Browse Source

Merge branch 'test02' of jishutao/kede-server into prod

anderx 3 years ago
parent
commit
b3a84cd621

+ 5 - 4
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -344,7 +344,7 @@
 		left join district_glossory dg2 on b.location_city = dg2.id
 		left join district_glossory dg3 on b.location_area = dg3.id
 		left join admin d on a.aid = d.id
-		where a.type = 1 and a.status =0
+		where a.type = 1 and a.status =0 and a.source in (1,2,3)
 	<if test="role == 0">
 		and un.name
 		<if test="names == null">
@@ -397,7 +397,7 @@
 		from admin
 		where department_id=#{departmentId,jdbcType=VARCHAR}) d on a.aid = d.id
 		</if>
-		where a.type = 1 and a.status =0
+		where a.type = 1 and a.status =0 and a.source in (1,2,3)
 		<if test="role == 0">
 			and un.name
 			<if test="names == null">
@@ -2192,13 +2192,14 @@ inner join(
   </select>
 
   <select id="getUserByNameList" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerSimpleBo">
-  	select id,nickname name from `user` where nickname like concat('%',#{name},'%')
+  	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="page_sql != null">
    		${page_sql}
 	</if>
     </select>
     <select id="getUserByNameCount" resultType="java.lang.Integer" >
-  	select count(*) from `user` where nickname like concat('%',#{name},'%')
+  	select count(*) from `user` where type = 1 and status =0 and source in (1,2,3) and  nickname like concat('%',#{name},'%')
     </select>
     <select id="getAllUser" resultType="com.goafanti.common.bo.OutUser">
 		select id,name ,province ,name_mobile nameMobile from user_now

+ 1 - 1
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -81,7 +81,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		if (u!=null&&u.getShareType()==2){
 			in.setNewUser(1);
 		}
-		if (u.getAid().equals(TokenManager.getAdminId())){
+		if (u==null||StringUtils.isEmpty(u.getAid())||u.getAid().equals(TokenManager.getAdminId())){
 			in.setMainStatus(1);
 		}
 		AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());