记得上下班打卡 | git大法好,push需谨慎

Commit a6d289fd authored by anjiabin's avatar anjiabin

提交chime社交相关

parent 1365abac
...@@ -41,69 +41,38 @@ public class ChimeUserController { ...@@ -41,69 +41,38 @@ public class ChimeUserController {
@ApiOperation(value = "社交用户注册") @ApiOperation(value = "社交用户注册")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "userId", value = "用户id"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "userId", value = "用户id"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "nickname", value = "昵称"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "sex", value = "性别"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "sex", value = "性别"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "tags", value = "兴趣标签[{\"tagCode\":\"tag1\",\"tagDesc\":\"tag描述\"},{\"tagCode\":\"tag2\",\"tagDesc\":\"tag描述2\"}]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "tags", value = "兴趣标签[{\"val\":\"tag1\",\"desc\":\"tag描述\"},{\"val\":\"tag2\",\"desc\":\"tag描述2\"}]"),
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "performanceId", value = "演出id") @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "operateType", value = "CREATE,UPDATE"),
}) })
@PostMapping(value = {"register"}) @PostMapping(value = {"register"})
public ResponseDto<String> register(@RequestParam @Validated String userId public ResponseDto<String> register(@RequestParam @Validated String userId
, @RequestParam @Validated String nickname
, @RequestParam @Validated String sex , @RequestParam @Validated String sex
, @RequestParam @Validated String tags , @RequestParam @Validated String tags
, @RequestParam @Validated String performanceId , @RequestParam @Validated String operateType
) { ) {
if(operateType.equalsIgnoreCase("CREATE")){
ChimeUserRegisterReqDto reqDto = ChimeUserRegisterReqDto.getNew(); ChimeUserRegisterReqDto reqDto = ChimeUserRegisterReqDto.getNew();
reqDto.setUserId(userId); reqDto.setUserId(userId);
reqDto.setNickName(nickname);
reqDto.setSex(sex); reqDto.setSex(sex);
reqDto.setTags(tags); reqDto.setTags(tags);
if(StringUtil.isNotEmpty(performanceId)){
reqDto.setPerformanceId(performanceId);
}else{
//云在场
reqDto.setPerformanceId("-1");
}
ChimeUserInfoDto chimeUserInfoDto = chimeUserService.createChimeUserInfo(reqDto); ChimeUserInfoDto chimeUserInfoDto = chimeUserService.createChimeUserInfo(reqDto);
if(StringUtil.isNull(chimeUserInfoDto)){ if(StringUtil.isNull(chimeUserInfoDto)){
return ResponseDto.failure("chime创建社交用户失败!"); return ResponseDto.failure("chime创建社交用户失败!");
} }
return ResponseDto.success("创建成功!"); return ResponseDto.success("创建成功!");
} }else if(operateType.equalsIgnoreCase("UPDATE")) {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "用户信息修改同步")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "userId", value = "用户id"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "nickname", value = "昵称"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "sex", value = "性别"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "tags", value = "兴趣标签(多个用逗号隔开)")
})
@PostMapping(value = {"updateUserTags"})
public ResponseDto<Boolean> updateUserTags(@RequestParam @Validated String userId
, @RequestParam @Validated String nickname
, @RequestParam @Validated String sex
, @RequestParam @Validated String tags
) {
ChimeUserUpdateReqDto reqDto = ChimeUserUpdateReqDto.getNew(); ChimeUserUpdateReqDto reqDto = ChimeUserUpdateReqDto.getNew();
reqDto.setUserId(userId); reqDto.setUserId(userId);
reqDto.setNickName(nickname);
reqDto.setSex(sex); reqDto.setSex(sex);
reqDto.setTags(tags); reqDto.setTags(tags);
//更新用户信息 //更新用户信息
Boolean rs = chimeUserService.updateUserInfo(reqDto); Boolean rs = chimeUserService.updateUserInfo(reqDto);
return ResponseDto.success(rs); if(!rs){
return ResponseDto.failure("更新社交用户信息失败!");
}
return ResponseDto.success(rs.toString());
}
return null;
} }
// @GetMapping("getUserByUserId")
// @ApiOperation("查询单个用户信息")
// @ApiImplicitParams({
// @ApiImplicitParam(type = "query", dataType = "String", name = "userId", value = "用户ID", required = true)
// })
// public ResponseDto<ChimeUserInfoDto> getUserByUserId(
// @RequestParam(defaultValue = "") String userId
// ) {
// ChimeUserInfoDto userInfoDto = chimeUserService.getUserByUserId(userId);
// return ResponseDto.success(userInfoDto);
// }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment