Przeglądaj źródła

炮灰小程序模拟数据+侧边栏群发飞书看课链接

cgp 1 dzień temu
rodzic
commit
cc8c321530

+ 11 - 0
fs-qwhook-sop/src/main/java/com/fs/app/controller/ApisFsUserCourseVideoController.java

@@ -178,6 +178,17 @@ public class ApisFsUserCourseVideoController extends BaseController {
     }
 
 
+    @GetMapping("/createRoomLinkFeishu")
+    @ApiOperation("创建发群课程链接--飞书")
+    public R createRoomLinkByFeishu(FsCourseLinkMiniParam param) {
+        QwUser qwUser = qwExternalContactService.getQwUserByRedis(param.getCorpId().trim(),param.getQwUserId().trim());
+        if (qwUser==null||qwUser.getCompanyId()==null){
+            return R.error("无权限");
+        }
+        return fsUserCourseVideoService.createRoomLinkByFeishu(param,qwUser.getCompanyUserId());//生成飞书群发课程链接
+    }
+
+
 
     @PostMapping("/selectTagList")
     @ApiOperation("查询标签列表")

+ 11 - 0
fs-qwhook-sop/src/main/java/com/fs/app/controller/FsUserCourseVideoController.java

@@ -128,6 +128,17 @@ public class FsUserCourseVideoController  extends BaseController  {
         return fsUserCourseVideoService.createSaleEasyRoomMiniLink(param,qwUser.getCompanyUserId());//生成销售易群发课程链接
     }
 
+
+    @GetMapping("/createRoomLinkFeishu")
+    @ApiOperation("创建发群课程链接--飞书")
+    public R createRoomLinkByFeishu(FsCourseLinkMiniParam param) {
+        QwUser qwUser = qwExternalContactService.getQwUserByRedis(param.getCorpId().trim(),param.getQwUserId().trim());
+        if (qwUser==null||qwUser.getCompanyId()==null){
+            return R.error("无权限");
+        }
+        return fsUserCourseVideoService.createRoomLinkByFeishu(param,qwUser.getCompanyUserId());//生成飞书群发课程链接
+    }
+
     /**
      * 创建 发客户小程序
      */

+ 11 - 0
fs-qwhook/src/main/java/com/fs/app/controller/ApisFsUserCourseVideoController.java

@@ -164,4 +164,15 @@ public class ApisFsUserCourseVideoController extends BaseController {
         return fsUserCourseVideoService.createSaleEasyRoomMiniLink(param,qwUser.getCompanyUserId());//生成销售易群发课程链接
     }
 
+
+    @GetMapping("/createRoomLinkFeishu")
+    @ApiOperation("创建发群课程链接--飞书")
+    public R createRoomLinkByFeishu(FsCourseLinkMiniParam param) {
+        QwUser qwUser = qwExternalContactService.getQwUserByRedis(param.getCorpId().trim(),param.getQwUserId().trim());
+        if (qwUser==null||qwUser.getCompanyId()==null){
+            return R.error("无权限");
+        }
+        return fsUserCourseVideoService.createRoomLinkByFeishu(param,qwUser.getCompanyUserId());//生成飞书群发课程链接
+    }
+
 }

+ 3 - 0
fs-service/src/main/java/com/fs/common/param/BaseQueryParam.java

@@ -19,4 +19,7 @@ public class BaseQueryParam extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "搜索字符串")
     private String keyword;
 
+    @ApiModelProperty(value = "炮灰小程序查询类目 1:百货,2:服饰")
+    private Integer casualtiesType;
+
 }

+ 5 - 0
fs-service/src/main/java/com/fs/course/service/IFsUserCourseVideoService.java

@@ -245,4 +245,9 @@ public interface IFsUserCourseVideoService
      * 侧边栏发销售易课程链接(群发)
      * */
     R createSaleEasyRoomMiniLink(FsCourseLinkMiniParam param,Long companyUserId);
+
+    /**
+     * 侧边栏发飞书课程链接(群发)
+     * */
+    R createRoomLinkByFeishu(FsCourseLinkMiniParam param, Long companyUserId);
 }

