1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| <?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="cc.mrbird.febs.mall.mapper.MallScoreVoucherMapper">
|
| <select id="findMallScoreVoucherListInPage" resultType="cc.mrbird.febs.mall.vo.ApiScoreVoucherRecordVo">
| SELECT
| a.voucher_no voucherNo,
| a.type type,
| a.voucher_cnt voucherCnt,
| a.price price,
| a.voucher_amount voucherAmount,
| RPAD(SUBSTRING(b.NAME,1,1),CHAR_LENGTH(b.NAME),'*') memberName
| FROM
| mall_score_voucher a
| LEFT JOIN mall_member b ON a.member_id = b.id
| <where>
| <if test="record.memberId!=null and record.memberId!=''">
| and a.member_id = #{record.memberId}
| </if>
| </where>
| ORDER BY
| a.CREATED_TIME DESC
| </select>
|
| </mapper>
|
|