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)); } } 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; } ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/forepart/dto/ArticleDTO.java
@@ -32,4 +32,5 @@ @ApiModelProperty(value = "资讯图片") private String rticleImageUrl; } 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; } 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; } 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()); ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/service/impl/ArticleServiceImpl.java
@@ -25,6 +25,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; @@ -80,6 +81,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); @@ -202,73 +204,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; } 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); } 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(); 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()); } 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); 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)); } } 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); } 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); } 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); } 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, 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); } 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; 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); 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); } 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); } 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; } } 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); }