123
无关风月
2024-12-27 2c130857cc3323376e3c19bb1c855bc7a6086150
manage/src/main/resources/mapping/TOrderAccountingMapper.xml
@@ -29,9 +29,29 @@
        id, code, orderId, rLens, lLens, frame, createTime, updateTime, createBy, updateBy, isDelete, commission, rLensProfit, lLensProfit, frameProfit, payMoney, profitMoney, profitRating
    </sql>
    <select id="pageList" resultType="com.jilongda.manage.vo.TOrderVO">
        select t1.* from
        select t1.*,t2.name as storeName from
                        t_order t1
        left join
                    left join t_store t2 on t1.storeId = t2.id
                    where 1=1
                    <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="req.startTime != null and req.startTime!=''">
            and (t1.createTime between #{req.startTime} and #{req.endTime})
        </if>
        <if test="req.startMoney != null ">
            and (t1.payMoney between #{req.startMoney} and #{req.endMoney})
        </if>
                    <if test="req.isAccounting != null ">
                        and t1.isAccounting = #{req.isAccounting}
                    </if>
                    <if test="req.storeId != null ">
                        and t1.storeId = #{req.storeId}
                    </if>
                            order by t1.isAccounting desc
    </select>
</mapper>