From 9e4f569138c9e929d9837550a463e9e4a8093c88 Mon Sep 17 00:00:00 2001 From: x_z Date: Mon, 16 May 2022 14:19:56 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=94=A8=E6=88=B7=E6=B3=A8=E5=86=8C=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=A0=B9=E6=8D=AE=E8=BF=90=E8=A1=8C=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=B8=AD=E8=AE=BE=E7=BD=AE=E7=9A=84=E5=8F=82=E6=95=B0=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=98=AF=E5=90=A6=E6=A0=A1=E9=AA=8C=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=B8=8D=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E5=85=AC=E5=8F=B8?= =?UTF-8?q?ID=E4=B8=BA=E7=A9=BA=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/auth/RegisterController.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/auth/RegisterController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/auth/RegisterController.java index 6f5ef5c..14d3bc0 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/auth/RegisterController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/auth/RegisterController.java @@ -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);//未审核