Browse Source

检查客户填写信息修改

anderx 10 months ago
parent
commit
b6196abffe

+ 3 - 3
src/main/java/com/goafanti/customer/bo/InputUpdateAndReceiveCustomer.java

@@ -11,7 +11,7 @@ public class InputUpdateAndReceiveCustomer {
     private Integer province;
     private Integer city;
     private Integer area;
-    private String type;
+    private Integer type;
     private String intendedProject;
     private String businessScope;
     private String position;
@@ -73,11 +73,11 @@ public class InputUpdateAndReceiveCustomer {
         this.societyTag = societyTag;
     }
 
-    public String getType() {
+    public Integer getType() {
         return type;
     }
 
-    public void setType(String type) {
+    public void setType(Integer type) {
         this.type = type;
     }
 

+ 3 - 0
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -1696,6 +1696,9 @@ public class AdminCustomerApiController extends BaseApiController{
 	}
 
 
+
+
+
 	/**
 	 * 补充客户并领取
 	 * @return

+ 19 - 7
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -3057,13 +3057,25 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	public Object checkUser(String id) {
 		User user = userMapper.queryById(id);
 		OrganizationIdentity oi = organizationIdentityMapper.selectOrgIdentityByUserId(id);
-		if (user==null||user.getNickname()==null||oi.getOrgCode()==null||oi.getContacts()==null||
-				oi.getContactMobile()==null||user.getSocietyTag()==null||oi.getLocationProvince()==null||
-				oi.getLocationCity()==null||oi.getLocationArea()==null||user.getType()==null||oi.getIntendedProject()==null||
-				oi.getBusinessScope()==null||user.getLevel()==null){
-			return false;
-		}
-		return true;
+		return getInputUpdateAndReceiveCustomer(user, oi);
+	}
+
+	private InputUpdateAndReceiveCustomer getInputUpdateAndReceiveCustomer(User user, OrganizationIdentity oi) {
+		InputUpdateAndReceiveCustomer out = new InputUpdateAndReceiveCustomer();
+		out.setId(user.getId());
+		out.setName(user.getNickname());
+		out.setOrgCode(oi.getOrgCode());
+		out.setContacts(oi.getContacts());
+		out.setContactMobile(oi.getContactMobile());
+		out.setSocietyTag(user.getSocietyTag());
+		out.setType(user.getType());
+		out.setIntendedProject(oi.getIntendedProject());
+		out.setBusinessScope(oi.getBusinessScope());
+		out.setProvince(oi.getLocationProvince());
+		out.setCity(oi.getLocationCity());
+		out.setArea(oi.getLocationArea());
+		out.setLevel(user.getLevel());
+		return out;
 	}
 
 	@Override