|
|
@@ -38,12 +38,11 @@ public interface StoreCommentMapper extends BaseMapper<StoreComment> {
|
|
|
* @param queryWrapper 查询条件
|
|
|
* @return List<StoreCommentVo>
|
|
|
*/
|
|
|
- @Select("SELECT a.*, IF(INSTR( a.phone_id, 'user' ) > 0, b.user_name, c.store_name ) user_name, " +
|
|
|
- " IF(INSTR( a.phone_id, 'user' ) > 0, b.user_image, e.img_url ) user_image FROM store_comment a "
|
|
|
+ @Select("SELECT a.*, IF(INSTR( a.phone_id, 'user' ) > 0, b.user_name, c.store_name ) user_name, "
|
|
|
+ + "IF(INSTR( a.phone_id, 'store' ) > 0, d.head_img, b.user_image ) user_image FROM store_comment a "
|
|
|
+ "left join life_user b on a.user_id = b.id and b.delete_flag = 0 "
|
|
|
+ "left join store_info c on a.store_id = c.id and c.delete_flag = 0 "
|
|
|
- + "left join store_user d on d.store_id = c.id and d.delete_flag = 0 "
|
|
|
- + "left join store_img e on a.store_id = e.store_id and e.img_type = 10 and e.delete_flag = 0 ${ew.customSqlSegment}")
|
|
|
+ + "left join store_user d on d.store_id = c.id and d.delete_flag = 0 ${ew.customSqlSegment}")
|
|
|
List<StoreCommentVo> getCommentList(@Param(Constants.WRAPPER) QueryWrapper<StoreCommentVo> queryWrapper);
|
|
|
|
|
|
/**
|
|
|
@@ -94,11 +93,11 @@ public interface StoreCommentMapper extends BaseMapper<StoreComment> {
|
|
|
* @param queryWrapper 查询条件
|
|
|
* @return IPage<StoreCommentVo>
|
|
|
*/
|
|
|
- @Select("SELECT a.*, COALESCE(b.user_name, c.store_name) user_name, IF(a.user_id is null, d.head_img, b.user_image) user_image FROM store_comment a "
|
|
|
+ @Select("SELECT a.*, COALESCE(b.user_name, c.store_name) user_name, "
|
|
|
+ + "IF(INSTR( a.phone_id, 'store' ) > 0, d.head_img, b.user_image ) user_image FROM store_comment a "
|
|
|
+ "left join life_user b on a.user_id = b.id and b.delete_flag = 0 "
|
|
|
+ "left join store_info c on a.store_id = c.id and c.delete_flag = 0 "
|
|
|
- + "left join store_user d on d.store_id = c.id and d.delete_flag = 0 "
|
|
|
- + "left join store_img e on a.store_id = e.store_id and e.img_type = 10 and e.delete_flag = 0 ${ew.customSqlSegment}")
|
|
|
+ + "left join store_user d on d.store_id = c.id and d.delete_flag = 0 ${ew.customSqlSegment}")
|
|
|
IPage<StoreCommentVo> getCommentPage(IPage<StoreCommentVo> page, @Param(Constants.WRAPPER) QueryWrapper<StoreCommentVo> queryWrapper);
|
|
|
|
|
|
/**
|