From dcb236bde4a1c2c9723790217b7bc8f199daa710 Mon Sep 17 00:00:00 2001
From: fwq <582742538@qq.com>
Date: 星期五, 28 四月 2023 14:55:47 +0800
Subject: [PATCH] Merge branch 'master-prod-new-优惠券校验' into master-test

---
 phis-feign/src/main/java/com/hz/his/dto/coupon/CouponCheckItemDto.java     |   51 +++++++++++++++++
 phis-feign/src/main/java/com/hz/his/dto/coupon/CouponCheckDto.java         |   28 +++++++++
 phis-feign/src/main/java/com/hz/phis/dt/coupon/CouponCheckDt.java          |   18 ++++++
 phis-feign/src/main/java/com/hz/his/dto/order/PayDto.java                  |    3 
 phis-feign/src/main/java/com/hz/his/feign/service/phis/SCouponService.java |   19 +++++-
 phis-feign/src/main/java/com/hz/his/dto/coupon/CouponListDto.java          |   27 +++++++++
 6 files changed, 141 insertions(+), 5 deletions(-)

diff --git a/phis-feign/src/main/java/com/hz/his/dto/coupon/CouponCheckDto.java b/phis-feign/src/main/java/com/hz/his/dto/coupon/CouponCheckDto.java
new file mode 100644
index 0000000..64111b7
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/coupon/CouponCheckDto.java
@@ -0,0 +1,28 @@
+package com.hz.his.dto.coupon;
+
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 浼樻儬鍒告牎楠屾墿灞�
+ * @author fwq
+ */
+@Data
+public class CouponCheckDto {
+
+    /**鐢ㄦ埛浼樻儬鍒哥爜鏍囪瘑闆嗗悎*/
+    private List<String> couponNumberIdList;
+    /**鍟嗗搧淇℃伅*/
+    private List<CouponCheckItemDto> goodsList;
+    /**鏀粯鏂瑰紡缂栧彿闆嗗悎*/
+    private List<String> payMethodList;
+
+
+    /**鍟嗗搧鎬婚噾棰�(鏆傛棤鐢�-涓嶄紶)*/
+    private BigDecimal total;
+    /**鍟嗗搧鎬讳欢鏁�(鏆傛棤鐢�-涓嶄紶)*/
+    private Integer itemNum;
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/coupon/CouponCheckItemDto.java b/phis-feign/src/main/java/com/hz/his/dto/coupon/CouponCheckItemDto.java
new file mode 100644
index 0000000..31b7b0c
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/coupon/CouponCheckItemDto.java
@@ -0,0 +1,51 @@
+package com.hz.his.dto.coupon;
+
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 浼樻儬鍒告牎楠�-鍟嗗搧淇℃伅
+ */
+@Data
+public class CouponCheckItemDto{
+    /**鍟嗗搧sku鏍囪瘑*/
+    private String skuId;
+    /**鍟嗗搧绫诲瀷*/
+    private Integer goodsType;
+    /**鍟嗗搧鎵�灞炲垎绫绘爣璇嗛泦鍚�*/
+    private List<String> typeIdList;
+    /**鍟嗗搧phis鏍囪瘑*/
+    private String hisId;
+    /**鍟嗗搧phis绫诲瀷*/
+    private String hisType;
+    /**鍟嗗搧鎵�灞瀙his鍒嗙被鏍囪瘑闆嗗悎*/
+    private List<String> hisTypeIdList;
+    /**鍗曚釜鍟嗗搧閲戦*/
+    private BigDecimal price;
+    /**璐拱鏁伴噺*/
+    private Integer buyNum;
+
+
+    /**绫诲瀷-椤圭洰*/
+    public static final String TYPE_PROJECT = "project";
+    /**绫诲瀷-鍟嗗搧/鑽搧*/
+    public static final String TYPE_RETAIL = "retail";
+    /**绫诲瀷-鍗¢」*/
+    public static final String TYPE_CARD = "card";
+    /**绫诲瀷-淇冮攢*/
+    public static final String TYPE_PROMOTION = "promotion";
+    /**绫诲瀷-澧炲�奸噾*/
+    public static final String TYPE_INCREMENT = "increment";
+    /**绫诲瀷-鍌ㄥ�奸噾*/
+    public static final String TYPE_STORED = "stored";
+    /**绫诲瀷-绉垎*/
+    public static final String TYPE_INTEGRAL = "integral";
+    /**绫诲瀷-鍥㈣喘鍟嗗搧*/
+    public static final String TYPE_COMMODITY = "commodity";
+    /**绫诲瀷-绉垎鍟嗗搧*/
+    public static final String TYPE_GOODS_INTEGRAL = "goods_integral";
+
+}
diff --git a/phis-feign/src/main/java/com/hz/his/dto/coupon/CouponListDto.java b/phis-feign/src/main/java/com/hz/his/dto/coupon/CouponListDto.java
new file mode 100644
index 0000000..e18b413
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/his/dto/coupon/CouponListDto.java
@@ -0,0 +1,27 @@
+package com.hz.his.dto.coupon;
+
+
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 鍙敤浼樻儬鍒稿垪琛ㄥ弬鏁�
+ * @author fwq
+ */
+@Data
+public class CouponListDto{
+    /**鐢ㄦ埛鏍囪瘑*/
+    private String userId;
+    /**鐢ㄦ埛浼樻儬鍒哥爜鏍囪瘑闆嗗悎*/
+    private List<String> couponNumberIdList;
+    /**鍟嗗搧淇℃伅*/
+    private List<CouponCheckItemDto> goodsList;
+    /**鏄惁鐢熸棩鍒�*/
+    private Integer isBirthday;
+    /**鏀粯鏂瑰紡缂栧彿闆嗗悎*/
+    private List<String> payMethodList;
+    /**浼樻儬鍒稿钩鍙�*/
+    private String platform;
+}
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
index 3610f04..7d5e7c7 100644
--- 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
@@ -37,7 +37,8 @@
 
     /**闈炲繀濉� 鏀堕摱鍛橀棬搴�*/
     private String cashierShopId;
-
+    /**浼樻儬鍒告牎楠岀増鏈紙榛樿0锛夌涓�鐗堜负0,闂ㄥ簵鍔╂墜涓婄嚎鐗堟湰涓�1*/
+    private Integer couponCheckVersion = 0;
     /**闈炲繀濉� 浼樻儬鍒竔d闆嗗悎*/
     private List<String> userCouponIds;
 }
