Browse Source

新增渠道BUG修复

anderx 8 months ago
parent
commit
989e3a1592

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

@@ -451,6 +451,7 @@
 		select
 			a.id as uid,
 			a.nickname as name,
+			a.aid,
 			a.create_time as createTime,
 			a.transfer_time as transferTime,
 			a.sign_bills signBills,

+ 7 - 0
src/main/java/com/goafanti/customer/bo/CustomerListOut.java

@@ -70,8 +70,15 @@ public class CustomerListOut extends CustomerListIn{
 	private Integer channel;
 	/** 渠道 0否 1是 */
 	private Integer newChannel;
+	private Integer myUser;
 
+	public Integer getMyUser() {
+		return myUser;
+	}
 
+	public void setMyUser(Integer myUser) {
+		this.myUser = myUser;
+	}
 
 	public Integer getNewChannel() {
 		return newChannel;

+ 11 - 1
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -208,8 +208,15 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
 		cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PUBLIC));
 		Map<String, Object> params = disposeParams(cli);
-        return (Pagination<CustomerListOut>) findPage("selectPublicOrganizationCustomerList",
+		Pagination<CustomerListOut> page = (Pagination<CustomerListOut>) findPage("selectPublicOrganizationCustomerList",
 				"selectPublicOrganizationCustomerCount", params, pageNo, pageSize);
+		List<CustomerListOut> list = (List<CustomerListOut>) page.getList();
+		list.forEach(e -> {
+			if (e.getAid().equals(TokenManager.getAdminId())){
+				e.setMyUser(1);
+			}
+		});
+		return page;
 	}
 
 	@Override
@@ -250,6 +257,9 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			if (null != c) {
 				if (null != c.getAid())
 					c.setAdminName(adminMapper.selectNameByid(c.getAid()));
+					if (c.getAid().equals(TokenManager.getAdminId())){
+						c.setMyUser(1);
+					}
 				if (null != c.getShareType() && c.getShareType().equals("1"))
 					c.setAdminName("暂无");
 				if (null != c.getMid())