|
@@ -1,6 +1,7 @@
|
|
|
package com.zanxiang.game.module.sdk.controller;
|
|
|
|
|
|
|
|
|
+import com.zanxiang.game.module.mybatis.entity.Game;
|
|
|
import com.zanxiang.game.module.sdk.annotation.UnSignCheck;
|
|
|
import com.zanxiang.game.module.sdk.annotation.ValidLogin;
|
|
|
import com.zanxiang.game.module.sdk.enums.DataTypeEnum;
|
|
@@ -10,11 +11,13 @@ import com.zanxiang.game.module.sdk.pojo.vo.GameShareVO;
|
|
|
import com.zanxiang.game.module.sdk.pojo.vo.UserLoginVO;
|
|
|
import com.zanxiang.game.module.sdk.pojo.vo.UserVO;
|
|
|
import com.zanxiang.game.module.sdk.service.*;
|
|
|
+import com.zanxiang.module.util.JsonUtil;
|
|
|
import com.zanxiang.module.util.pojo.ResultVO;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiResponse;
|
|
|
import io.swagger.annotations.ApiResponses;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -29,6 +32,7 @@ import java.util.Objects;
|
|
|
*/
|
|
|
@Api(tags = "用户接口")
|
|
|
@RestController
|
|
|
+@Slf4j
|
|
|
@RequestMapping(value = "/api/user")
|
|
|
public class UserController {
|
|
|
|
|
@@ -50,6 +54,9 @@ public class UserController {
|
|
|
@Autowired
|
|
|
private IMsgSceneCheckService msgSceneCheckService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IGameService gameService;
|
|
|
+
|
|
|
@ApiOperation(value = "游戏分享信息")
|
|
|
@GetMapping("/share/game")
|
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameShareVO.class)})
|
|
@@ -111,6 +118,10 @@ public class UserController {
|
|
|
@PostMapping("/update/game/role")
|
|
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
|
|
|
public ResultVO<Boolean> updateUserGameRole(@Validated @RequestBody GameUserRoleUpdateParam param, @ValidLogin UserData userData) {
|
|
|
+ Game game = gameService.getById(userData.getGameId());
|
|
|
+ if (game != null && Objects.equals(game.getSuperGameId(), 3L)) {
|
|
|
+ log.error("梦幻修仙游戏玩家角色信息上报, param : {}, userData : {}", JsonUtil.toString(param), JsonUtil.toString(userData));
|
|
|
+ }
|
|
|
Boolean result = gameUserRoleService.updateUserGameRole(param, userData);
|
|
|
//创建角色通知监听服务
|
|
|
if (Objects.equals(param.getDataType(), DataTypeEnum.TYPE_CREATE_ROLE.getDateType())) {
|