Browse Source

按客户名称搜索客户修改分为默认和APP公出

anderx 2 years ago
parent
commit
0475062cfd

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

@@ -2209,12 +2209,18 @@ inner join(
   <select id="getUserByNameList" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerSimpleBo">
   	select id,nickname name from `user` where type = 1 and status =0 and source in (1,2,3)
 	and nickname like concat('%',#{name},'%')
+	<if test="type==1">
+	and share_type in (0,2,3,4)
+	</if>
   	<if test="page_sql != null">
    		${page_sql}
 	</if>
     </select>
     <select id="getUserByNameCount" resultType="java.lang.Integer" >
   	select count(*) from `user` where type = 1 and status =0 and source in (1,2,3) and  nickname like concat('%',#{name},'%')
+		<if test="type==1">
+			and share_type in (0,2,3,4)
+		</if>
     </select>
     <select id="getAllUser" resultType="com.goafanti.common.bo.OutUser">
 		select id,name ,province ,name_mobile nameMobile from user_now

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

@@ -2468,7 +2468,9 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			Admin admin = adminMapper.selectByPrimaryKey(TokenManager.getAdminId());
 			if (admin.getPublicPurview()==0){
 				//根据白名单设置查询权限
-				//params.put("type", name);
+				params.put("type", 1);
+			}else {
+				params.put("type", 0);
 			}
 		}
 		params.put("name", name);