From 0423dcc11fe7bfcfc107198bbe4cbe34d77ace6f Mon Sep 17 00:00:00 2001 From: kongdeqiang <kongdeqiang960204@163.com> Date: 星期二, 12 十二月 2023 16:36:21 +0800 Subject: [PATCH] 提交更新 --- src/main/java/com/boying/controller/phone/YCPayController.java | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/boying/controller/phone/YCPayController.java b/src/main/java/com/boying/controller/phone/YCPayController.java index c48444d..6d91a67 100644 --- a/src/main/java/com/boying/controller/phone/YCPayController.java +++ b/src/main/java/com/boying/controller/phone/YCPayController.java @@ -16,6 +16,7 @@ import com.boying.util.HTTPEntityUtil; import com.google.gson.Gson; import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @@ -52,6 +53,7 @@ private final OrderRecordService orderRecordService; private final TicketService ticketService; private final TicketBlackService ticketBlackService; + private final SystemConfigProperties systemConfigProperties; private final WhiteListService whiteListService; private final EnterParkService enterParkService; @@ -149,6 +151,10 @@ public Object parkXT(Long id){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss"); OutPark outPark = outParkService.getById(id); + System.out.println("id:"+id); + if(id == null){ + return R.failed("鏈壘鍒版暟鎹紝璇风◢鍚庨噸鏂扮偣鍑�"); + } if(outPark.getPrice()==0){ updateOutPark(outPark.getId(),"03"); return R.failed("鏈鍋滆溅鏃犻渶鏀粯璐圭敤"); @@ -220,14 +226,14 @@ Map<String,Object> map = new HashMap<>(); map.put("encoding","UTF-8"); map.put("signMethod","01"); - map.put("sdkAppId","8202309110000001"); + map.put("sdkAppId",systemConfigProperties.getXTYHMERID()); map.put("txnType","1007"); map.put("txnSubType","100702"); map.put("txnAccType","03"); map.put("aesWay","01"); - map.put("merId","8202309110000001"); - map.put("merName","閭兏甯傚嘲宄扮熆鍖烘粡婧愬缓璁惧彂灞曟湁闄愬叕鍙�"); - map.put("backEndUrl","http://39.96.92.240:8089/ffzf/api/getResult"); + map.put("merId",systemConfigProperties.getXTYHMERID()); + map.put("merName",systemConfigProperties.getXTYHMERNAME()); + map.put("backEndUrl",systemConfigProperties.getXTYHRESULT()); map.put("txnOrderId",outPark.getId()+""+format); map.put("txnOrderTime",format); map.put("txnOrderBody",outPark.getCarNo()+"娉婅溅缂磋垂"); @@ -296,6 +302,7 @@ */ @PostMapping("payByWX") public Object payByWX(Long id,String openId){ + System.out.println("寮�濮嬫敮浠�"); OutPark outPark = outParkService.getById(id); String xtyhpay = systemConfigProperties.getXTYHPAY(); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); @@ -304,17 +311,17 @@ Map<String,Object> map = new HashMap<>(); map.put("encoding","UTF-8"); map.put("signMethod","01"); - map.put("sdkAppId","8202309110000001"); + map.put("sdkAppId",systemConfigProperties.getXTYHMERID()); map.put("txnType","1006"); map.put("txnSubType","100603"); map.put("txnAccType","02"); - map.put("secMerAppId","wx46e756aed958f895"); + map.put("secMerAppId",systemConfigProperties.getXTYHAPPID()); map.put("txnSubOpenid",openId); map.put("txnProductId",outPark.getId()+""); map.put("aesWay","01"); - map.put("merId","8202309110000001"); - map.put("merName","閭兏甯傚嘲宄扮熆鍖烘粡婧愬缓璁惧彂灞曟湁闄愬叕鍙�"); - map.put("backEndUrl","http://39.96.92.240:8089/ffzf/api/getResult"); + map.put("merId",systemConfigProperties.getXTYHMERID()); + map.put("merName",systemConfigProperties.getXTYHMERNAME()); + map.put("backEndUrl",systemConfigProperties.getXTYHRESULT()); map.put("txnOrderId",outPark.getId()+""+format); map.put("txnOrderTime",format); map.put("txnOrderBody",outPark.getCarNo()+"娉婅溅缂磋垂"); @@ -429,6 +436,7 @@ if(respCode.equals("0000")){ //浜ゆ槗鎴愬姛,鏍规嵁娴佹按鍙锋煡璇㈠嚭鍦鸿褰� OutPark byPayCode = outParkService.findByPayCode(respTxnSsn); + writeTxt2(byPayCode.getId()+"鏀跺埌鍥炴墽\n"); if(byPayCode == null){ return R.failed("鏈煡璇㈠埌璁㈠崟"); }else { -- Gitblit v1.9.1