|
@@ -1,10 +1,10 @@
|
|
|
package com.fs.app.controller.game;
|
|
package com.fs.app.controller.game;
|
|
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
|
|
import com.fs.app.annotation.Login;
|
|
import com.fs.app.annotation.Login;
|
|
|
|
|
+import com.fs.app.controller.AppBaseController;
|
|
|
import com.fs.common.core.domain.R;
|
|
import com.fs.common.core.domain.R;
|
|
|
-import com.fs.his.domain.FsUser;
|
|
|
|
|
-import com.fs.his.service.IFsUserService;
|
|
|
|
|
|
|
+import com.fs.his.param.FsUserAddIntegralParam;
|
|
|
|
|
+import com.fs.his.service.IFsUserIntegralLogsService;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -12,19 +12,21 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/player")
|
|
@RequestMapping("/player")
|
|
|
-public class PlayerController {
|
|
|
|
|
|
|
+public class PlayerController extends AppBaseController {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- private IFsUserService fsUserService;
|
|
|
|
|
|
|
+ private IFsUserIntegralLogsService userIntegralLogsService;
|
|
|
|
|
|
|
|
@Login
|
|
@Login
|
|
|
@PostMapping("/updateCurrency")
|
|
@PostMapping("/updateCurrency")
|
|
|
@ApiOperation("玩家货币更新")
|
|
@ApiOperation("玩家货币更新")
|
|
|
- public R updateCurrency(@RequestBody FsUser player){
|
|
|
|
|
- Boolean flag=fsUserService.updateFsUser(player)>0;
|
|
|
|
|
- return R.ok().put("flag",flag);
|
|
|
|
|
|
|
+ public R updateCurrency(@RequestBody FsUserAddIntegralParam param){
|
|
|
|
|
+ param.setUserId(Long.parseLong(getUserId()));
|
|
|
|
|
+ param.setType(3);//游戏添加积分
|
|
|
|
|
+ return userIntegralLogsService.addIntegral(param);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|