|
@@ -461,7 +461,8 @@
|
|
|
<result column="describe_handle_desc" property="describeHandleDesc"/>
|
|
|
<result column="describe_content" property="describeContent"/>
|
|
|
<collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>
|
|
|
- <collection property="postageInfoList" column="customer_id" ofType="PostageInfo" select="listPostageInfoByCustomerId"/>
|
|
|
+ <!-- <collection property="postageInfoList" column="customer_id" ofType="PostageInfo" select="listPostageInfoByCustomerId"/>-->
|
|
|
+ <collection property="sendbackInfoList" column="customer_id" ofType="SendbackInfo" select="listSendbackInfoByCustomerId"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="listComplaintDetect" parameterType="Integer" resultType="ComplaintDetectInfo">
|
|
@@ -1047,15 +1048,34 @@ and cr.relation_is_transfer = 10*/
|
|
|
|
|
|
<select id="getCmRelationInfo" parameterType="CmRelation" resultType="CmRelation">
|
|
|
SELECT
|
|
|
- *
|
|
|
- FROM
|
|
|
- tb_rst_cm_relation
|
|
|
+ cr.*,
|
|
|
+ sx.sendback_status AS relationBackStatus
|
|
|
+ FROM
|
|
|
+ tb_rst_cm_relation cr
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT
|
|
|
+ sxx.*
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT ss.* from (
|
|
|
+ select tb_rst_cm_sendback_info.*,tb_rst_cm_relation.customer_id
|
|
|
+ FROM
|
|
|
+ tb_rst_cm_sendback_info
|
|
|
+ LEFT JOIN tb_rst_cm_relation on tb_rst_cm_relation.relation_id = tb_rst_cm_sendback_info.relation_id
|
|
|
+
|
|
|
+ ORDER BY
|
|
|
+ sendback_create_time desc
|
|
|
+ ) ss
|
|
|
+ GROUP BY
|
|
|
+ ss.relation_id
|
|
|
+ ) sxx
|
|
|
+ ) sx ON sx.customer_id = cr.customer_id
|
|
|
<where>
|
|
|
<if test="relationId != null and relationId != ''">
|
|
|
- relation_id = #{relationId},
|
|
|
+ cr.relation_id = #{relationId},
|
|
|
</if>
|
|
|
<if test="customerId != null and customerId != ''">
|
|
|
- customer_id = #{customerId}
|
|
|
+ cr.customer_id = #{customerId}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
@@ -1212,6 +1232,23 @@ and cr.relation_is_transfer = 10*/
|
|
|
WHERE relation_id = #{relationId}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="listSendbackInfoByCustomerId" parameterType="Integer" resultType="SendbackInfo">
|
|
|
+ SELECT
|
|
|
+ sendback_id,
|
|
|
+ tb_rst_cm_sendback_info.relation_id,
|
|
|
+ sendback_logistics_company,
|
|
|
+ sendback_logistics_no,
|
|
|
+ sendback_name,
|
|
|
+ sendback_tel,
|
|
|
+ sendback_status,
|
|
|
+ sendback_sign_time,
|
|
|
+ sendback_create_time,
|
|
|
+ sendback_update_time
|
|
|
+ from tb_rst_cm_sendback_info
|
|
|
+ LEFT JOIN tb_rst_cm_relation on tb_rst_cm_relation.relation_id = tb_rst_cm_sendback_info.relation_id
|
|
|
+ where tb_rst_cm_relation.customer_id = #{customerId}
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="sendbackItemList" parameterType="Integer" resultType="SendbackItem">
|
|
|
select
|
|
|
*,
|