|
|
@ -118,14 +118,17 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS |
|
|
//生成企业统一信用代码盐
|
|
|
//生成企业统一信用代码盐
|
|
|
String salt = PasswordTools.encrypt(enterpriseInformation.getEnterpriseNumber()); |
|
|
String salt = PasswordTools.encrypt(enterpriseInformation.getEnterpriseNumber()); |
|
|
enterpriseInformation.setSalt(salt); |
|
|
enterpriseInformation.setSalt(salt); |
|
|
EnterpriseInformation info = enterpriseInformationMapper.selectEnterpriseInformationById(enterpriseInformation.getId()); |
|
|
|
|
|
|
|
|
//判断当前登录人是否已经在本系统中登记了企业信息
|
|
|
|
|
|
EnterpriseInformation enterpriseInformation1 = new EnterpriseInformation(); |
|
|
|
|
|
enterpriseInformation1.setEnterpriseNumber(enterpriseInformation.getEnterpriseNumber()); |
|
|
|
|
|
List<EnterpriseInformation> enterpriseInformations = enterpriseInformationMapper.selectEnterpriseInformationList(enterpriseInformation1); |
|
|
|
|
|
|
|
|
int i=0; |
|
|
int i=0; |
|
|
if (null!=info && null != info.getId()) { |
|
|
if(enterpriseInformations.size() == 0){ |
|
|
i = enterpriseInformationMapper.updateEnterpriseInformationByEnterpriseNumber(enterpriseInformation); |
|
|
|
|
|
} else { |
|
|
|
|
|
System.out.println("````````````````````````````````````````"); |
|
|
|
|
|
System.out.println(enterpriseInformation.getEnterpriseName()); |
|
|
|
|
|
i = enterpriseInformationMapper.insertEnterpriseInformation(enterpriseInformation); |
|
|
i = enterpriseInformationMapper.insertEnterpriseInformation(enterpriseInformation); |
|
|
|
|
|
} else { |
|
|
|
|
|
i = enterpriseInformationMapper.updateEnterpriseInformationByEnterpriseNumber(enterpriseInformation); |
|
|
} |
|
|
} |
|
|
if(i > 0){ |
|
|
if(i > 0){ |
|
|
String text = salt; |
|
|
String text = salt; |
|
|
|