+ 89 - 0
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -40,6 +40,7 @@ import com.fs.course.service.IFsUserCourseVideoService;
 import com.fs.course.service.IFsVideoResourceService;
 import com.fs.course.vo.*;
 import com.fs.course.vo.newfs.*;
+import com.fs.feishu.service.FeiShuService;
 import com.fs.his.domain.FsUser;
 import com.fs.his.domain.FsUserIntegralLogs;
 import com.fs.his.domain.FsUserWx;
@@ -56,6 +57,7 @@ import com.fs.qw.domain.*;
 import com.fs.qw.mapper.*;
 import com.fs.qw.service.IQwCompanyService;
 import com.fs.qw.service.IQwExternalContactService;
+import com.fs.qw.vo.QwSopCourseFinishTempSetting;
 import com.fs.qwApi.Result.QwAddContactWayResult;
 import com.fs.qwApi.param.QwAddContactWayParam;
 import com.fs.qwApi.service.QwApiService;
@@ -271,11 +273,16 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
     @Autowired
     private FsUserCourseMapper courseMapper;
 
+    @Autowired
+    private FeiShuService feiShuService;
+
     private final BlockingQueue<FsCourseWatchLog> watchLogsQueue = new LinkedBlockingQueue<>(20000);
 
 
     private static final String gjminiappLink = "/pages/course/learning?course=";
 
+    private static final String feishuMiniappLink = "/pages_course/video?course=";
+
     /**
      * 查询课堂视频
      *
@@ -3798,6 +3805,88 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
         return R.ok().put("data",news);
     }
 
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public R createRoomLinkByFeishu(FsCourseLinkMiniParam param, Long companyUserId) {
+        String json = configService.selectConfigByKey("course.config");
+        CourseConfig config = JSON.parseObject(json, CourseConfig.class);
+
+        QwUser qwUser = qwExternalContactService.getQwUserByRedis(param.getCorpId().trim(), param.getQwUserId().trim());
+
+        if (qwUser==null||qwUser.getCompanyId()==null||qwUser.getCompanyUserId()==null){
+            return R.error("员工未绑定 销售公司 或 销售 请先绑定");
+        }
+
+        QwCompany qwCompany = iQwCompanyService.getQwCompanyByRedis(param.getCorpId());
+
+        if (qwCompany == null ) {
+            return  R.error().put("msg","企业不存在,请联系管理员");
+        }
+        String corpId = param.getCorpId();
+        Long courseId = param.getCourseId();
+        //qw_user表的主键id
+        Long qwUserId = qwUser.getId();
+        Date createTime = DateUtils.getNowDate();
+        Long externalUserId = param.getExternalUserId();
+        Long videoId = param.getVideoId();
+        Long companyId = qwCompany.getId();
+
+        if (videoId == null) {
+            log.error("飞书链接生成失败:视频ID为空");
+            return  R.error().put("msg","飞书链接生成失败:视频ID为空");
+        }
+
+        //2.创建课程短链
+        Map<String, String> feishuH5Link = createFeishuH5Link(param.getCorpId(), createTime, courseId.intValue(), videoId.intValue(), String.valueOf(qwUserId), companyUserId, companyId, externalUserId, config);
+        //获取生成的课程短链码
+        String shortCode = feishuH5Link.get("link");
+
+        //3.调用生成飞书注册授权链接
+        String feishuLink = feiShuService.getFeishuRegisterLink(videoId, companyId, courseId, companyUserId,shortCode);
+
+        if (StringUtils.isEmpty(feishuLink)) {
+            throw new CustomException("生成飞书注册链接失败");
+        }
+        JSONObject news = new JSONObject(true);
+        // 获取配置的小程序id
+        QwAppMiniProgramRelation qwAppMiniProgramRelation = qwAppMiniProgramRelationMapper.selectQwAppMiniProgramRelationByAgentIdAndCorpId(param.getAppAgentId(), param.getCorpId());
+        if (qwAppMiniProgramRelation == null){
+            log.error("createRoomLinkByFeishu()未找到侧边栏配置的小程序,appAgentId:{},corpId:{}", param.getAppAgentId(), param.getCorpId());
+            news.put("miniprogramAppid", qwCompany.getMiniAppId());
+        }else{
+            news.put("miniprogramAppid", qwAppMiniProgramRelation.getMiniAppId());
+        }
+        news.put("miniprogramTitle", param.getTitle());
+        news.put("miniprogramPicUrl", config.getSidebarImageUrl());
+        news.put("miniprogramPage", feishuLink);
+
+        return R.ok().put("data",news);
+    }
+
+    /**
+     * 生成课程链接
+     * */
+    private Map<String, String> createFeishuH5Link(String corpId, Date sendTime,
+                                                   Integer courseId, Integer videoId, String qwUserId,
+                                                   Long companyUserId, Long companyId, Long externalId, CourseConfig config) {
+        FsCourseLink link = createFsCourseLink(corpId, sendTime, courseId, videoId, Long.valueOf(qwUserId),
+                companyUserId, companyId, externalId, 3, null);
+        FsCourseRealLink courseMap = new FsCourseRealLink();
+        BeanUtils.copyProperties(link, courseMap);
+        String courseJson = JSON.toJSONString(courseMap);
+        String realLinkFull = feishuMiniappLink + courseJson;
+        if (StringUtils.isNotEmpty(config.getRealLinkGjDomainName())) {
+            realLinkFull = config.getRealLinkGjDomainName() + realLinkFull;
+        }
+        link.setRealLink(realLinkFull);
+        link.setUpdateTime(new Date());
+        fsCourseLinkMapper.insertFsCourseLink(link);
+        Map<String, String> result = new HashMap<>();
+        result.put("url", link.getRealLink());//真实课程链接
+        result.put("link", link.getLink());//课程短链
+        return result;
+    }
+
     private Map<String, String> createH5GjLinkByMiniApp(String corpId, Date sendTime,
                                                         Integer courseId, Integer videoId, String qwUserId,
                                                         Long companyUserId, Long companyId, Long externalId, CourseConfig config) {

+ 3 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreProductQueryParam.java

@@ -35,4 +35,7 @@ public class FsStoreProductQueryParam extends BaseQueryParam implements Serializ
     private Integer isDrug;
     //店铺id
     private Long storeId;
+
+    @ApiModelProperty(value = "炮灰小程序查询类目 1:百货,2:服饰")
+    private Integer casualtiesType;
 }

