Helius
2022-05-27 4351e71d782741143a98f86f6648acd16689165f
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?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.matrix.system.common.dao.OperationLogDao">
 
 
    <select id="selectPageList" resultType="com.matrix.system.common.bean.respVO.OperationLogRespVo">
 
        SELECT
        a.id,
        a.ope_function,
        a.ope_but,
        d.shop_short_name as shop_name,
        b.su_name AS opeUser,
        c.vip_name,
        a.bill_no,
        a.ip,
        a.note,
        a.create_time
        FROM
        sys_operation_log a
        LEFT JOIN sys_users b ON a.ope_user_id = b.su_id
        LEFT JOIN sys_vip_info c ON a.vip_id = c.id
        LEFT JOIN sys_shop_info d ON a.shop_id = d.id
        <where>
            a.company_id=#{param.companyId}
            <if test="param.shopId != null and param.shopId != 0  ">
                and  a.shop_id=#{param.shopId}
            </if>
            <if test="param.opeUserId != null">
                and  a.ope_user_id=#{param.opeUserId}
            </if>
 
            <if test="param.vipQueryKey != null and param.vipQueryKey != ''  ">
                and c.VIP_NAME like concat('%',#{param.vipQueryKey},'%')
                or (c.VIP_NO like concat('%',#{param.vipQueryKey},'%')
                or c.PHONE like concat('%',#{param.vipQueryKey},'%')
                )
            </if>
            <if test="param.opeFunction != null">
                and a.ope_function=#{param.opeFunction}
            </if>
 
            <if test="param.opeBut != null">
                and a.ope_but=#{param.opeBut}
            </if>
            <if test="param.billNo != null  and param.billNo != ''">
                and a.bill_no like concat('%',#{param.billNo},'%')
            </if>
            <if test="param.ip != null  and param.ip != ''">
                and a.ip like concat('%',#{param.ip},'%')
            </if>
            <if test="param.note != null and param.note != ''">
                and a.note like concat('%',#{param.note},'%')
            </if>
            <if test="param.startTime != null  ">
                and a.create_time  <![CDATA[>=]]> #{param.startTime}
            </if>
            <if test="param.endTime != null">
                and a.create_time <![CDATA[<=]]> #{param.endTime}
            </if>
            order by ${param.sort} ${param.order}
        </where>
 
 
    </select>
</mapper>