瀏覽代碼

获取门店趣味信息

qxy 1 月之前
父節點
當前提交
877c3a5333

+ 2 - 1
alien-entity/src/main/java/shop/alien/mapper/StoreCommentSummaryInterestMapper.java

@@ -1,5 +1,6 @@
 package shop.alien.mapper;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Insert;
 import org.apache.ibatis.annotations.Mapper;
 import shop.alien.entity.store.StoreCommentSummaryInterest;
@@ -11,7 +12,7 @@ import java.util.List;
  * AI 服务 店铺趣味信息
  */
 @Mapper
-public interface StoreCommentSummaryInterestMapper {
+public interface StoreCommentSummaryInterestMapper extends BaseMapper<StoreCommentSummaryInterest> {
     @Insert({
             "<script>", // 开启动态 SQL 脚本
             "INSERT INTO store_comment_summary_interest (",

+ 14 - 0
alien-store/src/main/java/shop/alien/store/controller/StoreInfoController.java

@@ -12,6 +12,7 @@ import shop.alien.entity.result.R;
 import shop.alien.entity.store.*;
 import shop.alien.entity.store.dto.StoreInfoDto;
 import shop.alien.entity.store.vo.*;
+import shop.alien.mapper.StoreCommentSummaryInterestMapper;
 import shop.alien.mapper.StoreImgMapper;
 import shop.alien.mapper.TagsMainMapper;
 import shop.alien.mapper.WebAuditMapper;
@@ -45,6 +46,8 @@ public class StoreInfoController {
 
     private final WebAuditMapper webAuditMapper;
 
+    private final StoreCommentSummaryInterestMapper storeCommentSummaryInterestMapper;
+
     @ApiOperation("获取所有门店")
     @ApiOperationSupport(order = 1)
     @GetMapping("/getAll")
@@ -740,4 +743,15 @@ public class StoreInfoController {
         return R.data(voList);
     }
 
+    @ApiOperation(value = "AI服务-门店趣味信息")
+    @GetMapping("/getStoreInterestInfo")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "storeId", value = "门店id", dataType = "int", paramType = "query")
+    })
+    public R<List<StoreCommentSummaryInterest>> getStoreInterestInfo(int storeId) {
+        log.info("StoreInfoController.getStoreInterestInfo?storeId={}", storeId);
+        List<StoreCommentSummaryInterest> list = storeCommentSummaryInterestMapper.selectList(new LambdaQueryWrapper<StoreCommentSummaryInterest>().eq(StoreCommentSummaryInterest :: getStoreId, storeId));
+        return R.data(list);
+    }
+
 }