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
| | |
| | | public R<Void> editGoodsNum(Integer goodsId, Integer num) { |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R<List<Goods>> getAllGoods() { |
| | | return R.fail("获取所有商品失败:" + cause.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @PutMapping("/goods/editGoodsNum") |
| | | R<Void> editGoodsNum(@RequestParam("goodsId") Integer goodsId, @RequestParam("num") Integer num); |
| | | |
| | | |
| | | /** |
| | | * 获取所有商品 |
| | | * @return |
| | | */ |
| | | @PostMapping("/goods/getAllGoods") |
| | | R<List<Goods>> getAllGoods(); |
| | | } |
| | |
| | | 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); |
| | |
| | | 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); |
| | | } |
| | | } |
| | | |
| | |
| | | if (appUser ==null){ |
| | | return R.fail("当前号码暂无注册用户"); |
| | | } |
| | | |
| | | appUser.setUserType(2); |
| | | appUserClient.editAppUserById(appUser); |
| | | AppUserShop appUserShop = new AppUserShop(); |
| | | appUserShop.setShopId(sysUser.getObjectId()); |
| | | appUserShop.setAppUserId(appUser.getId()); |
| | |
| | | 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){ |
| | |
| | | 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()); |