From 43d89351806db520f5d040945255f9ac3b5e2f73 Mon Sep 17 00:00:00 2001 From: chenjiahe <763432473@qq.com> Date: 星期一, 07 八月 2023 18:58:23 +0800 Subject: [PATCH] 新增支付接口-订单二维码 --- phis-feign/src/main/java/com/hz/phis/vo/payment/qr/OrderQrResponeVo.java | 21 ++++++++++ phis-feign/src/main/java/com/hz/his/constant/PayWay.java | 14 +++++++ phis-feign/src/main/java/com/hz/his/feign/service/platform/payment/PaymentService.java | 23 +++++++++++ phis-feign/src/main/java/com/hz/phis/vo/payment/qr/OrderQrVo.java | 36 ++++++++++++++++++ phis-feign/src/main/java/com/hz/his/vo/payment/PayNoVo.java | 10 ---- 5 files changed, 95 insertions(+), 9 deletions(-) diff --git a/phis-feign/src/main/java/com/hz/his/constant/PayWay.java b/phis-feign/src/main/java/com/hz/his/constant/PayWay.java new file mode 100644 index 0000000..4f642ac --- /dev/null +++ b/phis-feign/src/main/java/com/hz/his/constant/PayWay.java @@ -0,0 +1,14 @@ +package com.hz.his.constant; + +/**鏀粯鏂瑰紡*/ +public class PayWay { + + /**浜ゆ槗鏂瑰紡-寰俊*/ + public static final String PAY_WAY_WECHAT = "WECHAT"; + /**浜ゆ槗鏂瑰紡-鏀粯瀹�*/ + public static final String PAY_WAY_ALIPAY = "ALIPAY"; + /**浜ゆ槗鏂瑰紡-閾惰仈*/ + public static final String PAY_WAY_UNIONPAY = "UNIONPAY"; + /**浜ゆ槗鏂瑰紡-鏁板瓧浜烘皯甯�*/ + public static final String PAY_WAYE_EC = "EC"; +} diff --git a/phis-feign/src/main/java/com/hz/his/feign/service/platform/payment/PaymentService.java b/phis-feign/src/main/java/com/hz/his/feign/service/platform/payment/PaymentService.java new file mode 100644 index 0000000..8fc78f9 --- /dev/null +++ b/phis-feign/src/main/java/com/hz/his/feign/service/platform/payment/PaymentService.java @@ -0,0 +1,23 @@ +package com.hz.his.feign.service.platform.payment; + +import com.hx.resultTool.Result; +import com.hz.his.vo.payment.PayNoVo; +import com.hz.phis.vo.payment.qr.OrderQrVo; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +/** + * 杩欓噷杩欎釜name 闇�瑕佸~鍐� 璇锋眰鐨勬湇鍔℃彁渚涜�呯殑娉ㄥ唽鍒皀acos Server涓婇潰鐨勬湇鍔″悕锛宲ath 鏄姹傛帴鍙e墠缂� + */ +@FeignClient(name="phi-platform-service",path = "/phip",contextId = "payment-qr") +public interface PaymentService { + + /** + * 鑾峰彇鏀粯缂栧彿锛屽彧杩斿洖鏀粯缂栧彿 + * data杞寲瀵硅薄OrderQrResponeVo + */ + @PostMapping(value = "/payment/order/qr") + Result orderQrPay(@RequestBody OrderQrVo orderQrVo); + +} \ No newline at end of file diff --git a/phis-feign/src/main/java/com/hz/his/vo/payment/PayNoVo.java b/phis-feign/src/main/java/com/hz/his/vo/payment/PayNoVo.java index 9fb4fb5..7476c03 100644 --- a/phis-feign/src/main/java/com/hz/his/vo/payment/PayNoVo.java +++ b/phis-feign/src/main/java/com/hz/his/vo/payment/PayNoVo.java @@ -13,7 +13,7 @@ /**Y-12-鍙犲姞闀垮害锛屽湪orderNo鍚庨潰娣诲姞闀垮害锛岄粯璁�6锛� * 娌℃湁鐗规畩瑕佹眰閮芥槸榛樿6锛屾渶澶�12*/ private Integer lengrhCount = 6; - /**N-浜ゆ槗鏂瑰紡*/ + /**N-浜ゆ槗鏂瑰紡锛孭ayWay鑾峰彇*/ private String payWay; /**Y-璋冭捣鏀粯鐢ㄦ埛*/ private String userId; @@ -30,12 +30,4 @@ /**鍏宠仈绫诲瀷-鎬昏鍗�*/ public static final int TYPE_ORDER = 0; - /**浜ゆ槗鏂瑰紡-寰俊*/ - public static final String PAY_WAY_WECHAT = "WECHAT"; - /**浜ゆ槗鏂瑰紡-鏀粯瀹�*/ - public static final String PAY_WAY_ALIPAY = "ALIPAY"; - /**浜ゆ槗鏂瑰紡-閾惰仈*/ - public static final String PAY_WAY_UNIONPAY = "UNIONPAY"; - /**浜ゆ槗鏂瑰紡-鏁板瓧浜烘皯甯�*/ - public static final String PAY_WAYE_EC = "EC"; } diff --git a/phis-feign/src/main/java/com/hz/phis/vo/payment/qr/OrderQrResponeVo.java b/phis-feign/src/main/java/com/hz/phis/vo/payment/qr/OrderQrResponeVo.java new file mode 100644 index 0000000..85c4cc2 --- /dev/null +++ b/phis-feign/src/main/java/com/hz/phis/vo/payment/qr/OrderQrResponeVo.java @@ -0,0 +1,21 @@ +package com.hz.phis.vo.payment.qr; + +import lombok.Data; + +/** + * 璁㈠崟浜岀淮鐮佺敵璇疯繑鍥� + * @author CJH + */ +@Data +public class OrderQrResponeVo { + + /**鍟嗘埛鍙�-Y-32锛堝晢鎴峰湪鎷涜瀹屾垚鍟嗘埛杩涗欢鍚庡垎閰嶇殑鎷涜鍟嗘埛鍙凤級*/ + private String merId; + /**鍟嗘埛璁㈠崟鍙�-Y-32锛堝晢鎴风鐢熸垚锛岃姹傛璁㈠崟鍙峰湪鏁翠釜鍟嗘埛涓嬪敮涓�锛�*/ + private String outOrderNo; + /**骞冲彴浜ゆ槗娴佹按鍙�-Y-32-娌抽┈杩斿洖*/ + private String platTrxNo; + /**浜岀淮鐮佸唴瀹癸紝闇�瑕佸皢鏀瑰唴瀹圭敓鎴愪簩缁寸爜*/ + private String qrCode; + +} diff --git a/phis-feign/src/main/java/com/hz/phis/vo/payment/qr/OrderQrVo.java b/phis-feign/src/main/java/com/hz/phis/vo/payment/qr/OrderQrVo.java new file mode 100644 index 0000000..e58b107 --- /dev/null +++ b/phis-feign/src/main/java/com/hz/phis/vo/payment/qr/OrderQrVo.java @@ -0,0 +1,36 @@ +package com.hz.phis.vo.payment.qr; + +import lombok.Data; + +import java.math.BigDecimal; + +/**璁㈠崟浜岀淮鐮佹敮浠� + * @author CJH + */ +@Data +public class OrderQrVo { + + /**N-32-绗笁鏂瑰晢鎴峰彿锛屾病鏈夋寚瀹氬彲涓嶄紶*/ + private String merId; + /**鍟嗘埛璁㈠崟鍙�-Y-32锛堝晢鎴风鐢熸垚锛岃姹傛璁㈠崟鍙峰湪鏁翠釜鍟嗘埛涓嬪敮涓�锛�*/ + private String outOrderNo; + /**N-浜ゆ槗鏂瑰紡锛孭ayWay鑾峰彇锛屼笉濉粯璁�*/ + private String payWay; + /**Y-浜ゆ槗閲戦*/ + private BigDecimal payTotal; + /**N-256-浜ゆ槗閫氱煡鍦板潃锛屼笉濉粯璁ゅ湴鍧�*/ + private String notifyUrl; + /**缁堢IP-Y-64锛堝繀椤讳紶姝g‘鐨勭敤鎴风IP锛�*/ + private String spbillCreateIp; + /**N-鍟嗘埛鑷畾涔夊瓧娈�*/ + private String reqReserved; + /**鍟嗗搧鎻忚堪-Y-128锛堝晢鍝佹弿杩颁氦鏄撳瓧娈垫牸寮忔牴鎹笉鍚岀殑搴旂敤鍦烘櫙鎸夌収浠ヤ笅鏍煎紡锛� + APP鏀粯锛氶渶浼犲叆搴旂敤甯傚満涓婄殑APP鍚嶅瓧-瀹為檯鍟嗗搧鍚嶇О锛屽ぉ澶╃埍娑堥櫎-娓告垙鍏呭�硷紱 + 鍏紬鍙锋敮浠橈細浼犲叆鍏紬鍙峰悕绉�-瀹為檯鍟嗗搧鍚嶇О锛屼緥濡傦細鑵捐褰㈣薄搴�- image-QQ鍏粩锛� + 灏忕▼搴忔敮浠橈細浼犲叆鍟嗗鍚嶇О-閿�鍞晢鍝佺被鐩紝濡傦細鑵捐-娓告垙锛涖�傦級*/ + private String body; + + /**N-鏀粯鏂瑰紡缂栧彿锛圥aymentMethod閲岄潰鐨勭紪鍙凤級锛屾殏鏃剁敤涓嶄笂锛屽叧鑱旇鍗曠殑鏀粯鏂瑰紡璁板綍*/ + private String paymentNo; + +} -- Gitblit v1.8.0