44323
2023-09-26 6676f28a5a6ca65015a2b2c26e804fa998d625c8
cloud-server-account/src/main/resources/mapper/RechargeRecordsMapper.xml
@@ -4,19 +4,43 @@
    <select id="rechargeList" resultType="com.dsh.account.model.vo.RechargeRecordsVO">
        select t1.*,t2.name,t2.phone from t_recharge_records t1
        left join t_app_user t2 on t1.appUserId = t2.id
        select t1.* from t_recharge_records t1
        <where>
            <if test="query.amount!=null and query.amount!= ''">
                and t1.amount &lt;= #{query.amount}
            </if>
            <if test="query.name!=null and query.name!= ''">
                AND t1.name LIKE concat('%',#{query.name},'%')
            </if>
            <if test="query.phone!=null and query.phone!= ''">
                and t1.phone LIKE concat('%',#{query.phone},'%')
            </if>
            <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''">
                and t1.insertTime between #{sTime} and #{eTime}
            </if>
            <if test="query.userIds != null and query.userIds.size()>0">
                AND t1.appUserId IN
                <foreach collection="query.userIds" separator="," item="id" open="(" close=")">
                    #{id}
                </foreach>
            </if>
        </where>
    </select>
    <select id="listAll" resultType="com.dsh.account.entity.VipPayment">
        select t1.* from t_vip_payment t1
        <where>
        <if test="amount!=null and amount!= ''">
            and t1.amount &lt;= #{amount}
        </if>
        <if test="query.userIds != null and query.userIds.size()>0">
            AND t1.appUserId IN
            <foreach collection="query.userIds" separator="," item="id" open="(" close=")">
                #{id}
            </foreach>
        </if>
        <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''">
            and t1.insertTime between #{sTime} and #{eTime}
        </if>
        </where>
    </select>
</mapper>