Browse Source

积分记录

feature/dangjian
wanggongfeng 4 years ago
parent
commit
51eb62d845
  1. 27
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/ActivePointLogDao.xml

27
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/ActivePointLogDao.xml

@ -139,31 +139,32 @@
<select id="exportTotal" resultType="com.elink.esua.epdc.dto.result.ActivePointTotalResultDTO"> <select id="exportTotal" resultType="com.elink.esua.epdc.dto.result.ActivePointTotalResultDTO">
select select
USER_NAME, user.real_name USER_NAME,
DEPT_NAME, pl.DEPT_NAME,
sum(POINTS) as POINTS, sum(pl.POINTS) as POINTS,
OPERATION_DESC pl.OPERATION_DESC
from epdc_active_point_log from epdc_active_point_log pl
where DEL_FLAG = '0' left join esua_epdc_user.epdc_user user on user.ID = pl.USER_ID and user.DEL_FLAG = '0'
where pl.DEL_FLAG = '0'
<if test="operationType != null and operationType != ''"> <if test="operationType != null and operationType != ''">
and OPERATION_TYPE = #{operationType} and pl.OPERATION_TYPE = #{operationType}
</if> </if>
<if test="userName != null and userName != ''"> <if test="userName != null and userName != ''">
and USER_NAME like '%' #{userName} '%' and pl.USER_NAME like '%' #{userName} '%'
</if> </if>
<if test="deptId != null and deptId != ''"> <if test="deptId != null and deptId != ''">
and FIND_IN_SET( #{deptId}, ALL_DEPT_IDS ) and FIND_IN_SET( #{deptId}, pl.ALL_DEPT_IDS )
</if> </if>
<if test="mobile != null and mobile != ''"> <if test="mobile != null and mobile != ''">
and MOBILE like '%' #{mobile} '%' and pl.MOBILE like '%' #{mobile} '%'
</if> </if>
<if test="operationDesc != null and operationDesc != ''"> <if test="operationDesc != null and operationDesc != ''">
and OPERATION_DESC like '%' #{operationDesc} '%' and pl.OPERATION_DESC like '%' #{operationDesc} '%'
</if> </if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND DATE_FORMAT( OPERATION_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} AND DATE_FORMAT( pl.OPERATION_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
</if> </if>
group by USER_NAME,OPERATION_DESC group by pl.USER_ID,pl.DEPT_ID,pl.OPERATION_DESC
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save