This commit is contained in:
+3
-1
@@ -5,6 +5,7 @@ import com.xiaowang.jayucloud.salon.core.support.privacy.PhoneCrypto;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -67,7 +68,8 @@ public class MyMetaObjectHandler implements MetaObjectHandler {
|
||||
return;
|
||||
}
|
||||
Object value = metaObject.getValue(source);
|
||||
String hash = value == null ? null : PhoneCrypto.current().index(String.valueOf(value));
|
||||
String text = value == null ? null : String.valueOf(value).trim();
|
||||
String hash = !StringUtils.hasText(text) ? null : PhoneCrypto.current().index(text);
|
||||
metaObject.setValue(target, hash);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -384,7 +384,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserDO> implements
|
||||
if (userDTO == null || !Integer.valueOf(3).equals(userDTO.getType())) throw new IllegalArgumentException("仅支持新增美甲师");
|
||||
if (shopId == null || shopId <= 0) throw new IllegalArgumentException("门店不能为空");
|
||||
if (!StringUtils.hasText(userDTO.getNickname())) throw new IllegalArgumentException("美甲师姓名不能为空");
|
||||
String phone = validateUserPhone(userDTO.getPhone(), null, true);
|
||||
String phone = validateUserPhone(userDTO.getPhone(), null, false);
|
||||
UserDO userDO = new UserDO();
|
||||
userDO.setShopId(shopId);
|
||||
userDO.setNickname(userDTO.getNickname().trim());
|
||||
|
||||
Reference in New Issue
Block a user