albertshaw преди 8 години
родител
ревизия
643f27eea7
променени са 1 файла, в които са добавени 12 реда и са изтрити 14 реда
  1. 12 14
      src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

+ 12 - 14
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -63,20 +63,18 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 	public User insertRegister(User user, String contacts, String unitName, String username) {
 		userMapper.insert(user);
 		if (null != user.getType() && UserType.ORGANIZATION.getCode().equals(user.getType())) {
-			if (!StringUtils.isBlank(unitName) || !StringUtils.isBlank(contacts)) {
-				OrganizationIdentity organizationIdentity = new OrganizationIdentity();
-				organizationIdentity.setUid(user.getId());
-				organizationIdentity.setUnitName(StringUtils.isBlank(unitName) ? "" : unitName);
-				organizationIdentity.setContacts(StringUtils.isBlank(contacts) ? "" : contacts);
-				organizationIdentity.setId(UUID.randomUUID().toString());
-				organizationIdentity.setIdentityType(0);
-				organizationIdentity.setAuditStatus(0);
-				organizationIdentity.setProcess(0);
-				organizationIdentity.setWrongCount(0);
-				organizationIdentity.setListed(0);
-				organizationIdentity.setListedType(0);
-				organizationIdentityMapper.insert(organizationIdentity);
-			}
+			OrganizationIdentity organizationIdentity = new OrganizationIdentity();
+			organizationIdentity.setUid(user.getId());
+			organizationIdentity.setUnitName(StringUtils.isBlank(unitName) ? "" : unitName);
+			organizationIdentity.setContacts(StringUtils.isBlank(contacts) ? "" : contacts);
+			organizationIdentity.setId(UUID.randomUUID().toString());
+			organizationIdentity.setIdentityType(0);
+			organizationIdentity.setAuditStatus(0);
+			organizationIdentity.setProcess(0);
+			organizationIdentity.setWrongCount(0);
+			organizationIdentity.setListed(0);
+			organizationIdentity.setListedType(0);
+			organizationIdentityMapper.insert(organizationIdentity);
 		}
 
 		if (null != user.getType() && UserType.PERSONAL.getCode().equals(user.getType())) {