You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
2.5 KiB
61 lines
2.5 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.epmet.dao.PointVerificationLogDao">
|
|
|
|
<resultMap type="com.epmet.entity.PointVerificationLogEntity" id="pointVerificationLogMap">
|
|
<result property="id" column="ID"/>
|
|
<result property="actionId" column="ACTION_ID"/>
|
|
<result property="userId" column="USER_ID"/>
|
|
<result property="operatorId" column="OPERATOR_ID"/>
|
|
<result property="operatorName" column="OPERATOR_NAME"/>
|
|
<result property="operatorAgencyId" column="OPERATOR_AGENCY_ID"/>
|
|
<result property="exchangedItem" column="EXCHANGED_ITEM"/>
|
|
<result property="point" column="POINT"/>
|
|
<result property="longitude" column="LONGITUDE"/>
|
|
<result property="dimension" column="DIMENSION"/>
|
|
<result property="address" column="ADDRESS"/>
|
|
<result property="delFlag" column="DEL_FLAG"/>
|
|
<result property="revision" column="REVISION"/>
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
<result property="updatedBy" column="UPDATED_BY"/>
|
|
<result property="updatedTime" column="UPDATED_TIME"/>
|
|
</resultMap>
|
|
|
|
<!-- 查询指定用户兑换记录 传参:用户Id -->
|
|
<select id="selectVerificationLog" resultType="com.epmet.dto.result.ResiPointLogPeriodResultDTO">
|
|
SELECT
|
|
USER_ID,
|
|
'积分兑换' AS TITLE,
|
|
concat( '兑换', EXCHANGED_ITEM ) AS REMARK,
|
|
concat( '-', POINT ) AS point,
|
|
DATE_FORMAT( CREATED_TIME, '%Y-%m-%d' ) AS DATE,
|
|
DATE_FORMAT( CREATED_TIME, '%H:%i' ) AS TIME
|
|
FROM
|
|
POINT_VERIFICATION_LOG
|
|
WHERE
|
|
DEL_FLAG = '0'
|
|
AND USER_ID = #{userId}
|
|
ORDER BY
|
|
CREATED_TIME DESC
|
|
</select>
|
|
|
|
<!-- 获取工作人员月度核销记录 -->
|
|
<select id="selectStaffVerificationLog" resultType="com.epmet.dto.result.WorkPointVerificationLogResultDTO">
|
|
SELECT
|
|
user_id,
|
|
exchanged_item AS remark,
|
|
point,
|
|
DATE_FORMAT(created_time,'%Y-%m-%d %H:%i:%s') AS date
|
|
FROM
|
|
point_verification_log
|
|
WHERE
|
|
del_flag = '0'
|
|
AND operator_id = #{staffId}
|
|
AND created_time > #{startDate}
|
|
AND created_time < #{endDate}
|
|
ORDER BY
|
|
created_time DESC
|
|
</select>
|
|
</mapper>
|