From 02e460a52667915cda6c4ebb58488646795c37ec Mon Sep 17 00:00:00 2001
From: 童刚 <pBP8jclM@8yTJ@4h>
Date: 星期三, 03 八月 2022 18:59:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 phis-feign/src/main/java/com/hz/his/feign/service/phis/SUserService.java           |   14 ++
 phis-feign/src/main/java/com/hz/his/dto/order/OrderPayDto.java                     |   29 ++++
 phis-feign/src/main/java/com/hz/his/dto/user/coupon/GoodsCanUseCouponDto.java      |   23 +++
 phis-feign/src/main/java/com/hz/his/dto/user/coupon/UserCanUseCouponDto.java       |    2 
 phis-feign/src/main/java/com/hz/his/dto/user/coupon/OrderItemCouponDto.java        |   24 ++++
 phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipCouponService.java |    8 +
 phis-feign/src/main/java/com/hz/his/constant/CouponPlatformConstants.java          |   22 +++
 phis-feign/src/main/java/com/hz/his/dto/user/coupon/OrderCanUseCouponDto.java      |   24 ++++
 phis-feign/src/main/java/com/hz/his/dto/order/OrderCreateDto.java                  |   27 ++++
 phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipOrderService.java  |   65 +++++-----
 phis-feign/src/main/java/com/hz/his/dto/order/OrderDeveloperDto.java               |  101 ++++++++++++++++
 11 files changed, 305 insertions(+), 34 deletions(-)

