|
@@ -7,12 +7,25 @@ import org.springframework.http.MediaType;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
import shop.alien.entity.result.R;
|
|
import shop.alien.entity.result.R;
|
|
|
|
|
+import shop.alien.entity.store.StoreCuisine;
|
|
|
|
|
+import shop.alien.entity.store.StoreCuisineCategory;
|
|
|
|
|
+import shop.alien.entity.store.StoreOrder;
|
|
|
|
|
+import shop.alien.entity.store.StoreOrderDetail;
|
|
|
import shop.alien.entity.store.StoreTable;
|
|
import shop.alien.entity.store.StoreTable;
|
|
|
|
|
+import shop.alien.entity.store.dto.StoreInfoWithHomepageCuisinesDTO;
|
|
|
|
|
+import shop.alien.entity.store.dto.AddCartItemDTO;
|
|
|
import shop.alien.entity.store.dto.CartDTO;
|
|
import shop.alien.entity.store.dto.CartDTO;
|
|
|
import shop.alien.entity.store.dto.ChangeTableDTO;
|
|
import shop.alien.entity.store.dto.ChangeTableDTO;
|
|
|
|
|
+import shop.alien.entity.store.dto.CreateOrderDTO;
|
|
|
|
|
+import shop.alien.entity.store.dto.UpdateOrderCouponDTO;
|
|
|
import shop.alien.entity.store.vo.*;
|
|
import shop.alien.entity.store.vo.*;
|
|
|
|
|
+import shop.alien.store.feign.dto.DiningChangePhoneBody;
|
|
|
|
|
+import shop.alien.store.feign.dto.DiningProfileUpdateBody;
|
|
|
|
|
+import shop.alien.store.feign.dto.DiningWeChatLoginBody;
|
|
|
|
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 点餐服务 Feign 客户端
|
|
* 点餐服务 Feign 客户端
|
|
@@ -63,7 +76,7 @@ public interface DiningServiceFeign {
|
|
|
R<List<CuisineListVO>> searchCuisines(
|
|
R<List<CuisineListVO>> searchCuisines(
|
|
|
@RequestHeader(value = "Authorization", required = false) String authorization,
|
|
@RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
@RequestParam("storeId") Integer storeId,
|
|
@RequestParam("storeId") Integer storeId,
|
|
|
- @RequestParam("keyword") String keyword,
|
|
|
|
|
|
|
+ @RequestParam(value = "keyword", required = false) String keyword,
|
|
|
@RequestParam("tableId") Integer tableId);
|
|
@RequestParam("tableId") Integer tableId);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -112,6 +125,47 @@ public interface DiningServiceFeign {
|
|
|
@RequestHeader(value = "Authorization", required = false) String authorization,
|
|
@RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
@RequestParam("storeId") Integer storeId);
|
|
@RequestParam("storeId") Integer storeId);
|
|
|
|
|
|
|
|
|
|
+ @PostMapping("/store/dining/coupon/receive")
|
|
|
|
|
+ R<Boolean> receiveCoupon(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("couponId") Integer couponId);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/store/dining/order/confirm")
|
|
|
|
|
+ R<OrderConfirmVO> getOrderConfirmInfo(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("tableId") Integer tableId,
|
|
|
|
|
+ @RequestParam("dinerCount") Integer dinerCount);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/store/dining/order/lock")
|
|
|
|
|
+ R<Boolean> lockOrder(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("tableId") Integer tableId);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/store/dining/order/unlock")
|
|
|
|
|
+ R<Boolean> unlockOrder(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("tableId") Integer tableId);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/store/dining/order/check-lock")
|
|
|
|
|
+ R<Integer> checkOrderLock(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("tableId") Integer tableId);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/store/dining/order/settlement")
|
|
|
|
|
+ R<OrderSettlementVO> getOrderSettlementInfo(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("orderId") Integer orderId);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/store/dining/order/settlement/lock")
|
|
|
|
|
+ R<Boolean> lockSettlement(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("orderId") Integer orderId);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/store/dining/order/settlement/unlock")
|
|
|
|
|
+ R<Boolean> unlockSettlement(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("orderId") Integer orderId);
|
|
|
|
|
+
|
|
|
// ==================== 订单相关接口 ====================
|
|
// ==================== 订单相关接口 ====================
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -126,6 +180,89 @@ public interface DiningServiceFeign {
|
|
|
@RequestHeader(value = "Authorization", required = false) String authorization,
|
|
@RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
@PathVariable("tableId") Integer tableId);
|
|
@PathVariable("tableId") Integer tableId);
|
|
|
|
|
|
|
|
|
|
+ @PostMapping("/store/order/cart/add")
|
|
|
|
|
+ R<CartDTO> addCartItem(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestBody AddCartItemDTO dto);
|
|
|
|
|
+
|
|
|
|
|
+ @PutMapping("/store/order/cart/update")
|
|
|
|
|
+ R<CartDTO> updateCartItem(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("tableId") Integer tableId,
|
|
|
|
|
+ @RequestParam("cuisineId") Integer cuisineId,
|
|
|
|
|
+ @RequestParam("quantity") Integer quantity);
|
|
|
|
|
+
|
|
|
|
|
+ @DeleteMapping("/store/order/cart/remove")
|
|
|
|
|
+ R<CartDTO> removeCartItem(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("tableId") Integer tableId,
|
|
|
|
|
+ @RequestParam("cuisineId") Integer cuisineId);
|
|
|
|
|
+
|
|
|
|
|
+ @DeleteMapping("/store/order/cart/clear")
|
|
|
|
|
+ R<CartDTO> clearCart(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("tableId") Integer tableId);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/store/order/cart/set-diner-count")
|
|
|
|
|
+ R<CartDTO> setDinerCount(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("tableId") Integer tableId,
|
|
|
|
|
+ @RequestParam("dinerCount") Integer dinerCount);
|
|
|
|
|
+
|
|
|
|
|
+ @PutMapping("/store/order/cart/update-tableware")
|
|
|
|
|
+ R<CartDTO> updateTablewareQuantity(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("tableId") Integer tableId,
|
|
|
|
|
+ @RequestParam(value = "quantity", required = false) Integer quantity);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/store/order/create")
|
|
|
|
|
+ R<OrderSuccessVO> createOrder(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestBody CreateOrderDTO dto);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/store/order/pay/{orderId}")
|
|
|
|
|
+ R<Object> payOrder(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @PathVariable("orderId") Integer orderId,
|
|
|
|
|
+ @RequestParam("payType") Integer payType);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/store/order/cancel/{orderId}")
|
|
|
|
|
+ R<Boolean> cancelOrder(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @PathVariable("orderId") Integer orderId);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/store/order/info/{orderId}")
|
|
|
|
|
+ R<OrderInfoVO> getOrderInfo(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @PathVariable("orderId") Integer orderId);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/store/order/detail/list/{orderId}")
|
|
|
|
|
+ R<List<StoreOrderDetail>> getOrderDetailList(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @PathVariable("orderId") Integer orderId);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/store/order/my-orders")
|
|
|
|
|
+ R<Page<StoreOrderPageVO>> getMyOrders(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam(value = "current", defaultValue = "1") Long current,
|
|
|
|
|
+ @RequestParam(value = "size", defaultValue = "10") Long size,
|
|
|
|
|
+ @RequestParam("type") String type);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/store/order/complete/{orderId}")
|
|
|
|
|
+ R<Boolean> completeOrder(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @PathVariable("orderId") Integer orderId);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/store/order/update-coupon")
|
|
|
|
|
+ R<StoreOrder> updateOrderCoupon(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestBody UpdateOrderCouponDTO dto);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/store/order/admin/reset-table/{tableId}")
|
|
|
|
|
+ R<Boolean> resetTable(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @PathVariable("tableId") Integer tableId);
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 换桌(迁移购物车、未完成订单及关联数据,支持点餐未下单场景,无需订单号)
|
|
* 换桌(迁移购物车、未完成订单及关联数据,支持点餐未下单场景,无需订单号)
|
|
|
*
|
|
*
|
|
@@ -227,8 +364,113 @@ public interface DiningServiceFeign {
|
|
|
R<Object> getUserInfo(
|
|
R<Object> getUserInfo(
|
|
|
@RequestHeader(value = "Authorization", required = false) String authorization);
|
|
@RequestHeader(value = "Authorization", required = false) String authorization);
|
|
|
|
|
|
|
|
|
|
+ @PostMapping("/dining/user/wechatLogin")
|
|
|
|
|
+ R<Object> wechatLogin(@RequestBody DiningWeChatLoginBody body);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/dining/user/updateProfile")
|
|
|
|
|
+ R<Object> updateProfile(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestBody DiningProfileUpdateBody body);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/dining/user/changePhone")
|
|
|
|
|
+ R<Object> changePhone(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestBody DiningChangePhoneBody body);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/dining/user/verifyToken")
|
|
|
|
|
+ R<Object> verifyToken(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestBody(required = false) Map<String, String> body);
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/dining/user/parseToken")
|
|
|
|
|
+ R<Object> parseToken(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestBody(required = false) Map<String, String> body);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/dining/coupon/getUserCouponList")
|
|
|
|
|
+ R<List<LifeDiscountCouponVo>> couponGetUserCouponList(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam(value = "page", defaultValue = "1") int page,
|
|
|
|
|
+ @RequestParam(value = "size", defaultValue = "10") int size,
|
|
|
|
|
+ @RequestParam("tabType") String tabType,
|
|
|
|
|
+ @RequestParam(value = "type", required = false) Integer type,
|
|
|
|
|
+ @RequestParam(value = "couponType", required = false) Integer couponType,
|
|
|
|
|
+ @RequestParam(value = "storeId", required = false) String storeId);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/dining/coupon/detail")
|
|
|
|
|
+ R<LifeDiscountCouponVo> couponGetDetail(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("counponId") String counponId);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/dining/coupon/storeUsableList")
|
|
|
|
|
+ R<Map<String, Object>> couponStoreUsableList(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("storeId") String storeId,
|
|
|
|
|
+ @RequestParam("amount") BigDecimal amount,
|
|
|
|
|
+ @RequestParam(value = "couponType", required = false) Integer couponType);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/dining/coupon/userOwned")
|
|
|
|
|
+ R<List<LifeDiscountCouponVo>> couponUserOwned(
|
|
|
|
|
+ @RequestParam(value = "storeId", required = false) String storeId,
|
|
|
|
|
+ @RequestParam(value = "amount", required = false) BigDecimal amount);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/dining/coupon/getStoreUserCouponList")
|
|
|
|
|
+ R<List<LifeDiscountCouponVo>> couponGetStoreUserCouponList(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("storeId") String storeId,
|
|
|
|
|
+ @RequestParam(value = "couponType", required = false) Integer couponType);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/dining/coupon/userOwnedByStore")
|
|
|
|
|
+ R<List<LifeDiscountCouponVo>> couponUserOwnedByStore(
|
|
|
|
|
+ @RequestParam(value = "storeId", required = false) String storeId,
|
|
|
|
|
+ @RequestParam(value = "couponType", required = false) Integer couponType);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/dining/coupon/getStoreAllCouponList")
|
|
|
|
|
+ R<Page<LifeDiscountCouponVo>> couponGetStoreAllCouponList(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam(value = "page", defaultValue = "1") int page,
|
|
|
|
|
+ @RequestParam(value = "size", defaultValue = "10") int size,
|
|
|
|
|
+ @RequestParam("storeId") String storeId,
|
|
|
|
|
+ @RequestParam(value = "couponName", required = false) String couponName,
|
|
|
|
|
+ @RequestParam("tab") String tab,
|
|
|
|
|
+ @RequestParam(value = "couponsFromType", defaultValue = "1") int couponsFromType,
|
|
|
|
|
+ @RequestParam(value = "couponStatus", defaultValue = "1") int couponStatus,
|
|
|
|
|
+ @RequestParam(value = "couponType", required = false) Integer couponType);
|
|
|
|
|
+
|
|
|
|
|
+ // ==================== 支付(与点餐同域) ====================
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/payment/prePay")
|
|
|
|
|
+ R<Object> prePay(
|
|
|
|
|
+ @RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
+ @RequestParam("price") String price,
|
|
|
|
|
+ @RequestParam("subject") String subject,
|
|
|
|
|
+ @RequestParam("payType") String payType,
|
|
|
|
|
+ @RequestParam("payer") String payer,
|
|
|
|
|
+ @RequestParam("orderNo") String orderNo,
|
|
|
|
|
+ @RequestParam("storeId") Integer storeId,
|
|
|
|
|
+ @RequestParam(value = "couponId", required = false) Integer couponId,
|
|
|
|
|
+ @RequestParam(value = "payerId", required = false) Integer payerId,
|
|
|
|
|
+ @RequestParam(value = "tablewareFee", required = false) String tablewareFee,
|
|
|
|
|
+ @RequestParam(value = "discountAmount", required = false) String discountAmount,
|
|
|
|
|
+ @RequestParam(value = "payAmount", required = false) String payAmount);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/payment/searchOrderByOutTradeNoPath")
|
|
|
|
|
+ R<Object> searchOrderByOutTradeNoPath(
|
|
|
|
|
+ @RequestParam("transactionId") String transactionId,
|
|
|
|
|
+ @RequestParam("payType") String payType,
|
|
|
|
|
+ @RequestParam("storeId") Integer storeId);
|
|
|
|
|
+
|
|
|
// ==================== 门店信息接口 ====================
|
|
// ==================== 门店信息接口 ====================
|
|
|
|
|
|
|
|
|
|
+ @GetMapping("/store/info/detail/{storeId}")
|
|
|
|
|
+ R<StoreInfoWithHomepageCuisinesDTO> getStoreInfoWithHomepageCuisines(@PathVariable("storeId") Integer storeId);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/store/info/categories")
|
|
|
|
|
+ R<List<StoreCuisineCategory>> getStoreInfoCategories(@RequestParam("storeId") Integer storeId);
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/store/info/cuisines")
|
|
|
|
|
+ R<List<StoreCuisine>> getStoreInfoCuisinesByCategoryId(@RequestParam("categoryId") Integer categoryId);
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 根据门店ID查询桌号列表
|
|
* 根据门店ID查询桌号列表
|
|
|
*
|
|
*
|