Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

igl 7 hónapja
szülő
commit
04f6ffd041
23 módosított fájl, 128 hozzáadás és 51 törlés
  1. 4 1
      vehicle-client/src/main/java/com/chelvc/cloud/vehicle/client/CurrencyRecordClient.java
  2. 34 0
      vehicle-client/src/main/java/com/chelvc/cloud/vehicle/client/param/BalanceRetailParam.java
  3. 5 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/controller/CurrencyRecordController.java
  4. 2 1
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/CurrencyRecordService.java
  5. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CarouselImagesServiceImpl.java
  6. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CategoryServiceImpl.java
  7. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CommissionConfigServiceImpl.java
  8. 3 3
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CouponServiceImpl.java
  9. 43 7
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CurrencyRecordServiceImpl.java
  10. 1 1
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/FavoriteServiceImpl.java
  11. 1 1
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/FeedbackReplyServiceImpl.java
  12. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/FeedbackServiceImpl.java
  13. 3 3
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/GoodsServiceImpl.java
  14. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/HelpCategoryServiceImpl.java
  15. 3 3
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/HelpServiceImpl.java
  16. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/MerchantAuthServiceImpl.java
  17. 6 6
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/MerchantServiceImpl.java
  18. 1 1
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/NoticeServiceImpl.java
  19. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/OmsOrderReturnApplyServiceImpl.java
  20. 3 3
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/OmsOrderServiceImpl.java
  21. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/UserCouponServiceImpl.java
  22. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/UserReceiveAddressServiceImpl.java
  23. 1 1
      vehicle-server/src/main/resources/mapper/MerchantMapper.xml

+ 4 - 1
vehicle-client/src/main/java/com/chelvc/cloud/vehicle/client/CurrencyRecordClient.java

@@ -1,11 +1,14 @@
 package com.chelvc.cloud.vehicle.client;
 
+import java.time.LocalDate;
 import java.util.List;
 
 import com.chelvc.cloud.vehicle.client.dto.CurrencyRecordDTO;
 import com.chelvc.cloud.vehicle.client.dto.EarningsDTO;
+import com.chelvc.cloud.vehicle.client.param.BalanceRetailParam;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 
 /**
@@ -22,7 +25,7 @@ public interface CurrencyRecordClient {
      * @return 收益流水记录列表
      */
     @GetMapping("/currencyRecord/listCurrencyRecord")
-    List<CurrencyRecordDTO> listCurrencyRecord(@RequestParam("type") Integer type);
+    List<CurrencyRecordDTO> listCurrencyRecord(@RequestBody BalanceRetailParam param);
 
     /**
      * 获取用户得总收益、本周收益、本月收益、可提现金额

+ 34 - 0
vehicle-client/src/main/java/com/chelvc/cloud/vehicle/client/param/BalanceRetailParam.java

@@ -0,0 +1,34 @@
+package com.chelvc.cloud.vehicle.client.param;
+
+import com.chelvc.framework.common.model.Paging;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.SuperBuilder;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * 预约信息参数
+ *
+ * @author liude
+ * @date 2023/1/17
+ */
+@Data
+@SuperBuilder
+@NoArgsConstructor
+@AllArgsConstructor
+public class BalanceRetailParam implements Serializable {
+    /**
+     * 日期
+     */
+    @NotNull(message = "查询日期不能为空")
+    private Long date;
+    /**
+     * type 类型:0-平台;1-用户;2-商户
+     */
+    @NotNull(message = "查询类型不能为空")
+    private Integer type;
+
+}

+ 5 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/controller/CurrencyRecordController.java

@@ -1,13 +1,16 @@
 package com.chelvc.cloud.vehicle.server.controller;
 
+import java.time.LocalDate;
 import java.util.List;
 
 import com.chelvc.cloud.vehicle.client.dto.CurrencyRecordDTO;
 import com.chelvc.cloud.vehicle.client.dto.EarningsDTO;
