|
|
@@ -15,6 +15,7 @@
|
|
|
id, festival_name, festival_date, particular_year
|
|
|
</sql>
|
|
|
|
|
|
+ <!-- 业务类型取自 store_comment.business_type;store_info 无 business_type 列(经营种类为 business_types / business_type_name 等) -->
|
|
|
<select id="getAppealManagement" resultType="shop.alien.entity.store.vo.LifeAppealManageVo">
|
|
|
SELECT
|
|
|
appeal.id,
|
|
|
@@ -23,11 +24,10 @@
|
|
|
su.`name` AS store_contact,
|
|
|
lu.user_phone AS user_phone,
|
|
|
store.store_tel AS store_phone,
|
|
|
- `comment`.comment_content AS customer_report,
|
|
|
+ `comment`.content AS customer_report,
|
|
|
appeal.appeal_reason,
|
|
|
appeal.appeal_status AS appeal_type,
|
|
|
si.img_url as appeal_image,
|
|
|
- sg.img_url AS commentImage,
|
|
|
CASE
|
|
|
appeal.appeal_status
|
|
|
WHEN 0 THEN
|
|
|
@@ -37,32 +37,35 @@
|
|
|
WHEN 2 THEN
|
|
|
"失败"
|
|
|
END AS appeal_type_name,
|
|
|
- `comment`.business_type,
|
|
|
+ `comment`.source_type AS sourceType,
|
|
|
CASE
|
|
|
- `comment`.business_type
|
|
|
+ `comment`.source_type
|
|
|
WHEN 1 THEN
|
|
|
- "订单评论"
|
|
|
+ "动态的评论"
|
|
|
WHEN 2 THEN
|
|
|
"动态社区评论"
|
|
|
WHEN 3 THEN
|
|
|
- "活动评论"
|
|
|
- END AS business_type_name,
|
|
|
- appeal.created_time AS appeal_time
|
|
|
+ "打卡评论"
|
|
|
+ END AS sourceTypeName,
|
|
|
+ lu.user_phone AS userPhone,
|
|
|
+ appeal.created_time AS appealTime,
|
|
|
+ appeal.updated_time AS auditTime,
|
|
|
+ store.business_section AS businessType,
|
|
|
+ store.business_type_name AS businessTypeName
|
|
|
FROM
|
|
|
store_comment_appeal appeal
|
|
|
LEFT JOIN store_info store ON appeal.store_id = store.id
|
|
|
LEFT JOIN store_user su ON su.store_id = store.id and su.delete_flag = 0
|
|
|
- LEFT JOIN store_comment `comment` ON `comment`.id = appeal.comment_id
|
|
|
+ LEFT JOIN common_comment `comment` ON `comment`.id = appeal.comment_id
|
|
|
LEFT JOIN life_user lu ON `comment`.user_id = lu.id
|
|
|
LEFT JOIN store_img si ON appeal.img_id = si.id
|
|
|
- LEFT JOIN store_img sg ON sg.id = `comment`.img_id
|
|
|
WHERE
|
|
|
1 = 1
|
|
|
<if test="storeName != null and storeName != ''">
|
|
|
AND store.store_name LIKE CONCAT('%', #{storeName}, '%')
|
|
|
</if>
|
|
|
<if test="storeContact != null and storeContact != ''">
|
|
|
- AND `comment`.comment_content LIKE CONCAT('%', #{storeContact}, '%')
|
|
|
+ AND `comment`.content LIKE CONCAT('%', #{storeContact}, '%')
|
|
|
</if>
|
|
|
<if test="storePhone != null and storePhone != ''">
|
|
|
AND lu.user_phone LIKE CONCAT('%', #{storePhone}, '%')
|
|
|
@@ -83,11 +86,10 @@
|
|
|
su.`name` AS store_contact,
|
|
|
lu.user_phone AS user_phone,
|
|
|
store.store_tel AS store_phone,
|
|
|
- `comment`.comment_content AS customer_report,
|
|
|
+ `comment`.content AS customer_report,
|
|
|
appeal.appeal_reason,
|
|
|
appeal.appeal_status AS appeal_type,
|
|
|
si.img_url as appeal_image,
|
|
|
- sg.img_url AS commentImage,
|
|
|
CASE
|
|
|
appeal.appeal_status
|
|
|
WHEN 0 THEN
|
|
|
@@ -97,25 +99,28 @@
|
|
|
WHEN 2 THEN
|
|
|
"失败"
|
|
|
END AS appeal_type_name,
|
|
|
- `comment`.business_type,
|
|
|
+ `comment`.source_type,
|
|
|
CASE
|
|
|
- `comment`.business_type
|
|
|
+ `comment`.source_type
|
|
|
WHEN 1 THEN
|
|
|
- "订单评论"
|
|
|
+ "动态的评论"
|
|
|
WHEN 2 THEN
|
|
|
- "动态社区评论"
|
|
|
+ "动态社区评论"
|
|
|
WHEN 3 THEN
|
|
|
- "活动评论"
|
|
|
- END AS business_type_name,
|
|
|
- appeal.created_time AS appeal_time
|
|
|
+ "打卡评论"
|
|
|
+ END AS source_type_name,
|
|
|
+ appeal.created_time AS appeal_time,
|
|
|
+ appeal.updated_time AS auditTime,
|
|
|
+ lu.user_phone AS userPhone,
|
|
|
+ store.business_section AS businessType,
|
|
|
+ store.business_type_name AS businessTypeName
|
|
|
FROM
|
|
|
store_comment_appeal appeal
|
|
|
LEFT JOIN store_info store ON appeal.store_id = store.id
|
|
|
LEFT JOIN store_user su ON su.store_id = store.id and su.delete_flag = 0
|
|
|
- LEFT JOIN store_comment `comment` ON `comment`.id = appeal.comment_id
|
|
|
+ LEFT JOIN common_comment `comment` ON `comment`.id = appeal.comment_id
|
|
|
LEFT JOIN life_user lu ON `comment`.user_id = lu.id
|
|
|
LEFT JOIN store_img si ON appeal.img_id = si.id
|
|
|
- LEFT JOIN store_img sg ON sg.id = `comment`.img_id
|
|
|
WHERE
|
|
|
appeal.id = #{id}
|
|
|
LIMIT 1
|