|
|
@@ -3,6 +3,7 @@ package shop.alien.mapper;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import org.apache.ibatis.annotations.Insert;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
import shop.alien.entity.store.TagsMain;
|
|
|
import shop.alien.entity.store.vo.TagsMainVo;
|
|
|
@@ -40,12 +41,13 @@ public interface TagsMainMapper extends BaseMapper<TagsMain> {
|
|
|
})
|
|
|
int insertBatchTagsMain(List<TagsMain> tagsMainList);
|
|
|
|
|
|
- @Select("SELECT\n" +
|
|
|
+ @Select("<script>" +
|
|
|
+ "SELECT\n" +
|
|
|
" main.id,\n" +
|
|
|
" main.tag_name,\n" +
|
|
|
" main.store_id,\n" +
|
|
|
" main.tag_type,\n" +
|
|
|
- " COUNT(DISTINCT synonym.comment_id) AS evaluateNumber\n" +
|
|
|
+ " IFNULL(GROUP_CONCAT(DISTINCT synonym.comment_id ORDER BY synonym.comment_id SEPARATOR ','), '') AS evaluateNumber\n" +
|
|
|
"FROM\n" +
|
|
|
" tags_main main\n" +
|
|
|
" LEFT JOIN tags_synonym synonym \n" +
|
|
|
@@ -55,6 +57,7 @@ public interface TagsMainMapper extends BaseMapper<TagsMain> {
|
|
|
" main.store_id = #{storeId} \n" +
|
|
|
" AND main.delete_flag = 0\n" +
|
|
|
"GROUP BY\n" +
|
|
|
- " main.id")
|
|
|
- List<TagsMainVo> getStoreEvaluateTags(int storeId);
|
|
|
+ " main.id" +
|
|
|
+ "</script>")
|
|
|
+ List<TagsMainVo> getStoreEvaluateTags(Integer storeId);
|
|
|
}
|