+ 191 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/ProductServiceMock.java

@@ -0,0 +1,191 @@
+package com.fs.hisStore.service.impl;
+
+import com.fs.hisStore.vo.FsStoreProductListQueryVO;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * 模拟商品数据服务(用于开发/测试环境)
+ * 支持百货、服饰两类商品,自动分配商品名称、描述和图片
+ */
+@Service
+public class ProductServiceMock {
+
+    /**
+     * 模拟推荐商品列表
+     * @param limit    返回条数
+     * @param category 商品类别:1-百货,2-服饰
+     * @return 商品列表
+     */
+    public List<FsStoreProductListQueryVO> selectFsStoreProductTuiQuery(int limit, int category) {
+        return generateMockList(limit, category, "推荐");
+    }
+
+    /**
+     * 模拟喜欢商品列表
+     * @param limit    返回条数
+     * @param category 商品类别:1-百货,2-服饰
+     * @return 商品列表
+     */
+    public List<FsStoreProductListQueryVO> selectFsStoreProductGoodQuery(int limit, int category) {
+        return generateMockList(limit, category, "喜欢");
+    }
+
+    // ================== 私有核心生成方法 ==================
+    private List<FsStoreProductListQueryVO> generateMockList(int limit, int category, String type) {
+        List<FsStoreProductListQueryVO> list = new ArrayList<>(limit);
+        Random random = new Random();
+
+        // ----- 1. 分类商品名称(按类别) -----
+        String[][] namesByCategory = {
+                // 百货(category=1)
+                {
+                        "不锈钢保温杯", "多功能收纳盒", "竹纤维毛巾", "无痕衣架(10个装)", "可折叠购物袋",
+                        "陶瓷马克杯", "保鲜碗三件套", "厨房计时器", "防滑地垫", "LED小夜灯",
+                        "指甲刀套装", "化妆棉(200片)", "牙刷架", "挂钩贴", "桌面垃圾桶"
+                },
+                // 服饰(category=2)
+                {
+                        "纯棉短袖T恤", "宽松卫衣", "弹力牛仔裤", "运动休闲裤", "连帽开衫外套",
+                        "帆布鞋", "板鞋", "凉拖", "棒球帽", "帆布双肩包",
+                        "丝巾", "皮带", "袜子(5双装)", "内衣套装", "瑜伽裤"
+                }
+        };
+
+        // ----- 2. 分类商品描述(按类别) -----
+        String[][] infoByCategory = {
+                // 百货描述
+                {
+                        "304不锈钢,长效保温", "大容量,分类整理更轻松", "柔软吸水,亲肤耐用",
+                        "防滑设计,坚固承重", "轻便折叠,环保材质",
+                        "简约设计,手感细腻", "密封保鲜,微波可用", "精准定时,操作简单",
+                        "吸水防滑,易清洗", "柔光不刺眼,节能省电",
+                        "锋利耐用,收纳方便", "柔软亲肤,不掉絮", "免钉安装,节省空间",
+                        "强力承重,不留痕", "精致小巧,实用美观"
+                },
+                // 服饰描述
+                {
+                        "100%纯棉,透气舒适", "潮流宽松,百搭时尚", "高弹力,修身显瘦",
+                        "运动休闲,自在自如", "连帽设计,防风保暖",
+                        "经典帆布,轻便耐磨", "简约板鞋,日常百搭", "EVA材质,软底防滑",
+                        "可调节帽围,遮阳防晒", "大容量,轻便背负",
+                        "真丝质感,优雅点缀", "头层牛皮,质感出众", "精梳棉,吸汗透气",
+                        "舒适无痕,贴身呵护", "高弹力,适合瑜伽运动"
+                }
+        };
+
+        // ----- 3. 分类商品图片(按类别)★ 请替换为你的真实图片链接 ★ -----
+        String[] dailyImages = {
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E6%94%B6%E7%BA%B3%E7%9B%92.jpg",   // 收纳盒
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E4%BF%9D%E6%B8%A9%E6%9D%AF.jpg",   // 保温杯
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E6%AF%9B%E5%B7%BE.jpg",  // 毛巾
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E8%A1%A3%E6%9E%B6.jpg",        // 衣架
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E6%8A%98%E5%8F%A0%E8%A2%8B.jpg",      // 折叠袋
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E9%99%B6%E7%93%B7%E6%9D%AF.jpg",   // 陶瓷杯
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E8%AE%A1%E6%97%B6%E5%99%A8.jpg", // 计时器
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E5%B0%8F%E5%A4%9C%E7%81%AF.jpg",   // 小夜灯
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E5%9C%B0%E5%9E%AB.jpg"      // 地垫
+        };
+
+        String[] clothingImages = {
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/T%E6%81%A4.jpg",     // T恤
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E5%8D%AB%E8%A1%A3.jpg",     // 卫衣
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E7%89%9B%E4%BB%94%E8%A3%A4.jpg",      // 牛仔裤
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E5%B8%86%E5%B8%83%E9%9E%8B.jpg",// 帆布鞋
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E4%BC%91%E9%97%B2%E8%A3%A4.jpg",// 休闲裤
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E6%A3%92%E7%90%83%E5%B8%BD.jpg",// 棒球帽
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E5%8F%8C%E8%82%A9%E5%8C%85.jpg",   // 双肩包
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E4%B8%9D%E5%B7%BE.jpg",      // 丝巾
+                "https://ysy-1329817240.cos.ap-guangzhou.myqcloud.com/app/casualtiesType/%E7%9A%AE%E5%B8%A6.jpg"        // 皮带
+        };
+
+        // 根据 category 选择对应的数据池
+        int idx = (category == 2) ? 1 : 0;
+        String[] names = namesByCategory[idx];
+        String[] infos = infoByCategory[idx];
+        String[] images = (category == 2) ? clothingImages : dailyImages;
+
+        // 通用单位
+        String[] unitNames = {"个", "件", "双", "条", "只", "套", "盒"};
+
+        // ----- 4. 循环生成指定数量的商品 -----
+        for (int i = 0; i < limit; i++) {
+            FsStoreProductListQueryVO vo = new FsStoreProductListQueryVO();
+
+            // ---- 基础ID ----
+            vo.setProductId(400000L + i + 1 + category * 100000L); // 不同类别ID段不同
+            vo.setStoreId(500000L + random.nextInt(100));
+
+            // ---- 图片(随机从对应图片池中选取) ----
+            String randomImageUrl = images[random.nextInt(images.length)];
+            vo.setImage(randomImageUrl);
+
+            // ---- 商品名称(加前缀区分推荐/喜欢) ----
+            String baseName = names[i % names.length];
+            String prefix = "推荐".equals(type) ? "🔥 " : "❤️ ";
+            vo.setProductName(prefix + baseName);
+
+            // ---- 商品描述 ----
+            vo.setProductInfo(infos[i % infos.length]);
+
+            // ---- 分类ID(随机1~12) ----
+            vo.setCateId((long) (random.nextInt(12) + 1));
+
+            // ---- 价格(百货5~150,服饰20~300) ----
+            double minPrice = (category == 2) ? 20 : 5;
+            double maxPrice = (category == 2) ? 300 : 150;
+            double priceVal = minPrice + random.nextDouble() * (maxPrice - minPrice);
+            vo.setPrice(BigDecimal.valueOf(priceVal).setScale(2, BigDecimal.ROUND_HALF_UP));
+            double otPriceVal = priceVal * (0.8 + random.nextDouble() * 0.5);
+            vo.setOtPrice(BigDecimal.valueOf(otPriceVal).setScale(2, BigDecimal.ROUND_HALF_UP));
+
+            // ---- 销量(0~9999) ----
+            vo.setSales(random.nextInt(10000));
+
+            // ---- 单位 ----
+            vo.setUnitName(unitNames[random.nextInt(unitNames.length)]);
+
+            // ---- ★ 非药品标志,所有药品字段置 null(与真实数据一致) ★ ----
+            vo.setIsDrug("0");
+            vo.setDrugImage(null);
+            vo.setDrugRegCertNo(null);
+            vo.setCommonName(null);
+            vo.setDosageForm(null);
+            vo.setUnitPrice(null);
+            vo.setBatchNumber(null);
+            vo.setMah(null);
+            vo.setMahAddress(null);
+            vo.setManufacturer(null);
+            vo.setManufacturerAddress(null);
+            vo.setIndications(null);
+            vo.setDosage(null);
+            vo.setAdverseReactions(null);
+            vo.setContraindications(null);
+            vo.setPrecautions(null);
+
+            // ---- 审核状态(固定为"1") ----
+            vo.setIsAudit("1");
+
+            // ---- 店铺信息(随机1~5个店铺) ----
+            int storeCount = random.nextInt(5) + 1;
+            vo.setStoreCount(storeCount);
+            StringBuilder ids = new StringBuilder();
+            for (int j = 0; j < storeCount; j++) {
+                if (j > 0) ids.append(",");
+                ids.append(500000L + random.nextInt(100));
+            }
+            vo.setStoreIds(ids.toString());
+
+            // ---- 是否赠品(约15%概率) ----
+            vo.setIsGift(random.nextInt(7) == 0 ? 1 : 0);
+
+            list.add(vo);
+        }
+
+        return list;
+    }
+}

