无关风月
2024-12-31 bf765893039bc7968b8160a70bda778526dca98c
manage/src/main/resources/mapping/TOrderAccountingMapper.xml
@@ -28,5 +28,30 @@
    <sql id="Base_Column_List">
        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.*,t2.name as storeName from
                        t_order t1
                    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="query.startTime != null and query.startTime!=''">
            and (t1.createTime between #{query.startTime} and #{query.endTime})
        </if>
        <if test="query.startMoney != null ">
            and (t1.payMoney between #{query.startMoney} and #{query.endMoney})
        </if>
                    <if test="query.isAccounting != null ">
                        and t1.isAccounting = #{query.isAccounting}
                    </if>
                    <if test="query.storeId != null ">
                        and t1.storeId = #{query.storeId}
                    </if>
                            order by t1.isAccounting desc
    </select>
</mapper>