Pu Zhibing
2024-12-17 d53c16a12e612a95dc8f6fb248e3669cbc441eb4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?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.ruoyi.account.mapper.BalanceChangeRecordMapper">
 
    <select id="pageList" resultType="com.ruoyi.account.api.model.BalanceChangeRecord">
                select t1.*,t2.name as userName,t2.phone as userPhone
                from t_balance_change_record t1
                left join  t_app_user t2 on t1.app_user_id = t2.id
                <where>
                    <if test="agentQuery.name != null and agentQuery.name != ''">
                        and t2.name like concat('%',#{agentQuery.name},'%')
                    </if>
                    <if test="agentQuery.phone != null and agentQuery.phone != ''">
                        and t2.phone like concat('%',#{agentQuery.phone},'%')
                    </if>
                    <if test="agentQuery.changeType != null">
                        and t1.change_type = #{agentQuery.changeType}
                    </if>
                    <if test="agentQuery.localDate1 != null">
                        and DATE(t1.create_time) between  #{agentQuery.localDate1} and #{agentQuery.localDate2}
                    </if>
                </where>
    </select>
</mapper>