From 4d379d60060f49abed7214d3c12e9ae8951074fe Mon Sep 17 00:00:00 2001 From: chc <1501738723@qq.com> Date: Fri, 10 Mar 2023 14:49:27 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E8=81=8A=E5=A4=A9=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/im/serviceimpl/ImTalkServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/im/serviceimpl/ImTalkServiceImpl.java b/framework/src/main/java/cn/lili/modules/im/serviceimpl/ImTalkServiceImpl.java index bb59c584..c03f4c01 100644 --- a/framework/src/main/java/cn/lili/modules/im/serviceimpl/ImTalkServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/im/serviceimpl/ImTalkServiceImpl.java @@ -77,12 +77,13 @@ public class ImTalkServiceImpl extends ServiceImpl impleme Member self = memberService.getById(selfId); Member otherMember = memberService.getById(userId); Store otherStore = storeService.getById(userId); - if(otherStore != null){ - imTalk = new ImTalk(self, otherStore); - }else if (otherMember != null){ - imTalk = new ImTalk(self, otherMember); - } + if(otherStore != null){ + imTalk = new ImTalk(self, otherStore); + }else if (otherMember != null){ + imTalk = new ImTalk(self, otherMember); + } } + this.save(imTalk); } return imTalk; } From 4af58aea4a8fde61f64121dd24a5c75a606bc0ef Mon Sep 17 00:00:00 2001 From: 17600048398 <277692624@qq.com> Date: Fri, 10 Mar 2023 16:36:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=95=86=E5=93=81=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E5=BF=AB=E9=80=92=E8=B4=B9=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lili/modules/order/cart/render/impl/SkuFreightRender.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/main/java/cn/lili/modules/order/cart/render/impl/SkuFreightRender.java b/framework/src/main/java/cn/lili/modules/order/cart/render/impl/SkuFreightRender.java index 795a0360..b4edf0fe 100644 --- a/framework/src/main/java/cn/lili/modules/order/cart/render/impl/SkuFreightRender.java +++ b/framework/src/main/java/cn/lili/modules/order/cart/render/impl/SkuFreightRender.java @@ -71,7 +71,7 @@ public class SkuFreightRender implements CartRenderStep { && !freightTemplate.getFreightTemplateChildList().isEmpty()) { //店铺模版免运费则跳过 if (freightTemplate.getPricingMethod().equals(FreightTemplateEnum.FREE.name())) { - break; + continue; } //运费模版 From f7e6789e233e2d0417746f4539ebd004b85aed98 Mon Sep 17 00:00:00 2001 From: 17600048398 <277692624@qq.com> Date: Fri, 10 Mar 2023 17:42:48 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=9A=E5=91=98=E6=94=B6=E8=97=8F?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8B=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/MemberCollectionController.java | 96 ------------------- .../MemberCollectionGoodsController.java | 68 +++++++++++++ .../MemberCollectionStoreController.java | 66 +++++++++++++ 3 files changed, 134 insertions(+), 96 deletions(-) delete mode 100644 buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionController.java create mode 100644 buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionGoodsController.java create mode 100644 buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionStoreController.java diff --git a/buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionController.java b/buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionController.java deleted file mode 100644 index 8fa42a0f..00000000 --- a/buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionController.java +++ /dev/null @@ -1,96 +0,0 @@ -package cn.lili.controller.member; - -import cn.lili.common.enums.ResultUtil; -import cn.lili.common.vo.PageVO; -import cn.lili.common.vo.ResultMessage; -import cn.lili.modules.member.service.GoodsCollectionService; -import cn.lili.modules.member.service.StoreCollectionService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.validation.constraints.NotNull; - -/** - * 买家端,会员收藏接口 - * - * @author Chopper - * @since 2020/11/17 2:32 下午 - */ -@RestController -@Api(tags = "买家端,会员收藏接口") -@RequestMapping("/buyer/member/collection") -public class MemberCollectionController { - - /** - * 会员商品收藏 - */ - @Autowired - private GoodsCollectionService goodsCollectionService; - /** - * 会员店铺 - */ - @Autowired - private StoreCollectionService storeCollectionService; - - /** - * 商品收藏关键字 - */ - private String goods="GOODS"; - - @ApiOperation(value = "查询会员收藏列表") - @ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺") - @GetMapping("/{type}") - public ResultMessage goodsList(@PathVariable String type, PageVO page) { - if (goods.equals(type)) { - return ResultUtil.data(goodsCollectionService.goodsCollection(page)); - } - return ResultUtil.data(storeCollectionService.storeCollection(page)); - } - - @ApiOperation(value = "添加会员收藏") - @ApiImplicitParams({ - @ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"), - @ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path") - }) - @PostMapping("/add/{type}/{id}") - public ResultMessage addGoodsCollection(@PathVariable String type, - @NotNull(message = "值不能为空") @PathVariable String id) { - if (goods.equals(type)) { - return ResultUtil.data(goodsCollectionService.addGoodsCollection(id)); - } - return ResultUtil.data(storeCollectionService.addStoreCollection(id)); - - } - - @ApiOperation(value = "删除会员收藏") - @ApiImplicitParams({ - @ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"), - @ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path") - }) - @DeleteMapping(value = "/delete/{type}/{id}") - public ResultMessage deleteGoodsCollection(@PathVariable String type, - @NotNull(message = "值不能为空") @PathVariable String id) { - if (goods.equals(type)) { - return ResultUtil.data(goodsCollectionService.deleteGoodsCollection(id)); - } - return ResultUtil.data(storeCollectionService.deleteStoreCollection(id)); - } - - @ApiOperation(value = "查询会员是否收藏") - @ApiImplicitParams({ - @ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"), - @ApiImplicitParam(name = "id", value = "值", dataType = "String", paramType = "path") - }) - @GetMapping(value = "/isCollection/{type}/{id}") - public ResultMessage isCollection(@PathVariable String type, - @NotNull(message = "值不能为空") @PathVariable String id) { - if (goods.equals(type)) { - return ResultUtil.data(this.goodsCollectionService.isCollection(id)); - } - return ResultUtil.data(this.storeCollectionService.isCollection(id)); - } -} diff --git a/buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionGoodsController.java b/buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionGoodsController.java new file mode 100644 index 00000000..c8e53e2d --- /dev/null +++ b/buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionGoodsController.java @@ -0,0 +1,68 @@ +package cn.lili.controller.member; + +import cn.lili.common.enums.ResultUtil; +import cn.lili.common.vo.PageVO; +import cn.lili.common.vo.ResultMessage; +import cn.lili.modules.member.service.GoodsCollectionService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.validation.constraints.NotNull; + +/** + * 买家端,会员收藏接口 + * + * @author Chopper + * @since 2020/11/17 2:32 下午 + */ +@RestController +@Api(tags = "买家端,会员商品收藏接口") +@RequestMapping("/buyer/member/collection") +public class MemberCollectionGoodsController { + + /** + * 会员商品收藏 + */ + @Autowired + private GoodsCollectionService goodsCollectionService; + + @ApiOperation(value = "查询会员收藏列表") + @GetMapping("/GOODS") + public ResultMessage goodsList(PageVO page) { + return ResultUtil.data(goodsCollectionService.goodsCollection(page)); + } + + @ApiOperation(value = "添加会员收藏") + @ApiImplicitParams({ + @ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path") + }) + @PostMapping("/add/GOODS/{id}") + public ResultMessage addGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) { + return ResultUtil.data(goodsCollectionService.addGoodsCollection(id)); + + } + + @ApiOperation(value = "删除会员收藏") + @ApiImplicitParams({ + @ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"), + @ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path") + }) + @DeleteMapping(value = "/delete/GOODS/{id}") + public ResultMessage deleteGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) { + return ResultUtil.data(goodsCollectionService.deleteGoodsCollection(id)); + } + + @ApiOperation(value = "查询会员是否收藏") + @ApiImplicitParams({ + @ApiImplicitParam(name = "type", value = "类型", dataType = "String", paramType = "path", example = "GOODS:商品,STORE:店铺"), + @ApiImplicitParam(name = "id", value = "值", dataType = "String", paramType = "path") + }) + @GetMapping(value = "/isCollection/GOODS/{id}") + public ResultMessage isCollection(@NotNull(message = "值不能为空") @PathVariable String id) { + return ResultUtil.data(this.goodsCollectionService.isCollection(id)); + } +} \ No newline at end of file diff --git a/buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionStoreController.java b/buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionStoreController.java new file mode 100644 index 00000000..d73708bd --- /dev/null +++ b/buyer-api/src/main/java/cn/lili/controller/member/MemberCollectionStoreController.java @@ -0,0 +1,66 @@ +package cn.lili.controller.member; + +import cn.lili.common.enums.ResultUtil; +import cn.lili.common.vo.PageVO; +import cn.lili.common.vo.ResultMessage; +import cn.lili.modules.member.service.StoreCollectionService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.validation.constraints.NotNull; + +/** + * 买家端,会员收藏接口 + * + * @author Chopper + * @since 2020/11/17 2:32 下午 + */ +@RestController +@Api(tags = "买家端,会员店铺收藏接口") +@RequestMapping("/buyer/member/storeCollection") +public class MemberCollectionStoreController { + + /** + * 会员店铺 + */ + @Autowired + private StoreCollectionService storeCollectionService; + + @ApiOperation(value = "查询会员收藏列表") + @GetMapping("/STORE") + public ResultMessage goodsList(PageVO page) { + return ResultUtil.data(storeCollectionService.storeCollection(page)); + } + + @ApiOperation(value = "添加会员收藏") + @ApiImplicitParams({ + @ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path") + }) + @PostMapping("/add/STORE/{id}") + public ResultMessage addGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) { + return ResultUtil.data(storeCollectionService.addStoreCollection(id)); + + } + + @ApiOperation(value = "删除会员收藏") + @ApiImplicitParams({ + @ApiImplicitParam(name = "num", value = "值", dataType = "Long", paramType = "path") + }) + @DeleteMapping(value = "/delete/STORE/{id}") + public ResultMessage deleteGoodsCollection(@NotNull(message = "值不能为空") @PathVariable String id) { + return ResultUtil.data(storeCollectionService.deleteStoreCollection(id)); + } + + @ApiOperation(value = "查询会员是否收藏") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "值", dataType = "String", paramType = "path") + }) + @GetMapping(value = "/isCollection/STORE/{id}") + public ResultMessage isCollection(@NotNull(message = "值不能为空") @PathVariable String id) { + return ResultUtil.data(this.storeCollectionService.isCollection(id)); + } +}