| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cc.mrbird.febs.mall.mapper.CjInfoMapper"> |
| | | |
| | | <resultMap id="CjInfoMap" type="cc.mrbird.febs.mall.entity.CjInfo"> |
| | | <id column="id" property="id" /> |
| | | <result column="total_amount" property="totalAmount" /> |
| | | <result column="kj_num" property="kjNum" /> |
| | | <result column="kj_no" property="kjNo" /> |
| | | <result column="kj_state" property="kjState" /> |
| | | <result column="zj_state" property="zjState" /> |
| | | <result column="perk_amount" property="perkAmount" /> |
| | | <result column="CREATED_TIME" property="createdTime" /> |
| | | <collection property="items" ofType="cc.mrbird.febs.mall.entity.CjItem"> |
| | | <id column="item_id" property="id" /> |
| | | <result column="type" property="type" /> |
| | | <result column="amount" property="amount" /> |
| | | <result column="item_kj_num" property="kjNum" /> |
| | | <result column="item_num" property="itemNum" /> |
| | | <result column="item_perk_amount" property="perkAmount" /> |
| | | <result column="item_CREATED_TIME" property="createdTime" /> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <select id="selectTzListByMemberId" resultMap="CjInfoMap"> |
| | | <select id="selectTzListByMemberId" resultType="cc.mrbird.febs.mall.entity.CjInfo"> |
| | | select |
| | | a.*, |
| | | b.id item_id, |
| | | b.type, |
| | | b.amount, |
| | | b.item_num, |
| | | b.kj_num item_kj_num, |
| | | b.CREATED_TIME item_CREATED_TIME, |
| | | b.perk_amount item_perk_amount |
| | | a.* |
| | | from cj_info a |
| | | inner join cj_item b on a.id = b.info_id |
| | | <where> |
| | | <if test="record.memberId != null"> |
| | | and a.member_id=#{record.memberId} |