Merge branch 'xizang-changyun' of https://gitee.com/xiaochen991015/xizang into dev
| | |
| | | package com.taxi591.bankapi; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | |
| | | import java.net.URLEncoder; |
| | | |
| | | import static com.taxi591.bankapi.BankProperties.PREFIX; |
| | | |
| | |
| | | public static final String PREFIX = "com.taxi591.bank"; |
| | | |
| | | public static final String ENBALE_PREFIX = PREFIX+".enable"; |
| | | |
| | | public static final String H5_BANK_URL="https://enjoy.abchina.com/jf-web/epayItem"; |
| | | |
| | | private Boolean enable = true; |
| | | |
| | |
| | | */ |
| | | private String cerPath; |
| | | |
| | | public static void main(String[] args) { |
| | | String url = "https://enjoy.abchina.com/jf-web/epayItem?code=JF-EPAY2025030510983&userInput="; |
| | | JSONObject param = new JSONObject(); |
| | | param.put("input1","25041612464700100000000000096254"); |
| | | url+=URLEncoder.encode(param.toJSONString()); |
| | | url+="&showBill=0"; |
| | | System.out.println(url); |
| | | |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.dto.BillStatisticsDto; |
| | | import com.ruoyi.system.dto.CachPayDto; |
| | | import com.ruoyi.system.dto.OfflinePayCheckDto; |
| | | import com.ruoyi.system.dto.SmsByBillDto; |
| | | import com.ruoyi.system.dto.TBillDto; |
| | | import com.ruoyi.system.dto.TbillSaveDto; |
| | | import com.ruoyi.system.dto.*; |
| | | import com.ruoyi.system.model.TBillConfirm; |
| | | import com.ruoyi.system.model.TBillDetail; |
| | | import com.ruoyi.system.model.TContract; |
| | | import com.ruoyi.system.query.TBillQuery; |
| | | import com.ruoyi.system.query.TContractQuery; |
| | | import com.ruoyi.system.service.TBillConfirmService; |
| | | import com.ruoyi.system.service.TBillDetailService; |
| | | import com.ruoyi.system.service.TBillService; |
| | | import com.ruoyi.system.service.TContractService; |
| | | import com.ruoyi.system.service.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | TContractService contractService; |
| | | @Autowired |
| | | TPayOrderService tPayOrderService; |
| | | |
| | | @PreAuthorize("@ss.hasPermi('bill:list')") |
| | | @PostMapping("list") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "创建支付订单、二维码支付") |
| | | @PostMapping("makeOrder") |
| | | public R<MakeOrderResp> makeOrder(@Validated @RequestBody MakeOrderDto dto){ |
| | | MakeOrderResp resp = tPayOrderService.makeOrder(dto); |
| | | return R.ok(resp); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | client: |
| | | accessKey: AKIDCF5EF2c0DE1e5JK8r4EGJF4mNsMgp26x |
| | | secretKey: lLl184rUyFOOE0d5KNGC3kmfNsCWk4GU |
| | | bucket: xzgttest-1305134071 |
| | | # bucket: xzgt-1305134071 |
| | | bucketAddr: ap-chengdu |
| | | bucket: xzgttest-1305134071 |
| | | rootSrc: https://xzgttest-1305134071.cos.ap-chengdu.myqcloud.com/ |
| | | # rootSrc: https://xzgt-1305134071.cos.ap-chengdu.myqcloud.com |
| | | location: /xizang |
| | | sms: |
| | | enable: true |
| | |
| | | druid: |
| | | # 主库数据源 |
| | | master: |
| | | url: jdbc:mysql://xzgt.test.591taxi.cn:13306/xizang?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: 8f5z9g52gx4bg |
| | | # url: jdbc:mysql://xzgt.test.591taxi.cn:13306/xizang?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai |
| | | # username: root |
| | | # password: 8f5z9g52gx4bg |
| | | url: jdbc:mysql://cd-cdb-mrjncn8m.sql.tencentcdb.com:20945/xizang?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: xzgt |
| | | password: changyun!6f2gshj6h3j |
| | | # 从库数据源 |
| | | slave: |
| | | # 从数据源开关/默认关闭 |
| | |
| | | |
| | | @Test |
| | | public void test(){ |
| | | String params = "{\"format\":\"json\",\"message\":{\"head\":{\"channel\":\"OPEN\",\"transCode\":\"chargeBill\",\"transFlag\":\"01\",\"transSeqNum\":\"BP250411141205A19694\",\"timeStamp\":\"20250411141205218\",\"branchCode\":\"2540\"},\"info\":{\"epayCode\":\"JF-EPAY2025030510983\",\"merchantId\":\"103882597000441\",\"traceNo\":\"JF250411141154364902\",\"input1\":\"25041114115300100000000000069356\",\"userId\":\"o4mMu5Ry-Uv3hpLt81DrXVSCe9hA\",\"amtRule\":\"0\",\"payBillCount\":\"1\",\"payBillAmt\":\"0.01\",\"payBillNo\":\"25041114115300100000000000069356\",\"payType\":\"EP139\",\"transPaySeq\":\"4BEC2514080908013408\",\"transDate\":\"20250411\",\"transTime\":\"141205\",\"settleDate\":\"20250411\",\"clearType\":\"ZHSYT\",\"resendTimes\":\"0\",\"numOpenMerchantOrder\":\"10388259700044143807189441315960\"}}}"; |
| | | String params = "{\"format\":\"json\",\"message\":{\"head\":{\"channel\":\"OPEN\",\"transCode\":\"chargeBill\",\"transFlag\":\"01\",\"transSeqNum\":\"BP250411153516A79185\",\"timeStamp\":\"20250411153516852\",\"branchCode\":\"2540\"},\"info\":{\"epayCode\":\"JF-EPAY2025030510983\",\"merchantId\":\"103882597000441\",\"traceNo\":\"JF250411153505316902\",\"input1\":\"25041115350400100000000000074347\",\"userId\":\"o4mMu5Ry-Uv3hpLt81DrXVSCe9hA\",\"amtRule\":\"0\",\"payBillCount\":\"1\",\"payBillAmt\":\"50000.00\",\"payBillNo\":\"25041115350400100000000000074347\",\"payType\":\"EP139\",\"transPaySeq\":\"4BEC2515210332857924\",\"transDate\":\"20250411\",\"transTime\":\"153516\",\"settleDate\":\"20250411\",\"clearType\":\"ZHSYT\",\"resendTimes\":\"0\",\"numOpenMerchantOrder\":\"10388259700044143857094001513707\"}}}"; |
| | | ChargeBillRequest chargeBillRequest = JSON.parseObject(params, |
| | | new TypeReference<ChargeBillRequest>() { |
| | | }); |
| | |
| | | private String orderNo; |
| | | @ApiModelProperty("金额,分") |
| | | private Long amount; |
| | | @ApiModelProperty("微信小程序支付跳转链接,用于生成二维码") |
| | | @ApiModelProperty("H5支付地址,用于生成二维码") |
| | | private String appletUrl; |
| | | |
| | | |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.constant.AmountConstant; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | |
| | | import com.ruoyi.system.service.TOrderBillService; |
| | | import com.ruoyi.system.service.TPayOrderService; |
| | | import com.ruoyi.system.service.TTenantService; |
| | | import com.taxi591.bankapi.BankProperties; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | |
| | | |
| | | public String createAppletUrl(String orderNo){ |
| | | return ""+orderNo; |
| | | JSONObject param = new JSONObject(); |
| | | param.put("input1",orderNo); |
| | | StringBuffer sb = new StringBuffer(); |
| | | sb.append(BankProperties.H5_BANK_URL) |
| | | .append("?code=").append("JF-EPAY2025030510983") |
| | | .append("&userInput=") |
| | | .append(URLEncoder.encode(param.toJSONString())) |
| | | .append("&showBill=0"); |
| | | return sb.toString(); |
| | | } |
| | | |
| | | @Override |