Commit 7b9b9efa by xugaojun

添加导购:修改字段校验逻辑

parent 4c14d9f1
......@@ -249,12 +249,20 @@ public class ClerkController extends WebBaseController{
String nationcode = staffDTO.getNationCode();
String postion = staffDTO.getPostion();
Integer sex = staffDTO.getSex();
if(StringUtils.isAnyBlank(staffName,commitName)) {
if(StringUtils.isAnyBlank(staffName, commitName)) {
return resultResponse(HaoBanErrCode.ERR_10004);
}
if(!GooglePhoneNumberUtil.checkPhoneNumber(phoneNumber, nationcode)){
if (StringUtils.isEmpty(clerkCode)) {
return resultResponse(HaoBanErrCode.ERR_111116);
}
if(StringUtils.isNotEmpty(phoneNumber) &&
!GooglePhoneNumberUtil.checkPhoneNumber(phoneNumber, nationcode)){
return resultResponse(HaoBanErrCode.ERR_10012);
}
// 导购code校验-字母和数字
if (!clerkCode.matches("[a-zA-Z0-9]")) {
return resultResponse(HaoBanErrCode.ERR_10023);
}
if(version == null){
StaffDTO staff = staffApiService.selectByNationcodeAndPhoneNumber(wxEnterpriseId,nationcode,phoneNumber);
if(staff != null) {
......
......@@ -218,6 +218,8 @@ public enum HaoBanErrCode {
ERR_10022(10022, "已有刷新在执行中,请不要重复刷新"),
ERR_10023(10023, "code格式不正确"),
ERR_11122(11122,"手机号已存在"),
ERR_11123(11123, "请到好办端刷新企业微信好友"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment