无关风月
2024-12-30 e2a878cf46999412c138fbd158586e47d9b8366a
manage/src/main/resources/mapping/TOrderAftersalesMapper.xml
@@ -24,17 +24,21 @@
    </sql>
    <select id="pageList" resultType="com.jilongda.manage.vo.TOrderAftersalesVO">
        select toa.id, toa.code, toa.sysId, toa.optometristId, toa.orderId, toa.reason, toa.handleResult, toa.createTime, toa.updateTime,
               toa.createBy, toa.updateBy, toa.isDelete,tau.name, tau.phone, tau.realName, ts.name as storeName, o.orderMoney
               toa.createBy, toa.updateBy, toa.isDelete, ts.name as storeName, o.orderMoney,tau.`name` as `name`,
               o.realName
        from t_order_aftersales toa
        left join t_app_user tau on toa.sysId = tau.id
        left join t_order o on toa.orderId = o.id
        left join t_store ts on o.storeId = ts.id
        left join t_app_user tau on o.userId = tau.id
        <where>
            <if test="query.name != null and query.name != ''">
                and tau.name like concat('%',#{query.name},'%')
            </if>
            <if test="query.phone != null and query.phone != ''">
                and tau.phone like concat('%',#{query.phone},'%')
                and o.phone like concat('%',#{query.phone},'%')
            </if>
            <if test="query.userIds != null and query.userIds.size()>0">
                AND o.userId IN
                <foreach collection="query.userIds" close=")" open="(" item="id" separator=",">
                    #{id}
                </foreach>
            </if>
            <if test="query.storeId != null">
                and o.storeId = #{query.phone}