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