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.
 
 
 
 
 

43 lines
1.8 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.PointRewardDao">
<resultMap type="com.epmet.entity.PointRewardEntity" id="pointRewardMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="agencyPids" column="AGENCY_PIDS"/>
<result property="houseId" column="HOUSE_ID"/>
<result property="houseAllName" column="HOUSE_ALL_NAME"/>
<result property="staffId" column="STAFF_ID"/>
<result property="staffName" column="STAFF_NAME"/>
<result property="businessCode" column="BUSINESS_CODE"/>
<result property="statement" column="STATEMENT"/>
<result property="pointValue" column="POINT_VALUE"/>
<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>
<select id="selectRewardRecord" resultType="com.epmet.dto.PointRewardDTO">
select id,
HOUSE_ID,
HOUSE_ALL_NAME,
STATEMENT,
POINT_VALUE,
CREATED_TIME
from point_reward
where DEL_FLAG='0'
and BUSINESS_CODE=#{businessCode}
and CUSTOMER_ID=#{customerId}
<if test="houseId != null and houseId != ''">
and HOUSE_ID= #{houseId}
</if>
order by CREATED_TIME desc
</select>
</mapper>