| Pass |
- 17:16:55 |
+ 16:54:23 |
Test passed
|
@@ -128,13 +128,13 @@
Started
-
六月 27, 2026 17:16:55
+
六月 28, 2026 16:54:23
Ended
-
六月 27, 2026 17:16:55
+
六月 28, 2026 16:54:23
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/AdminSeckillGroupController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/AdminSeckillGroupController.java
index a59c9bbe..c3c58546 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/AdminSeckillGroupController.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/AdminSeckillGroupController.java
@@ -32,6 +32,7 @@ import java.util.List;
public class AdminSeckillGroupController {
public static final String GROUP_DELIVERY_TIME_KEY_PREFIX = "GROUP_DELIVERY_TIME:";
+ public static final String GROUP_CUSTOMER_PHONE_KEY_PREFIX = "GROUP_CUSTOMER_PHONE:";
public static final int DEFAULT_GROUP_DELIVERY_TIME = 30;
@Autowired
@@ -62,6 +63,25 @@ public class AdminSeckillGroupController {
return new ResultUtil().setData(getDeliveryTimeByRegionId(redisTemplateHelper, regionId));
}
+ @RequestMapping(value = "/customerPhone/save", method = RequestMethod.POST)
+ @ApiOperation(value = "淇濆瓨鍖哄煙瀹㈡湇鐢佃瘽")
+ public Result saveCustomerPhone(@RequestBody CustomerPhoneSetting setting) {
+ if (setting == null || StringUtils.isBlank(setting.getRegionId())) {
+ return ResultUtil.error("鍖哄煙ID涓嶈兘涓虹┖");
+ }
+ if (StringUtils.isBlank(setting.getCustomerPhone())) {
+ return ResultUtil.error("瀹㈡湇鐢佃瘽涓嶈兘涓虹┖");
+ }
+ redisTemplateHelper.set(buildCustomerPhoneKey(setting.getRegionId()), setting.getCustomerPhone().trim());
+ return ResultUtil.success("淇濆瓨鎴愬姛");
+ }
+
+ @RequestMapping(value = "/customerPhone/get", method = RequestMethod.GET)
+ @ApiOperation(value = "鏌ヨ鍖哄煙瀹㈡湇鐢佃瘽")
+ public Result getCustomerPhone(@RequestParam(value = "regionId") String regionId) {
+ return new ResultUtil().setData(getCustomerPhoneByRegionId(redisTemplateHelper, regionId));
+ }
+
public static Integer getDeliveryTimeByRegionId(RedisTemplateHelper redisTemplateHelper, String regionId) {
if (redisTemplateHelper == null || StringUtils.isBlank(regionId)) {
return DEFAULT_GROUP_DELIVERY_TIME;
@@ -77,6 +97,14 @@ public class AdminSeckillGroupController {
}
}
+ public static String getCustomerPhoneByRegionId(RedisTemplateHelper redisTemplateHelper, String regionId) {
+ if (redisTemplateHelper == null || StringUtils.isBlank(regionId)) {
+ return "";
+ }
+ String value = redisTemplateHelper.get(buildCustomerPhoneKey(regionId));
+ return StringUtils.isBlank(value) ? "" : value;
+ }
+
public static Integer getTotalDeliveryTimeByRegionIdAndShopId(RedisTemplateHelper redisTemplateHelper, String regionId, String shopId) {
return getShopCookingTimeByRegionIdAndShopId(redisTemplateHelper, regionId, shopId)
+ getDeliveryTimeByRegionId(redisTemplateHelper, regionId);
@@ -105,6 +133,10 @@ public class AdminSeckillGroupController {
return GROUP_DELIVERY_TIME_KEY_PREFIX + regionId;
}
+ public static String buildCustomerPhoneKey(String regionId) {
+ return GROUP_CUSTOMER_PHONE_KEY_PREFIX + regionId;
+ }
+
public static class DeliveryTimeSetting {
private String regionId;
private Integer deliveryTime;
@@ -126,6 +158,27 @@ public class AdminSeckillGroupController {
}
}
+ public static class CustomerPhoneSetting {
+ private String regionId;
+ private String customerPhone;
+
+ public String getRegionId() {
+ return regionId;
+ }
+
+ public void setRegionId(String regionId) {
+ this.regionId = regionId;
+ }
+
+ public String getCustomerPhone() {
+ return customerPhone;
+ }
+
+ public void setCustomerPhone(String customerPhone) {
+ this.customerPhone = customerPhone;
+ }
+ }
+
@RequestMapping(value = "/category/save", method = RequestMethod.POST)
@ApiOperation(value = "鏂板绉掓潃鍥㈠垎绫")
public Result saveCategory(@RequestBody SeckillGroupCategory category) {
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/UserAddressController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/UserAddressController.java
index 5f4d3ea7..16e407dd 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/UserAddressController.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/UserAddressController.java
@@ -88,6 +88,16 @@ public class UserAddressController {
List list = userAddressService.getAddressListByUserId(userId);
return new ResultUtil>().setData(list);
}
+
+ @RequestMapping(value = "/get", method = RequestMethod.GET)
+ @ApiOperation(value = "鏍规嵁ID鑾峰彇鐢ㄦ埛鏀惰揣鍦板潃")
+ public Result get(@RequestParam("id") String id) {
+ if (StringUtils.isBlank(id)) {
+ return ResultUtil.error("鍦板潃ID涓嶈兘涓虹┖");
+ }
+ UserAddress address = userAddressService.getById(id);
+ return new ResultUtil().setData(address);
+ }
@RequestMapping(value = "/setDefault", method = RequestMethod.POST)
@ApiOperation(value = "璁剧疆榛樿鏀惰揣鍦板潃")
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/WechatPayController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/WechatPayController.java
index e378bef2..ec8fe6b2 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/WechatPayController.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/WechatPayController.java
@@ -5,6 +5,7 @@ import cc.hiver.mall.service.mybatis.MallDeliveryOrderService;
import cc.hiver.mall.service.mybatis.MallOrderService;
import cc.hiver.mall.serviceimpl.UnifiedOrderService;
import cc.hiver.mall.utils.KeyUtils;
+import cc.hiver.mall.utils.MallOrderDeliveryFeeRefundHelper;
import cc.hiver.mall.utils.WechatPayConfig;
import cc.hiver.mall.utils.WechatPaySigner;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -18,10 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import javax.annotation.PostConstruct;
import java.io.ByteArrayOutputStream;
@@ -57,6 +55,9 @@ public class WechatPayController {
@Autowired
private MallDeliveryOrderService mallDeliveryOrderService;
+ @Autowired
+ private MallOrderDeliveryFeeRefundHelper mallOrderDeliveryFeeRefundHelper;
+
@Autowired
private WechatPaySigner signer;
@@ -133,10 +134,21 @@ public class WechatPayController {
// 2. 鐢熸垚鍓嶇鏀粯鍙傛暟
Map payParams = buildPaySign(prepayId);
payParams.put("code","200");
+ if(description.equals("澧炲姞閰嶉佷剑閲")){
+ payParams.put("wxOrderId", outTradeNo);
+ }
return ResponseEntity.ok(payParams);
}
}
+ @GetMapping("/delivery-fee-record/exists")
+ public ResponseEntity