Browse Source

用户新增用户等级字段,私有企业客户新增用户等级筛选,列表同步页新增

anderx 7 years ago
parent
commit
dccecc0e65

+ 9 - 2
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -409,6 +409,7 @@
 			  	date_format(t0.create_time,'%Y-%m-%d %H:%i:%S') as createTime,
 			   	t0.identify_name as name,
 			   	t0.society_tag as societyTag,
+			   	t0.level,
 			   	date_format(t1.last_follow_time,'%Y-%m-%d %H:%i:%S') as lastFollowTime,
 			   	date_format(t2.last_sign_time,'%Y-%m-%d %H:%i:%S') as lastSignTime,
 				b.contacts,
@@ -420,7 +421,7 @@
 				if(t0.transfer_time < t1.last_follow_time,t1.last_follow_time,t0.transfer_time) as orderTime,
 				d.name as adminName
 		from 
-			(select id,aid,type,share_type,transfer_time,create_time,identify_name,society_tag from user where aid = #{aid} and type = 1 and share_type = 0 and status != 1)t0
+			(select id,aid,type,share_type,transfer_time,create_time,identify_name,society_tag,level from user where aid = #{aid} and type = 1 and share_type = 0 and status != 1)t0
 		left join 
 			(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
 		on t0.id = t1.uid left join 
@@ -453,6 +454,9 @@
 		<if test="area != null">
 			and b.location_area = #{area,jdbcType=INTEGER}
 		</if>
+		<if test="level != null">
+			and t0.level = #{level,jdbcType=INTEGER}
+		</if>
 		 order by orderTime 
 		 <if test="page_sql != null">
     		${page_sql}
@@ -462,7 +466,7 @@
 		select 
 			count(0)	
 		from 
-			(select id,aid,type,share_type,transfer_time,identify_name,society_tag from user where aid = #{aid} and type = 1 and share_type = 0 and status != 1)t0
+			(select id,aid,type,share_type,transfer_time,identify_name,society_tag,level from user where aid = #{aid} and type = 1 and share_type = 0 and status != 1)t0
 		left join organization_identity b on t0.id = b.uid where 1=1
 		<if test="aid != null and aid !=''">
 			and t0.aid = #{aid,jdbcType=VARCHAR}
@@ -485,6 +489,9 @@
 		<if test="area != null">
 			and b.location_area = #{area,jdbcType=INTEGER}
 		</if>
+		<if test="level != null">
+			and t0.level = #{level,jdbcType=INTEGER}
+		</if>
 	</select>
 	<select id="selectPublicOrganizationCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
 		select

+ 10 - 0
src/main/java/com/goafanti/customer/bo/CustomerListIn.java

@@ -56,6 +56,8 @@ public class CustomerListIn {
 	private Integer creditRating;
 	
 	private String departmentId;
+
+	private String level;
 	
 	
 	public String getType() {
@@ -209,4 +211,12 @@ public class CustomerListIn {
 	public void setDepartmentId(String departmentId) {
 		this.departmentId = departmentId;
 	}
+
+	public String getLevel() {
+		return level;
+	}
+
+	public void setLevel(String level) {
+		this.level = level;
+	}
 }

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

@@ -50,6 +50,8 @@ public class CustomerListOut extends CustomerListIn{
 	
 	private String mid;
 	
+	private String level;
+	
 	public String getAuditOpinion() {
 		return auditOpinion;
 	}
@@ -184,4 +186,12 @@ public class CustomerListOut extends CustomerListIn{
 	public void setMid(String mid) {
 		this.mid = mid;
 	}
+
+	public String getLevel() {
+		return level;
+	}
+
+	public void setLevel(String level) {
+		this.level = level;
+	}
 }

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

@@ -50,7 +50,7 @@ import com.goafanti.customer.bo.UserDetailBo;
 import com.goafanti.customer.service.CustomerService;
 
 @RestController
-@RequestMapping("/open/api/admin/customer")
+@RequestMapping("/api/admin/customer")
 public class AdminCustomerApiController extends BaseApiController{
 	@Resource
 	private CustomerService customerService;

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

@@ -141,7 +141,8 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 	@Override
 	public Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
-		cli.setAid(TokenManager.getAdminId());
+//		cli.setAid(TokenManager.getAdminId());
+		cli.setAid("1");
 		cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PRIVATE));
 		Map<String,Object> params = disposeParams(cli);
 		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPrivateOrganizationCustomerList","selectPrivateOrganizationCustomerCount",params,pageNo,pageSize);
@@ -207,6 +208,7 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 		if(StringUtils.isNotBlank(cli.getStartDate())) params.put("startDate", cli.getStartDate()+" 00:00:00");
 		if(StringUtils.isNotBlank(cli.getEndDate())) params.put("endDate", cli.getEndDate()+" 23:59:59");
 		if(null!=cli.getDataGrade()) params.put("dataGrade", cli.getDataGrade());
+		if(null!=cli.getLevel())params.put("level", cli.getLevel());
 		return params;
 	}