+import com.chelvc.cloud.vehicle.client.param.BalanceRetailParam;
 import com.chelvc.cloud.vehicle.server.service.CurrencyRecordService;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -29,8 +32,8 @@ public class CurrencyRecordController {
      * @return 收益流水记录列表
      */
     @GetMapping("/currencyRecord/listCurrencyRecord")
-    public List<CurrencyRecordDTO> listCurrencyRecord(@RequestParam("type") Integer type) {
-        return currencyRecordService.listCurrencyRecord(type);
+    public List<CurrencyRecordDTO> listCurrencyRecord(@RequestBody BalanceRetailParam param) {
+        return currencyRecordService.listCurrencyRecord(param.getType(),param.getDate());
     }
 
     /**

+ 2 - 1
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/CurrencyRecordService.java

@@ -6,6 +6,7 @@ import com.chelvc.cloud.vehicle.client.dto.EarningsDTO;
 import com.chelvc.cloud.vehicle.server.entity.CurrencyRecord;
 
 import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.util.List;
 
 /**
@@ -35,7 +36,7 @@ public interface CurrencyRecordService extends IService<CurrencyRecord> {
      * 收益流水记录
      * @return 收益流水记录列表
      */
-    List<CurrencyRecordDTO> listCurrencyRecord(Integer type);
+    List<CurrencyRecordDTO> listCurrencyRecord(Integer type, Long date);
 
     /**
      * 获取用户得总收益、本周收益、本月收益、可提现金额

+ 2 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CarouselImagesServiceImpl.java

@@ -38,7 +38,7 @@ public class CarouselImagesServiceImpl extends ServiceImpl<CarouselImagesMapper,
 
     @Override
     public void updateCarouselImages(@NonNull Long id, @NonNull CarouselImagesModifyParam param) {
-        CarouselImages carouselImages = AssertUtils.available(this.getById(id), "该轮播图不存在");
+        CarouselImages carouselImages = AssertUtils.nonnull(this.getById(id), "该轮播图不存在");
         CarouselImagesCopier.INSTANCE.copying(param, carouselImages);
         this.updateById(carouselImages);
     }
@@ -54,7 +54,7 @@ public class CarouselImagesServiceImpl extends ServiceImpl<CarouselImagesMapper,
 
     @Override
     public void deleteCarouselImages(Long id){
-        AssertUtils.available(this.getById(id), "该轮播图存在");
+        AssertUtils.nonnull(this.getById(id), "该轮播图存在");
         this.baseMapper.deleteById(id);
     }
 

+ 2 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CategoryServiceImpl.java

@@ -69,7 +69,7 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
 
     @Override
     public void updateCategory(@NonNull Long id, @NonNull CategoryModifyParam param) {
-        Category category = AssertUtils.available(this.getById(id), "分类不存在");
+        Category category = AssertUtils.nonnull(this.getById(id), "分类不存在");
         CategoryCopier.INSTANCE.copying(param, category);
         if(StringUtils.isEmpty(category.getParentId())){
             category.setParentId(0L);
@@ -174,7 +174,7 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
     }
     @Override
     public void deleteCategory(Long id){
-        AssertUtils.available(this.getById(id), "该分类不存在");
+        AssertUtils.nonnull(this.getById(id), "该分类不存在");
         this.baseMapper.deleteById(id);
     }
     @Override

+ 2 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CommissionConfigServiceImpl.java

@@ -41,7 +41,7 @@ public class CommissionConfigServiceImpl extends ServiceImpl<CommissionConfigMap
 
     @Override
     public void updateCommissionConfig(@NonNull Long id, @NonNull CommissionConfigModifyParam param) {
-        CommissionConfig commissionConfig = AssertUtils.available(this.getById(id), "该抽成配置不存在");
+        CommissionConfig commissionConfig = AssertUtils.nonnull(this.getById(id), "该抽成配置不存在");
         CommissionConfigCopier.INSTANCE.copying(param, commissionConfig);
         Long userId = SessionContextHolder.getId();
         commissionConfig.setUpdateTime(new Date());
@@ -58,7 +58,7 @@ public class CommissionConfigServiceImpl extends ServiceImpl<CommissionConfigMap
 
     @Override
     public void deleteCommissionConfig(Long id){
-        AssertUtils.available(this.getById(id), "该轮播图存在");
+        AssertUtils.nonnull(this.getById(id), "该轮播图存在");
         this.baseMapper.deleteById(id);
     }
     @Override

+ 3 - 3
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CouponServiceImpl.java

@@ -64,20 +64,20 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
 
     @Override
     public void updateCoupon(@NonNull Long id, @NonNull CouponModifyParam param) {
-        Coupon coupon = AssertUtils.available(this.getById(id), "优惠券不存在");
+        Coupon coupon = AssertUtils.nonnull(this.getById(id), "优惠券不存在");
         CouponCopier.INSTANCE.copying(param, coupon);
         this.updateById(coupon);
     }
 
     @Override
     public void deleteCoupon(@NonNull Long id) {
-        AssertUtils.available(this.getById(id), "商品优惠卷不存在");
+        AssertUtils.nonnull(this.getById(id), "商品优惠卷不存在");
         this.baseMapper.deleteById(id);
     }
 
     @Override
     public CouponDTO getCoupon(@NonNull Long id) {
-        Coupon coupon = AssertUtils.available(this.getById(id), "优惠券不存在");
+        Coupon coupon = AssertUtils.nonnull(this.getById(id), "优惠券不存在");
         return this.convert(coupon);
     }
 

+ 43 - 7
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CurrencyRecordServiceImpl.java

@@ -9,14 +9,24 @@ import com.chelvc.cloud.vehicle.server.entity.Asset;
 import com.chelvc.cloud.vehicle.server.entity.CurrencyRecord;
 import com.chelvc.cloud.vehicle.server.service.AssetService;
 import com.chelvc.cloud.vehicle.server.service.CurrencyRecordService;
+import com.chelvc.cloud.vehicle.server.service.MerchantService;
 import com.chelvc.framework.base.context.SessionContextHolder;
+import com.chelvc.framework.common.util.DateUtils;
+import com.chelvc.framework.common.util.StringUtils;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 
 import java.math.BigDecimal;
+import java.text.Format;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 收益流水记录表操作接口
@@ -30,14 +40,40 @@ public class CurrencyRecordServiceImpl extends ServiceImpl<CurrencyRecordMapper,
 
     private final AssetService assetService;
 
+    private final MerchantService merchantService;
+
      @Override
-     public List<CurrencyRecordDTO> listCurrencyRecord(Integer type){
-      Long userId = SessionContextHolder.getId();
-         List<CurrencyRecord> currencyRecords = this.lambdaQuery()
-                 .eq(CurrencyRecord::getUserId,userId)
-                 .eq(CurrencyRecord::getType, type)
-                 .list();
-      return CurrencyRecordCopier.INSTANCE.copying(currencyRecords);
+     public List<CurrencyRecordDTO> listCurrencyRecord(Integer type, Long date){
+         Date localDate = new Date(date);
+         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+         Long userId = SessionContextHolder.getId();
+         if (2 == type){
+             List<Long> merchantIds = this.merchantService.getMerchantIdsByUserId(userId);
+             if (CollectionUtils.isEmpty(merchantIds)){
+                 return new ArrayList<>();
+             }
+             List<CurrencyRecord> currencyRecords = this.lambdaQuery()
+                     .eq(CurrencyRecord::getUserId,merchantIds.get(0))
+                     .eq(CurrencyRecord::getType, type)
+                     .orderByDesc(CurrencyRecord::getCreateTime)
+                     .list();//1808847197293170689
+             List<CurrencyRecordDTO> list = CurrencyRecordCopier.INSTANCE.copying(currencyRecords);
+             List<CurrencyRecordDTO> filteredPeople = list.stream()
+                     .filter(item -> sdf.format(item.getCreateTime()).equals(sdf.format(localDate)))
+                     .collect(Collectors.toList());
+             return filteredPeople;
+         }else{
+             List<CurrencyRecord> currencyRecords = this.lambdaQuery()
+                     .eq(CurrencyRecord::getUserId,userId)
+                     .eq(CurrencyRecord::getType, type)
+                     .orderByDesc(CurrencyRecord::getCreateTime)
+                     .list();//1808847197293170689
+             List<CurrencyRecordDTO> list = CurrencyRecordCopier.INSTANCE.copying(currencyRecords);
+             List<CurrencyRecordDTO> filteredPeople = list.stream()
+                     .filter(item -> !DateUtils.format(item.getCreateTime()).equals(DateUtils.format(localDate)))
+                     .collect(Collectors.toList());
+             return filteredPeople;
+         }
      }
     @Override
     public EarningsDTO getCurrencyRecord(Integer type){

+ 1 - 1
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/FavoriteServiceImpl.java

@@ -72,7 +72,7 @@ public class FavoriteServiceImpl extends ServiceImpl<FavoriteMapper, Favorite> i
                 .eq(Favorite::getUserId, userId)
                 .eq(Favorite::getContentId, id).one();
         AssertUtils.available(favorite != null, "收藏信息不存在");
-        AssertUtils.available(favorite.getUserId(), "非法操作");
+        AssertUtils.nonnull(favorite.getUserId(), "非法操作");
         AssertUtils.available(Objects.equals(favorite.getUserId(), SessionContextHolder.getId()), "非法操作");
         this.baseMapper.deleteFavorite(id, userId);
     }

+ 1 - 1
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/FeedbackReplyServiceImpl.java

@@ -35,7 +35,7 @@ public class FeedbackReplyServiceImpl extends ServiceImpl<FeedbackReolyMapper, F
 
     @Override
     public void updateFeedbackReply(@NonNull Long id, @NonNull FeedBackReplyModifyParam param) {
-        FeedBackReply feedBackReply = AssertUtils.available(this.getById(id), "该意见反馈回复不存在");
+        FeedBackReply feedBackReply = AssertUtils.nonnull(this.getById(id), "该意见反馈回复不存在");
         FeedbackReplyCopier.INSTANCE.copying(param, feedBackReply);
         this.updateById(feedBackReply);
     }

+ 2 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/FeedbackServiceImpl.java

@@ -41,7 +41,7 @@ public class FeedbackServiceImpl extends ServiceImpl<FeedbackMapper, FeedBack> i
 
     @Override
     public void updateFeedback(@NonNull Long id, @NonNull FeedBackModifyParam param) {
-        FeedBack feedBack = AssertUtils.available(this.getById(id), "该意见反馈不存在");
+        FeedBack feedBack = AssertUtils.nonnull(this.getById(id), "该意见反馈不存在");
         FeedbackCopier.INSTANCE.copying(param, feedBack);
         this.updateById(feedBack);
     }
@@ -69,7 +69,7 @@ public class FeedbackServiceImpl extends ServiceImpl<FeedbackMapper, FeedBack> i
     }
     @Override
     public void updateStatus(Long id,String status){
-        FeedBack feedBack = AssertUtils.available(this.getById(id), "该意见反馈不存在");
+        FeedBack feedBack = AssertUtils.nonnull(this.getById(id), "该意见反馈不存在");
         feedBack.setStatus(status);
         this.updateById(feedBack);
     }

+ 3 - 3
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/GoodsServiceImpl.java

@@ -65,7 +65,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
         Long userId = SessionContextHolder.getId();
         GoodsDetailDTO detail = GoodsDetailDTO.builder().build();
         // 获取商品信息
-        Goods goods = AssertUtils.available(this.getById(id), "商品不存在");
+        Goods goods = AssertUtils.nonnull(this.getById(id), "商品不存在");
         //查询商品是否被收藏
         Integer count = this.baseMapper.goodsFavorite(id,userId);
         detail.setGoods(GoodsCopier.INSTANCE.copying(goods));
@@ -114,14 +114,14 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
 
     @Override
     public void updateGoods(@NonNull Long id, @NonNull GoodsModifyParam param) {
-        Goods goods = AssertUtils.available(this.getById(id), "商品不存在");
+        Goods goods = AssertUtils.nonnull(this.getById(id), "商品不存在");
         GoodsCopier.INSTANCE.copying(param, goods);
         this.updateById(goods);
     }
 
     @Override
     public void deleteGoods(@NonNull Long id) {
-        AssertUtils.available(this.getById(id), "商品不存在");
+        AssertUtils.nonnull(this.getById(id), "商品不存在");
         this.baseMapper.deleteById(id);
     }
 

+ 2 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/HelpCategoryServiceImpl.java

@@ -100,7 +100,7 @@ public class HelpCategoryServiceImpl extends ServiceImpl<HelpCategoryMapper,Help
     @Override
     public void updateHelpCategory(@NonNull Long id, @NonNull HelpCategoryModifyParam param)
     {
-        HelpCategory helpCategory = AssertUtils.available(this.getById(id), "该分类不存在");
+        HelpCategory helpCategory = AssertUtils.nonnull(this.getById(id), "该分类不存在");
         HelpCategoryCopier.INSTANCE.copying(param,helpCategory);
         Long userId = SessionContextHolder.getId();
         helpCategory.setUpdater(userId);
@@ -119,7 +119,7 @@ public class HelpCategoryServiceImpl extends ServiceImpl<HelpCategoryMapper,Help
     @Override
     public void deleteHelpCategoryById(@NonNull Long id)
     {
-        HelpCategory helpCategory = AssertUtils.available(this.getById(id), "该分类不存在");
+        HelpCategory helpCategory = AssertUtils.nonnull(this.getById(id), "该分类不存在");
         this.deleteHelpCategoryById(id);
     }
 

+ 3 - 3
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/HelpServiceImpl.java

@@ -89,7 +89,7 @@ public class HelpServiceImpl extends ServiceImpl<HelpMapper, Help> implements
      */
     @Override
     public void updateHelp(@NonNull Long id, @NonNull HelpModifyParam param) {
-        Help help = AssertUtils.available(this.getById(id), "该问题帮助不存在");
+        Help help = AssertUtils.nonnull(this.getById(id), "该问题帮助不存在");
         HelpCopier.INSTANCE.copying(param, help);
         Long userId = SessionContextHolder.getId();
         help.setUpdater(userId);
@@ -106,8 +106,8 @@ public class HelpServiceImpl extends ServiceImpl<HelpMapper, Help> implements
      */
     @Override
     public void deleteHelpById(@NonNull Long id) {
-        Help help = AssertUtils.available(this.getById(id), "该问题帮助不存在");
-        this.deleteHelpById(id);
+        Help help = AssertUtils.nonnull(this.getById(id), "该问题帮助不存在");
+        this.removeById(id);
     }
 
     @Override

+ 2 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/MerchantAuthServiceImpl.java

@@ -98,7 +98,7 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
         if (StringUtils.isEmpty(param.getStoreAddress())){
             param.setStoreAddress(param.getStoreAddress());
         }
-        MerchantAuth merchantAuth = AssertUtils.available(this.getById(id), "商家认证不存在");
+        MerchantAuth merchantAuth = AssertUtils.nonnull(this.getById(id), "商家认证不存在");
         MerchantAuthCopier.INSTANCE.copying(param, merchantAuth);
         merchantAuth.setReviewStatus("2");
         merchantAuth.setId(id);
@@ -177,7 +177,7 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
     @Override
     public void certificationAudit(Long id, String state,String message ) {
         Long userId = SessionContextHolder.getId();
-        MerchantAuth merchantAuth = AssertUtils.available(this.getById(id), "商家认证不存在");
+        MerchantAuth merchantAuth = AssertUtils.nonnull(this.getById(id), "商家认证不存在");
         merchantAuth.setReviewStatus(state);
         merchantAuth.setReviewTime(new Date());
         merchantAuth.setReviewer(userId.toString());

+ 6 - 6
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/MerchantServiceImpl.java

@@ -118,7 +118,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
     public MerchantDetailDTO getMerchantDetail(@NonNull Long id) {
         // 获取商家信息
         MerchantDTO merchant = MerchantCopier.INSTANCE.copying(
-                AssertUtils.available(this.getById(id), "商家不存在")
+                AssertUtils.nonnull(this.getById(id), "商家不存在")
         );
 
         // 获取商家全部商品列表
@@ -139,7 +139,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
     public MerchantDetailDTO getMerchantDetail(Long id, LocationQueryParam param) {
         // 获取商家信息
         MerchantDTO merchant = MerchantCopier.INSTANCE.copying(
-                AssertUtils.available(this.baseMapper.getMerchantById(id, param), "商家不存在")
+                AssertUtils.nonnull(this.baseMapper.getMerchantById(id, param), "商家不存在")
         );
 //        Category category = this.categoryService.getById(merchant.getMainBusiness());
 //        if (null != category){
@@ -217,7 +217,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
 
     @Override
     public void updateMerchant(@NonNull Long id, @NonNull MerchantModifyParam param) {
-        Merchant merchant = AssertUtils.available(this.getById(id), "商家不存在");
+        Merchant merchant = AssertUtils.nonnull(this.getById(id), "商家不存在");
         MerchantCopier.INSTANCE.copying(param, merchant);
         this.updateById(merchant);
         List<Long> business = param.getAncillaryBusiness();
@@ -251,7 +251,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
 
     @Override
     public void deleteMerchant(@NonNull Long id) {
-        AssertUtils.available(this.getById(id), "商家不存在");
+        AssertUtils.nonnull(this.getById(id), "商家不存在");
         this.baseMapper.deleteById(id);
     }
 
@@ -278,7 +278,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
 
     @Override
     public MerchantDTO getMerchant(@NonNull Long id) {
-        Merchant merchant = AssertUtils.available(this.getById(id), "商家不存在");
+        Merchant merchant = AssertUtils.nonnull(this.getById(id), "商家不存在");
         return this.convert(merchant);
     }
 
@@ -515,7 +515,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
 
     @Override
     public void merchantAudit(Long id, MerchantStatus status){
-        Merchant merchant = AssertUtils.available(this.getById(id), "商家不存在");
+        Merchant merchant = AssertUtils.nonnull(this.getById(id), "商家不存在");
         merchant.setStatus(status);
         this.updateById(merchant);
     }

+ 1 - 1
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/NoticeServiceImpl.java

@@ -42,7 +42,7 @@ public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, Notice> impleme
 
     @Override
     public void updateNotice(@NonNull Long id, @NonNull NoticeModifyParam param) {
-        Notice notice = AssertUtils.available(this.getById(id), "通知配置不存在");
+        Notice notice = AssertUtils.nonnull(this.getById(id), "通知配置不存在");
         NoticeCopier.INSTANCE.copying(param, notice);
         this.updateById(notice);
     }

+ 2 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/OmsOrderReturnApplyServiceImpl.java

@@ -122,7 +122,7 @@ public class OmsOrderReturnApplyServiceImpl extends ServiceImpl<OmsOrderReturnAp
     @Override
     public Long updateOmsOrderReturnApply(@NonNull Long id, @NonNull OrderReturnApplyModifyParam param)
     {
-        OmsOrderReturnApply omsOrderReturnApply = AssertUtils.available(this.getById(id), "退货申请单不存在");
+        OmsOrderReturnApply omsOrderReturnApply = AssertUtils.nonnull(this.getById(id), "退货申请单不存在");
         OrderReturnApplyCopier.INSTANCE.copying(param,omsOrderReturnApply);
         return omsOrderReturnApply.getId();
     }
@@ -148,7 +148,7 @@ public class OmsOrderReturnApplyServiceImpl extends ServiceImpl<OmsOrderReturnAp
     @Override
     public Long deleteOmsOrderReturnApplyById(@NonNull Long id)
     {
-        OmsOrderReturnApply omsOrderReturnApply = AssertUtils.available(this.getById(id), "退货申请单不存在");
+        OmsOrderReturnApply omsOrderReturnApply = AssertUtils.nonnull(this.getById(id), "退货申请单不存在");
         this.baseMapper.deleteById(id);
         return omsOrderReturnApply.getId();
     }

+ 3 - 3
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/OmsOrderServiceImpl.java

@@ -882,11 +882,11 @@ public class OmsOrderServiceImpl extends ServiceImpl<OmsOrderMapper, OmsOrder> i
 
     @Override
     public void orderVerification(Long orderId, Long merchantId) {
-        AssertUtils.available(orderId, "订单不存在");
+        AssertUtils.nonnull(orderId, "订单不存在");
         OmsOrder omsOrder = baseMapper.selectById(orderId);
-        AssertUtils.available(omsOrder, "订单不存在");
+        AssertUtils.nonnull(omsOrder, "订单不存在");
         //List<Long> merchantIds = this.merchantService.getMerchantIdsByUserId(merchantUserId);
-        AssertUtils.available(merchantId, "商家不存在");
+        AssertUtils.nonnull(merchantId, "商家不存在");
         AssertUtils.available(omsOrder.getMerchantId() != null && omsOrder.getMerchantId().equals(merchantId),
                 "该订单商品不属于此商家");
         Integer status = omsOrder.getStatus();

+ 2 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/UserCouponServiceImpl.java

@@ -100,7 +100,7 @@ public class UserCouponServiceImpl extends ServiceImpl<UserCouponMapper, UserCou
 
     @Override
     public void updateUserCoupon(@NonNull Long id, @NonNull UserCouponModifyParam param) {
-        UserCoupon userCoupon = AssertUtils.available(this.getById(id), "优惠券领取记录不存在");
+        UserCoupon userCoupon = AssertUtils.nonnull(this.getById(id), "优惠券领取记录不存在");
         UserCouponCopier.INSTANCE.copying(param, userCoupon);
         this.updateById(userCoupon);
     }
@@ -130,7 +130,7 @@ public class UserCouponServiceImpl extends ServiceImpl<UserCouponMapper, UserCou
 
     @Override
     public Long claimCoupon(@NonNull Long couponId) {
-        Coupon coupon = AssertUtils.available(couponService.getById(couponId), "优惠券不存在");
+        Coupon coupon = AssertUtils.nonnull(couponService.getById(couponId), "优惠券不存在");
         if (!CouponClaimType.FREE.equals(coupon.getClaimType())) {
             throw new ResourceUnavailableException("当前优惠券不允许免费领取");
         }

+ 2 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/UserReceiveAddressServiceImpl.java

@@ -51,7 +51,7 @@ public class UserReceiveAddressServiceImpl extends ServiceImpl<UserReceiveAddres
     @Override
     public Long update ( @NonNull Long id, @NonNull UserReceiveAddressModifyParam param){
         Long userId = SessionContextHolder.getId();
-        UserReceiveAddress userReceiveAddress = AssertUtils.available(this.getById(id), "该常用地址不存在");
+        UserReceiveAddress userReceiveAddress = AssertUtils.nonnull(this.getById(id), "该常用地址不存在");
         UserReceiveAddressCopier.INSTANCE.copying(param,userReceiveAddress);
         userReceiveAddress.setUpdateTime(new Date());
         if (param.isDefaultStatus()){
@@ -82,7 +82,7 @@ public class UserReceiveAddressServiceImpl extends ServiceImpl<UserReceiveAddres
 
     @Override
     public void delete(@NonNull Long id){
-        AssertUtils.available(this.getById(id), "该常用地址不存在");
+        AssertUtils.nonnull(this.getById(id), "该常用地址不存在");
         this.baseMapper.deleteById(id);
     }
     @Override

+ 1 - 1
vehicle-server/src/main/resources/mapper/MerchantMapper.xml

@@ -60,7 +60,7 @@
             <if test="offset != null">
                 mt.id > #{offset}
             </if>
-            mt.region = #{region} and mt.status = 'ONLINE'
+            mt.region between #{code} and #{boundary} and mt.status = 'ONLINE'
             <if test="keyword != null and !keyword.isEmpty()">
                 and mt.name like concat('%', #{keyword}, '%')
             </if>