diff --git a/phis-feign/src/main/java/com/hz/his/constant/CouponPlatformConstants.java b/phis-feign/src/main/java/com/hz/his/constant/CouponPlatformConstants.java
new file mode 100644
index 0000000..8c043c0
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/constant/CouponPlatformConstants.java
@@ -0,0 +1,22 @@
+package com.hz.his.constant;
+
+/**
+ * 骞冲彴甯搁噺
+ *
+ * @Author: wzh
+ * @Date: 2022/08/02
+ * @Description:
+ */
+public class CouponPlatformConstants {
+    //棰勭害
+    public static String TYPE_PLATFORM_PHIS = "p-his";
+    //鑹惧績鑽�
+    public static String TYPE_PLATFORM_CRM = "crm";
+    //瀵煎尰
+    public static String TYPE_PLATFORM_GUIDE = "guide";
+    //his鍔╂墜
+    public static String TYPE_PLATFORM_HIS = "his";
+    public static String TYPE_PLATFORM_MA = "marketing_assistant";
+    /**棰嗗缓*/
+    public static String TYPE_PLATFORM_PHISKIN = "PhiSkin";
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/OrderCreateDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/OrderCreateDto.java
new file mode 100644
index 0000000..e204f8f
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/order/OrderCreateDto.java
@@ -0,0 +1,27 @@
+package com.hz.his.dto.order;
+
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author wzh
+ * 璁㈠崟鍒涘缓鎵╁睍
+ */
+@Data
+public class OrderCreateDto {
+
+    private OrdersTotalDto orderTotal;
+
+    private List<OrderItemDto> orderItem;
+
+    private List<OrderDeveloperDto> orderDeveloper;
+
+    private List<String> cardItemInfoIds;
+
+    private String operatorId;
+
+    private String shopId;
+
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/OrderDeveloperDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/OrderDeveloperDto.java
new file mode 100644
index 0000000..1e77c83
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/order/OrderDeveloperDto.java
@@ -0,0 +1,101 @@
+package com.hz.his.dto.order;
+
+import java.util.Date;
+
+/**
+ * 璁㈠崟涓庡紑鍙戜汉鍏宠仈琛�(榛樿:鐢ㄦ埛缁戝畾鐨勬墍灞為【闂�)
+ */
+public class OrderDeveloperDto {
+
+    private String id;
+    private Date createTime;
+    private Date editTime;
+
+    /** 璁㈠崟id锛圤rdersTotal锛� */
+    private String orderId;
+
+    /** 寮�鍗曚汉闂ㄥ簵鏍囪瘑(榛樿:鐢ㄦ埛缁戝畾鐨勬墍灞為【闂�) */
+    private String shopId;
+    /** 寮�鍗曚汉闂ㄥ簵鍚嶇О(榛樿:鐢ㄦ埛缁戝畾鐨勬墍灞為【闂�)*/
+    private String shopName;
+
+    /** 寮�鍗曚汉鍛樺伐鏍囪瘑(榛樿:鐢ㄦ埛缁戝畾鐨勬墍灞為【闂�)*/
+    private String employeeId;
+     /** 寮�鍗曚汉鍛樺伐鍚嶇О(榛樿:鐢ㄦ埛缁戝畾鐨勬墍灞為【闂�)*/
+    private String employeeName;
+
+     /** 绫诲瀷(缇庡甯�/鍖荤敓)*/
+    private String type;
+
+    public String getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+
+    public String getShopId() {
+        return shopId;
+    }
+
+    public void setShopId(String shopId) {
+        this.shopId = shopId;
+    }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    public String getEmployeeId() {
+        return employeeId;
+    }
+
+    public void setEmployeeId(String employeeId) {
+        this.employeeId = employeeId;
+    }
+
+    public String getEmployeeName() {
+        return employeeName;
+    }
+
+    public void setEmployeeName(String employeeName) {
+        this.employeeName = employeeName;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getEditTime() {
+        return editTime;
+    }
+
+    public void setEditTime(Date editTime) {
+        this.editTime = editTime;
+    }
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/order/OrderPayDto.java b/phis-feign/src/main/java/com/hz/his/dto/order/OrderPayDto.java
new file mode 100644
index 0000000..034edb7
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/order/OrderPayDto.java
@@ -0,0 +1,29 @@
+package com.hz.his.dto.order;
+
+import lombok.Data;
+
+/**
+ * @author wzh
+ * 璁㈠崟缁撹处鎵╁睍
+ */
+@Data
+public class OrderPayDto {
+
+    /** 鏄惁鏄寜椤圭洰浠樻,0:鍚�,1:鏄� */
+    private Integer type;
+    /** 璁㈠崟id */
+    private String orderId;
+    /** 搴斾粯鐨勬�婚噾棰� */
+    private String total;
+    /** 鐢ㄦ埛鐪熸鏀粯鐨勯噾棰濋泦鍚� */
+    private String amount;
+    /** 鎿嶄綔浜哄憳淇℃伅json */
+    private String operator;
+    /** 鎿嶄綔浜哄憳id */
+    private String operatorId;
+    /** 浼樻儬鍒竔d */
+    private String userCouponId;
+    /** 鐢ㄦ埛璧勯噾淇℃伅 */
+    private String userMoney;
+
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/user/coupon/GoodsCanUseCouponDto.java b/phis-feign/src/main/java/com/hz/his/dto/user/coupon/GoodsCanUseCouponDto.java
new file mode 100644
index 0000000..255cbb5
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/user/coupon/GoodsCanUseCouponDto.java
@@ -0,0 +1,23 @@
+package com.hz.his.dto.user.coupon;
+
+
+import com.hz.his.dto.PageDto;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * @author wzh
+ * 鍟嗗搧鍙敤浼樻儬鍒告墿灞�
+ * */
+@Data
+public class GoodsCanUseCouponDto extends PageDto {
+    /**鐢ㄦ埛鏍囪瘑*/
+    private String userId;
+    /**sku鏍囪瘑*/
+    private String skuId;
+    /**鍟嗗搧绫诲瀷*/
+    private String goodType;
+    /**鍟嗗搧閲戦*/
+    private BigDecimal price;
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/user/coupon/OrderCanUseCouponDto.java b/phis-feign/src/main/java/com/hz/his/dto/user/coupon/OrderCanUseCouponDto.java
new file mode 100644
index 0000000..e68ba2b
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/user/coupon/OrderCanUseCouponDto.java
@@ -0,0 +1,24 @@
+package com.hz.his.dto.user.coupon;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @author wzh
+ * 鍒ゆ柇璁㈠崟鏄惁鍙敤璇ヤ紭鎯犲埜鐨勮鍗曚俊鎭�
+ * */
+@Data
+public class OrderCanUseCouponDto {
+    /**鐢ㄦ埛鏍囪瘑*/
+    private String userId;
+    /**浼樻儬鍒告爣璇�*/
+    private String couponId;
+    /**璁㈠崟閲戦*/
+    private BigDecimal total;
+    /**璐拱浠舵暟*/
+    private Integer itemNum;
+    /**瀛愯鍗曞晢鍝佷俊鎭垪琛�*/
+    private List<OrderItemCouponDto> itemList;
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/user/coupon/OrderItemCouponDto.java b/phis-feign/src/main/java/com/hz/his/dto/user/coupon/OrderItemCouponDto.java
new file mode 100644
index 0000000..e63776f
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/user/coupon/OrderItemCouponDto.java
@@ -0,0 +1,24 @@
+package com.hz.his.dto.user.coupon;
+
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * @author wzh
+ * 鍒ゆ柇璁㈠崟鏄惁鍙敤璇ヤ紭鎯犲埜鐨勮鍗曚俊鎭�
+ * */
+@Data
+public class OrderItemCouponDto {
+    /**鍟嗗搧绫诲瀷*/
+    private String goodsType;
+    /**鍟嗗搧鏍囪瘑*/
+    private String goodsId;
+    /**sku鏍囪瘑*/
+    private String goodsSkuId;
+    /**璐拱鍟嗗搧鏁伴噺*/
+    private Integer goodsNum;
+    /**璁㈠崟閲戦*/
+    private BigDecimal total;
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/user/coupon/UserCanUseCouponDto.java b/phis-feign/src/main/java/com/hz/his/dto/user/coupon/UserCanUseCouponDto.java
index daed734..31983d2 100644
--- a/phis-feign/src/main/java/com/hz/his/dto/user/coupon/UserCanUseCouponDto.java
+++ b/phis-feign/src/main/java/com/hz/his/dto/user/coupon/UserCanUseCouponDto.java
@@ -20,6 +20,6 @@
     private BigDecimal total;
     /**婊¤冻浠舵暟*/
     private Integer itemNum;
-    /**鍟嗗搧瀵瑰簲鐨刪is鏍囪瘑*/
+    /**鍟嗗搧crm sku鏍囪瘑*/
     private List<HisGoodsDto> hisGoodsDtoList;
 }
diff --git a/phis-feign/src/main/java/com/hz/his/feign/service/phis/SUserService.java b/phis-feign/src/main/java/com/hz/his/feign/service/phis/SUserService.java
index 39b0dd2..c87eb6f 100644
--- a/phis-feign/src/main/java/com/hz/his/feign/service/phis/SUserService.java
+++ b/phis-feign/src/main/java/com/hz/his/feign/service/phis/SUserService.java
@@ -6,6 +6,8 @@
 import com.hz.his.dto.user.UserLevelDto;
 import com.hz.his.dto.user.card.UserCardDto;
 import com.hz.his.dto.user.card.UserCardUsedDto;
+import com.hz.his.dto.user.coupon.GoodsCanUseCouponDto;
+import com.hz.his.dto.user.coupon.OrderCanUseCouponDto;
 import com.hz.his.dto.user.coupon.UserCanUseCouponDto;
 import com.hz.his.dto.user.coupon.UserCouponDto;
 import com.hz.his.dto.user.money.*;
@@ -112,6 +114,18 @@
     @PostMapping(value = "/user/can/use/coupon")
     Result userCanUseCoupon(@RequestBody UserCanUseCouponDto userCanUseCouponDto);
 
+    /**
+     * 鑾峰彇鍟嗗搧鍙敤浼樻儬鍒�
+     * */
+    @PostMapping(value = "/goods/can/use/coupon")
+    Result goodsCanUseCoupon(@RequestBody GoodsCanUseCouponDto goodsCanUseCouponDto);
+
+    /**
+     * 鍒ゆ柇璁㈠崟鏄惁鍙敤璇ヤ紭鎯犲埜
+     */
+    @PostMapping(value = "/order/can/use/coupon")
+    Result orderCanUseCoupon(@RequestBody OrderCanUseCouponDto orderCanUseCouponDto);
+
 
     /**
      * 鑾峰彇鐢ㄦ埛澧炲�奸噾鍒楄〃
diff --git a/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipCouponService.java b/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipCouponService.java
index faff2c7..a638ca7 100644
--- a/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipCouponService.java
+++ b/phis-feign/src/main/java/com/hz/his/feign/service/platform/SPhipCouponService.java
@@ -30,6 +30,12 @@
     @PostMapping(value = "/coupon/cancel/coupon")
     Result cancelUserCoupon(@RequestBody CouponDto couponDto);
 
-
+    /**
+     * 寮�鏀惧钩鍙�-鑾峰彇鑹惧績鑽熶紭鎯犲埜2.0鍒楄〃
+     * @param dto
+     * @return
+     */
+    @PostMapping(value = "/coupon/get/Coupon")
+    Result getCoupon(@RequestBody CouponDto dto);
 
 }
\ No newline at end of file
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 014cd48..5827a98 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
@@ -1,9 +1,10 @@
 package com.hz.his.feign.service.platform;
 
-//import com.hx.phiappt.model.order.OrdersTotal;
-//import com.hx.phip.dto.order.OrderCreateDto;
-//import com.hx.phip.dto.order.OrderPayDto;
 import com.hx.resultTool.Result;
+import com.hz.his.dto.order.OrderCreateDto;
+import com.hz.his.dto.order.OrderPayDto;
+import com.hz.his.dto.order.OrderRefundDto;
+import com.hz.his.dto.order.OrdersTotalDto;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -14,34 +15,34 @@
 @FeignClient(name="phi-platform-service",path = "/phip",contextId = "phip-order")
 public interface SPhipOrderService {
 
-//    /**
-//     * 寮�鏀惧钩鍙�-鏂�-鏂板璁㈠崟鏇存柊鑷硃his
-//     */
-//    @PostMapping(value = "/newSync/order/add")
-//    Result createOrder(@RequestBody OrderCreateDto params);
-//
-//    /**
-//     * 寮�鏀惧钩鍙�-鏂�-璁㈠崟鐘舵�佹洿鏂拌嚦phis
-//     */
-//    @PostMapping(value = "/newSync/order/orderUpdate")
-//    Result updateOrderStatus(@RequestBody OrdersTotal params);
-//
-//    /**
-//     * 寮�鏀惧钩鍙�-鏂�-璁㈠崟缁撹处鏇存柊鑷硃his
-//     */
-//    @PostMapping(value = "/newSync/order/pay")
-//    Result payOrderSuc(@RequestBody OrderPayDto params);
-//
-//    /**
-//     * 寮�鏀惧钩鍙�-鏂�-璁㈠崟閫�娆炬洿鏂拌嚦phis
-//     */
-//    @PostMapping(value = "/newSync/order/refund")
-//    Result refundOrder(String params);
-//
-//    /**
-//     * 寮�鏀惧钩鍙�-鏂�-鍙栨秷璁㈠崟鏇存柊鑷硃his
-//     */
-//    @PostMapping(value = "/newSync/order/cancel")
-//    Result cancelOrder(String params);
+    /**
+     * 寮�鏀惧钩鍙�-鏂�-鏂板璁㈠崟鏇存柊鑷硃his
+     */
+    @PostMapping(value = "/newSync/order/add")
+    Result createOrder(@RequestBody OrderCreateDto params);
+
+    /**
+     * 寮�鏀惧钩鍙�-鏂�-璁㈠崟鐘舵�佹洿鏂拌嚦phis
+     */
+    @PostMapping(value = "/newSync/order/orderUpdate")
+    Result updateOrderStatus(@RequestBody OrdersTotalDto params);
+
+    /**
+     * 寮�鏀惧钩鍙�-鏂�-璁㈠崟缁撹处鏇存柊鑷硃his
+     */
+    @PostMapping(value = "/newSync/order/pay")
+    Result payOrderSuc(@RequestBody OrderPayDto params);
+
+    /**
+     * 寮�鏀惧钩鍙�-鏂�-璁㈠崟閫�娆炬洿鏂拌嚦phis
+     */
+    @PostMapping(value = "/newSync/order/refund")
+    Result refundOrder(@RequestBody OrderRefundDto params);
+
+    /**
+     * 寮�鏀惧钩鍙�-鏂�-鍙栨秷璁㈠崟鏇存柊鑷硃his
+     */
+    @PostMapping(value = "/newSync/order/cancel")
+    Result cancelOrder(@RequestBody OrderRefundDto params);
 
 }
\ No newline at end of file

--
Gitblit v1.8.0