|
|
@@ -24,6 +24,7 @@ public interface StoreCommentAppealMapper extends BaseMapper<StoreCommentAppeal>
|
|
|
/**
|
|
|
* 申诉历史-分页查询
|
|
|
* 注意:comment_id 关联的是 common_rating.id(评价ID),不是 store_comment.id
|
|
|
+ * 注意:common_rating 表不加 delete_flag = 0 条件,以便申诉通过后仍能显示评价快照数据
|
|
|
*
|
|
|
* @param page 分页参数
|
|
|
* @param queryWrapper 查询条件
|
|
|
@@ -32,7 +33,7 @@ public interface StoreCommentAppealMapper extends BaseMapper<StoreCommentAppeal>
|
|
|
@Select("select a.*, b.dict_detail appeal_status_str, c.content comment_content, c.score comment_star, c.score score, c.other_score, c.is_anonymous, c.image_urls commentImgId, d.user_name, d.user_image, e.store_name, f.phone store_phone, f.name store_contact, e.store_type " +
|
|
|
"from store_comment_appeal a " +
|
|
|
"left join store_dictionary b on a.appeal_status = b.dict_id and b.type_name = 'appealStatus' and b.delete_flag = 0 " +
|
|
|
- "left join common_rating c on a.comment_id = c.id and c.delete_flag = 0 " +
|
|
|
+ "left join common_rating c on a.comment_id = c.id " +
|
|
|
"left join life_user d on c.user_id = d.id and d.delete_flag = 0 " +
|
|
|
"left join store_info e on a.store_id = e.id and e.delete_flag = 0 " +
|
|
|
"Left join store_user f on e.id = f.store_id and f.delete_flag = 0 ${ew.customSqlSegment}")
|
|
|
@@ -41,14 +42,15 @@ public interface StoreCommentAppealMapper extends BaseMapper<StoreCommentAppeal>
|
|
|
/**
|
|
|
* 申诉历史-全部查询
|
|
|
* 注意:comment_id 关联的是 common_rating.id(评价ID),不是 store_comment.id
|
|
|
+ * 注意:common_rating 表不加 delete_flag = 0 条件,以便申诉通过后仍能显示评价快照数据
|
|
|
*
|
|
|
* @param queryWrapper 查询条件
|
|
|
* @return List<StoreCommentAppealVo>
|
|
|
*/
|
|
|
@Select("select a.*, b.dict_detail appeal_status_str, c.content comment_content, c.score comment_star, d.user_name, d.user_image, e.store_name, f.phone store_phone, f.name store_contact, e.store_type from store_comment_appeal a " +
|
|
|
"left join store_dictionary b on a.appeal_status = b.dict_id and b.type_name = 'appealStatus' and b.delete_flag = 0 " +
|
|
|
- "left join common_rating c on a.comment_id = c.id and c.delete_flag = 0 " +
|
|
|
- "left join life_user d on c.user_id = d.id and d.delete_flag = 0 " +
|
|
|
+ "left join common_rating c on a.comment_id = c.id " +
|
|
|
+ "left join life_user d on c.user_id = d.id and d.delete_flag = 0 " +
|
|
|
"left join store_info e on a.store_id = e.id and e.delete_flag = 0 " +
|
|
|
"Left join store_user f on e.id = f.store_id and f.delete_flag = 0 ${ew.customSqlSegment}")
|
|
|
List<StoreCommentAppealVo> getStoreCommentAppealPage(@Param(Constants.WRAPPER) QueryWrapper<StoreCommentAppealVo> queryWrapper);
|
|
|
@@ -56,6 +58,7 @@ public interface StoreCommentAppealMapper extends BaseMapper<StoreCommentAppeal>
|
|
|
/**
|
|
|
* 申诉详情
|
|
|
* 注意:comment_id 关联的是 common_rating.id(评价ID),不是 store_comment.id
|
|
|
+ * 注意:common_rating 表不加 delete_flag = 0 条件,以便申诉通过后仍能显示评价快照数据
|
|
|
*
|
|
|
* @param queryWrapper 查询条件
|
|
|
* @return StoreCommentAppealVo
|
|
|
@@ -63,21 +66,22 @@ public interface StoreCommentAppealMapper extends BaseMapper<StoreCommentAppeal>
|
|
|
@Select("select a.*, b.dict_detail appeal_status_str, c.content comment_content, c.score, c.other_score, a.created_time comment_time, c.score comment_star, c.is_anonymous, c.image_urls commentImgId, d.user_name, e.phone store_phone, d.user_name userName, d.user_image userImage " +
|
|
|
"from store_comment_appeal a " +
|
|
|
"left join store_dictionary b on a.appeal_status = b.dict_id and b.type_name = 'appealStatus' and b.delete_flag = 0 " +
|
|
|
- "left join common_rating c on a.comment_id = c.id and c.delete_flag = 0 " +
|
|
|
+ "left join common_rating c on a.comment_id = c.id " +
|
|
|
"left join life_user d on c.user_id = d.id and d.delete_flag = 0 " +
|
|
|
- "left join store_user e on a.store_id = e.store_id and e.delete_flag = 0 ${ew.customSqlSegment}")
|
|
|
+ "left join store_user e on a.store_id = e.store_id and e.delete_flag = 0 ${ew.customSqlSegment}")
|
|
|
StoreCommentAppealVo getCommentDetail(@Param(Constants.WRAPPER) QueryWrapper<StoreCommentAppealVo> queryWrapper);
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 申诉列表(平台端使用)
|
|
|
* 注意:comment_id 关联的是 common_rating.id(评价ID),不是 store_comment.id
|
|
|
+ * 注意:common_rating 表不加 delete_flag = 0 条件,以便申诉通过后仍能显示评价快照数据
|
|
|
*
|
|
|
* @return List<Map < String, Object>>
|
|
|
*/
|
|
|
@Select("SELECT sca.id, sca.appeal_reason, sca.appeal_status, cr.content comment_content, si.img_url, cr.image_urls user_img_url, cr.id comment_id, cr.business_id " +
|
|
|
"FROM store_comment_appeal sca " +
|
|
|
- "LEFT JOIN common_rating cr ON sca.comment_id = cr.id AND cr.delete_flag = 0 " +
|
|
|
+ "LEFT JOIN common_rating cr ON sca.comment_id = cr.id " +
|
|
|
"LEFT JOIN store_img si ON sca.img_id = si.id " +
|
|
|
"WHERE sca.appeal_status = 0 and record_id is null AND sca.delete_flag = 0")
|
|
|
List<Map<String, Object>> getAppealList();
|