Helius
2021-06-26 27748ad0d623313cfd8064f329f65c4c4d0af238
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
26
27
28
29
30
<?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.xzx.gc.shop.mapper.ScoreDetailsMapper">
 
    <select id="queryScoreDetailsList" resultType="com.xzx.gc.shop.vo.QueryScoreDetailsListVo">
        SELECT
        a.*,
               b.nick_name name,
        a.CREATED_TIME createTime
        FROM
        xzx_score_details a
        left join xzx_user_info b on b.user_id = a.user_id
        WHERE 1 = 1
        <if test="record.orderNo != null and record.orderNo != ''">
            and a.order_no like concat('%',#{record.orderNo},'%')
        </if>
        <if test="record.type != null and record.type != ''">
            and a.type = #{record.type}
        </if>
        <if test="record.createTimeStart != null">
            and a.CREATED_TIME >= #{record.createTimeStart}
        </if>
 
        <if test="record.createTimeEnd != null">
            and a.CREATED_TIME &lt;= #{record.createTimeEnd}
        </if>
        order by a.CREATED_TIME desc
    </select>
 
</mapper>