From a3ead770c30b310b9b1b7e3786d5d847da540e55 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期三, 25 十二月 2019 12:21:20 +0800 Subject: [PATCH] 2.0.6 --- fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackGiveRecordMapper.xml | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackGiveRecordMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackGiveRecordMapper.xml index b2fa0d8..dd218d2 100644 --- a/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackGiveRecordMapper.xml +++ b/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackGiveRecordMapper.xml @@ -12,6 +12,19 @@ <result column="rpgr_receive_time" property="receiveTime" jdbcType="TIMESTAMP"/> <result column="rpgr_state" property="state" jdbcType="INTEGER"/> </resultMap> + + <resultMap id="VOResultMap" type="com.yeshi.fanli.vo.redpack.RedPackGiveVO"> + <id column="rpgr_id" property="id" jdbcType="BIGINT"/> + <result column="rpgr_money" property="amount" jdbcType="DECIMAL"/> + <result column="rpgr_give_uid" property="giveUid" jdbcType="BIGINT"/> + <result column="rpgr_give_time" property="giveTime" jdbcType="TIMESTAMP"/> + <result column="rpgr_end_time" property="endTime" jdbcType="TIMESTAMP"/> + <result column="rpgr_receive_uid" property="receiveUid" jdbcType="BIGINT"/> + <result column="rpgr_receive_time" property="receiveTime" jdbcType="TIMESTAMP"/> + <result column="rpgr_state" property="state" jdbcType="INTEGER"/> + </resultMap> + + <sql id="Base_Column_List">rpgr_id,rpgr_money,rpgr_give_uid,rpgr_give_time,rpgr_end_time,rpgr_receive_uid,rpgr_receive_time,rpgr_state</sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select <include refid="Base_Column_List"/>from yeshi_ec_red_pack_give_record where rpgr_id = #{id,jdbcType=BIGINT} @@ -59,4 +72,15 @@ LIMIT #{count} </select> + <select id="getGiveList" resultMap="VOResultMap"> + SELECT * FROM yeshi_ec_red_pack_give_record + WHERE rpgr_give_uid = #{uid} + ORDER BY rpgr_id DESC + LIMIT #{start},#{count} + </select> + + <select id="countGiveList" resultType="Long"> + SELECT IFNULL(COUNT(rpgr_id),0) FROM yeshi_ec_red_pack_give_record + WHERE rpgr_give_uid = #{uid} + </select> </mapper> -- Gitblit v1.8.0