|
@@ -0,0 +1,328 @@
|
|
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
+<!DOCTYPE mapper
|
|
|
|
|
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
+<mapper namespace="com.fs.his.mapper.FsIntegralAfterSalesMapper">
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap type="FsIntegralAfterSales" id="FsIntegralAfterSalesResult">
|
|
|
|
|
+ <result property="id" column="id" />
|
|
|
|
|
+ <result property="orderId" column="order_id" />
|
|
|
|
|
+ <result property="orderCode" column="order_code" />
|
|
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
|
|
+ <result property="companyUserId" column="company_user_id" />
|
|
|
|
|
+ <result property="refundAmount" column="refund_amount" />
|
|
|
|
|
+ <result property="refundIntegral" column="refund_integral" />
|
|
|
|
|
+ <result property="serviceType" column="service_type" />
|
|
|
|
|
+ <result property="reasons" column="reasons" />
|
|
|
|
|
+ <result property="explains" column="explains" />
|
|
|
|
|
+ <result property="explainImg" column="explain_img" />
|
|
|
|
|
+ <result property="shipperCode" column="shipper_code" />
|
|
|
|
|
+ <result property="deliverySn" column="delivery_sn" />
|
|
|
|
|
+ <result property="deliveryName" column="delivery_name" />
|
|
|
|
|
+ <result property="deliveryCode" column="delivery_code" />
|
|
|
|
|
+ <result property="status" column="status" />
|
|
|
|
|
+ <result property="salesStatus" column="sales_status" />
|
|
|
|
|
+ <result property="orderStatus" column="order_status" />
|
|
|
|
|
+ <result property="consignee" column="consignee" />
|
|
|
|
|
+ <result property="phoneNumber" column="phone_number" />
|
|
|
|
|
+ <result property="address" column="address" />
|
|
|
|
|
+ <result property="consigneePhone" column="consignee_phone" />
|
|
|
|
|
+ <result property="deptId" column="dept_id" />
|
|
|
|
|
+ <result property="operator" column="operator" />
|
|
|
|
|
+ <result property="remark" column="remark" />
|
|
|
|
|
+ <result property="isDel" column="is_del" />
|
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="selectFsIntegralAfterSalesVo">
|
|
|
|
|
+ select id, order_id, order_code, user_id, company_id, company_user_id,
|
|
|
|
|
+ refund_amount, refund_integral, service_type, reasons, explains, explain_img,
|
|
|
|
|
+ shipper_code, delivery_sn, delivery_name, delivery_code,
|
|
|
|
|
+ status, sales_status, order_status,
|
|
|
|
|
+ consignee, phone_number, address, consignee_phone, dept_id,
|
|
|
|
|
+ operator, remark, is_del,
|
|
|
|
|
+ create_time, create_by, update_time, update_by
|
|
|
|
|
+ from fs_integral_after_sales
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- VO ResultMap(含关联查询字段) -->
|
|
|
|
|
+ <resultMap type="com.fs.his.vo.FsIntegralAfterSalesVO" id="FsIntegralAfterSalesVOResult" extends="FsIntegralAfterSalesResult">
|
|
|
|
|
+ <!-- 用户信息(fs_user) -->
|
|
|
|
|
+ <result property="nickName" column="nick_name" />
|
|
|
|
|
+ <result property="userPhone" column="user_phone" />
|
|
|
|
|
+ <!-- 企业信息(company) -->
|
|
|
|
|
+ <result property="companyName" column="company_name" />
|
|
|
|
|
+ <!-- 企业员工昵称(company_user) -->
|
|
|
|
|
+ <result property="companyUserNickName" column="company_user_nick_name" />
|
|
|
|
|
+ <!-- 积分订单信息(fs_integral_order)
|
|
|
|
|
+ 商品名称/原价等信息不单独查询,统一从 item_json 解析 -->
|
|
|
|
|
+ <result property="integral" column="integral" />
|
|
|
|
|
+ <result property="payMoney" column="pay_money" />
|
|
|
|
|
+ <result property="itemJson" column="item_json" />
|
|
|
|
|
+ <result property="userAddress" column="order_user_address" />
|
|
|
|
|
+ <result property="orderCreateTime" column="order_create_time" />
|
|
|
|
|
+ <result property="payTime" column="pay_time" />
|
|
|
|
|
+ <result property="payType" column="pay_type" />
|
|
|
|
|
+ <result property="orderDeliverySn" column="order_delivery_sn" />
|
|
|
|
|
+ <result property="orderDeliveryName" column="order_delivery_name" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- VO 关联查询字段(售后单 + 用户 + 企业 + 员工 + 积分订单)
|
|
|
|
|
+ 注意:fs_integral_order 表无 goods_name / ot_price 列,商品信息统一从 item_json 解析 -->
|
|
|
|
|
+ <sql id="selectFsIntegralAfterSalesVOColumns">
|
|
|
|
|
+ s.id, s.order_id, s.order_code, s.user_id, s.company_id, s.company_user_id,
|
|
|
|
|
+ s.refund_amount, s.refund_integral, s.service_type, s.reasons, s.explains, s.explain_img,
|
|
|
|
|
+ s.shipper_code, s.delivery_sn, s.delivery_name, s.delivery_code,
|
|
|
|
|
+ s.status, s.sales_status, s.order_status,
|
|
|
|
|
+ s.consignee, s.phone_number, s.address, s.consignee_phone, s.dept_id,
|
|
|
|
|
+ s.operator, s.remark, s.is_del,
|
|
|
|
|
+ s.create_time, s.create_by, s.update_time, s.update_by,
|
|
|
|
|
+ fu.nick_name,
|
|
|
|
|
+ fu.phone AS user_phone,
|
|
|
|
|
+ c.company_name,
|
|
|
|
|
+ cu.nick_name AS company_user_nick_name,
|
|
|
|
|
+ o.integral,
|
|
|
|
|
+ o.pay_money,
|
|
|
|
|
+ o.item_json,
|
|
|
|
|
+ o.user_address AS order_user_address,
|
|
|
|
|
+ o.create_time AS order_create_time,
|
|
|
|
|
+ o.pay_time,
|
|
|
|
|
+ o.pay_type,
|
|
|
|
|
+ o.delivery_sn AS order_delivery_sn,
|
|
|
|
|
+ o.delivery_name AS order_delivery_name
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectFsIntegralAfterSalesList" parameterType="FsIntegralAfterSales" resultMap="FsIntegralAfterSalesResult">
|
|
|
|
|
+ <include refid="selectFsIntegralAfterSalesVo"/>
|
|
|
|
|
+ <where>
|
|
|
|
|
+ is_del = 0
|
|
|
|
|
+ <if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
|
|
|
|
+ <if test="userId != null"> and user_id = #{userId}</if>
|
|
|
|
|
+ <if test="companyId != null"> and company_id = #{companyId}</if>
|
|
|
|
|
+ <if test="companyUserId != null"> and company_user_id = #{companyUserId}</if>
|
|
|
|
|
+ <if test="serviceType != null"> and service_type = #{serviceType}</if>
|
|
|
|
|
+ <if test="status != null"> and status = #{status}</if>
|
|
|
|
|
+ <if test="salesStatus != null"> and sales_status = #{salesStatus}</if>
|
|
|
|
|
+ <if test="orderStatus != null"> and order_status = #{orderStatus}</if>
|
|
|
|
|
+ <if test="deliverySn != null and deliverySn != ''"> and delivery_sn like concat('%', #{deliverySn}, '%')</if>
|
|
|
|
|
+ <if test="deptId != null">
|
|
|
|
|
+ and (dept_id = #{deptId} OR dept_id IN (SELECT t.dept_id FROM company_dept t WHERE find_in_set(#{deptId}, ancestors)))
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="beginTime != null and beginTime != ''">
|
|
|
|
|
+ AND date_format(create_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null and endTime != ''">
|
|
|
|
|
+ AND date_format(create_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by id desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectFsIntegralAfterSalesById" parameterType="Long" resultMap="FsIntegralAfterSalesResult">
|
|
|
|
|
+ <include refid="selectFsIntegralAfterSalesVo"/>
|
|
|
|
|
+ where id = #{id} and is_del = 0
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectFsIntegralAfterSalesByOrderCode" resultMap="FsIntegralAfterSalesResult">
|
|
|
|
|
+ <include refid="selectFsIntegralAfterSalesVo"/>
|
|
|
|
|
+ where order_code = #{orderCode} and is_del = 0
|
|
|
|
|
+ order by id desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="countUnfinishedByOrderCode" resultType="int">
|
|
|
|
|
+ select ifnull(count(1), 0)
|
|
|
|
|
+ from fs_integral_after_sales
|
|
|
|
|
+ where order_code = #{orderCode}
|
|
|
|
|
+ and is_del = 0
|
|
|
|
|
+ and sales_status = 0
|
|
|
|
|
+ and status != 3
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <insert id="insertFsIntegralAfterSales" parameterType="FsIntegralAfterSales" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
+ insert into fs_integral_after_sales
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="orderId != null">order_id,</if>
|
|
|
|
|
+ <if test="orderCode != null">order_code,</if>
|
|
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
|
|
+ <if test="companyId != null">company_id,</if>
|
|
|
|
|
+ <if test="companyUserId != null">company_user_id,</if>
|
|
|
|
|
+ <if test="refundAmount != null">refund_amount,</if>
|
|
|
|
|
+ <if test="refundIntegral != null">refund_integral,</if>
|
|
|
|
|
+ <if test="serviceType != null">service_type,</if>
|
|
|
|
|
+ <if test="reasons != null">reasons,</if>
|
|
|
|
|
+ <if test="explains != null">explains,</if>
|
|
|
|
|
+ <if test="explainImg != null">explain_img,</if>
|
|
|
|
|
+ <if test="shipperCode != null">shipper_code,</if>
|
|
|
|
|
+ <if test="deliverySn != null">delivery_sn,</if>
|
|
|
|
|
+ <if test="deliveryName != null">delivery_name,</if>
|
|
|
|
|
+ <if test="deliveryCode != null">delivery_code,</if>
|
|
|
|
|
+ <if test="status != null">status,</if>
|
|
|
|
|
+ <if test="salesStatus != null">sales_status,</if>
|
|
|
|
|
+ <if test="orderStatus != null">order_status,</if>
|
|
|
|
|
+ <if test="consignee != null">consignee,</if>
|
|
|
|
|
+ <if test="phoneNumber != null">phone_number,</if>
|
|
|
|
|
+ <if test="address != null">address,</if>
|
|
|
|
|
+ <if test="consigneePhone != null">consignee_phone,</if>
|
|
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
|
|
+ <if test="operator != null">operator,</if>
|
|
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
|
|
+ <if test="isDel != null">is_del,</if>
|
|
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="orderId != null">#{orderId},</if>
|
|
|
|
|
+ <if test="orderCode != null">#{orderCode},</if>
|
|
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
|
|
+ <if test="companyId != null">#{companyId},</if>
|
|
|
|
|
+ <if test="companyUserId != null">#{companyUserId},</if>
|
|
|
|
|
+ <if test="refundAmount != null">#{refundAmount},</if>
|
|
|
|
|
+ <if test="refundIntegral != null">#{refundIntegral},</if>
|
|
|
|
|
+ <if test="serviceType != null">#{serviceType},</if>
|
|
|
|
|
+ <if test="reasons != null">#{reasons},</if>
|
|
|
|
|
+ <if test="explains != null">#{explains},</if>
|
|
|
|
|
+ <if test="explainImg != null">#{explainImg},</if>
|
|
|
|
|
+ <if test="shipperCode != null">#{shipperCode},</if>
|
|
|
|
|
+ <if test="deliverySn != null">#{deliverySn},</if>
|
|
|
|
|
+ <if test="deliveryName != null">#{deliveryName},</if>
|
|
|
|
|
+ <if test="deliveryCode != null">#{deliveryCode},</if>
|
|
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
|
|
+ <if test="salesStatus != null">#{salesStatus},</if>
|
|
|
|
|
+ <if test="orderStatus != null">#{orderStatus},</if>
|
|
|
|
|
+ <if test="consignee != null">#{consignee},</if>
|
|
|
|
|
+ <if test="phoneNumber != null">#{phoneNumber},</if>
|
|
|
|
|
+ <if test="address != null">#{address},</if>
|
|
|
|
|
+ <if test="consigneePhone != null">#{consigneePhone},</if>
|
|
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
|
|
+ <if test="operator != null">#{operator},</if>
|
|
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
|
|
+ <if test="isDel != null">#{isDel},</if>
|
|
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="updateFsIntegralAfterSales" parameterType="FsIntegralAfterSales">
|
|
|
|
|
+ update fs_integral_after_sales
|
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
+ <if test="orderId != null">order_id = #{orderId},</if>
|
|
|
|
|
+ <if test="orderCode != null">order_code = #{orderCode},</if>
|
|
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
|
|
+ <if test="companyId != null">company_id = #{companyId},</if>
|
|
|
|
|
+ <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
|
|
+ <if test="refundAmount != null">refund_amount = #{refundAmount},</if>
|
|
|
|
|
+ <if test="refundIntegral != null">refund_integral = #{refundIntegral},</if>
|
|
|
|
|
+ <if test="serviceType != null">service_type = #{serviceType},</if>
|
|
|
|
|
+ <if test="reasons != null">reasons = #{reasons},</if>
|
|
|
|
|
+ <if test="explains != null">explains = #{explains},</if>
|
|
|
|
|
+ <if test="explainImg != null">explain_img = #{explainImg},</if>
|
|
|
|
|
+ <if test="shipperCode != null">shipper_code = #{shipperCode},</if>
|
|
|
|
|
+ <if test="deliverySn != null">delivery_sn = #{deliverySn},</if>
|
|
|
|
|
+ <if test="deliveryName != null">delivery_name = #{deliveryName},</if>
|
|
|
|
|
+ <if test="deliveryCode != null">delivery_code = #{deliveryCode},</if>
|
|
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
|
|
+ <if test="salesStatus != null">sales_status = #{salesStatus},</if>
|
|
|
|
|
+ <if test="orderStatus != null">order_status = #{orderStatus},</if>
|
|
|
|
|
+ <if test="consignee != null">consignee = #{consignee},</if>
|
|
|
|
|
+ <if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
|
|
|
|
|
+ <if test="address != null">address = #{address},</if>
|
|
|
|
|
+ <if test="consigneePhone != null">consignee_phone = #{consigneePhone},</if>
|
|
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
|
|
+ <if test="operator != null">operator = #{operator},</if>
|
|
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
+ <if test="isDel != null">is_del = #{isDel},</if>
|
|
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ where id = #{id}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <delete id="deleteFsIntegralAfterSalesById" parameterType="Long">
|
|
|
|
|
+ update fs_integral_after_sales set is_del = 1 where id = #{id}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+
|
|
|
|
|
+ <delete id="deleteFsIntegralAfterSalesByIds" parameterType="String">
|
|
|
|
|
+ update fs_integral_after_sales set is_del = 1 where id in
|
|
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
+ #{id}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- ==================== VO 关联查询 ==================== -->
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectFsIntegralAfterSalesVOList" parameterType="FsIntegralAfterSales" resultMap="FsIntegralAfterSalesVOResult">
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="selectFsIntegralAfterSalesVOColumns"/>
|
|
|
|
|
+ from fs_integral_after_sales s
|
|
|
|
|
+ left join fs_user fu on fu.user_id = s.user_id
|
|
|
|
|
+ left join company_user cu on cu.user_id = s.company_user_id
|
|
|
|
|
+ left join company c on c.company_id = s.company_id
|
|
|
|
|
+ left join fs_integral_order o on o.order_code = s.order_code
|
|
|
|
|
+ <where>
|
|
|
|
|
+ s.is_del = 0
|
|
|
|
|
+ <if test="orderCode != null and orderCode != ''"> and s.order_code = #{orderCode}</if>
|
|
|
|
|
+ <if test="userId != null"> and s.user_id = #{userId}</if>
|
|
|
|
|
+ <if test="nickName != null and nickName != ''"> and fu.nick_name like concat('%', #{nickName}, '%')</if>
|
|
|
|
|
+ <if test="companyId != null"> and s.company_id = #{companyId}</if>
|
|
|
|
|
+ <if test="companyUserId != null"> and s.company_user_id = #{companyUserId}</if>
|
|
|
|
|
+ <if test="serviceType != null"> and s.service_type = #{serviceType}</if>
|
|
|
|
|
+ <if test="status != null"> and s.status = #{status}</if>
|
|
|
|
|
+ <if test="salesStatus != null"> and s.sales_status = #{salesStatus}</if>
|
|
|
|
|
+ <if test="orderStatus != null"> and s.order_status = #{orderStatus}</if>
|
|
|
|
|
+ <if test="deliverySn != null and deliverySn != ''"> and s.delivery_sn like concat('%', #{deliverySn}, '%')</if>
|
|
|
|
|
+ <if test="deptId != null">
|
|
|
|
|
+ and (s.dept_id = #{deptId} OR s.dept_id IN (SELECT t.dept_id FROM company_dept t WHERE find_in_set(#{deptId}, ancestors)))
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="params.beginTime != null and params.beginTime != ''">
|
|
|
|
|
+ AND date_format(s.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="params.endTime != null and params.endTime != ''">
|
|
|
|
|
+ AND date_format(s.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by s.id desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectFsIntegralAfterSalesVOById" parameterType="Long" resultMap="FsIntegralAfterSalesVOResult">
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="selectFsIntegralAfterSalesVOColumns"/>
|
|
|
|
|
+ from fs_integral_after_sales s
|
|
|
|
|
+ left join fs_user fu on fu.user_id = s.user_id
|
|
|
|
|
+ left join company_user cu on cu.user_id = s.company_user_id
|
|
|
|
|
+ left join company c on c.company_id = s.company_id
|
|
|
|
|
+ left join fs_integral_order o on o.order_code = s.order_code
|
|
|
|
|
+ where s.id = #{id} and s.is_del = 0
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- App 端列表查询:强制按 userId 过滤,status 为前端查询类型(0全部/1售后中/2已完成) -->
|
|
|
|
|
+ <select id="selectFsIntegralAfterSalesVOListByParam" parameterType="com.fs.his.param.FsIntegralAfterSalesQueryParam" resultMap="FsIntegralAfterSalesVOResult">
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="selectFsIntegralAfterSalesVOColumns"/>
|
|
|
|
|
+ from fs_integral_after_sales s
|
|
|
|
|
+ left join fs_user fu on fu.user_id = s.user_id
|
|
|
|
|
+ left join company_user cu on cu.user_id = s.company_user_id
|
|
|
|
|
+ left join company c on c.company_id = s.company_id
|
|
|
|
|
+ left join fs_integral_order o on o.order_code = s.order_code
|
|
|
|
|
+ <where>
|
|
|
|
|
+ s.is_del = 0
|
|
|
|
|
+ and s.user_id = #{userId}
|
|
|
|
|
+ <if test="status != null and status == 1">
|
|
|
|
|
+ <!-- 售后中:正常售后单(sales_status=0)且未到退款成功(status < 5) -->
|
|
|
|
|
+ and s.sales_status = 0 and s.status < 5
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status != null and status == 2">
|
|
|
|
|
+ <!-- 已完成:退款成功(status=5)或已撤销/已拒绝(sales_status!=0) -->
|
|
|
|
|
+ and (s.status = 5 or s.sales_status != 0)
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="salesStatus != null"> and s.sales_status = #{salesStatus}</if>
|
|
|
|
|
+ <if test="serviceType != null"> and s.service_type = #{serviceType}</if>
|
|
|
|
|
+ <if test="orderCode != null and orderCode != ''"> and s.order_code like concat('%', #{orderCode}, '%')</if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by s.id desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+</mapper>
|