Browse Source

补充客户并领取开发

anderx 10 months ago
parent
commit
93cf47e968

+ 0 - 1
src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml

@@ -1118,7 +1118,6 @@
 
 
     <update id="updateServiceByUid" parameterType="com.goafanti.common.model.OrganizationIdentity">
-
     update organization_identity
     <set>
       <if test="contacts != null">

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

@@ -0,0 +1,131 @@
+package com.goafanti.customer.bo;
+
+public class InputUpdateAndReceiveCustomer {
+
+    private String id;
+    private String name;
+    private String orgCode;
+    private String contacts;
+    private String contactMobile;
+    private String societyTag;
+    private Integer province;
+    private Integer city;
+    private Integer area;
+    private String type;
+    private String intendedProject;
+    private String businessScope;
+    private String position;
+    private Integer level;
+
+    public Integer getLevel() {
+        return level;
+    }
+
+    public void setLevel(Integer level) {
+        this.level = level;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getOrgCode() {
+        return orgCode;
+    }
+
+    public void setOrgCode(String orgCode) {
+        this.orgCode = orgCode;
+    }
+
+    public String getContacts() {
+        return contacts;
+    }
+
+    public void setContacts(String contacts) {
+        this.contacts = contacts;
+    }
+
+    public String getContactMobile() {
+        return contactMobile;
+    }
+
+    public void setContactMobile(String contactMobile) {
+        this.contactMobile = contactMobile;
+    }
+
+    public String getSocietyTag() {
+        return societyTag;
+    }
+
+    public void setSocietyTag(String societyTag) {
+        this.societyTag = societyTag;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getIntendedProject() {
+        return intendedProject;
+    }
+
+    public void setIntendedProject(String intendedProject) {
+        this.intendedProject = intendedProject;
+    }
+
+    public String getBusinessScope() {
+        return businessScope;
+    }
+
+    public void setBusinessScope(String businessScope) {
+        this.businessScope = businessScope;
+    }
+
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String position) {
+        this.position = position;
+    }
+
+    public Integer getProvince() {
+        return province;
+    }
+
+    public void setProvince(Integer province) {
+        this.province = province;
+    }
+
+    public Integer getCity() {
+        return city;
+    }
+
+    public void setCity(Integer city) {
+        this.city = city;
+    }
+
+    public Integer getArea() {
+        return area;
+    }
+
+    public void setArea(Integer area) {
+        this.area = area;
+    }
+}

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

@@ -1694,4 +1694,17 @@ public class AdminCustomerApiController extends BaseApiController{
 		res.setData(customerService.checkUser(id));
 		return res;
 	}
+
+
+	/**
+	 * 补充客户并领取
+	 * @return
+	 */
+	@GetMapping("/updateAndReceiveCustomer")
+	public Result updateAndReceiveCustomer(InputUpdateAndReceiveCustomer in) {
+		Result res = new Result();
+		res.setData(customerService.updateAndReceiveCustomer(in));
+		receiveCustomer( in.getId(), null);
+		return res;
+	}
 }

+ 2 - 0
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -596,4 +596,6 @@ public interface CustomerService {
     Object updateMid(UserMid in);
 
     Object checkUser(String id);
+
+	Object updateAndReceiveCustomer(InputUpdateAndReceiveCustomer in);
 }

+ 20 - 0
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -3066,6 +3066,26 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return true;
 	}
 
+	@Override
+	public Object updateAndReceiveCustomer(InputUpdateAndReceiveCustomer in) {
+		User user = new User();
+		user.setId(in.getId());
+		user.setSocietyTag(in.getSocietyTag());
+		user.setLevel(in.getLevel());
+		userMapper.update(user);
+		OrganizationIdentity oi = new OrganizationIdentity();
+		oi.setUid(in.getId());
+		oi.setContacts(in.getContacts());
+		oi.setContactMobile(in.getContactMobile());
+		oi.setLocationProvince(in.getProvince());
+		oi.setLocationCity(in.getCity());
+		oi.setLocationArea(in.getArea());
+		oi.setIntendedProject(in.getIntendedProject());
+		oi.setBusinessScope(in.getBusinessScope());
+		organizationIdentityMapper.updateServiceByUid(oi);
+		return null;
+	}
+
 
 	private List<InputExcelUser> pushUserName(List<InputExcelUser> list) {
 		List<InputExcelUser> res=new ArrayList<>();