yfh 2 settimane fa
parent
commit
87437da95c

+ 30 - 0
fs-user-app/src/main/java/com/fs/app/controller/game/PlayerController.java

@@ -0,0 +1,30 @@
+package com.fs.app.controller.game;
+
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.fs.app.annotation.Login;
+import com.fs.common.core.domain.R;
+import com.fs.his.domain.FsUser;
+import com.fs.his.service.IFsUserService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/player")
+public class PlayerController {
+
+    @Autowired
+    private IFsUserService fsUserService;
+
+    @Login
+    @PostMapping("/updateCurrency")
+    @ApiOperation("玩家货币更新")
+    public R updateCurrency(@RequestBody FsUser player){
+        Boolean  flag=fsUserService.updateFsUser(player)>0;
+        return R.ok().put("flag",flag);
+    }
+
+}