回溯提交:ArtList 清理微信号必填遗留校验与前端提示
自动发布开发环境 Nacos 配置 / publish (push) Successful in 26s

This commit is contained in:
2026-11-08 15:31:39 +08:00
parent 2eefae834a
commit ae5bc3ef2b
3 changed files with 3 additions and 18 deletions
@@ -390,7 +390,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserDO> implements
String validatedPhone = validateUserPhone(userDTO.getPhone(), null, true);
Integer userType = userDTO.getType();
String validatedWechatId = UserProfileFieldSupport.normalizeOptionalText(userDTO.getWechatId());
UserProfileFieldSupport.requireWechatIdForServiceUser(userType, validatedWechatId);
/**
* Run business method `ensureShopBindingRequirement`.
@@ -598,7 +597,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserDO> implements
userDO.setVipId(userDTO.getVipId());
}
Integer targetUserType = userDO.getType();
UserProfileFieldSupport.requireWechatIdForServiceUser(targetUserType, userDO.getWechatId());
List<Long> validatedShopIds = null;
boolean shopBindingChanged = userDTO.getShopIds() != null || userDTO.getShopId() != null;
if (shopBindingChanged) {
@@ -1732,7 +1730,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserDO> implements
if (userDTO.getWechatQrCode() != null) {
userDO.setWechatQrCode(normalizeStoredProfileImage(userDTO.getWechatQrCode()));
}
UserProfileFieldSupport.requireWechatIdForServiceUser(userDO.getType(), userDO.getWechatId());
userDO.setUpdateTime(LocalDateTime.now());
boolean updated = userMapper.updateById(userDO) > 0;
@@ -13,11 +13,4 @@ public final class UserProfileFieldSupport {
}
return value.trim();
}
public static void requireWechatIdForServiceUser(Integer userType, String wechatId) {
if ((Integer.valueOf(2).equals(userType) || Integer.valueOf(3).equals(userType))
&& !StringUtils.hasText(wechatId)) {
throw new IllegalArgumentException("店长和美甲师的微信号不能为空");
}
}
}