Browse Source

修改

Signed-off-by: anderx <312518615@qq.com>
anderx 5 years ago
parent
commit
850c344e39
1 changed files with 21 additions and 16 deletions
  1. 21 16
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml

+ 21 - 16
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -1099,22 +1099,23 @@
 	left join (select uid,max(time_stamp) as time_stamp from user_follow group by uid) b  on a.id=b.uid
 	left join organization_identity c on a.id=c.uid
 	where a.aid is not null and  a.share_type=0 and a.type=1
-	<if test="aid != null"> 
+    <if test="aid != null"> 
 	and a.aid=  #{aid,jdbcType=VARCHAR}
     </if>
     <if test="type==null">
-    and a.source !=4
+    and a.source in(1,2,3)
     </if>
-    <if test="type!=null and type == 0">
+	<if test="type == 0">
     and a.source =1
-    and  a.create_time 
+    <if test="startTime != null and endTime != null">
+	and  a.create_time between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR} 
     </if>
-    <if test="type!=null and type == 1">
-    and a.source =2
-    and  a.transfer_time 
     </if>
+    <if test="type == 1">
+    and a.source =2
 	<if test="startTime != null and endTime != null">
-	  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR} 
+	and  a.transfer_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR} 
+    </if>
     </if>
    <if test="page_sql!=null">
 			${page_sql}
@@ -1126,19 +1127,23 @@
 	left join (select uid,max(time_stamp) as time_stamp from user_follow group by uid) b  on a.id=b.uid
 	left join organization_identity c on a.id=c.uid
 	where a.aid is not null and  a.share_type=0 and a.type=1
-	<if test="aid != null"> 
+	 <if test="aid != null"> 
 	and a.aid=  #{aid,jdbcType=VARCHAR}
     </if>
-	<if test="type == null or type != 1">
-    and a.source !=0
-    and  a.create_time 
+    <if test="type==null">
+    and a.source in(1,2,3)
+    </if>
+	<if test="type == 0">
+    and a.source =1
+    <if test="startTime != null and endTime != null">
+	and  a.create_time between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR} 
     </if>
-    <if test="type!=null and type == 1">
-    and a.source =2
-    and  a.transfer_time 
     </if>
+    <if test="type == 1">
+    and a.source =2
 	<if test="startTime != null and endTime != null">
-	 and  a.create_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR} 
+	and  a.transfer_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR} 
+    </if>
     </if>
   </select>
   <select id="listNameByDepAndName" resultType="java.lang.String">