|
@@ -1054,13 +1054,9 @@ public class StoreUserServiceImpl extends ServiceImpl<StoreUserMapper, StoreUser
|
|
|
if (isStoreUserLogoutCooling(storeUser) || isStoreUserLoggedOut(storeUser)) {
|
|
if (isStoreUserLogoutCooling(storeUser) || isStoreUserLoggedOut(storeUser)) {
|
|
|
throw new IllegalArgumentException("账号已在注销流程中");
|
|
throw new IllegalArgumentException("账号已在注销流程中");
|
|
|
}
|
|
}
|
|
|
- // 添加注销原因
|
|
|
|
|
storeUser.setLogoutReason(storeUserVo.getLogoutReason());
|
|
storeUser.setLogoutReason(storeUserVo.getLogoutReason());
|
|
|
- // 添加注销code
|
|
|
|
|
storeUser.setLogoutCode(storeUserVo.getLogoutCode());
|
|
storeUser.setLogoutCode(storeUserVo.getLogoutCode());
|
|
|
- // 注销冷静期
|
|
|
|
|
storeUser.setLogoutFlag(StoreUser.LOGOUT_FLAG_COOLING);
|
|
storeUser.setLogoutFlag(StoreUser.LOGOUT_FLAG_COOLING);
|
|
|
- // 添加注销申请时间
|
|
|
|
|
storeUser.setLogoutTime(new Date());
|
|
storeUser.setLogoutTime(new Date());
|
|
|
int num = storeUserMapper.updateById(storeUser);
|
|
int num = storeUserMapper.updateById(storeUser);
|
|
|
if (num > 0) {
|
|
if (num > 0) {
|
|
@@ -1109,17 +1105,7 @@ public class StoreUserServiceImpl extends ServiceImpl<StoreUserMapper, StoreUser
|
|
|
if (!isStoreUserLogoutCooling(storeUser)) {
|
|
if (!isStoreUserLogoutCooling(storeUser)) {
|
|
|
throw new IllegalArgumentException("当前账号不在注销冷静期内,无法撤销");
|
|
throw new IllegalArgumentException("当前账号不在注销冷静期内,无法撤销");
|
|
|
}
|
|
}
|
|
|
- // 修改注销标记为0
|
|
|
|
|
storeUser.setLogoutFlag(StoreUser.LOGOUT_FLAG_NORMAL);
|
|
storeUser.setLogoutFlag(StoreUser.LOGOUT_FLAG_NORMAL);
|
|
|
- // 注销状态变为可用
|
|
|
|
|
- if (storeUser.getStatus() != null && storeUser.getStatus() == -1) {
|
|
|
|
|
- storeUser.setStatus(0);
|
|
|
|
|
- }
|
|
|
|
|
- // 清空注销原因
|
|
|
|
|
- storeUser.setLogoutReason("");
|
|
|
|
|
- // 清空注销code
|
|
|
|
|
- storeUser.setLogoutCode("");
|
|
|
|
|
- // 清空注销申请时间
|
|
|
|
|
storeUser.setLogoutTime(null);
|
|
storeUser.setLogoutTime(null);
|
|
|
int num = storeUserMapper.updateById(storeUser);
|
|
int num = storeUserMapper.updateById(storeUser);
|
|
|
if (num > 0) {
|
|
if (num > 0) {
|