|
|
@@ -29,10 +29,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="companyId" column="company_id" />
|
|
|
<result property="companyUserId" column="company_user_id" />
|
|
|
<result property="deptId" column="dept_id" />
|
|
|
+ <result property="reasonId1" column="reason_id1" />
|
|
|
+ <result property="reasonId2" column="reason_id2" />
|
|
|
+ <result property="auditRemark" column="audit_remark" />
|
|
|
+ <result property="auditReasonName" column="audit_reason_name" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectLiveAfterSalesVo">
|
|
|
- select id, live_id, store_id, order_id, refund_amount, refund_type, reasons, explains, explain_img, delivery_code, delivery_sn, delivery_name, status, sales_status, order_status, create_time, is_del, user_id, consignee, phone_number, address, company_id, company_user_id, dept_id from live_after_sales
|
|
|
+ select id, live_id, store_id, order_id, refund_amount, refund_type, reasons, explains, explain_img, delivery_code, delivery_sn, delivery_name, status, sales_status, order_status, create_time, is_del, user_id, consignee, phone_number, address, company_id, company_user_id, dept_id, reason_id1, reason_id2, audit_remark, audit_reason_name from live_after_sales
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectLiveAfterSalesList" parameterType="LiveAfterSales" resultMap="LiveAfterSalesResult">
|
|
|
@@ -66,6 +70,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
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,
|
|
|
+ las.reason_id1, las.reason_id2, las.audit_remark, las.audit_reason_name,
|
|
|
+ rr1.reason_name as reasonValue1, rr2.reason_name as reasonValue2,
|
|
|
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
|
|
|
@@ -74,6 +80,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
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)
|
|
|
+ left join fs_refund_reason rr1 on las.reason_id1 = rr1.id
|
|
|
+ left join fs_refund_reason rr2 on las.reason_id2 = rr2.id
|
|
|
<if test="productName != null and productName != ''">
|
|
|
left join live_order_item loi on loi.order_id = lo.order_id
|
|
|
</if>
|
|
|
@@ -122,6 +130,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
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, lo.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,
|
|
|
+ las.reason_id1, las.reason_id2, las.audit_remark, las.audit_reason_name,
|
|
|
+ rr1.reason_name as reasonValue1, rr2.reason_name as reasonValue2,
|
|
|
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
|
|
|
@@ -130,6 +140,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
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)
|
|
|
+ left join fs_refund_reason rr1 on las.reason_id1 = rr1.id
|
|
|
+ left join fs_refund_reason rr2 on las.reason_id2 = rr2.id
|
|
|
<if test="productName != null and productName != ''">
|
|
|
left join live_order_item loi on loi.order_id = lo.order_id
|
|
|
</if>
|
|
|
@@ -207,6 +219,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="companyId != null">company_id,</if>
|
|
|
<if test="companyUserId != null">company_user_id,</if>
|
|
|
<if test="deptId != null">dept_id,</if>
|
|
|
+ <if test="reasonId1 != null">reason_id1,</if>
|
|
|
+ <if test="reasonId2 != null">reason_id2,</if>
|
|
|
+ <if test="auditRemark != null">audit_remark,</if>
|
|
|
+ <if test="auditReasonName != null">audit_reason_name,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="liveId != null">#{liveId},</if>
|
|
|
@@ -232,6 +248,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="companyId != null">#{companyId},</if>
|
|
|
<if test="companyUserId != null">#{companyUserId},</if>
|
|
|
<if test="deptId != null">#{deptId},</if>
|
|
|
+ <if test="reasonId1 != null">#{reasonId1},</if>
|
|
|
+ <if test="reasonId2 != null">#{reasonId2},</if>
|
|
|
+ <if test="auditRemark != null">#{auditRemark},</if>
|
|
|
+ <if test="auditReasonName != null">#{auditReasonName},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -261,6 +281,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="companyId != null">company_id = #{companyId},</if>
|
|
|
<if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
+ <if test="reasonId1 != null">reason_id1 = #{reasonId1},</if>
|
|
|
+ <if test="reasonId2 != null">reason_id2 = #{reasonId2},</if>
|
|
|
+ <if test="auditRemark != null">audit_remark = #{auditRemark},</if>
|
|
|
+ <if test="auditReasonName != null">audit_reason_name = #{auditReasonName},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|