1.用户注册时,根据运行参数中设置的参数判断是否校验企业名称,修复不校验的情况下公司ID为空报错的问题

master
x_z 3 years ago
parent b6dfe40c5a
commit 9e4f569138

@ -1,5 +1,6 @@
package com.glxp.sale.admin.controller.auth;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.annotation.AuthRuleAnnotation;
@ -221,10 +222,13 @@ public class RegisterController {
return ResultVOUtils.error(500, "该手机号已被注册");
}
CustomerInfoEntity customerInfoEntity = customerInfoService.selectById(Long.parseLong(userRegisterEntity.getCompanyId()));
if (customerInfoEntity != null)
return ResultVOUtils.error(500, "该企业已被注册!");
String company_check = systemParamConfigService.selectValueByParamKey("register_company_check");
if (StrUtil.isNotBlank(company_check) && company_check.equals("1")) {
//新用户注册时根据往来单位字典进行企业名称校验
CustomerInfoEntity customerInfoEntity = customerInfoService.selectById(Long.parseLong(userRegisterEntity.getCompanyId()));
if (customerInfoEntity != null)
return ResultVOUtils.error(500, "该企业已被注册!");
}
userRegisterEntity.setRegisterTime(DateUtil.getDateTime());
userRegisterEntity.setCheckType(0);//未审核

Loading…
Cancel
Save