From 3ec52c2746c01b4f3aaaf8e40c7540d3c29dea5f Mon Sep 17 00:00:00 2001 From: zhouxiang <zhouxiang> Date: 星期三, 31 八月 2022 15:59:15 +0800 Subject: [PATCH] 添加结账 接口和开单接口 --- phis-feign/src/main/java/com/hz/his/dto/order/PayAmountDto.java | 24 ++++++++++++ phis-feign/src/main/java/com/hz/his/dto/order/OrderPHisDto.java | 7 +++ phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java | 15 ++++++- phis-feign/src/main/java/com/hz/his/dto/order/OrderItemDto.java | 3 + phis-feign/src/main/java/com/hz/his/dto/order/PayDto.java | 30 +++++++++++++++ 5 files changed, 75 insertions(+), 4 deletions(-) diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemDto.java index b412caf..802a33c 100644 --- a/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemDto.java +++ b/phis-feign/src/main/java/com/hz/his/dto/order/OrderItemDto.java @@ -93,6 +93,9 @@ /** 鍗″寘鏍囪瘑 */ private List<CardItemInfoDto> cardItemInfoIds; + /** 绗笁鏂筰tem鏍囪瘑 */ + private String commonItemId; + /**骞冲彴绫诲瀷-CRM*/ diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/OrderPHisDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/OrderPHisDto.java index fdd9d01..b6315ad 100644 --- a/phis-feign/src/main/java/com/hz/his/dto/order/OrderPHisDto.java +++ b/phis-feign/src/main/java/com/hz/his/dto/order/OrderPHisDto.java @@ -3,6 +3,8 @@ import com.hz.his.dto.PageDto; import lombok.Data; +import java.util.List; + /** * Created with IntelliJ IDEA. * @@ -18,7 +20,10 @@ private String operatorId; //鎿嶄綔浜洪棬搴楁爣璇嗭紝蹇呭~ private String shopId; + //鎬昏鍗曚俊鎭紝蹇呭~ private OrdersTotalDto ordersTotal; - private OrderItemDto orderItem; + //涓�绾у瓙璁㈠崟锛屽繀濉� + private List<OrderItemDto> orderItem; + //寮�鍙戜汉闆嗗悎 private OrderDeveloperDto orderDeveloper; } diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/PayAmountDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/PayAmountDto.java new file mode 100644 index 0000000..91e40a7 --- /dev/null +++ b/phis-feign/src/main/java/com/hz/his/dto/order/PayAmountDto.java @@ -0,0 +1,24 @@ +package com.hz.his.dto.order; + +import lombok.Data; + +/** + * 缁撹处閲戦闆嗗悎 + * + * @Author: zhouxiang + * @Date: 2022/08/31/15:26 + * @Description: + */ +@Data +public class PayAmountDto { + //瀹為檯鏀粯閲戦 + private String amount; + //鏀粯鏂瑰紡 + private String method; + //鍟嗗搧/椤圭洰id/缁勫悎椤规爣璇�(鍗¢」鏀粯鏃跺繀浼犵粍鍚堥」鏍囪瘑) + private String commonId; + //鏉冪泭绫诲瀷:鍗¢」鏀粯蹇呬紶 + private String cardEquityId; + //鍗″寘鏍囪瘑:鍗¢」鏀粯蹇呬紶 + private String userCardId; +} diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/PayDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/PayDto.java new file mode 100644 index 0000000..2c8e35e --- /dev/null +++ b/phis-feign/src/main/java/com/hz/his/dto/order/PayDto.java @@ -0,0 +1,30 @@ +package com.hz.his.dto.order; + +import lombok.Data; + +import java.util.List; + +/** + * 缁撹处鍙傛暟 + * + * @Author: zhouxiang + * @Date: 2022/06/29/15:11 + * @Description: + */ +@Data +public class PayDto { + //鏄惁鏄寜椤圭洰浠樻,0:鍚�,1:鏄� + private Integer type; + //璁㈠崟id 蹇呭~ + private String orderId; + //搴斾粯鎬婚噾棰� 蹇呭~ + private String total; + //缁撹处鍙傛暟 蹇呭~ + private List<PayAmountDto> amount; + //鎿嶄綔浜烘爣璇� 蹇呭~,crm濉敤鎴� + private String operatorId; + //浼樻儬鍒竔d + private String userCouponId; + //璁㈠崟棰嗗缓鏍囪瘑 + private String hisOrderId; +} diff --git a/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java b/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java index 5f4993b..813beb3 100644 --- a/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java +++ b/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java @@ -7,6 +7,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; +import javax.servlet.http.HttpServletRequest; + /** * 杩欓噷杩欎釜name 闇�瑕佸~鍐� 璇锋眰鐨勬湇鍔℃彁渚涜�呯殑娉ㄥ唽鍒皀acos Server涓婇潰鐨勬湇鍔″悕锛宲ath 鏄姹傛帴鍙e墠缂� */ @@ -49,9 +51,16 @@ @PostMapping(value = "/refund/syn/refund") Result synRefund(@RequestBody OrderRefundDto dto, @RequestHeader("appIdCode") String appIdCode); + /** - * 寮�鏀惧钩鍙�-寮�鍗曞苟涓旂粨璐︽帴鍙� + * 寮�鏀惧钩鍙�-寮�鍗� */ - @PostMapping(value = "/create/pay/order") - Result createPayOrder(@RequestBody OrderPHisDto dto); + @PostMapping(value = "/order/add") + Result orderAdd(HttpServletRequest request, @RequestBody OrderPHisDto dto); + + /** + * 寮�鏀惧钩鍙�-缁撹处 + */ + @PostMapping(value = "/order/pay") + Result orderPay(HttpServletRequest request,@RequestBody PayDto dto); } \ No newline at end of file -- Gitblit v1.8.0