| 
					
				 | 
			
			
				@@ -43,19 +43,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where id = #{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectQwWorkTaskListVONew" resultType="com.fs.qw.vo.QwWorkTaskListVO"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        select t.* from qw_work_task t 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT t.* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FROM qw_work_task t 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        INNER JOIN ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT t_inner.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FROM qw_work_task t_inner 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            DATE(t.create_time) = CURDATE() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="extId != null "> and t.ext_id = #{extId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="qwUserId != null "> and t.qw_user_id = #{qwUserId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="type != null "> and t.type = #{type}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="status != null "> and t.status = #{status}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="score != null "> and t.score = #{score}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="sopId != null  and sopId != ''"> and t.sop_id = #{sopId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="companyId != null "> and t.company_id = #{companyId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="companyUserId != null "> and t.company_user_id = #{companyUserId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            DATE(t_inner.create_time) = CURDATE() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="extId != null "> and t_inner.ext_id = #{extId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="qwUserId != null "> and t_inner.qw_user_id = #{qwUserId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="type != null "> and t_inner.type = #{type}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="status != null "> and t_inner.status = #{status}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="score != null "> and t_inner.score = #{score}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="sopId != null  and sopId != ''"> and t_inner.sop_id = #{sopId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="companyId != null "> and t_inner.company_id = #{companyId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="companyUserId != null "> and t_inner.company_user_id = #{companyUserId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        order by t.score desc,t.id desc 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ORDER BY t_inner.score DESC, t_inner.id DESC 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LIMIT ${(pageNum-1)*pageSize}, ${pageSize} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ) AS filtered_ids ON t.id = filtered_ids.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ORDER BY t.score DESC, t.id DESC 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectQwWorkTaskListByMap" resultType="com.fs.qw.domain.QwWorkTask"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -68,6 +75,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           and qwt.company_user_id = #{params.companyUserId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           and qwt.status = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="selectQwWorkTaskListVONewCount" resultType="java.lang.Long"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        select count(1) from qw_work_task t 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            DATE(t.create_time) = CURDATE() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="extId != null "> and t.ext_id = #{extId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="qwUserId != null "> and t.qw_user_id = #{qwUserId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="type != null "> and t.type = #{type}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="status != null "> and t.status = #{status}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="score != null "> and t.score = #{score}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="sopId != null  and sopId != ''"> and t.sop_id = #{sopId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="companyId != null "> and t.company_id = #{companyId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="companyUserId != null "> and t.company_user_id = #{companyUserId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        order by t.score desc,t.id desc 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <insert id="insertQwWorkTask" parameterType="QwWorkTask" useGeneratedKeys="true" keyProperty="id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         insert into qw_work_task 
			 |