fix some shits

pay.vue 还用 store.value.min_price,应改 minPrice。
后端下单最好也校验起送价,别只靠前端。
配送规则保存前过滤/校验空行、maxKm <= minKm。
This commit is contained in:
Kroytz committed 2026-07-03 19:19:17 +08:00
1 parent a0c13b91da
commit 4a1aab453d
4 files changed
+25 -4

No files matched your search

@@ -37,6 +37,7 @@ public interface ErrorCodeConstants {
ErrorCode STORE_ORDER_DESK_NOT = new ErrorCode(1008007023, "当前桌号不存在");
ErrorCode STORE_ORDER_OUT_OF_DELIVERY_RANGE = new ErrorCode(1008007024, "当前收货地址不在配送范围内");
ErrorCode STORE_ORDER_MIN_PRICE_NOT_MET = new ErrorCode(1008007025, "未达到外卖起送价");
@@ -229,6 +229,12 @@ public class AppStoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper,Store
}
}
if (OrderLogEnum.ORDER_TAKE_OUT.getValue().equals(param.getOrderType())
&& storeShopDO.getMinPrice() != null
&& sumPrice.compareTo(storeShopDO.getMinPrice()) < 0) {
throw exception(STORE_ORDER_MIN_PRICE_NOT_MET);
}
//计算优惠券价格
if(StrUtil.isNotBlank(param.getCouponId())){
CouponUserDO couponUserDO = appCouponUserService.getById(param.getCouponId());