diff --git a/phis-feign/src/main/java/com/hz/his/feign/service/phis/SCouponService.java b/phis-feign/src/main/java/com/hz/his/feign/service/phis/SCouponService.java
index 03821bd..6674546 100644
--- a/phis-feign/src/main/java/com/hz/his/feign/service/phis/SCouponService.java
+++ b/phis-feign/src/main/java/com/hz/his/feign/service/phis/SCouponService.java
@@ -2,10 +2,7 @@
 
 
 import com.hx.resultTool.Result;
-import com.hz.his.dto.coupon.CouponDetailDto;
-import com.hz.his.dto.coupon.CouponDto;
-import com.hz.his.dto.coupon.CouponGoodsDto;
-import com.hz.his.dto.coupon.CouponListDetailDto;
+import com.hz.his.dto.coupon.*;
 import com.hz.his.dto.dictionaries.DictionariesDto;
 import com.hz.phis.dt.marketingCoupon.MarketingCouponDto;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -102,4 +99,18 @@
      */
     @PostMapping(value = "/marketing/data")
     Result marketingData(@RequestBody(required = false) MarketingCouponDto marketingCouponDto);
+
+
+    /**
+     * 浼樻儬鍒哥粺涓�鏍¢獙鎺ュ彛
+     */
+    @PostMapping(value = "/coupon/unify/check")
+    Result unifyCheck(@RequestBody(required = false) CouponCheckDto couponCheckDto);
+
+    /**
+     * 鐢ㄦ埛-鍙敤浼樻儬鍒稿垪琛�-缁熶竴鏍¢獙鐗堟湰
+     * @return canUseCouponList鍙敤鍒稿垪琛� canUseCount鍙敤鍒告暟閲�
+     * */
+    @PostMapping(value = "/coupon/user/unify/check/list")
+    Result userCouponCheckList(@RequestBody(required = false) CouponListDto couponListDto);
 }
diff --git a/phis-feign/src/main/java/com/hz/phis/dt/coupon/CouponCheckDt.java b/phis-feign/src/main/java/com/hz/phis/dt/coupon/CouponCheckDt.java
new file mode 100644
index 0000000..5a1bb61
--- /dev/null
+++ b/phis-feign/src/main/java/com/hz/phis/dt/coupon/CouponCheckDt.java
@@ -0,0 +1,18 @@
+package com.hz.phis.dt.coupon;
+
+
+import lombok.Data;
+/**
+ * 浼樻儬鍒告楠岃繑鍥炲疄浣�
+ */
+@Data
+public class CouponCheckDt {
+    /**鏄惁鍙敤*/
+    private Boolean isCanUse;
+    /**涓嶅彲鐢ㄦ彁绀�*/
+    private String unavailableMsg;
+    /**鏄惁寮傚父*/
+    private Boolean isErr;
+    /**寮傚父鎻愮ず*/
+    private String errMsg;
+}

--
Gitblit v1.8.0