移风店镇项目初始化
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.
 
 
 
 
 

42 lines
1.7 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.PointAdjustmentLogDao">
<resultMap type="com.epmet.entity.PointAdjustmentLogEntity" id="pointAdjustmentLogMap">
<result property="id" column="ID"/>
<result property="actionId" column="ACTION_ID"/>
<result property="operatorName" column="OPERATOR_NAME"/>
<result property="adjustReason" column="ADJUST_REASON"/>
<result property="point" column="POINT"/>
<result property="adjustmentType" column="ADJUSTMENT_TYPE"/>
<result property="operatorAgencyId" column="OPERATOR_AGENCY_ID"/>
<result property="userId" column="USER_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
</resultMap>
<!-- 查询积分调整记录 -->
<select id="selectAdjustmentListByUserId" resultType="com.epmet.dto.result.PointAdjustmentResultDTO">
SELECT
operator_name AS staffNickname,
adjust_reason AS reason,
DATE_FORMAT( created_time, '%Y-%m-%d %H:%i:%s' ) AS date,
CASE
ADJUSTMENT_TYPE
WHEN 'plus' THEN
CONCAT( '+', POINT ) ELSE POINT END AS POINT
FROM
point_adjustment_log
WHERE
del_flag = '0'
AND user_id = #{userId}
ORDER BY
created_time DESC
</select>
</mapper>