From 8a7f9301f4b9e6fcd4e1b3014fb8c5d52820e179 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Thu, 07 Aug 2025 15:57:07 +0800
Subject: [PATCH] Merge branch 'master' into xin
---
oying-system/src/main/java/com/oying/modules/pc/store/domain/dto/StoreFieldUpdateRequest.java | 5 +++++
oying-system/src/main/java/com/oying/modules/pc/store/service/StoreService.java | 2 ++
oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreServiceImpl.java | 8 ++++++++
oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreQualificationMerchantController.java | 10 ++++++++++
oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreMerchantController.java | 14 ++++++++++++++
5 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/oying-system/src/main/java/com/oying/modules/pc/store/domain/dto/StoreFieldUpdateRequest.java b/oying-system/src/main/java/com/oying/modules/pc/store/domain/dto/StoreFieldUpdateRequest.java
index faba857..b53dfbd 100644
--- a/oying-system/src/main/java/com/oying/modules/pc/store/domain/dto/StoreFieldUpdateRequest.java
+++ b/oying-system/src/main/java/com/oying/modules/pc/store/domain/dto/StoreFieldUpdateRequest.java
@@ -61,6 +61,11 @@
@NotNull(groups = UpdateStoreDeliveryFeeGroup.class)
private BigDecimal deliveryFee;
+ public interface UpdateStorePackagingFeeGroup{}
+
+ @NotNull(groups = UpdateStorePackagingFeeGroup.class)
+ private BigDecimal packagingFee;
+
public interface UpdateStoreDeliveryMinimumGroup{}
@NotNull(groups = UpdateStoreDeliveryMinimumGroup.class)
diff --git a/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreMerchantController.java b/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreMerchantController.java
index 306160f..5da22b4 100644
--- a/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreMerchantController.java
+++ b/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreMerchantController.java
@@ -277,6 +277,20 @@
}
/**
+ * 修改包装费用
+ */
+ @PatchMapping(value = "/{storeId}/packagingFee")
+ @ApiOperation("修改包装费用")
+ /*@PreAuthorize("@el.check('merchant:store:deliveryFee')" +
+ " and @storeMerchantOwnershipService.check(#storeId)")*/
+ public ResponseEntity<?> updatePackagingFee(@PathVariable("storeId") Long storeId,
+ @Validated(value = StoreFieldUpdateRequest.UpdateStorePackagingFeeGroup.class)
+ @RequestBody StoreFieldUpdateRequest request) {
+ storeService.updatePackagingFee(storeId, request.getPackagingFee(), request.getVersion());
+ return ResponseEntity.noContent().build();
+ }
+
+ /**
* 修改状态
*/
@PatchMapping(value = "/{storeId}/businessStatus")
diff --git a/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreQualificationMerchantController.java b/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreQualificationMerchantController.java
index aa31e18..c1eafde 100644
--- a/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreQualificationMerchantController.java
+++ b/oying-system/src/main/java/com/oying/modules/pc/store/rest/StoreQualificationMerchantController.java
@@ -92,4 +92,14 @@
storeQualificationService.deleteAll(ids);
return ResponseEntity.noContent().build();
}
+
+ @PostMapping(value = "/delete")
+ @Log("删除店铺资质")
+ @ApiOperation("删除店铺资质")
+ //@PreAuthorize("@el.check('merchant:storeQualification:batchDel') " +
+ // "and @storeMerchantOwnershipService.check(#storeId)")
+ public ResponseEntity<?> batchDelete(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
+ storeQualificationService.deleteAll(ids);
+ return ResponseEntity.noContent().build();
+ }
}
diff --git a/oying-system/src/main/java/com/oying/modules/pc/store/service/StoreService.java b/oying-system/src/main/java/com/oying/modules/pc/store/service/StoreService.java
index f5443f1..e4dc65c 100644
--- a/oying-system/src/main/java/com/oying/modules/pc/store/service/StoreService.java
+++ b/oying-system/src/main/java/com/oying/modules/pc/store/service/StoreService.java
@@ -64,6 +64,8 @@
boolean updateDeliveryFee(Long storeId, BigDecimal deliveryFee, Long version);
+ boolean updatePackagingFee(Long storeId, BigDecimal packagingFee, Long version);
+
boolean updateStatus(Long storeId, Integer status, Long version);
boolean existsByIdAndMerchantId(Long storeId, Long merchantId);
diff --git a/oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreServiceImpl.java b/oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreServiceImpl.java
index 253d66c..e134989 100644
--- a/oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreServiceImpl.java
+++ b/oying-system/src/main/java/com/oying/modules/pc/store/service/impl/StoreServiceImpl.java
@@ -225,6 +225,14 @@
}
@Override
+ public boolean updatePackagingFee(Long storeId, BigDecimal packagingFee, Long version) {
+ Store existingStore = this.getOrThrow(storeId, version);
+ LambdaUpdateWrapper<Store> wrapper = this.createLambdaUpdateWrapper(storeId, existingStore.getVersion())
+ .set(Store::getPackagingFee, packagingFee);
+ return update(wrapper);
+ }
+
+ @Override
public boolean updateStatus(Long storeId, Integer status, Long version) {
Store existingStore = this.getOrThrow(storeId, version);
LambdaUpdateWrapper<Store> wrapper = this.createLambdaUpdateWrapper(storeId, existingStore.getVersion())
--
Gitblit v1.9.3