|  |  | @ -52,7 +52,7 @@ | 
			
		
	
		
			
				
					|  |  |  |         case when OPERATION_TYPE =0 then sum(POINTS) else 0 end as f, | 
			
		
	
		
			
				
					|  |  |  |         case when OPERATION_TYPE =1 then sum(POINTS) else 0 end as z, | 
			
		
	
		
			
				
					|  |  |  |         BEHAVIOR_CODE | 
			
		
	
		
			
				
					|  |  |  |         from epdc_points_logs where USER_ID = #{userId} and BEHAVIOR_CODE = #{behaviorCode} | 
			
		
	
		
			
				
					|  |  |  |         from epdc_points_logs where USER_ID = #{userId} and RULE_CODE = #{ruleCode} | 
			
		
	
		
			
				
					|  |  |  |         <if test="operationFlag == 0"> | 
			
		
	
		
			
				
					|  |  |  |             and OPERATION_TIME between date_add(now() , interval  -1 minute ) and now() | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
	
		
			
				
					|  |  | @ -183,9 +183,8 @@ | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     <select id="selectPointsList" resultType="com.elink.esua.epdc.dto.result.PointsStatisticsListResultDTO"> | 
			
		
	
		
			
				
					|  |  |  |         SELECT | 
			
		
	
		
			
				
					|  |  |  |             SUM( | 
			
		
	
		
			
				
					|  |  |  |                 IF( lg.OPERATION_TYPE = '1', lg.POINTS, 0 ) | 
			
		
	
		
			
				
					|  |  |  |             ) allPoints, | 
			
		
	
		
			
				
					|  |  |  |             SUM(lg.POINTS) allPoints, | 
			
		
	
		
			
				
					|  |  |  |             lg.OPERATION_TYPE as pointsType, | 
			
		
	
		
			
				
					|  |  |  |             SUM( | 
			
		
	
		
			
				
					|  |  |  |                 IF( lg.OPERATION_TYPE = '0', lg.POINTS, 0 ) | 
			
		
	
		
			
				
					|  |  |  |             )  residuePoints, | 
			
		
	
	
		
			
				
					|  |  | @ -194,15 +193,15 @@ | 
			
		
	
		
			
				
					|  |  |  |             epdc_points_logs lg | 
			
		
	
		
			
				
					|  |  |  |         WHERE | 
			
		
	
		
			
				
					|  |  |  |             lg.DEL_FLAG = '0' | 
			
		
	
		
			
				
					|  |  |  |             <if test="ruleCode!= null and ruleCode !=''"> | 
			
		
	
		
			
				
					|  |  |  |                 and lg.RULE_CODE = #{ruleCode} | 
			
		
	
		
			
				
					|  |  |  |             <if test="behaviorCode!= null and behaviorCode !=''"> | 
			
		
	
		
			
				
					|  |  |  |                 and lg.BEHAVIOR_CODE = #{behaviorCode} | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |             <if test="startTime!= null and startTime !=''"> | 
			
		
	
		
			
				
					|  |  |  |                 and lg.OPERATION_TIME between #{startTime} AND #{endTime} | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         GROUP BY | 
			
		
	
		
			
				
					|  |  |  |             lg.RULE_CODE | 
			
		
	
		
			
				
					|  |  |  |         lg.OPERATION_TYPE,lg.BEHAVIOR_CODE | 
			
		
	
		
			
				
					|  |  |  |         ORDER BY allPoints DESC | 
			
		
	
		
			
				
					|  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 |