Browse Source

签单客户新增显示剩余签单天数、更改资料查询查看下级更改为查看本部门

anderx 7 years ago
parent
commit
3fe7a708bb

+ 7 - 16
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -577,7 +577,7 @@
 	<select id="selectSignOrganizationCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
 		select 
 			t0.uid as uid,
-			t3.last_sign_time as lastSignTime,
+			date_format(t3.last_sign_time,'%Y-%m-%d %H:%I:%S') as lastSignTime,
 			t1.last_follow_time as lastFollowTime,
 			t2.society_tag as societyTag,
 			t2.identify_name as name,
@@ -1840,7 +1840,7 @@ from
 	on b.location_city=c1.id left join district_glossory c2 
 	on b.location_area=c2.id left join industry_category d 
 	on b.industry = d.id 
-	where 1=1 and a.status=0
+	where a.status=0
 		<if test="type !=null and type!=''">
 			and a.`type`=#{type,jdbcType=VARCHAR}
 			</if>
@@ -1881,15 +1881,9 @@ from
 		 order by a.create_time,a.nickname desc
 )x
 inner join(
-		select
-			id
-		from
-			admin
-		where
-			id = #{aid,jdbcType=VARCHAR}
-			or superior_id = #{aid,jdbcType=VARCHAR}
-	) y on
-	y.id = x.information_maintainer
+	select id from admin a
+	inner join (select department_id as depId from admin where id= #{aid,jdbcType=VARCHAR})b on a.department_id=b.depId
+	) y on y.id = x.information_maintainer
 		 <if test="page_sql != null">
     		${page_sql}
    		 </if>
@@ -1897,11 +1891,8 @@ inner join(
 	<select id="selectDepCustomerInformationCount" resultType="java.lang.Integer">
 		select count(0)
 			from user a left join organization_identity b 
-			on a.id=b.uid inner join (select id
-			from admin
-			where id=   #{aid,jdbcType=VARCHAR}
-			or superior_id=  #{aid,jdbcType=VARCHAR}
-			) y
+			on a.id=b.uid inner join (select id from admin a
+	inner join (select department_id as depId from admin where id= #{aid,jdbcType=VARCHAR} )b on a.department_id=b.depId) y
 			on y.id=a.information_maintainer
 			where 1=1 and a.status=0
 			<if test="type !=null and type!=''">

+ 2 - 2
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("/api/admin/customer")
+@RequestMapping("/open/api/admin/customer")
 public class AdminCustomerApiController extends BaseApiController{
 	@Resource
 	private CustomerService customerService;
@@ -1002,7 +1002,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		res.data(customerService.listCustomerInformation(cli,pageNo,pageSize));
 		return res;
 	}
-	/** 所属单位客户信息列表 **/
+	/** 部门单位客户信息列表 **/
 	@RequestMapping(value = "/listDepCustomerInformation", method = RequestMethod.POST)
 	public Result listDepCustomerInformation(CustomerListIn cli,Integer pageNo, Integer pageSize){
 		Result res = new Result();

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

@@ -1222,8 +1222,12 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 	public Pagination<CustomerListOut> listSignOrganizationCustomer(CustomerListIn cli, Integer pageNo,
 			Integer pageSize) {
 		cli.setAid(TokenManager.getAdminId());
+//		cli.setAid("1");
 		Map<String,Object> params = disposeParams(cli);
 		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectSignOrganizationCustomerList","selectSignOrganizationCustomerCount",params,pageNo,pageSize);
+		List<CustomerListOut> tmpList = (List<CustomerListOut>)list.getList();
+		setCustomerList(tmpList);
+		list.setList(tmpList);
 		return list;
 	}