|
|
@@ -115,6 +115,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
order by las.create_time desc
|
|
|
</select>
|
|
|
+ <select id="selectLiveAfterSalesVoListExport" parameterType="com.fs.live.vo.LiveAfterSalesVo" resultType="com.fs.live.vo.LiveAfterSalesVo">
|
|
|
+ select las.id, las.live_id, las.store_id, las.refund_amount,
|
|
|
+ las.refund_type, las.reasons, las.explains, las.explain_img, las.delivery_code, las.delivery_sn, las.delivery_name, las.status, las.sales_status,
|
|
|
+ las.order_status, las.create_time, las.is_del, las.user_id, las.consignee, las.phone_number, las.address, las.company_id, las.company_user_id, las.dept_id,
|
|
|
+ cu.nick_name as company_user_nick_name, c.company_name,lo.order_id,lo.order_code,lo.user_phone,lo.item_json,lo.pay_time as orderPayTime,
|
|
|
+ lo.user_address,lo.user_name,lo.pay_price,lo.total_postage,lop.bank_serial_no,lo.delivery_sn as orderDeliveryId,lo.delivery_name as orderDeliveryName,
|
|
|
+ lo.delivery_code as orderDeliverySn,lo.status as orderStatus,lop.bank_transaction_id,lo.pay_money,lop.pay_code as payCode
|
|
|
+ from live_after_sales las
|
|
|
+ left join live_order lo on lo.order_id = las.order_id
|
|
|
+ left join company_user cu on cu.user_id = las.company_user_id
|
|
|
+ left join company c on c.company_id = cu.company_id
|
|
|
+ left join live_order_payment lop on lop.business_id = lo.order_id and lop.status in (1,-1)
|
|
|
+ <if test="productName != null and productName != ''">
|
|
|
+ left join live_order_item loi on loi.order_id = lo.order_id
|
|
|
+ </if>
|
|
|
+
|
|
|
+ where 1=1 and las.status =4
|
|
|
+ <if test="hfOrderCode != null and hfOrderCode != ''"> and lop.pay_code = #{hfOrderCode}</if>
|
|
|
+ <if test="liveId != null and liveId != ''"> and las.live_id = #{liveId}</if>
|
|
|
+ <if test="companyUserNickName != null and companyUserNickName != ''"> and cu.nick_name like concat(#{companyUserNickName},'%')</if>
|
|
|
+ <if test="storeId != null and storeId != ''"> and las.store_id = #{storeId}</if>
|
|
|
+ <if test="orderCode != null and orderCode != ''"> and lo.order_code = #{orderCode}</if>
|
|
|
+ <if test="productNameQuery != null and productNameQuery != ''"> and JSON_UNQUOTE(JSON_EXTRACT(loi.json_info, '$.productName')) like concat('%', #{productNameQuery}, '%')</if>
|
|
|
+ <if test="refundAmount != null "> and las.refund_amount = #{refundAmount}</if>
|
|
|
+ <if test="refundType != null "> and las.refund_type = #{refundType}</if>
|
|
|
+ <if test="status != null "> and las.status = #{status}</if>
|
|
|
+ <if test="salesStatus != null "> and las.sales_status = #{salesStatus}</if>
|
|
|
+ <if test="orderStatus != null "> and las.order_status = #{orderStatus}</if>
|
|
|
+ <if test="reasons != null and reasons != ''"> and las.reasons = #{reasons}</if>
|
|
|
+ <if test="explains != null and explains != ''"> and las.explains = #{explains}</if>
|
|
|
+ <if test="explainImg != null and explainImg != ''"> and las.explain_img = #{explainImg}</if>
|
|
|
+ <if test="deliveryCode != null and deliveryCode != ''"> and las.delivery_code = #{deliveryCode}</if>
|
|
|
+ <if test="deliverySn != null and deliverySn != ''"> and las.delivery_sn = #{deliverySn}</if>
|
|
|
+ <if test="deliveryName != null and deliveryName != ''"> and las.delivery_name like concat('%', #{deliveryName}, '%')</if>
|
|
|
+ <if test="status != null "> and las.status = #{status}</if>
|
|
|
+ <if test="salesStatus != null "> and las.sales_status = #{salesStatus}</if>
|
|
|
+ <if test="orderStatus != null "> and las.order_status = #{orderStatus}</if>
|
|
|
+ <if test="deliveryStatus != null and deliveryStatus!= ''"> and las.order_status = #{deliveryStatus}</if>
|
|
|
+ <if test="isDel != null and isDel != ''"> and las.is_del = #{isDel}</if>
|
|
|
+ <if test="userId != null "> and las.user_id = #{userId}</if>
|
|
|
+ <if test="consignee != null and consignee != ''"> and las.consignee = #{consignee}</if>
|
|
|
+ <if test="phoneNumber != null and phoneNumber != ''"> and las.phone_number = #{phoneNumber}</if>
|
|
|
+ <if test="address != null and address != ''"> and las.address = #{address}</if>
|
|
|
+ <if test="companyId != null "> and las.company_id = #{companyId}</if>
|
|
|
+ <if test="companyUserId != null "> and las.company_user_id = #{companyUserId}</if>
|
|
|
+ <if test="deptId != null "> and cu.dept_id = #{deptId}</if>
|
|
|
+ <if test="userPhone != null "> and lo.user_phone like concat(#{userPhone},'%')</if>
|
|
|
+
|
|
|
+ <if test="productName != null and productName != ''">
|
|
|
+ group by las.id
|
|
|
+ </if>
|
|
|
+ order by las.create_time desc
|
|
|
+ </select>
|
|
|
|
|
|
<select id="selectLiveAfterSalesById" parameterType="Long" resultMap="LiveAfterSalesResult">
|
|
|
<include refid="selectLiveAfterSalesVo"/>
|