woody il y a 8 mois
Parent
commit
750ac8b298
17 fichiers modifiés avec 38 ajouts et 38 suppressions
  1. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CarouselImagesServiceImpl.java
  2. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CategoryServiceImpl.java
  3. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CommissionConfigServiceImpl.java
  4. 3 3
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/CouponServiceImpl.java
  5. 1 1
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/FavoriteServiceImpl.java
  6. 1 1
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/FeedbackReplyServiceImpl.java
  7. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/FeedbackServiceImpl.java
  8. 3 3
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/GoodsServiceImpl.java
  9. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/HelpCategoryServiceImpl.java
  10. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/HelpServiceImpl.java
  11. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/MerchantAuthServiceImpl.java
  12. 6 6
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/MerchantServiceImpl.java
  13. 1 1
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/NoticeServiceImpl.java
  14. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/OmsOrderReturnApplyServiceImpl.java
  15. 3 3
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/OmsOrderServiceImpl.java
  16. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/UserCouponServiceImpl.java
  17. 2 2
      vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/UserReceiveAddressServiceImpl.java

+ 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);
     }
 

+ 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);
     }
 

+ 2 - 2
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,7 +106,7 @@ public class HelpServiceImpl extends ServiceImpl<HelpMapper, Help> implements
      */
     @Override
     public void deleteHelpById(@NonNull Long id) {
-        Help help = AssertUtils.available(this.getById(id), "该问题帮助不存在");
+        Help help = AssertUtils.nonnull(this.getById(id), "该问题帮助不存在");
         this.deleteHelpById(id);
     }
 

+ 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