| Pass |
- 0:26:02 |
+ 9:26:52 |
Test passed
|
@@ -128,13 +128,13 @@
Started
-
ʮһÔÂ 11, 2026 00:26:01
+
ʮһÔÂ 12, 2026 09:26:52
Ended
-
ʮһÔÂ 11, 2026 00:26:02
+
ʮһÔÂ 12, 2026 09:26:52
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopAreaController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopAreaController.java
index 0759cd06..670a6973 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopAreaController.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopAreaController.java
@@ -219,6 +219,42 @@ public class ShopAreaController {
return ResultUtil.success("保存成功");
}
+ private static final String TARGET_TRANSFER_DELIVERY_REGION_ID = "2110300467664916480";
+
+ @RequestMapping(value = "/transferDeliverySwitch/get", method = RequestMethod.GET)
+ @ApiOperation(value = "根据校区ID查询中转配送开关")
+ public Result getTransferDeliverySwitch(@RequestParam String regionId) {
+ if (!TARGET_TRANSFER_DELIVERY_REGION_ID.equals(regionId)) {
+ return new ResultUtil().setData(1);
+ }
+ ShopArea shopArea = shopAreaService.get(regionId);
+ if (shopArea == null) {
+ return ResultUtil.error("校区不存在");
+ }
+ Integer transferDeliveryEnabled = shopArea.getTransferDeliveryEnabled() == null ? 1 : shopArea.getTransferDeliveryEnabled();
+ return new ResultUtil().setData(transferDeliveryEnabled);
+ }
+
+ @RequestMapping(value = "/transferDeliverySwitch/update", method = RequestMethod.POST)
+ @ApiOperation(value = "根据校区ID更新中转配送开关")
+ public Result updateTransferDeliverySwitch(@RequestParam String regionId, @RequestParam Integer transferDeliveryEnabled) {
+ if (!TARGET_TRANSFER_DELIVERY_REGION_ID.equals(regionId)) {
+ return ResultUtil.error("当前区域不支持中转配送设置");
+ }
+ if (transferDeliveryEnabled == null || (transferDeliveryEnabled != 0 && transferDeliveryEnabled != 1)) {
+ return ResultUtil.error("中转配送开关参数错误");
+ }
+ ShopArea shopArea = shopAreaService.get(regionId);
+ if (shopArea == null) {
+ return ResultUtil.error("校区不存在");
+ }
+ shopArea.setTransferDeliveryEnabled(transferDeliveryEnabled);
+ ShopArea updated = shopAreaService.update(shopArea);
+ shopAreaService.refreshShopAreaCache(updated.getParentId(), updated.getId());
+ redisTemplate.deleteByPattern("ShopArea:*");
+ return ResultUtil.success("保存成功");
+ }
+
@RequestMapping(value = "/delByIds", method = RequestMethod.POST)
@ApiOperation(value = "批量通过id删除")
public Result delByIds(@RequestParam String[] ids) {
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java
index 0022fa8b..79b5b36a 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java
@@ -29,10 +29,8 @@ import cc.hiver.core.entity.User;
import cc.hiver.core.entity.Worker;
import cc.hiver.core.service.UserService;
import cc.hiver.core.service.WorkerService;
-import cc.hiver.mall.entity.Shop;
-import cc.hiver.mall.entity.ShopArea;
-import cc.hiver.mall.entity.ShopTakeaway;
-import cc.hiver.mall.entity.ShopUser;
+import cc.hiver.mall.dao.ShopGateLocationDao;
+import cc.hiver.mall.entity.*;
import cc.hiver.mall.invitelog.service.InviteLogService;
import cc.hiver.mall.pojo.dto.ShopCacheDTO;
import cc.hiver.mall.pojo.dto.ShopRevenue;
@@ -78,6 +76,7 @@ import java.util.stream.Collectors;
@Api(tags = "店铺管理接口")
@RequestMapping("/hiver/app/shop/")
public class ShopController {
+ private static final String TARGET_GATE_LOCATION_REGION_ID = "2110300467664916480";
private static final String GROUP_BUY_DEFAULT_PAGE_CACHE_PREFIX = "GROUP_BUY_DEFAULT_SHOP_PAGE:";
private static final long GROUP_BUY_DEFAULT_PAGE_CACHE_SECONDS = 30L;
private static final DateTimeFormatter BUSINESS_TIME_FORMATTER = DateTimeFormatter.ofPattern("HH:mm");
@@ -87,6 +86,9 @@ public class ShopController {
@Autowired
private ShopService shopService;
+ @Autowired
+ private ShopGateLocationDao shopGateLocationDao;
+
@Autowired
private ShopAreaService shopAreaService;
@@ -498,6 +500,83 @@ public class ShopController {
return ResultUtil.success("编辑成功");
}
+ @RequestMapping(value = "/gateLocation/list", method = RequestMethod.GET)
+ @ApiOperation("查询商家送达地点")
+ public Result> listGateLocation(@RequestParam String shopId) {
+ Shop shop = requireTargetGateLocationShop(shopId);
+ if (shop == null) {
+ return ResultUtil.error("当前区域不支持送达地点");
+ }
+ return new ResultUtil>().setData(shopGateLocationDao.findByShopIdOrderByCreateTimeAsc(shopId));
+ }
+
+ @RequestMapping(value = "/gateLocation/save", method = RequestMethod.POST)
+ @ApiOperation("新增或编辑商家送达地点")
+ public Result