+ 2 - 1
fs-service/src/main/java/com/fs/sop/service/impl/SopUserLogsInfoServiceImpl.java

@@ -1933,7 +1933,8 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
                     if (StringUtils.isNotEmpty(feishuLink)) {
                         // 替换占位符
                         String txt = StringUtil.strIsNullOrEmpty(qwUser.getWelcomeText()) ? "" : qwUser.getWelcomeText();
-                        String customerTitle = StringUtil.strIsNullOrEmpty(contact.getStageStatus()) || "0".equals(contact.getStageStatus()) ? "同学" : contact.getStageStatus();
+                        String customerTitle = contact == null ? "同学" :
+                                (StringUtil.strIsNullOrEmpty(contact.getStageStatus()) || "0".equals(contact.getStageStatus()) ? "同学" : contact.getStageStatus());
                         if (StringUtils.isNotEmpty(st.getLinkTitle())) {
                             st.setLinkTitle(st.getLinkTitle()
                                     .replaceAll("#销售称呼#", txt)

+ 23 - 4
fs-user-app/src/main/java/com/fs/app/controller/store/ProductScrmController.java

@@ -10,6 +10,7 @@ import com.fs.erp.service.IErpGoodsService;
 import com.fs.hisStore.domain.*;
 import com.fs.hisStore.param.*;
 import com.fs.hisStore.service.*;
+import com.fs.hisStore.service.impl.ProductServiceMock;
 import com.fs.hisStore.vo.FsStoreCartVO;
 import com.fs.hisStore.vo.FsStoreProductAttrValueQueryVO;
 import com.fs.hisStore.vo.FsStoreProductListQueryVO;
@@ -54,6 +55,9 @@ public class ProductScrmController extends AppBaseController {
 
     @Autowired
     private IFsStoreScrmService storeScrmService;
+
+    @Autowired
+    private ProductServiceMock productServiceMock;//模拟数据,用于炮灰小程序展示
     /**
      * 获取用户信息
      * @param storeId
@@ -93,7 +97,12 @@ public class ProductScrmController extends AppBaseController {
     public R getProducts(FsStoreProductQueryParam param, HttpServletRequest request){
         PageHelper.startPage(param.getPage(), param.getPageSize());
         param.setIsDisplay(1);
-        List<FsStoreProductListQueryVO> productList=productService.selectFsStoreProductListQuery(param);
+        List<FsStoreProductListQueryVO> productList;
+        if (param.getCasualtiesType()==null){
+            productList=productService.selectFsStoreProductListQuery(param);
+        }else {
+            productList=productServiceMock.selectFsStoreProductGoodQuery(10,param.getCasualtiesType());
+        }
         PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(productList);
         return R.ok().put("data",listPageInfo);
     }
@@ -260,15 +269,25 @@ public class ProductScrmController extends AppBaseController {
     @GetMapping("/getTuiProducts")
     public R getTuiProducts(BaseQueryParam param, HttpServletRequest request){
         PageHelper.startPage(param.getPage(), param.getPageSize());
-        List<FsStoreProductListQueryVO> list=productService.selectFsStoreProductTuiListQuery();
-        PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(list);
+        List<FsStoreProductListQueryVO> productList;
+        if (param.getCasualtiesType()==null){
+            productList=productService.selectFsStoreProductTuiListQuery();
+        }else {
+            productList=productServiceMock.selectFsStoreProductTuiQuery(10,param.getCasualtiesType());
+        }
+        PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(productList);
         return R.ok().put("data",listPageInfo);
     }
     @ApiOperation("获取喜欢商品数据")
     @GetMapping("/getGoodsProducts")
     public R getGoodsProducts(BaseQueryParam param, HttpServletRequest request){
         PageHelper.startPage(param.getPage(), param.getPageSize());
-        List<FsStoreProductListQueryVO> list=productService.selectFsStoreProductGoodListQuery();
+        List<FsStoreProductListQueryVO> list;
+        if (param.getCasualtiesType()==null){
+            list=productService.selectFsStoreProductGoodListQuery();
+        }else {
+            list=productServiceMock.selectFsStoreProductGoodQuery(10,param.getCasualtiesType());
+        }
         PageInfo<FsStoreProductListQueryVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);