fix: 修复绑定微信用户参数校验及初始化余额问题
修正绑定微信小程序用户时的参数校验逻辑,增加corpid参数检查 调整用户绑定成功后初始化余额从1000改为100000 修复绑定成功返回值逻辑错误
This commit is contained in:
parent
f1956d28b1
commit
13ba9efe63
|
|
@ -103,7 +103,8 @@ public class Ab98UserController extends BaseController {
|
||||||
@AccessLog(title = "ab98用户管理", businessType = BusinessTypeEnum.MODIFY)
|
@AccessLog(title = "ab98用户管理", businessType = BusinessTypeEnum.MODIFY)
|
||||||
@PostMapping("/bindWxMpUser")
|
@PostMapping("/bindWxMpUser")
|
||||||
public ResponseDTO<String> bindWxMpUser(@RequestBody BindWxMpUserCommand command) {
|
public ResponseDTO<String> bindWxMpUser(@RequestBody BindWxMpUserCommand command) {
|
||||||
if (command == null || StringUtils.isBlank(command.getDynamicCode()) || StringUtils.isBlank(command.getName()) || StringUtils.isBlank(command.getIdNum())) {
|
if (command == null || StringUtils.isBlank(command.getDynamicCode()) || StringUtils.isBlank(command.getName())
|
||||||
|
|| StringUtils.isBlank(command.getIdNum()) || StringUtils.isBlank(command.getCorpid())) {
|
||||||
log.error("绑定微信小程序用户到汇邦云参数错误: {}", JSONUtil.toJsonStr(command));
|
log.error("绑定微信小程序用户到汇邦云参数错误: {}", JSONUtil.toJsonStr(command));
|
||||||
return ResponseDTO.fail(new ApiException(ErrorCode.Client.COMMON_REQUEST_PARAMETERS_INVALID, "参数错误"));
|
return ResponseDTO.fail(new ApiException(ErrorCode.Client.COMMON_REQUEST_PARAMETERS_INVALID, "参数错误"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -360,11 +360,10 @@ public class WxUserApplicationService {
|
||||||
if (wxUserEntity != null) {
|
if (wxUserEntity != null) {
|
||||||
wxUserEntity.setAb98UserId(ab98UserEntity.getAb98UserId());
|
wxUserEntity.setAb98UserId(ab98UserEntity.getAb98UserId());
|
||||||
userService.updateById(wxUserEntity);
|
userService.updateById(wxUserEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
ab98UserApplicationService.createAb98UserBalance(ab98UserEntity.getAb98UserId(), command.getCorpid(), 100000L);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ab98UserApplicationService.createAb98UserBalance(ab98UserEntity.getAb98UserId(), command.getCorpid(), 1000L);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue