luodangjia
2025-01-13 e734816f2da83f4d0f58d9d09cef45a3a658a466
Merge remote-tracking branch 'origin/master'

# Conflicts:
# ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/GoodsClientFallbackFactory.java
# ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/GoodsClient.java
# ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
8个文件已修改
38 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/vo/CouponInfoVo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/GoodsClientFallbackFactory.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/GoodsClient.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/SeckillActivityInfoServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/vo/CouponInfoVo.java
@@ -115,7 +115,7 @@
    @ApiModelProperty(value = "可领取对应的ids,用find_in_set查询")
    @TableField("person_ids")
    private String personIds;
    @ApiModelProperty(value = "商品卷对应的商品名称")
    @TableField(exist = false)
    private List<String> goodNames;
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/GoodsClientFallbackFactory.java
@@ -44,6 +44,11 @@
            public R<Void> editGoodsNum(Integer goodsId, Integer num) {
                return R.fail();
            }
            @Override
            public R<List<Goods>> getAllGoods() {
                return R.fail("获取所有商品失败:" + cause.getMessage());
            }
        };
    }
}
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/GoodsClient.java
@@ -55,4 +55,12 @@
     */
    @PutMapping("/goods/editGoodsNum")
    R<Void> editGoodsNum(@RequestParam("goodsId") Integer goodsId, @RequestParam("num") Integer num);
    /**
     * 获取所有商品
     * @return
     */
    @PostMapping("/goods/getAllGoods")
    R<List<Goods>> getAllGoods();
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserCouponController.java
@@ -86,7 +86,9 @@
            if (vo.getCouponType()==4){
                List<String> goodNames = new ArrayList<>();
                if (vo.getForGoodIds().equals("-1")){
                        goodNames.add("全部商品");
                    List<Goods> data1 = goodsClient.getAllGoods().getData();
                    List<String> collect = data1.stream().map(Goods::getName).collect(Collectors.toList());
                    goodNames.addAll(collect);
                }else{
                    String[] split = vo.getForGoodIds().split(",");
                    R<List<Goods>> goodsById = goodsClient.getGoodsById(split);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
@@ -234,5 +234,16 @@
        goodsService.updateById(goods);
        return R.ok();
    }
    /**
     * 获取所有商品
     * @return
     */
    @PostMapping("/getAllGoods")
    public R<List<Goods>> getAllGoods(){
        List<Goods> list = goodsService.list(new LambdaQueryWrapper<Goods>().eq(Goods::getDelFlag, 0).eq(Goods::getStatus, 2));
        return R.ok(list);
    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java
@@ -100,7 +100,8 @@
            if (appUser ==null){
                return R.fail("当前号码暂无注册用户");
            }
            appUser.setUserType(2);
            appUserClient.editAppUserById(appUser);
            AppUserShop appUserShop = new AppUserShop();
            appUserShop.setShopId(sysUser.getObjectId());
            appUserShop.setAppUserId(appUser.getId());
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -259,7 +259,8 @@
        Integer integer = orderClient.getGoodsSaleNum(goods.getId(), 1).getData();
        goodsVO.setSaleNum(integer);
        GoodsEvaluate goodsEvaluate = goodsEvaluateService.lambdaQuery().eq(GoodsEvaluate::getGoodsId, goodsId)
                .orderByDesc(GoodsEvaluate::getGrade).eq(GoodsEvaluate::getStatus, 2).eq(GoodsEvaluate::getDelFlag, 0).last(" limit 0, 1").one();
                .orderByDesc(GoodsEvaluate::getGrade).eq(GoodsEvaluate::getStatus, 2).isNotNull(GoodsEvaluate::getComment)
                .eq(GoodsEvaluate::getDelFlag, 0).last(" limit 0, 1").one();
        if (null != goodsEvaluate) {
            AppUser appUserById = appUserClient.getAppUserById(goodsEvaluate.getAppUserId());
            if(null != appUserById){
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/SeckillActivityInfoServiceImpl.java
@@ -134,7 +134,7 @@
        seckillActivityDetailVO.setShopList(shops);
        Integer integer = orderClient.getGoodsSaleNum(goods.getId(), 2).getData();
        seckillActivityDetailVO.setSaleNum(integer);
        GoodsEvaluate goodsEvaluate = goodsEvaluateService.lambdaQuery().eq(GoodsEvaluate::getGoodsId, goodsId)
        GoodsEvaluate goodsEvaluate = goodsEvaluateService.lambdaQuery().eq(GoodsEvaluate::getGoodsId, goodsId).isNotNull(GoodsEvaluate::getComment)
                .orderByDesc(GoodsEvaluate::getGrade).eq(GoodsEvaluate::getStatus, 2).eq(GoodsEvaluate::getDelFlag, 0).last(" limit 0, 1").one();
        if (null != goodsEvaluate) {
            AppUser appUserById = appUserClient.getAppUserById(goodsEvaluate.getAppUserId());