Compare commits
No commits in common. "905de45218cb9089ce659d9f2da4ca797037402c" and "2d63d0715e86b2beb15b1356312af3950b34e679" have entirely different histories.
905de45218
...
2d63d0715e
|
|
@ -38,12 +38,6 @@ public class AppUserController {
|
||||||
return userService.sendPhoneCode(cmd);
|
return userService.sendPhoneCode(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("密码找回")
|
|
||||||
@PostMapping("/passwordRecover")
|
|
||||||
public SingleResponse<UserCO> passwordRecover(@Validated @RequestBody AppUserRegisterCmd cmd) {
|
|
||||||
return userService.passwordRecover(cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("注册用户")
|
@ApiOperation("注册用户")
|
||||||
@PostMapping("/register")
|
@PostMapping("/register")
|
||||||
public SingleResponse<UserCO> register(@Validated @RequestBody AppUserRegisterCmd cmd) {
|
public SingleResponse<UserCO> register(@Validated @RequestBody AppUserRegisterCmd cmd) {
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,6 @@ public class UserAddExe {
|
||||||
if(phoneCodeObj == null || !phoneCodeObj.toString().equals(cmd.getPhoneCode())){
|
if(phoneCodeObj == null || !phoneCodeObj.toString().equals(cmd.getPhoneCode())){
|
||||||
throw new BizException("验证码已过期或错误");
|
throw new BizException("验证码已过期或错误");
|
||||||
}
|
}
|
||||||
zcloudRedisUtil.del(RedisConstant.PHONE_CODE_KEY + cmd.getPhone());
|
|
||||||
|
|
||||||
CorpInfoDO corpInfoDO = corpInfoRepository.getCorpInfoByCorpName("相关方通用租户");
|
CorpInfoDO corpInfoDO = corpInfoRepository.getCorpInfoByCorpName("相关方通用租户");
|
||||||
if(corpInfoDO == null){
|
if(corpInfoDO == null){
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import com.alibaba.cola.dto.Response;
|
||||||
import com.alibaba.cola.exception.BizException;
|
import com.alibaba.cola.exception.BizException;
|
||||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||||
import com.jjb.saas.system.client.user.facade.UserFacade;
|
import com.jjb.saas.system.client.user.facade.UserFacade;
|
||||||
import com.zcloud.basic.info.constant.RedisConstant;
|
|
||||||
import com.zcloud.basic.info.domain.enums.UserChangeRecordStatusEnum;
|
import com.zcloud.basic.info.domain.enums.UserChangeRecordStatusEnum;
|
||||||
import com.zcloud.basic.info.domain.enums.UserEmploymentFlagEnum;
|
import com.zcloud.basic.info.domain.enums.UserEmploymentFlagEnum;
|
||||||
import com.zcloud.basic.info.domain.enums.UserFlowFlagEnum;
|
import com.zcloud.basic.info.domain.enums.UserFlowFlagEnum;
|
||||||
|
|
@ -53,7 +52,6 @@ public class UserUpdateExe {
|
||||||
private final UserCorpRecordGateway userCorpRecordGateway;
|
private final UserCorpRecordGateway userCorpRecordGateway;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
private UserFacade userFacade;
|
private UserFacade userFacade;
|
||||||
private ZcloudRedisUtil zcloudRedisUtil;
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void execute(UserUpdateCmd userUpdateCmd) {
|
public void execute(UserUpdateCmd userUpdateCmd) {
|
||||||
|
|
@ -114,28 +112,6 @@ public class UserUpdateExe {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public boolean execute(AppUserRegisterCmd cmd) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UserE userE = new UserE();
|
|
||||||
userE.checkPassword(cmd.getPassword(), cmd.getConfirmPassword());
|
|
||||||
|
|
||||||
// 获取redis验证码
|
|
||||||
Object phoneCodeObj = zcloudRedisUtil.get(RedisConstant.PHONE_CODE_KEY + cmd.getPhone());
|
|
||||||
if(phoneCodeObj == null || !phoneCodeObj.toString().equals(cmd.getPhoneCode())){
|
|
||||||
throw new BizException("验证码已过期或错误");
|
|
||||||
}
|
|
||||||
zcloudRedisUtil.del(RedisConstant.PHONE_CODE_KEY + cmd.getPhone());
|
|
||||||
|
|
||||||
BeanUtils.copyProperties(cmd, userE);
|
|
||||||
userE.encryptionPassword();
|
|
||||||
userGateway.updatePassword(userE);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void executeChangePassword(Long id) {
|
public void executeChangePassword(Long id) {
|
||||||
|
|
|
||||||
|
|
@ -55,12 +55,6 @@ public class UserServiceImpl implements UserServiceI {
|
||||||
return SingleResponse.buildSuccess();
|
return SingleResponse.buildSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public SingleResponse<UserCO> passwordRecover(AppUserRegisterCmd cmd) {
|
|
||||||
userUpdateExe.execute(cmd);
|
|
||||||
return SingleResponse.buildSuccess();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SingleResponse<UserCO> perfectUserInfo(AppUserInfoCmd cmd) {
|
public SingleResponse<UserCO> perfectUserInfo(AppUserInfoCmd cmd) {
|
||||||
userAddExe.execute(cmd);
|
userAddExe.execute(cmd);
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,6 @@ public interface UserServiceI {
|
||||||
|
|
||||||
SingleResponse<UserCO> register(AppUserRegisterCmd cmd);
|
SingleResponse<UserCO> register(AppUserRegisterCmd cmd);
|
||||||
|
|
||||||
SingleResponse<UserCO> passwordRecover(AppUserRegisterCmd cmd);
|
|
||||||
|
|
||||||
SingleResponse<UserCO> perfectUserInfo(AppUserInfoCmd cmd);
|
SingleResponse<UserCO> perfectUserInfo(AppUserInfoCmd cmd);
|
||||||
|
|
||||||
SingleResponse<UserCO> onboarding(AppUserOnboardingCmd cmd);
|
SingleResponse<UserCO> onboarding(AppUserOnboardingCmd cmd);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue