Administrator пре 4 година
родитељ
комит
a5822222a0
1 измењених фајлова са 9 додато и 8 уклоњено
  1. 9 8
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

+ 9 - 8
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -499,13 +499,13 @@ from public_release a left join `user` b on a.uid =b.id left join admin c on a.a
 	<if test="releaseStarts != null and publicEnd != null">
 	and a.release_start  BETWEEN #{releaseStarts} and #{publicEnd}
 	</if>
-	<if test="clockTime !=null">
+	<if test="userName !=null">
 	and b.nickname like CONCAT('%',#{userName},'%')
 	</if>
-	<if test="clockTime !=null">
+	<if test="status !=null">
 	and a.status = #{status}
 	</if>
-	<if test="clockTime !=null">
+	<if test="clockIn !=null">
 	and a.clock_in = #{clockIn}
 	</if>
 	ORDER BY (case when a.status=1 then 1 else 2 end),a.status ,a.create_time 
@@ -515,7 +515,8 @@ from public_release a left join `user` b on a.uid =b.id left join admin c on a.a
   </select>
   <select id="countPublicRelease" resultType="java.lang.Integer">
   select  count(*)
-	from public_release a  left join admin c on a.aid =c.id
+	from public_release a left join `user` b on a.uid =b.id 
+	left join admin c on a.aid =c.id
 	where 1=1
 	<if test="type==0">
 	and a.aid= #{aid} 
@@ -526,16 +527,16 @@ from public_release a left join `user` b on a.uid =b.id left join admin c on a.a
 	<if test="clockTime !=null">
 	and a.release_start &lt; #{clockTime} and a.release_end &gt; #{clockTime}
 	</if>
-		<if test="releaseStarts != null and publicEnd != null">
+	<if test="releaseStarts != null and publicEnd != null">
 	and a.release_start  BETWEEN #{releaseStarts} and #{publicEnd}
 	</if>
-	<if test="clockTime !=null">
+	<if test="userName !=null">
 	and b.nickname like CONCAT('%',#{userName},'%')
 	</if>
-	<if test="clockTime !=null">
+	<if test="status !=null">
 	and a.status = #{status}
 	</if>
-	<if test="clockTime !=null">
+	<if test="clockIn !=null">
 	and a.clock_in = #{clockIn}
 	</if>
   </select>