From e45091fdf9e412c758bc320f3f5664081631fa4b Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期三, 12 六月 2024 20:58:50 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/handler/MyMetaObjectHandler.java | 4 ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml | 21 ++ ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java | 21 +- ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/service/impl/ArticleServiceImpl.java | 131 ++++++++------- ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java | 26 ++- ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/handler/MyMetaObjectHandler.java | 4 ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/IGoodsSkuService.java | 4 ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionBidRecordServiceImpl.java | 11 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/InnerOrderAuctionBondController.java | 6 ruoyi-modules/ruoyi-promotion/src/main/java/com/ruoyi/promotion/handler/MyMetaObjectHandler.java | 4 ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/handler/MyMetaObjectHandler.java | 4 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/handler/MyMetaObjectHandler.java | 4 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/LogisticsServiceImpl.java | 39 ++++ ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/ForepartSensitiveWordsController.java | 3 ruoyi-modules/ruoyi-auction/src/main/resources/mapper/auction/AuctionSalesroomMapper.xml | 10 ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/dto/ArticleDTO.java | 1 ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/vo/ArticleCommentsVO.java | 3 ruoyi-modules/ruoyi-auction/src/main/resources/mapper/auction/AuctionGoodsMapper.xml | 16 +- ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/service/impl/ArticleCommentsServiceImpl.java | 2 ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java | 71 +++++++- ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java | 21 + ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/dto/ArticleCommentsDTO.java | 3 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/ILogisticsService.java | 5 ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/domain/ArticleComments.java | 7 ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/MemberServiceImpl.java | 14 + ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/forepart/ForepartGoodsSkuController.java | 8 + 26 files changed, 313 insertions(+), 130 deletions(-) diff --git a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/ForepartSensitiveWordsController.java b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/ForepartSensitiveWordsController.java index 1953312..478dc58 100644 --- a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/ForepartSensitiveWordsController.java +++ b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/ForepartSensitiveWordsController.java @@ -39,8 +39,7 @@ @PostMapping("/judgeSensitiveWordsList") @ApiOperation(value = "用户端-判断敏感词") public R<judgeSensitiveWordsVO> judgeSensitiveWordsList(@RequestBody judgeSensitiveWordsDTO SensitiveWordsDTO) { - SensitiveWordsService.judgeSensitiveWordsList(SensitiveWordsDTO); - return R.ok(); + return R.ok( SensitiveWordsService.judgeSensitiveWordsList(SensitiveWordsDTO)); } } diff --git a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/dto/ArticleCommentsDTO.java b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/dto/ArticleCommentsDTO.java index 5e97a41..9fe0a3c 100644 --- a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/dto/ArticleCommentsDTO.java +++ b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/dto/ArticleCommentsDTO.java @@ -33,4 +33,7 @@ @ApiModelProperty(value = "1 评论,2 是回复") private Integer type; + @ApiModelProperty(value = "评论等级") + private Integer state; + } diff --git a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/dto/ArticleDTO.java b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/dto/ArticleDTO.java index 3c38bb3..7c43377 100644 --- a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/dto/ArticleDTO.java +++ b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/dto/ArticleDTO.java @@ -32,4 +32,5 @@ @ApiModelProperty(value = "资讯图片") private String rticleImageUrl; + } diff --git a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/vo/ArticleCommentsVO.java b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/vo/ArticleCommentsVO.java index a0f8be8..25c1439 100644 --- a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/vo/ArticleCommentsVO.java +++ b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/vo/ArticleCommentsVO.java @@ -47,5 +47,8 @@ @ApiModelProperty("是否点赞 1 点赞, 2 未点赞") private Integer islike; + @ApiModelProperty(value = "评论等级") + private Integer state; + List<ArticleCommentsVO> articleCommentsVOList; } diff --git a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/domain/ArticleComments.java b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/domain/ArticleComments.java index 67a21cb..c701444 100644 --- a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/domain/ArticleComments.java +++ b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/domain/ArticleComments.java @@ -52,11 +52,11 @@ private String createBy; @ApiModelProperty(value = "创建时间") - @TableField(value = "create_by", fill = FieldFill.INSERT) + @TableField(value = "create_time", fill = FieldFill.INSERT) private LocalDateTime createTime; @ApiModelProperty(value = "更新者") - @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE) + @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE) private String updateBy; @ApiModelProperty(value = "更新时间") @@ -77,4 +77,7 @@ @ApiModelProperty(value = "点赞数") private Integer likeCount; + @ApiModelProperty(value = "评论等级") + private Integer state; + } diff --git a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/service/impl/ArticleCommentsServiceImpl.java b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/service/impl/ArticleCommentsServiceImpl.java index 7d6996b..5def371 100644 --- a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/service/impl/ArticleCommentsServiceImpl.java +++ b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/service/impl/ArticleCommentsServiceImpl.java @@ -56,6 +56,7 @@ articleComments.setMemberId(articleCommentsDTO.getMemberId()); articleComments.setArticleId(articleCommentsDTO.getArticleId()); articleComments.setContent(articleCommentsDTO.getContent()); + articleComments.setState(articleCommentsDTO.getState()); articleComments.setType(1); }else{ articleComments.setMemberId(articleCommentsDTO.getMemberId()); @@ -63,6 +64,7 @@ articleComments.setReplyId(articleCommentsDTO.getReplyId()); articleComments.setContent(articleCommentsDTO.getContent()); articleComments.setBmemberId(articleCommentsDTO.getBmemberId()); + articleComments.setState(articleCommentsDTO.getState()); articleComments.setType(2); } Article byId = articleMapper.selectById(articleCommentsDTO.getArticleId()); diff --git a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/service/impl/ArticleServiceImpl.java b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/service/impl/ArticleServiceImpl.java index 86bcea1..7c11d38 100644 --- a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/service/impl/ArticleServiceImpl.java +++ b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/service/impl/ArticleServiceImpl.java @@ -26,6 +26,7 @@ import com.ruoyi.common.core.enums.ArticleTypeEnum; import com.ruoyi.common.core.enums.AuditStatusEnum; import com.ruoyi.common.core.exception.ServiceException; +import com.ruoyi.common.core.enums.ListingStatusEnum; import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.core.utils.page.BeanUtils; import com.ruoyi.common.core.utils.page.PageDTO; @@ -81,6 +82,7 @@ if (articleDTO.getTitle()!=null){ wrapper.like(Article::getTitle,articleDTO.getTitle()); } + wrapper.eq(Article::getListingStatus,0); wrapper.eq(Article::getStatus,2); wrapper.eq( Article::getDelFlag,0); wrapper.orderByDesc(Article::getCreateTime); @@ -203,73 +205,80 @@ Page<ArticleComments> page1 = articleCommentsService.page(page, wrapper); PageDTO<ArticleCommentsVO> articleCommentsVOPageDTO = PageDTO.of(page1, ArticleCommentsVO.class); List<ArticleCommentsVO> list2 = articleCommentsVOPageDTO.getList(); - for(ArticleCommentsVO articleCommentsVO:list2){ - R<Member> membeOne = memberClient.getMembeOne(articleCommentsVO.getMemberId(), - SecurityConstants.INNER); - Member data = membeOne.getData(); - articleCommentsVO.setMemberNickname(data.getNickname()); - articleCommentsVO.setBmemberNickavatar(data.getAvatar()); - LambdaQueryWrapper<MemberLike> wrapper1= Wrappers.lambdaQuery(); - wrapper1.eq(MemberLike::getMemberId,articleCommentsVO.getMemberId()); - wrapper1.eq(MemberLike::getArticleId,articleCommentsVO.getArticleId()); - wrapper1.eq(MemberLike::getType,2); - wrapper1.eq( MemberLike::getDelFlag,0); - List<MemberLike> list = memberLikeService.list(wrapper1); - if (list.size()>0){ - articleCommentsVO.setIslike(1); - }else { - articleCommentsVO.setIslike(2); - } - - - List<ArticleCommentsVO> articleCommentsVOList1=new ArrayList<>(); - - LambdaQueryWrapper< ArticleComments> wrapper2= Wrappers.lambdaQuery(); - wrapper2.eq(ArticleComments::getReplyId,articleCommentsVO.getArticleId()); - wrapper2.eq( ArticleComments::getDelFlag,0); - wrapper2.eq( ArticleComments::getType,2); - List<ArticleComments> list1 = articleCommentsService.list(wrapper2); - for (ArticleComments articleComments1:list1){ - ArticleCommentsVO articleCommentsVO1=new ArticleCommentsVO(); - - R<Member> membeOne1 = memberClient.getMembeOne(articleCommentsVO.getMemberId(), + if (list2!=null){ + for(int i=0;i<list2.size();i++){ + ArticleCommentsVO articleCommentsVO=list2.get(i); + R<Member> membeOne = memberClient.getMembeOne(articleCommentsVO.getMemberId(), SecurityConstants.INNER); - Member data1 = membeOne1.getData(); - - R<Member> membeOne2 = memberClient.getMembeOne(articleCommentsVO.getBmemberId(), - SecurityConstants.INNER); - Member data2 = membeOne2.getData(); - - articleCommentsVO1.setArticleId(articleComments1.getArticleId()); - articleCommentsVO1.setContent(articleComments1.getContent()); - articleCommentsVO1.setMemberId(articleComments1.getMemberId()); - articleCommentsVO1.setId(articleComments1.getId()); - articleCommentsVO1.setMemberNickname(data1.getNickname()); - articleCommentsVO1.setBmemberNickavatar(data1.getAvatar()); - articleCommentsVO1.setLikeCount(articleComments1.getLikeCount()); - articleCommentsVO1.setCreateTime(articleComments1.getCreateTime()); - articleCommentsVO1.setBmemberNickavatar(data2.getAvatar()); - articleCommentsVO1.setBmemberNickname(data2.getNickname()); - - LambdaQueryWrapper<MemberLike> wrapper3= Wrappers.lambdaQuery(); - wrapper3.eq(MemberLike::getMemberId,articleCommentsVO.getMemberId()); - wrapper3.eq(MemberLike::getArticleId,articleCommentsVO.getArticleId()); - wrapper3.eq(MemberLike::getType,2); - wrapper3.eq( MemberLike::getDelFlag,0); - List<MemberLike> list3 = memberLikeService.list(wrapper3); - if (list3.size()>0){ - articleCommentsVO1.setIslike(1); + Member data = membeOne.getData(); + articleCommentsVO.setMemberNickname(data.getNickname()); + articleCommentsVO.setMemberNickavatar(data.getAvatar()); + LambdaQueryWrapper<MemberLike> wrapper1= Wrappers.lambdaQuery(); + wrapper1.eq(MemberLike::getMemberId,articleCommentsVO.getMemberId()); + wrapper1.eq(MemberLike::getArticleId,articleCommentsVO.getId()); + wrapper1.eq(MemberLike::getType,2); + wrapper1.eq( MemberLike::getDelFlag,0); + List<MemberLike> list = memberLikeService.list(wrapper1); + if (list.size()>0){ + articleCommentsVO.setIslike(1); }else { - articleCommentsVO1.setIslike(2); + articleCommentsVO.setIslike(2); } - articleCommentsVOList1.add(articleCommentsVO1); + + + List<ArticleCommentsVO> articleCommentsVOList1=new ArrayList<>(); + + LambdaQueryWrapper< ArticleComments> wrapper2= Wrappers.lambdaQuery(); + wrapper2.eq(ArticleComments::getReplyId,articleCommentsVO.getId()); + wrapper2.eq( ArticleComments::getDelFlag,0); + wrapper2.eq( ArticleComments::getType,2); + List<ArticleComments> list1 = articleCommentsService.list(wrapper2); + for (ArticleComments articleComments1:list1){ + ArticleCommentsVO articleCommentsVO1=new ArticleCommentsVO(); + + R<Member> membeOne1 = memberClient.getMembeOne(articleComments1.getMemberId(), + SecurityConstants.INNER); + Member data1 = membeOne1.getData(); + + + + R<Member> membeOne2 = memberClient.getMembeOne(articleComments1.getBmemberId(), + SecurityConstants.INNER); + Member data2 = membeOne2.getData(); + + articleCommentsVO1.setArticleId(articleComments1.getArticleId()); + articleCommentsVO1.setContent(articleComments1.getContent()); + articleCommentsVO1.setMemberId(articleComments1.getMemberId()); + articleCommentsVO1.setId(articleComments1.getId()); + articleCommentsVO1.setMemberNickname(data1.getNickname()); + articleCommentsVO1.setMemberNickavatar(data1.getAvatar()); + articleCommentsVO1.setBmemberNickavatar(data1.getAvatar()); + articleCommentsVO1.setLikeCount(articleComments1.getLikeCount()); + articleCommentsVO1.setCreateTime(articleComments1.getCreateTime()); + articleCommentsVO1.setBmemberNickname(data2.getNickname()); + articleCommentsVO1.setState(articleComments1.getState()); + articleCommentsVO1.setBmemberId(data2.getId()); + + LambdaQueryWrapper<MemberLike> wrapper3= Wrappers.lambdaQuery(); + wrapper3.eq(MemberLike::getMemberId,articleCommentsVO.getMemberId()); + wrapper3.eq(MemberLike::getArticleId,articleComments1.getId()); + wrapper3.eq(MemberLike::getType,2); + wrapper3.eq( MemberLike::getDelFlag,0); + List<MemberLike> list3 = memberLikeService.list(wrapper3); + if (list3.size()>0){ + articleCommentsVO1.setIslike(1); + }else { + articleCommentsVO1.setIslike(2); + } + articleCommentsVOList1.add(articleCommentsVO1); + } + + articleCommentsVO.setArticleCommentsVOList(articleCommentsVOList1); + } - - articleCommentsVO.setArticleCommentsVOList(articleCommentsVOList1); - - list2.add(articleCommentsVO); } + return articleCommentsVOPageDTO; } diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/handler/MyMetaObjectHandler.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/handler/MyMetaObjectHandler.java index 3cb74cc..041288d 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/handler/MyMetaObjectHandler.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/handler/MyMetaObjectHandler.java @@ -21,7 +21,7 @@ public void insertFill(MetaObject metaObject) { // 获取当前登录用户 Long userId = SecurityUtils.getUserId(); - fillValue("createBy", userId, metaObject); + fillValue("createBy", userId.toString(), metaObject); fillValue("createTime", LocalDateTime.now(), metaObject); } @@ -29,7 +29,7 @@ public void updateFill(MetaObject metaObject) { // 获取当前登录用户 Long userId = SecurityUtils.getUserId(); - fillValue("updateBy", userId, metaObject); + fillValue("updateBy", userId.toString(), metaObject); fillValue("updateTime", LocalDateTime.now(), metaObject); } diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionBidRecordServiceImpl.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionBidRecordServiceImpl.java index bb911df..9213457 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionBidRecordServiceImpl.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionBidRecordServiceImpl.java @@ -43,15 +43,18 @@ auctionBidRecordList = this.list(wrapper); //判断 if (auctionBidRecordList.size()>=auctionSalesroomGoods.getSalesroomStock()){ - for (int i=0;i<=auctionSalesroomGoods.getSalesroomStock();i++){ + for (int i=0;i<auctionSalesroomGoods.getSalesroomStock();i++){ AuctionBidRecord auctionBidRecord= auctionBidRecordList.get(i); auctionBidRecord.setStatus(BidStatusEnum.LEAD); } }else{ - for (int i=0;i<=auctionBidRecordList.size();i++){ - AuctionBidRecord auctionBidRecord= auctionBidRecordList.get(i); - auctionBidRecord.setStatus(BidStatusEnum.LEAD); + if (auctionBidRecordList.size()>0){ + for (int i=0;i<auctionBidRecordList.size();i++){ + AuctionBidRecord auctionBidRecord= auctionBidRecordList.get(i); + auctionBidRecord.setStatus(BidStatusEnum.LEAD); + } } + } }if (auctionSalesroomGoods.getStatus().getCode()==2){ LambdaQueryWrapper<AuctionBidRecord> wrapper=Wrappers.lambdaQuery(); diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java index d5c1267..1bac1a8 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java @@ -59,11 +59,7 @@ import io.seata.spring.annotation.GlobalTransactional; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; +import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; import javax.annotation.Resource; @@ -511,11 +507,20 @@ memberAuctionSalesroomDTO.setMemberId(auctionGoodsListDTO.getMemberId()); List<OrderAuctionBond> data = auctionClient.getAuctionGoodsOrderAuctionBondList(auctionGoodsListDTO, SecurityConstants.INNER).getData(); Set<Long> goodsSkuIdList = null; - goodsSkuIdList = data.stream().map(OrderAuctionBond::getAuctionSalesroomId) - .collect(Collectors.toSet()); + if (data!=null){ + goodsSkuIdList = data.stream().map(OrderAuctionBond::getAuctionSalesroomId) + .collect(Collectors.toSet()); + }else { + Set<Long> goodsSkuIdList1 =new HashSet<>(); + goodsSkuIdList1.add(0L); + goodsSkuIdList=goodsSkuIdList1; + } AuctionGoodsListPageDTO auctionGoodsListPageDTO=new AuctionGoodsListPageDTO(); - auctionGoodsListPageDTO.setGoodsSkuIdList(goodsSkuIdList); + if (goodsSkuIdList!=null){ + auctionGoodsListPageDTO.setGoodsSkuIdList(goodsSkuIdList); + } + if (auctionGoodsListDTO.getStartStatus()!=4){ auctionGoodsListPageDTO.setStartStatus(auctionGoodsListDTO.getStartStatus()); } diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java index 1021e7c..a591c8f 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java @@ -90,11 +90,7 @@ import java.io.IOException; import java.math.BigDecimal; import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import java.util.stream.Collectors; @@ -203,7 +199,7 @@ @Override public List<AuctionSalesroom> getAuctionBidRecordList(AuctionSalesroomDTO ationSalesroomGoodsDTO) { LambdaQueryWrapper<AuctionSalesroom> wrapper=Wrappers.lambdaQuery(); - wrapper.eq(AuctionSalesroom::getSalesroomName,ationSalesroomGoodsDTO.getSalesroomName()); + wrapper.like(AuctionSalesroom::getSalesroomName,ationSalesroomGoodsDTO.getSalesroomName()); wrapper.eq(AuctionSalesroom::getDelFlag,0); List<AuctionSalesroom> page1 = this.list(wrapper); return page1; @@ -824,9 +820,16 @@ page.setSize(memberAuctionSalesroomDTO.getPageSize()); page.setCurrent(memberAuctionSalesroomDTO.getPageCurr()); MemberAuctionSalesroomWdDTO memberAuctionSalesroomWdDTO=new MemberAuctionSalesroomWdDTO(); - memberAuctionSalesroomWdDTO.setGoodsSkuIdList(goodsSkuIdList); - if(memberAuctionSalesroomWdDTO.getStatus()!=4){ - memberAuctionSalesroomWdDTO.setStatus(memberAuctionSalesroomWdDTO.getStatus()); + if (goodsSkuIdList.size()>0){ + memberAuctionSalesroomWdDTO.setGoodsSkuIdList(goodsSkuIdList); + }else{ + Set<Long> goodsSkuIdList1 = new HashSet<>(); + goodsSkuIdList1.add(0L); + memberAuctionSalesroomWdDTO.setGoodsSkuIdList(goodsSkuIdList1); + } + + if(MemberAuctionSalesroomDTO.getStatus()!=4){ + memberAuctionSalesroomWdDTO.setStatus(MemberAuctionSalesroomDTO.getStatus()); } List<AuctionSalesroom> auctionSalesroomList=auctionSalesroomMapper.pageMemberAuctionSalesroomWdList(page,memberAuctionSalesroomWdDTO); List<WdMemberAuctionSalesroomVO> List=new ArrayList<>(); @@ -841,7 +844,10 @@ memberAuctionSalesroomDTO1.setAuctionSalesroomId(auctionSalesroom.getId()); memberAuctionSalesroomDTO1.setMemberId(MemberAuctionSalesroomDTO.getMemberId()); List<OrderAuctionBond> data1 = orderClient.getOrderAuctionBondList1(memberAuctionSalesroomDTO1, SecurityConstants.INNER).getData(); - memberAuctionSalesroomVO.setBondTime(data1.get(0).getCreateTime()); + if (data1.size()>0){ + memberAuctionSalesroomVO.setBondTime(data1.get(0).getCreateTime()); + } + List.add(memberAuctionSalesroomVO); } page.setRecords(List); diff --git a/ruoyi-modules/ruoyi-auction/src/main/resources/mapper/auction/AuctionGoodsMapper.xml b/ruoyi-modules/ruoyi-auction/src/main/resources/mapper/auction/AuctionGoodsMapper.xml index 8f0d99b..4a811f0 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/resources/mapper/auction/AuctionGoodsMapper.xml +++ b/ruoyi-modules/ruoyi-auction/src/main/resources/mapper/auction/AuctionGoodsMapper.xml @@ -2,22 +2,22 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.auction.mapper.AuctionGoodsMapper"> <select id="getAuctionGoodsPgeList" resultType="com.ruoyi.system.api.domain.AuctionGoods"> - SELECT * FROM t_auction_goods ta left join - WHERE ta.del_flag = 0 and ta.listing_status=0 + SELECT * FROM t_auction_goods ta + WHERE del_flag = 0 and listing_status=0 <if test="param.startStatus!=null and param.startStatus != ''"> - AND ta.start_status=#{param.startStatus} + AND start_status=#{param.startStatus} </if> <if test="param.goodsSkuIdList != null and param.goodsSkuIdList.size()>0"> - OR ta.goods_sku_id IN + AND goods_sku_id IN <foreach collection="param.goodsSkuIdList" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> ORDER BY CASE - WHEN status = 0 THEN 2 - WHEN status = 1 THEN 1 - WHEN status = 2 THEN 3 - END,status + WHEN start_status = 0 THEN 2 + WHEN start_status = 1 THEN 1 + WHEN start_status = 2 THEN 3 + END,start_status </select> </mapper> diff --git a/ruoyi-modules/ruoyi-auction/src/main/resources/mapper/auction/AuctionSalesroomMapper.xml b/ruoyi-modules/ruoyi-auction/src/main/resources/mapper/auction/AuctionSalesroomMapper.xml index 5749bff..857b4f7 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/resources/mapper/auction/AuctionSalesroomMapper.xml +++ b/ruoyi-modules/ruoyi-auction/src/main/resources/mapper/auction/AuctionSalesroomMapper.xml @@ -3,10 +3,10 @@ <mapper namespace="com.ruoyi.auction.mapper.AuctionSalesroomMapper"> <select id="pageMemberAuctionSalesroomList" resultType="com.ruoyi.system.api.domain.AuctionSalesroom"> - SELECT * FROM t_auction_salesroom ta - WHERE ta.del_flag = 0 + SELECT * FROM t_auction_salesroom + WHERE del_flag = 0 <if test="param.salesroomName!=null and param.salesroomName != ''"> - AND ta.salesroomName LIKE CONCAT('%',#{param.salesroomName},'%') + AND salesroom_name LIKE CONCAT('%',#{param.salesroomName},'%') </if> ORDER BY CASE @@ -23,10 +23,10 @@ AND ta.status=#{param.status} </if> <if test="param.salesroomName!=null and param.salesroomName != ''"> - AND ta.salesroomName LIKE CONCAT('%',#{param.salesroomName},'%') + AND ta.salesroom_name LIKE CONCAT('%',#{param.salesroomName},'%') </if> <if test="param.goodsSkuIdList != null and param.goodsSkuIdList.size()>0"> - OR ta.goods_sku_id IN + OR ta.id IN <foreach collection="param.goodsSkuIdList" item="item" open="(" separator="," close=")"> #{item} </foreach> diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/forepart/ForepartGoodsSkuController.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/forepart/ForepartGoodsSkuController.java index 4cb6ed7..9a90c28 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/forepart/ForepartGoodsSkuController.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/forepart/ForepartGoodsSkuController.java @@ -7,11 +7,13 @@ import com.ruoyi.system.api.domain.dto.HomeGoodsSkuDTO; import com.ruoyi.system.api.domain.vo.HomeGoodsSkuListVO; import com.ruoyi.system.api.domain.vo.HomeGoodsSkuInfoVO; +import com.ruoyi.system.api.domain.vo.getHomeGoodsSkuXxiVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.List; /** * <p> @@ -41,5 +43,11 @@ return R.ok(iGoodsSkuService.getHomeGoodsSkuInfo(homeGoodsSkuDTO)); } + @PostMapping("/getHomeGoodsSkuXxi") + @ApiOperation(value = "用户端-普通商品信息") + public R<List<getHomeGoodsSkuXxiVO>> getHomeGoodsSkuXxi(@RequestBody HomeGoodsSkuDTO homeGoodsSkuDTO) { + return R.ok(iGoodsSkuService.getHomeGoodsSkuXxi(homeGoodsSkuDTO)); + } + } diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/handler/MyMetaObjectHandler.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/handler/MyMetaObjectHandler.java index cbad02c..99009d5 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/handler/MyMetaObjectHandler.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/handler/MyMetaObjectHandler.java @@ -21,7 +21,7 @@ public void insertFill(MetaObject metaObject) { // 获取当前登录用户 Long userId = SecurityUtils.getUserId(); - fillValue("createBy", userId, metaObject); + fillValue("createBy", userId.toString(), metaObject); fillValue("createTime", LocalDateTime.now(), metaObject); } @@ -29,7 +29,7 @@ public void updateFill(MetaObject metaObject) { // 获取当前登录用户 Long userId = SecurityUtils.getUserId(); - fillValue("updateBy", userId, metaObject); + fillValue("updateBy", userId.toString(), metaObject); fillValue("updateTime", LocalDateTime.now(), metaObject); } diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/IGoodsSkuService.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/IGoodsSkuService.java index 72ec0ad..dae4dfd 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/IGoodsSkuService.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/IGoodsSkuService.java @@ -13,6 +13,8 @@ import com.ruoyi.system.api.domain.vo.HomeGoodsSkuInfoVO; import com.ruoyi.system.api.domain.vo.HomeGoodsSkuListVO; import java.util.List; + +import com.ruoyi.system.api.domain.vo.getHomeGoodsSkuXxiVO; import org.springframework.web.bind.annotation.RequestBody; /** @@ -68,5 +70,7 @@ HomeGoodsSkuInfoVO getHomeGoodsSkuInfo(@RequestBody HomeGoodsSkuDTO homeGoodsSkuDTO); + List<getHomeGoodsSkuXxiVO> getHomeGoodsSkuXxi(@RequestBody HomeGoodsSkuDTO homeGoodsSkuDTO); + GoodsSkuVO getGoodsDetail(Long id); } diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java index 553a71f..dfcc88f 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java @@ -249,12 +249,21 @@ LambdaQueryWrapper<GoodsSku> wrapper3= Wrappers.lambdaQuery(); wrapper3.eq(GoodsSku::getDelFlag,0); wrapper3.eq(GoodsSku::getListingStatus,0); - wrapper3.like(GoodsSku::getSkuName,homeGoodsSkuDTO.getSkuName()); - wrapper3.eq(GoodsSku::getSkuName,homeGoodsSkuDTO.getSkuName()); - wrapper3.eq(GoodsSku::getBrandId,homeGoodsSkuDTO.getBrandId()); - wrapper3.eq(GoodsSku::getCategoryId,homeGoodsSkuDTO.getCategoryId()); - wrapper3.eq(GoodsSku::getSeriesId,homeGoodsSkuDTO.getSeriesId()); - wrapper3.eq(GoodsSku::getFlavorTypeId,homeGoodsSkuDTO.getFlavorTypeId()); + if (homeGoodsSkuDTO.getSkuName()!=null){ + wrapper3.like(GoodsSku::getSkuName,homeGoodsSkuDTO.getSkuName()); + } + if (homeGoodsSkuDTO.getBrandId()!=null){ + wrapper3.eq(GoodsSku::getBrandId,homeGoodsSkuDTO.getBrandId()); + } + if (homeGoodsSkuDTO.getCategoryId()!=null){ + wrapper3.eq(GoodsSku::getCategoryId,homeGoodsSkuDTO.getCategoryId()); + } + if (homeGoodsSkuDTO.getSeriesId()!=null){ + wrapper3.eq(GoodsSku::getSeriesId,homeGoodsSkuDTO.getSeriesId()); + } + if (homeGoodsSkuDTO.getFlavorTypeId()!=null){ + wrapper3.eq(GoodsSku::getFlavorTypeId,homeGoodsSkuDTO.getFlavorTypeId()); + } if (homeGoodsSkuDTO.getSort()==2){ wrapper3.orderByAsc(GoodsSku::getPrice); } diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java index ed51dbd..9c3ce3f 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java @@ -39,12 +39,11 @@ import com.ruoyi.system.api.domain.dto.ListStatusDTO; import com.ruoyi.system.api.domain.vo.HomeGoodsSkuInfoVO; import com.ruoyi.system.api.domain.vo.HomeGoodsSkuListVO; +import com.ruoyi.system.api.domain.vo.getHomeGoodsSkuXxiVO; import com.ruoyi.system.api.feignClient.GoodsSkuClient; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import java.util.*; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import javax.annotation.Resource; @@ -301,12 +300,22 @@ LambdaQueryWrapper<GoodsSku> wrapper3= Wrappers.lambdaQuery(); wrapper3.eq(GoodsSku::getDelFlag,0); wrapper3.eq(GoodsSku::getListingStatus,0); - wrapper3.like(GoodsSku::getSkuName,homeGoodsSkuDTO.getSkuName()); - wrapper3.eq(GoodsSku::getSkuName,homeGoodsSkuDTO.getSkuName()); - wrapper3.eq(GoodsSku::getBrandId,homeGoodsSkuDTO.getBrandId()); - wrapper3.eq(GoodsSku::getCategoryId,homeGoodsSkuDTO.getCategoryId()); - wrapper3.eq(GoodsSku::getSeriesId,homeGoodsSkuDTO.getSeriesId()); - wrapper3.eq(GoodsSku::getFlavorTypeId,homeGoodsSkuDTO.getFlavorTypeId()); + if (homeGoodsSkuDTO.getSkuName()!=null){ + wrapper3.like(GoodsSku::getSkuName,homeGoodsSkuDTO.getSkuName()); + } + if (homeGoodsSkuDTO.getBrandId()!=null){ + wrapper3.eq(GoodsSku::getBrandId,homeGoodsSkuDTO.getBrandId()); + } + if (homeGoodsSkuDTO.getCategoryId()!=null){ + wrapper3.eq(GoodsSku::getCategoryId,homeGoodsSkuDTO.getCategoryId()); + } + + if (homeGoodsSkuDTO.getSeriesId()!=null){ + wrapper3.eq(GoodsSku::getSeriesId,homeGoodsSkuDTO.getSeriesId()); + } + if (homeGoodsSkuDTO.getFlavorTypeId()!=null){ + wrapper3.eq(GoodsSku::getFlavorTypeId,homeGoodsSkuDTO.getFlavorTypeId()); + } if (homeGoodsSkuDTO.getSort()==2){ wrapper3.orderByAsc(GoodsSku::getPrice); } @@ -411,6 +420,50 @@ return homeGoodsSkuInfoVO; } + @Override + public List<getHomeGoodsSkuXxiVO> getHomeGoodsSkuXxi(HomeGoodsSkuDTO homeGoodsSkuDTO) { + List<getHomeGoodsSkuXxiVO> homeGoodsSkuXxiVOS=new ArrayList<>(); + GoodsSku byId = this.getById(homeGoodsSkuDTO.getGoodsSkuId()); + GoodsBrand data = goodsSkuClient.getBrandOne(byId.getBrandId(), SecurityConstants.INNER).getData(); + GoodsCategory data1 = goodsSkuClient.getCategoryOne(byId.getCategoryId(), SecurityConstants.INNER).getData(); + GoodsSeries data2 = goodsSkuClient.getSeriesOne(byId.getSeriesId(), SecurityConstants.INNER).getData(); + GoodsFlavorType data3 = goodsSkuClient.getFlavorTypeOne(byId.getFlavorTypeId(), SecurityConstants.INNER).getData(); + + + getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO1=new getHomeGoodsSkuXxiVO(); + getHomeGoodsSkuXxiVO1.setContent(data1.getCategoryName()); + getHomeGoodsSkuXxiVO1.setTitleName("分类"); + homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO1); + + getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO2=new getHomeGoodsSkuXxiVO(); + getHomeGoodsSkuXxiVO2.setContent(data2.getSeriesName()); + getHomeGoodsSkuXxiVO2.setTitleName("系列"); + homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO2); + + getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO=new getHomeGoodsSkuXxiVO(); + getHomeGoodsSkuXxiVO.setContent(data.getBrandName()); + getHomeGoodsSkuXxiVO.setTitleName("品牌"); + homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO); + + getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO3=new getHomeGoodsSkuXxiVO(); + getHomeGoodsSkuXxiVO3.setContent(data3.getFlavorTypeName()); + getHomeGoodsSkuXxiVO3.setTitleName("香型"); + homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO3); + + + List<GoodsInfoTitleValueVO> goodsInfoTitleValueVOList = goodsInfoTitleValueService.listByGoodsId(homeGoodsSkuDTO.getGoodsSkuId()); + Collections.sort(goodsInfoTitleValueVOList, Comparator.comparingInt(GoodsInfoTitleValueVO::getSortNum)); + for (GoodsInfoTitleValueVO goodsInfoTitleValueVO:goodsInfoTitleValueVOList){ + getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVOs=new getHomeGoodsSkuXxiVO(); + getHomeGoodsSkuXxiVOs.setContent(goodsInfoTitleValueVO.getContent()); + getHomeGoodsSkuXxiVOs.setTitleName(goodsInfoTitleValueVO.getTitleName()); + homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVOs); + } + + + return homeGoodsSkuXxiVOS; + } + private boolean updateGoodsStock(GoodsSku skus, Integer auctionStock) { return this.lambdaUpdate() .set(skus.getStock() + auctionStock > 0, GoodsSku::getStock, diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/handler/MyMetaObjectHandler.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/handler/MyMetaObjectHandler.java index a27c936..3e0cf2d 100644 --- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/handler/MyMetaObjectHandler.java +++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/handler/MyMetaObjectHandler.java @@ -21,7 +21,7 @@ public void insertFill(MetaObject metaObject) { // 获取当前登录用户 Long userId = SecurityUtils.getUserId(); - fillValue("createBy", userId, metaObject); + fillValue("createBy", userId.toString(), metaObject); fillValue("createTime", LocalDateTime.now(), metaObject); } @@ -29,7 +29,7 @@ public void updateFill(MetaObject metaObject) { // 获取当前登录用户 Long userId = SecurityUtils.getUserId(); - fillValue("updateBy", userId, metaObject); + fillValue("updateBy", userId.toString(), metaObject); fillValue("updateTime", LocalDateTime.now(), metaObject); } diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/MemberServiceImpl.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/MemberServiceImpl.java index be3b6b2..1dfcb83 100644 --- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/MemberServiceImpl.java +++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/MemberServiceImpl.java @@ -82,7 +82,7 @@ public static RequestConfig config = RequestConfig.custom().setConnectTimeout(5000).setSocketTimeout(5000).build(); // 配置您申请的KEY,在个人中心->我的数据,接口名称上方查看 - public static final String APPKEY = ""; + public static final String APPKEY = "61ad64e1ea78a24e00c449c346caa5d7"; //明文查询地址 public static String query_url = "http://op.juhe.cn/idcard/query?key=" + APPKEY; @@ -305,6 +305,12 @@ public void authentificationMembe(MemberDTO memberDTO) { Member member= this.getById(memberDTO.getMemberid()); member.setPhone(memberDTO.getPhone()); + if(memberDTO.getIdNumber()==null){ + throw new ServiceException("身份证号不能为空"); + } + if(memberDTO.getRealName()==null){ + throw new ServiceException("姓名不能为空"); + } member.setIdNumber(memberDTO.getIdNumber()); member.setRealName(memberDTO.getRealName()); String realname = "";// 姓名 @@ -338,6 +344,12 @@ } } JSONObject jsonObject= JSON.parseObject(result); + String object1= jsonObject.get("reason").toString(); + if(!object1.equals("成功")){ + throw new ServiceException(object1); + } + + String object= jsonObject.get("result").toString(); JSONObject jsonObject1= JSON.parseObject(object); if (Integer.valueOf(jsonObject1.get("res").toString())==2){ diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/InnerOrderAuctionBondController.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/InnerOrderAuctionBondController.java index 3a81973..a2bd624 100644 --- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/InnerOrderAuctionBondController.java +++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/InnerOrderAuctionBondController.java @@ -98,7 +98,9 @@ public R<List<OrderAuctionBond>> getOrderAuctionBondList1(@RequestBody MemberAuctionSalesroomDTO memberAuctionSalesroomDTO) { LambdaQueryWrapper<OrderAuctionBond> wrapper= Wrappers.lambdaQuery(); wrapper.eq(OrderAuctionBond::getMemberId,memberAuctionSalesroomDTO.getMemberId()); - wrapper.eq(OrderAuctionBond::getAuctionSalesroomId,memberAuctionSalesroomDTO.getAuctionSalesroomId()); + if (memberAuctionSalesroomDTO.getAuctionSalesroomId()!=null){ + wrapper.eq(OrderAuctionBond::getAuctionSalesroomId,memberAuctionSalesroomDTO.getAuctionSalesroomId()); + } wrapper.eq(OrderAuctionBond::getBoundStatus,2); wrapper.eq(OrderAuctionBond::getDelFlag,0); List<OrderAuctionBond> list = iOrderAuctionBondService.list(wrapper); @@ -112,7 +114,9 @@ public R<List<OrderAuctionBond>> getAuctionGoodsOrderAuctionBondList(@RequestBody AuctionGoodsListDTO auctionGoodsListDTO) { LambdaQueryWrapper<OrderAuctionBond> wrapper= Wrappers.lambdaQuery(); wrapper.eq(OrderAuctionBond::getMemberId,auctionGoodsListDTO.getMemberId()); + if (auctionGoodsListDTO.getGoodsSkuId()!=null){ wrapper.eq(OrderAuctionBond::getAuctionGoodsId,auctionGoodsListDTO.getGoodsSkuId()); + } wrapper.eq(OrderAuctionBond::getBoundStatus,1); wrapper.eq(OrderAuctionBond::getDelFlag,0); List<OrderAuctionBond> list = iOrderAuctionBondService.list(wrapper); diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/handler/MyMetaObjectHandler.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/handler/MyMetaObjectHandler.java index 88a0763..35d37bc 100644 --- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/handler/MyMetaObjectHandler.java +++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/handler/MyMetaObjectHandler.java @@ -21,7 +21,7 @@ public void insertFill(MetaObject metaObject) { // 获取当前登录用户 Long userId = SecurityUtils.getUserId(); - fillValue("createBy", userId, metaObject); + fillValue("createBy", userId.toString(), metaObject); fillValue("createTime", LocalDateTime.now(), metaObject); } @@ -29,7 +29,7 @@ public void updateFill(MetaObject metaObject) { // 获取当前登录用户 Long userId = SecurityUtils.getUserId(); - fillValue("updateBy", userId, metaObject); + fillValue("updateBy", userId.toString(), metaObject); fillValue("updateTime", LocalDateTime.now(), metaObject); } diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/ILogisticsService.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/ILogisticsService.java index 139e495..1c0f3b4 100644 --- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/ILogisticsService.java +++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/ILogisticsService.java @@ -2,6 +2,9 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.system.api.domain.Logistics; +import com.ruoyi.system.api.domain.dto.LogisticsDTO; +import com.ruoyi.system.api.domain.vo.Express100VO; +import org.springframework.web.bind.annotation.RequestBody; /** * <p> @@ -13,4 +16,6 @@ */ public interface ILogisticsService extends IService<Logistics> { + Express100VO getLogisticsList(@RequestBody LogisticsDTO logisticsDTO); + } diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/LogisticsServiceImpl.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/LogisticsServiceImpl.java index 3abea27..8288bdc 100644 --- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/LogisticsServiceImpl.java +++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/LogisticsServiceImpl.java @@ -1,9 +1,18 @@ package com.ruoyi.order.service.impl; +import com.alibaba.nacos.shaded.com.google.gson.Gson; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.kuaidi100.sdk.request.QueryTrackParam; +import com.kuaidi100.sdk.request.QueryTrackReq; +import com.kuaidi100.sdk.utils.SignUtils; import com.ruoyi.order.mapper.LogisticsMapper; import com.ruoyi.order.service.ILogisticsService; import com.ruoyi.system.api.domain.Logistics; +import com.ruoyi.system.api.domain.dto.LogisticsDTO; +import com.ruoyi.system.api.domain.vo.Express100VO; +import com.kuaidi100.sdk.core.IBaseClient; +import com.kuaidi100.sdk.pojo.HttpResult; +import com.kuaidi100.sdk.api.QueryTrack; import org.springframework.stereotype.Service; /** @@ -18,4 +27,34 @@ public class LogisticsServiceImpl extends ServiceImpl<LogisticsMapper, Logistics> implements ILogisticsService { + private String key="BltjQodT7186"; + private String customer="56DE8E9E3D58CE73C60755C8B7483043"; + + + + @Override + public Express100VO getLogisticsList(LogisticsDTO logisticsDTO) { + QueryTrackReq queryTrackReq = new QueryTrackReq(); + QueryTrackParam queryTrackParam = new QueryTrackParam(); + queryTrackParam.setCom(logisticsDTO.getCompany()); + queryTrackParam.setNum(logisticsDTO.getPostid()); + String param = new Gson().toJson(queryTrackParam); + + queryTrackReq.setParam(param); + queryTrackReq.setCustomer(customer); + queryTrackReq.setSign(SignUtils.querySign(param ,key,customer)); + + IBaseClient baseClient = new QueryTrack(); + HttpResult execute = null; + try { + execute = baseClient.execute(queryTrackReq); + } catch (Exception e) { + throw new RuntimeException(e); + } + // 对返回的数据进行反序列化处理 + Gson gson = new Gson(); + String responseBody = execute.getBody(); + Express100VO response = gson.fromJson(responseBody, Express100VO.class); + return response; + } } diff --git a/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml b/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml index 4e8081b..0da292e 100644 --- a/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml +++ b/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml @@ -58,11 +58,26 @@ o.goods_sku_id as goodsSkuId FROM t_order o - LEFT JOIN t_goods_sku tgs ON o.goods_sku_id = tgs.id <where> - o.order_status = 2 + o.order_status = 2 <if test="skuName != null and skuName != ''"> - AND tgs.goods_sku_name LIKE CONCAT('%',#{skuName},'%') + AND o.sku_name LIKE CONCAT('%',#{skuName},'%') + </if> + AND o.order_from = 3 + AND o.member_id=#{memberId} + </where> + </select> + + <select id="getOrderByGroupPurchaseMemberList" resultType="com.ruoyi.system.api.domain.vo.OrderVO"> + SELECT + o.*, + o.goods_sku_id as goodsSkuId + FROM + t_order o + <where> + o.order_status = 2 + <if test="skuName != null and skuName != ''"> + AND o.sku_name LIKE CONCAT('%',#{skuName},'%') </if> AND o.order_from = 3 AND o.member_id=#{memberId} diff --git a/ruoyi-modules/ruoyi-promotion/src/main/java/com/ruoyi/promotion/handler/MyMetaObjectHandler.java b/ruoyi-modules/ruoyi-promotion/src/main/java/com/ruoyi/promotion/handler/MyMetaObjectHandler.java index 6cdf42e..22f5337 100644 --- a/ruoyi-modules/ruoyi-promotion/src/main/java/com/ruoyi/promotion/handler/MyMetaObjectHandler.java +++ b/ruoyi-modules/ruoyi-promotion/src/main/java/com/ruoyi/promotion/handler/MyMetaObjectHandler.java @@ -21,7 +21,7 @@ public void insertFill(MetaObject metaObject) { // 获取当前登录用户 Long userId = SecurityUtils.getUserId(); - fillValue("createBy", userId, metaObject); + fillValue("createBy", userId.toString(), metaObject); fillValue("createTime", LocalDateTime.now(), metaObject); } @@ -29,7 +29,7 @@ public void updateFill(MetaObject metaObject) { // 获取当前登录用户 Long userId = SecurityUtils.getUserId(); - fillValue("updateBy", userId, metaObject); + fillValue("updateBy", userId.toString(), metaObject); fillValue("updateTime", LocalDateTime.now(), metaObject); } -- Gitblit v1.7.1