liujie
2023-08-08 d305641870004e685e17a12f7779697ba966f01f
cloud-server-account/src/main/resources/mapper/UserIntegralChangesMapper.xml
@@ -3,4 +3,23 @@
<mapper namespace="com.dsh.account.mapper.UserIntegralChangesMapper">
    <select id="listAll" resultType="com.dsh.account.entity.UserIntegral">
        select t1.id,t2.province,t2.city,t2.name,t2.phone,t1.type,t1.oldIntegral,t1.newIntegral,t1.category ,t1.insertTime,t1.remark from t_user_integral_changes t1  left join t_app_user t2 on t1.appUserId = t2.id
        where 1=1
        <if test="query.name !=null and query.name !=''">
            and t2.name like concat("%",#{query.name},"%")
        </if>
        <if test="query.phone !=null and query.phone !=''">
            and t2.phone like concat("%",#{query.phone},"%")
        </if>
        <if test="query.type !=null ">
            and t1.type like concat("%",#{query.type},"%")
        </if>
        <if test="query.category !=null ">
            and t1.category like concat("%",#{query.category},"%")
        </if>
        <if test="sTime !=null ">
            and t1.insertTime between #{sTime} and #{eTime}
        </if>
    </select>
</mapper>