Merge remote-tracking branch 'origin/master'
1 文件已重命名
1个文件已添加
30个文件已修改
| | |
| | | <sourceOutputDir name="target/generated-sources/annotations" /> |
| | | <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> |
| | | <outputRelativeToContentRoot value="true" /> |
| | | <module name="guns-core" /> |
| | | <module name="guns-rest" /> |
| | | <module name="guns-generator" /> |
| | | <module name="guns-core" /> |
| | | <module name="guns-admin" /> |
| | | </profile> |
| | | </annotationProcessing> |
| | | </component> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="Encoding"> |
| | | <file url="file://$PROJECT_DIR$/guns-admin/src/main/java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/guns-core/src/main/java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/guns-generator/src/main/java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/guns-rest/src/main/java" charset="UTF-8" /> |
| New file |
| | |
| | | package com.stylefeng.guns.modular.huifu.biz; |
| | | |
| | | import java.util.*; |
| | | |
| | | import com.huifu.bspay.sdk.opps.core.config.MerConfig; |
| | | import com.huifu.bspay.sdk.opps.core.net.BasePayRequest; |
| | | import com.huifu.bspay.sdk.opps.core.BasePay; |
| | | import com.stylefeng.guns.modular.huifu.properties.HuiFuProperties; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 余额支付 - 示例 |
| | | */ |
| | | |
| | | public class FenZhangUtil { |
| | | |
| | | @Autowired |
| | | private static HuiFuProperties huiFuProperties; |
| | | |
| | | |
| | | // public static void main(String[] args) throws Exception { |
| | | // // 1. 数据初始化,填入对应的商户配置 |
| | | // MerConfig merConfig = new MerConfig(); |
| | | //// merConfig.setProcutId(huiFuProperties.getProductId()); |
| | | //// merConfig.setSysId(huiFuProperties.getSysId()); |
| | | //// merConfig.setRsaPrivateKey(huiFuProperties.getRsaPrivateKey()); |
| | | //// merConfig.setRsaPublicKey(huiFuProperties.getRsaPublicKey()); |
| | | // merConfig.setProcutId("KAZX"); |
| | | // merConfig.setSysId("6666000182995771"); |
| | | // merConfig.setRsaPrivateKey("MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCR6W3ynQJL7f2C8vFYMcQkcirpkif9ZhLq1374jIlV87nv0T9uIm6DoW8LyNEl9w2Yc5qoBv70tt/oVpemA6IZY6NXzE2USNi/sv2qUTtapcIRYxe4acCfY8K+x+p7W2e6wUWIpl9qgZA+UnFmHQ0HT6Ywzq2jJL92JdIs147Ud1aVi3aX8LYItj0z3ZKwZQkaJawZSWQk2+EdPfN059L2qFkPtnT7JIthAdUTJYZA13K4tzw6mXp/DbgwVmLhrlmwl/ccSv2Q0ABfEk7jIxF1nZmCmSy3HrEw9xWyrg1BC+DgXBdyF0OEtpNfv+UW080syUVBNN0irHVuDP81BaAjAgMBAAECggEAGlBZprZQErdxz6rWgYxADj6UpJjaI2XEJZwFZveZUOnqb2hyIv+MpKp5Z0upBErApey7SHAyjJlqWfE72hGvqxp/+7Z5izNz+2ZhPtT1ekyIajBPt89CkLwiA9vz2plKZLC0RIeUj5WcGNEvaDX3AomHtCehwtk+uiTp+XJKbOBtkkQszcdCGY1DVoQ0ppFoINnM9VLbEzaFaG7VS3eFkU4cf2CwcrnJB1RncyPFK+bGFvjkLM/eQbsh8YxkBqaGz/8UM1Na1SEidqdyUF71ltqnI0u8pLe0V+5jugVW+3lPL/p1C3i7mAbQOs4yqRWlFaGVTzOawoQUOPVwDpzeeQKBgQDs1P7F4wURqX1qZR0hSTqOigg48ychaOF66new3SuWk2CVBy8Q8b7odGSPyxJSGZvFLoznPYuSaXCtQ935WWfjB7Z5JpSWCi9BmJnkh41k/KvgMqAEGkZP6ul/zFnDWj94VwXEBz3TuRk574vK2coWoxjM6h1dlJjRBVVTs8dnrQKBgQCduKCjPDUuOHbcNn3VsaHEZX1XyiXN5gds08o61PjiHM42wYXxfUt59nBJmg2yAVRIrKYHfswJcxb5XUTDI5ZhCBnIPrdrQzj7FNadm/7mKDvSsvZdpfTiHY341XnvCq7OcNNj8g5fVsWF769strepQReSug7xgX7ojPvVcAZhDwKBgD57KwP2Er5IIuhQ6NCBS0uTqvurWqV70BDnjtBAaWF+XDq0/HvR63XUTzuIbbrvOqNY1p+jIxFrc+iiQQupxLimrkNkJEs5QKJjqiYahPkhmA68DG9Ip0gqR5QJy5y4UIplGwZOiscyzC72vcC0mJZETSSylzC7JV3vtEUy5ua5AoGAEwlDqjAMIyYBgpa5HV+xLKkrNbtaUL2gy8vMLsmhuHjNkuJMrlb3EyNhbiC/4moyqArehy0Qp1tSvIo7UGotLkzx/69CKBoW+IcNWDyJyXG1trqO7cKoCdqTViM98lIRwyzu9rMydONeN8o0HCT5id4nYDhAsXl1vc+2XY6F1pUCgYEA0dxGHBTKD/WzIvTYGYD6Xx224Y84mO6x2Mu16zFoq/NjuIdKi2O+92yrKDCMMCqaY77fXvWD3eI7QYYlbKAOqdLKVipTbhnBccDyNbtYHVg59t4xS+K6HyD+quVkL9n40UkxSZbKZBQhqt+vlQy0FUgONFii1ACZO0A8Sc/bvn4="); |
| | | // merConfig.setRsaPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsWrruP9JBxrUd8uEX5Z8y7pg/UIr5RNHSgDnHqNI1hbi2MfTzB5vZ275wSFFaLDD9BesgDWqsUepPS/opROlDCg9y6WYH8mkN23NmHL9F8kT48OMmH722am+Hp0XVMMwXqA0oNt4f7oW6kDemjZW8/RT4vIE7cyxoxSsVRvjqSpx9wDgFLPWh3o0pHQaoxLyeUsGBATHFrxEDlosBvsuXjMcgjPKXALrcemzKOhBmBkLgyxNVmh61ZK+FNXd+/X4PeZlnWf54NRQAUKe1308E6IIaszo+CjneKuhj1m/X4f7AIvxAqlhuCV5E/DfKRmGopxaWqdtE960Y/H4SmBh2wIDAQAB"); |
| | | // BasePay.initWithMerConfig(merConfig); |
| | | // |
| | | // // 2.组装请求参数 |
| | | // Map<String, Object> paramsInfo = new HashMap<>(); |
| | | // // 请求流水号 |
| | | // paramsInfo.put("req_seq_id", "rQ20251119164316677154"); |
| | | // // 请求日期 |
| | | // paramsInfo.put("req_date", "20251119"); |
| | | // // 出款方商户号 |
| | | // paramsInfo.put("out_huifu_id", "6666000182995771"); |
| | | // // 支付金额 |
| | | // paramsInfo.put("ord_amt", "0.01"); |
| | | // // 分账对象 |
| | | // paramsInfo.put("acct_split_bunch", "{\"acct_infos\":[{\"div_amt\":\"0.01\",\"huifu_id\":\"6666000183361451\"}]}"); |
| | | // // 安全信息 |
| | | // paramsInfo.put("risk_check_data", "{\"sub_product\":\"1\",\"transfer_type\":\"05\"}"); |
| | | // // 手续费承担方标识余额支付手续费承担方标识;商户余额支付扣收规则为接口指定承担方时必填!枚举值:<br/>OUT:出款方;<br/>IN:分账接受方。<br/><font color="green">示例值:IN</font> |
| | | // paramsInfo.put("trans_fee_take_flag", "OUT"); |
| | | // // 核验值verify_type不为空时必填。当verify_type=SMS时,填写用户收到的短信验证码 |
| | | //// paramsInfo.put("verify_value", "test"); |
| | | // // 3. 发起API调用 |
| | | // Map<String, Object> response = BasePayRequest.requestBasePay("v2/trade/acctpayment/pay", paramsInfo, null, false);; |
| | | // System.out.println(response); |
| | | // } |
| | | |
| | | public static Map<String, Object> fenzhang(String req_seq_id,String req_date,String ord_amt,String huifu_id) throws Exception { |
| | | // 1. 数据初始化,填入对应的商户配置 |
| | | MerConfig merConfig = new MerConfig(); |
| | | // merConfig.setProcutId(huiFuProperties.getProductId()); |
| | | // merConfig.setSysId(huiFuProperties.getSysId()); |
| | | // merConfig.setRsaPrivateKey(huiFuProperties.getRsaPrivateKey()); |
| | | // merConfig.setRsaPublicKey(huiFuProperties.getRsaPublicKey()); |
| | | merConfig.setProcutId("KAZX"); |
| | | merConfig.setSysId("6666000182995771"); |
| | | merConfig.setRsaPrivateKey("MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCR6W3ynQJL7f2C8vFYMcQkcirpkif9ZhLq1374jIlV87nv0T9uIm6DoW8LyNEl9w2Yc5qoBv70tt/oVpemA6IZY6NXzE2USNi/sv2qUTtapcIRYxe4acCfY8K+x+p7W2e6wUWIpl9qgZA+UnFmHQ0HT6Ywzq2jJL92JdIs147Ud1aVi3aX8LYItj0z3ZKwZQkaJawZSWQk2+EdPfN059L2qFkPtnT7JIthAdUTJYZA13K4tzw6mXp/DbgwVmLhrlmwl/ccSv2Q0ABfEk7jIxF1nZmCmSy3HrEw9xWyrg1BC+DgXBdyF0OEtpNfv+UW080syUVBNN0irHVuDP81BaAjAgMBAAECggEAGlBZprZQErdxz6rWgYxADj6UpJjaI2XEJZwFZveZUOnqb2hyIv+MpKp5Z0upBErApey7SHAyjJlqWfE72hGvqxp/+7Z5izNz+2ZhPtT1ekyIajBPt89CkLwiA9vz2plKZLC0RIeUj5WcGNEvaDX3AomHtCehwtk+uiTp+XJKbOBtkkQszcdCGY1DVoQ0ppFoINnM9VLbEzaFaG7VS3eFkU4cf2CwcrnJB1RncyPFK+bGFvjkLM/eQbsh8YxkBqaGz/8UM1Na1SEidqdyUF71ltqnI0u8pLe0V+5jugVW+3lPL/p1C3i7mAbQOs4yqRWlFaGVTzOawoQUOPVwDpzeeQKBgQDs1P7F4wURqX1qZR0hSTqOigg48ychaOF66new3SuWk2CVBy8Q8b7odGSPyxJSGZvFLoznPYuSaXCtQ935WWfjB7Z5JpSWCi9BmJnkh41k/KvgMqAEGkZP6ul/zFnDWj94VwXEBz3TuRk574vK2coWoxjM6h1dlJjRBVVTs8dnrQKBgQCduKCjPDUuOHbcNn3VsaHEZX1XyiXN5gds08o61PjiHM42wYXxfUt59nBJmg2yAVRIrKYHfswJcxb5XUTDI5ZhCBnIPrdrQzj7FNadm/7mKDvSsvZdpfTiHY341XnvCq7OcNNj8g5fVsWF769strepQReSug7xgX7ojPvVcAZhDwKBgD57KwP2Er5IIuhQ6NCBS0uTqvurWqV70BDnjtBAaWF+XDq0/HvR63XUTzuIbbrvOqNY1p+jIxFrc+iiQQupxLimrkNkJEs5QKJjqiYahPkhmA68DG9Ip0gqR5QJy5y4UIplGwZOiscyzC72vcC0mJZETSSylzC7JV3vtEUy5ua5AoGAEwlDqjAMIyYBgpa5HV+xLKkrNbtaUL2gy8vMLsmhuHjNkuJMrlb3EyNhbiC/4moyqArehy0Qp1tSvIo7UGotLkzx/69CKBoW+IcNWDyJyXG1trqO7cKoCdqTViM98lIRwyzu9rMydONeN8o0HCT5id4nYDhAsXl1vc+2XY6F1pUCgYEA0dxGHBTKD/WzIvTYGYD6Xx224Y84mO6x2Mu16zFoq/NjuIdKi2O+92yrKDCMMCqaY77fXvWD3eI7QYYlbKAOqdLKVipTbhnBccDyNbtYHVg59t4xS+K6HyD+quVkL9n40UkxSZbKZBQhqt+vlQy0FUgONFii1ACZO0A8Sc/bvn4="); |
| | | merConfig.setRsaPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsWrruP9JBxrUd8uEX5Z8y7pg/UIr5RNHSgDnHqNI1hbi2MfTzB5vZ275wSFFaLDD9BesgDWqsUepPS/opROlDCg9y6WYH8mkN23NmHL9F8kT48OMmH722am+Hp0XVMMwXqA0oNt4f7oW6kDemjZW8/RT4vIE7cyxoxSsVRvjqSpx9wDgFLPWh3o0pHQaoxLyeUsGBATHFrxEDlosBvsuXjMcgjPKXALrcemzKOhBmBkLgyxNVmh61ZK+FNXd+/X4PeZlnWf54NRQAUKe1308E6IIaszo+CjneKuhj1m/X4f7AIvxAqlhuCV5E/DfKRmGopxaWqdtE960Y/H4SmBh2wIDAQAB"); |
| | | BasePay.initWithMerConfig(merConfig); |
| | | |
| | | // 2.组装请求参数 |
| | | Map<String, Object> paramsInfo = new HashMap<>(); |
| | | // 请求流水号 |
| | | paramsInfo.put("req_seq_id",req_seq_id); |
| | | // 请求日期 |
| | | paramsInfo.put("req_date", req_date); |
| | | // 出款方商户号 |
| | | paramsInfo.put("out_huifu_id", "6666000182995771"); |
| | | // 支付金额 |
| | | paramsInfo.put("ord_amt", ord_amt); |
| | | // 分账对象 |
| | | paramsInfo.put("acct_split_bunch", "{\"acct_infos\":[{\"div_amt\":\""+ord_amt+"\",\"huifu_id\":\""+huifu_id+"\"}]}"); |
| | | // 安全信息 |
| | | paramsInfo.put("risk_check_data", "{\"sub_product\":\"1\",\"transfer_type\":\"05\"}"); |
| | | // 手续费承担方标识余额支付手续费承担方标识;商户余额支付扣收规则为接口指定承担方时必填!枚举值:<br/>OUT:出款方;<br/>IN:分账接受方。<br/><font color="green">示例值:IN</font> |
| | | paramsInfo.put("trans_fee_take_flag", "OUT"); |
| | | // 核验值verify_type不为空时必填。当verify_type=SMS时,填写用户收到的短信验证码 |
| | | // paramsInfo.put("verify_value", "test"); |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/trade/acctpayment/pay", paramsInfo, null, false);; |
| | | return response; |
| | | } |
| | | |
| | | |
| | | public static Map<String, Object> queryFenzhang(String req_seq_id,String req_date) throws Exception { |
| | | // 1. 数据初始化,填入对应的商户配置 |
| | | MerConfig merConfig = new MerConfig(); |
| | | merConfig.setProcutId("KAZX"); |
| | | merConfig.setSysId("6666000182995771"); |
| | | merConfig.setRsaPrivateKey("MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCR6W3ynQJL7f2C8vFYMcQkcirpkif9ZhLq1374jIlV87nv0T9uIm6DoW8LyNEl9w2Yc5qoBv70tt/oVpemA6IZY6NXzE2USNi/sv2qUTtapcIRYxe4acCfY8K+x+p7W2e6wUWIpl9qgZA+UnFmHQ0HT6Ywzq2jJL92JdIs147Ud1aVi3aX8LYItj0z3ZKwZQkaJawZSWQk2+EdPfN059L2qFkPtnT7JIthAdUTJYZA13K4tzw6mXp/DbgwVmLhrlmwl/ccSv2Q0ABfEk7jIxF1nZmCmSy3HrEw9xWyrg1BC+DgXBdyF0OEtpNfv+UW080syUVBNN0irHVuDP81BaAjAgMBAAECggEAGlBZprZQErdxz6rWgYxADj6UpJjaI2XEJZwFZveZUOnqb2hyIv+MpKp5Z0upBErApey7SHAyjJlqWfE72hGvqxp/+7Z5izNz+2ZhPtT1ekyIajBPt89CkLwiA9vz2plKZLC0RIeUj5WcGNEvaDX3AomHtCehwtk+uiTp+XJKbOBtkkQszcdCGY1DVoQ0ppFoINnM9VLbEzaFaG7VS3eFkU4cf2CwcrnJB1RncyPFK+bGFvjkLM/eQbsh8YxkBqaGz/8UM1Na1SEidqdyUF71ltqnI0u8pLe0V+5jugVW+3lPL/p1C3i7mAbQOs4yqRWlFaGVTzOawoQUOPVwDpzeeQKBgQDs1P7F4wURqX1qZR0hSTqOigg48ychaOF66new3SuWk2CVBy8Q8b7odGSPyxJSGZvFLoznPYuSaXCtQ935WWfjB7Z5JpSWCi9BmJnkh41k/KvgMqAEGkZP6ul/zFnDWj94VwXEBz3TuRk574vK2coWoxjM6h1dlJjRBVVTs8dnrQKBgQCduKCjPDUuOHbcNn3VsaHEZX1XyiXN5gds08o61PjiHM42wYXxfUt59nBJmg2yAVRIrKYHfswJcxb5XUTDI5ZhCBnIPrdrQzj7FNadm/7mKDvSsvZdpfTiHY341XnvCq7OcNNj8g5fVsWF769strepQReSug7xgX7ojPvVcAZhDwKBgD57KwP2Er5IIuhQ6NCBS0uTqvurWqV70BDnjtBAaWF+XDq0/HvR63XUTzuIbbrvOqNY1p+jIxFrc+iiQQupxLimrkNkJEs5QKJjqiYahPkhmA68DG9Ip0gqR5QJy5y4UIplGwZOiscyzC72vcC0mJZETSSylzC7JV3vtEUy5ua5AoGAEwlDqjAMIyYBgpa5HV+xLKkrNbtaUL2gy8vMLsmhuHjNkuJMrlb3EyNhbiC/4moyqArehy0Qp1tSvIo7UGotLkzx/69CKBoW+IcNWDyJyXG1trqO7cKoCdqTViM98lIRwyzu9rMydONeN8o0HCT5id4nYDhAsXl1vc+2XY6F1pUCgYEA0dxGHBTKD/WzIvTYGYD6Xx224Y84mO6x2Mu16zFoq/NjuIdKi2O+92yrKDCMMCqaY77fXvWD3eI7QYYlbKAOqdLKVipTbhnBccDyNbtYHVg59t4xS+K6HyD+quVkL9n40UkxSZbKZBQhqt+vlQy0FUgONFii1ACZO0A8Sc/bvn4="); |
| | | merConfig.setRsaPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsWrruP9JBxrUd8uEX5Z8y7pg/UIr5RNHSgDnHqNI1hbi2MfTzB5vZ275wSFFaLDD9BesgDWqsUepPS/opROlDCg9y6WYH8mkN23NmHL9F8kT48OMmH722am+Hp0XVMMwXqA0oNt4f7oW6kDemjZW8/RT4vIE7cyxoxSsVRvjqSpx9wDgFLPWh3o0pHQaoxLyeUsGBATHFrxEDlosBvsuXjMcgjPKXALrcemzKOhBmBkLgyxNVmh61ZK+FNXd+/X4PeZlnWf54NRQAUKe1308E6IIaszo+CjneKuhj1m/X4f7AIvxAqlhuCV5E/DfKRmGopxaWqdtE960Y/H4SmBh2wIDAQAB"); |
| | | BasePay.initWithMerConfig(merConfig); |
| | | // 2.组装请求参数 |
| | | Map<String, Object> paramsInfo = new HashMap<>(); |
| | | // 商户号 |
| | | paramsInfo.put("huifu_id", "6666000182995771"); |
| | | // 原交易请求日期 |
| | | paramsInfo.put("org_req_date", req_date); |
| | | // 原交易请求流水号 |
| | | paramsInfo.put("org_req_seq_id", req_seq_id); |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/trade/acctpayment/pay/query", paramsInfo, null, false);; |
| | | System.out.println(response); |
| | | return response; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | licenseStartTime, licenseEndTime, licenseNumber, carNum, driverNum, mac, state, flag, upload, insertTime, detailAddress, companyInfo, scale |
| | | </sql> |
| | | <update id="updateState"> |
| | | update t_income set state =1 where allNo =#{s} |
| | | update t_income set state =1 where reqSeqId =#{s} |
| | | </update> |
| | | |
| | | |
| | |
| | | @TableField("state") |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 分账流水id |
| | | */ |
| | | @TableField("reqSeqId") |
| | | private String reqSeqId; |
| | | |
| | | /** |
| | | * 分账时间 |
| | | */ |
| | | @TableField("reqDate") |
| | | private String reqDate; |
| | | |
| | | public String getReqDate() { |
| | | return reqDate; |
| | | } |
| | | |
| | | public void setReqDate(String reqDate) { |
| | | this.reqDate = reqDate; |
| | | } |
| | | |
| | | public String getReqSeqId() { |
| | | return reqSeqId; |
| | | } |
| | | |
| | | public void setReqSeqId(String reqSeqId) { |
| | | this.reqSeqId = reqSeqId; |
| | | } |
| | | |
| | | public String getAllNo() { |
| | | return allNo; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.cloudPayment.example.AllocationExample; |
| | | import com.stylefeng.guns.modular.cloudPayment.example.WithdrawalExample; |
| | | import com.stylefeng.guns.modular.cloudPayment.req.AllocationReq; |
| | | import com.stylefeng.guns.modular.huifu.biz.FenZhangUtil; |
| | | import com.stylefeng.guns.modular.system.controller.util.Base64Util; |
| | | import com.stylefeng.guns.modular.system.dao.IncomeMapper; |
| | | import com.stylefeng.guns.modular.system.dao.TCompanyMapper; |
| | | import com.stylefeng.guns.modular.system.dao.TEnterpriseWithdrawalMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.dao.TCompanyMapper; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.unionpay.upyzt.exception.UpyztException; |
| | | import com.unionpay.upyzt.resp.AllocationResp; |
| | | import com.unionpay.upyzt.resp.WithdrawalResp; |
| | | import org.apache.poi.hssf.usermodel.*; |
| | | //import org.apache.poi.ss.usermodel.CellType; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | import org.apache.poi.ss.util.CellRangeAddress; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @Resource |
| | | private TCompanyMapper companyMapper; |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | public Double getSumCompanyIncomeMoney(String beginTime, String endTime, String userId) { |
| | | return this.baseMapper.getSumCompanyIncomeMoney(beginTime,endTime,userId); |
| | | } |
| | | |
| | | @Resource |
| | | private TEnterpriseWithdrawalMapper enterpriseWithdrawalMapper; |
| | | @Resource |
| | |
| | | |
| | | @Override |
| | | public void updateMoney() { |
| | | |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); |
| | | // 平台 |
| | | TCompany company1 = baseMapper.selectList(new EntityWrapper<TCompany>().eq("type", 1)).get(0); |
| | | TEnterpriseWithdrawal enterpriseWithdrawal = enterpriseWithdrawalMapper.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", company1.getId())).get(0); |
| | |
| | | String balanceAcctId = enterpriseWithdrawal.getBalanceAcctId(); |
| | | String code = enterpriseWithdrawal.getTransactionAuthorizationCode(); |
| | | code = Base64Util.decode(code); |
| | | |
| | | |
| | | |
| | | // 获取分公司分账时间 |
| | |
| | | if(sum==null || sum==0){ |
| | | continue; |
| | | } |
| | | Double v = sum * 100; |
| | | int money = v.intValue(); |
| | | TEnterpriseWithdrawal enterpriseWithdrawal2 = enterpriseWithdrawal1.get(0); |
| | | String balanceAcctId1 = enterpriseWithdrawal2.getBalanceAcctId(); |
| | | AllocationReq allocationReq = new AllocationReq(); |
| | | allocationReq.setOutOrderNo(ToolUtil.getRandomString(32)); |
| | | allocationReq.setPayBalanceAcctId(balanceAcctId); |
| | | allocationReq.setRecvBalanceAcctId(balanceAcctId1); |
| | | allocationReq.setAmount(money); |
| | | allocationReq.setPassword(code); |
| | | allocationReq.setProductCount(1); |
| | | allocationReq.setProductName("分公司分账"); |
| | | allocationReq.setOrderNo(ToolUtil.getRandomString(32)); |
| | | allocationReq.setOrderAmount(1l); |
| | | // Double v = sum * 100; |
| | | // int money = v.intValue(); |
| | | // TEnterpriseWithdrawal enterpriseWithdrawal2 = enterpriseWithdrawal1.get(0); |
| | | // String balanceAcctId1 = enterpriseWithdrawal2.getBalanceAcctId(); |
| | | // AllocationReq allocationReq = new AllocationReq(); |
| | | // allocationReq.setOutOrderNo(ToolUtil.getRandomString(32)); |
| | | // allocationReq.setPayBalanceAcctId(balanceAcctId); |
| | | // allocationReq.setRecvBalanceAcctId(balanceAcctId1); |
| | | // allocationReq.setAmount(money); |
| | | // allocationReq.setPassword(code); |
| | | // allocationReq.setProductCount(1); |
| | | // allocationReq.setProductName("分公司分账"); |
| | | // allocationReq.setOrderNo(ToolUtil.getRandomString(32)); |
| | | // allocationReq.setOrderAmount(1l); |
| | | String req_seq_id = ToolUtil.getRandomString(32); |
| | | String seq_date = simpleDateFormat.format(new Date()); |
| | | try { |
| | | AllocationResp allocationResp = AllocationExample.create(allocationReq); |
| | | System.out.println(company.getId()+"::"+company.getName()+"-----分账状态"+allocationResp.getStatus()+"--------------"); |
| | | if("processing".equals(allocationResp.getStatus())){ |
| | | // AllocationResp allocationResp = AllocationExample.create(allocationReq); |
| | | Map<String, Object> fenzhang = FenZhangUtil.fenzhang(req_seq_id, seq_date, String.valueOf(sum), "1"); |
| | | System.out.println(company.getId() + "::" + company.getName() + "-----分账状态" + fenzhang.toString() + "--------------"); |
| | | if (!"S".equals(fenzhang.get("trans_stat").toString())) { |
| | | List<Income> collect = state.stream().filter(e -> e.getUserType() == 1 && company.getId().equals(e.getObjectId())).collect(Collectors.toList()); |
| | | collect.stream().forEach(e->e.setAllNo(allocationResp.getAllocationId())); |
| | | collect.stream().forEach(e -> { |
| | | e.setReqSeqId(req_seq_id); |
| | | e.setReqDate(seq_date); |
| | | }); |
| | | incomeService.updateBatchById(collect); |
| | | } |
| | | if("succeeded".equals(allocationResp.getStatus())){ |
| | | if ("S".equals(fenzhang.get("trans_stat").toString())) { |
| | | List<Income> collect = state.stream().filter(e -> e.getUserType() == 1 && company.getId().equals(e.getObjectId())).collect(Collectors.toList()); |
| | | collect.stream().forEach(e->e.setState(1)); |
| | | collect.stream().forEach(e -> { |
| | | e.setState(1); |
| | | e.setReqDate(seq_date); |
| | | }); |
| | | incomeService.updateBatchById(collect); |
| | | } |
| | | } catch (UpyztException e) { |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | |
| | | if(sum==null || sum==0){ |
| | | continue; |
| | | } |
| | | Double v = sum * 100; |
| | | int money = v.intValue(); |
| | | UserWithdrawal userWithdrawal = userWithdrawals.get(0); |
| | | String balanceAcctId1 = userWithdrawal.getBalanceAcctId(); |
| | | AllocationReq allocationReq = new AllocationReq(); |
| | | allocationReq.setOutOrderNo(ToolUtil.getRandomString(32)); |
| | | allocationReq.setPayBalanceAcctId(balanceAcctId); |
| | | allocationReq.setRecvBalanceAcctId(balanceAcctId1); |
| | | allocationReq.setAmount(money); |
| | | allocationReq.setProductName("司机分账"); |
| | | allocationReq.setProductCount(1); |
| | | allocationReq.setOrderNo(ToolUtil.getRandomString(32)); |
| | | allocationReq.setOrderAmount(1l); |
| | | allocationReq.setPassword(code); |
| | | String req_seq_id = ToolUtil.getRandomString(32); |
| | | String seq_date = simpleDateFormat.format(new Date()); |
| | | |
| | | // UserWithdrawal userWithdrawal = userWithdrawals.get(0); |
| | | // String balanceAcctId1 = userWithdrawal.getBalanceAcctId(); |
| | | // AllocationReq allocationReq = new AllocationReq(); |
| | | // allocationReq.setOutOrderNo(); |
| | | // allocationReq.setPayBalanceAcctId(balanceAcctId); |
| | | // allocationReq.setRecvBalanceAcctId(balanceAcctId1); |
| | | // allocationReq.setAmount(money); |
| | | // allocationReq.setProductName("司机分账"); |
| | | // allocationReq.setProductCount(1); |
| | | // allocationReq.setOrderNo(ToolUtil.getRandomString(32)); |
| | | // allocationReq.setOrderAmount(1l); |
| | | // allocationReq.setPassword(code); |
| | | try { |
| | | AllocationResp allocationResp = AllocationExample.create(allocationReq); |
| | | System.out.println(tDriver.getId()+"::"+tDriver.getName()+"-----分账状态"+allocationResp.getStatus()+"--------------"); |
| | | if("processing".equals(allocationResp.getStatus())){ |
| | | Map<String, Object> fenzhang = FenZhangUtil.fenzhang(req_seq_id, seq_date, String.valueOf(sum), "1"); |
| | | // AllocationResp allocationResp = AllocationExample.create(allocationReq); |
| | | System.out.println(tDriver.getId() + "::" + tDriver.getName() + "-----分账状态" + fenzhang.toString() + "--------------"); |
| | | if (!"S".equals(fenzhang.get("trans_stat").toString())) { |
| | | List<Income> collect1 = state.stream().filter(e -> e.getUserType() == 2 && tDriver.getId().equals(e.getObjectId()) ).collect(Collectors.toList()); |
| | | collect1.stream().forEach(e->e.setAllNo(allocationResp.getAllocationId())); |
| | | collect1.stream().forEach(e -> { |
| | | e.setReqSeqId(req_seq_id); |
| | | e.setReqDate(seq_date); |
| | | }); |
| | | incomeService.updateBatchById(collect1); |
| | | } |
| | | if("succeeded".equals(allocationResp.getStatus())){ |
| | | if ("S".equals(fenzhang.get("trans_stat").toString())) { |
| | | List<Income> collect1 = state.stream().filter(e -> e.getUserType() == 2 && tDriver.getId().equals(e.getObjectId()) ).collect(Collectors.toList()); |
| | | collect1.stream().forEach(e->e.setState(1)); |
| | | collect1.stream().forEach(e -> { |
| | | e.setState(1); |
| | | e.setReqDate(seq_date); |
| | | }); |
| | | incomeService.updateBatchById(collect1); |
| | | } |
| | | } catch (UpyztException e) { |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void aaa() throws UpyztException { |
| | | AllocationResp allocationResp = AllocationExample.retrieveById("3008203473415955501"); |
| | |
| | | |
| | | @Override |
| | | public void taskDayFenzhang() { |
| | | List<Income> state = incomeService.selectList(new EntityWrapper<Income>().eq("state", 0).isNotNull("allNo")); |
| | | List<String> collect = state.stream().map(Income::getAllNo).distinct().collect(Collectors.toList()); |
| | | List<Income> state = incomeService.selectList(new EntityWrapper<Income>().eq("state", 0).isNotNull("reqSeqId")); |
| | | // 分组 |
| | | Set<String> collect = state.stream().map(Income::getReqSeqId).collect(Collectors.toSet()); |
| | | for (String s : collect) { |
| | | try { |
| | | AllocationResp allocationResp = AllocationExample.retrieveById(s); |
| | | System.out.println("分账定时查询:"+allocationResp); |
| | | if("succeeded".equals(allocationResp.getStatus())){ |
| | | Income income = state.stream().filter(e -> e.getReqSeqId().equals(s)).findFirst().orElse(null); |
| | | if (income != null) { |
| | | Map<String, Object> map = FenZhangUtil.queryFenzhang(income.getReqSeqId(), income.getReqDate()); |
| | | System.out.println("分账定时查询:" + map.toString()); |
| | | if ("S".equals(map.get("map").toString())) { |
| | | companyMapper.updateState(s); |
| | | } |
| | | } catch (UpyztException e) { |
| | | |
| | | } |
| | | // AllocationResp allocationResp = AllocationExample.retrieveById(s); |
| | | // |
| | | // if("succeeded".equals(allocationResp.getStatus())){ |
| | | // companyMapper.updateState(s); |
| | | // } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | @Autowired |
| | | private ITUserService userService; |
| | | |
| | |
| | | @Scheduled(fixedRate = 1000 * 60) |
| | | public void taskDayFenzhang() { |
| | | try { |
| | | //companyMapper.taskDayFenzhang(); // 分账业务 |
| | | companyMapper.taskDayFenzhang(); // 分账业务 |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | import com.stylefeng.guns.modular.CharteredCar.model.OrderCharteredCar; |
| | | import com.stylefeng.guns.modular.CharteredCar.server.IOrderCharteredCarService; |
| | | import com.stylefeng.guns.modular.account.controller.AppOrderController; |
| | | import com.stylefeng.guns.modular.api.OrderController; |
| | | import com.stylefeng.guns.modular.crossCity.dao.OrderCrossCityMapper; |
| | | import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.specialTrain.dao.OrderPrivateCarMapper; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.system.dao.SensitiveWordsMapper; |
| | |
| | | this.updateById(orderCharteredCar); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, 1, 6, orderCharteredCar.getId(), 6, money); |
| | | incomeService.saveData(1, 1, 6, orderCharteredCar.getId(), 6, money,null); |
| | | systemNoticeService.addSystemNotice(1, "您已使用余额成功完成感谢费支付,谢谢使用!", uid, 1); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | if(payType==4){ |
| | |
| | | private AppOrderController appOrderController; |
| | | |
| | | @Override |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception { |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception { |
| | | OrderCharteredCar orderCharteredCar = this.selectById(orderId); |
| | | PaymentRecord query = paymentRecordService.query(3, orderCharteredCar.getUserId(), 1, orderId, 6, payType, 1); |
| | | query.setState(2); |
| | |
| | | this.updateById(orderCharteredCar); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, 1, 6, orderCharteredCar.getId(), 6, query.getAmount()); |
| | | incomeService.saveData(1, 1, 6, orderCharteredCar.getId(), 6, query.getAmount(),out_trade_no); |
| | | systemNoticeService.addSystemNotice(1, "您已使用" + (payType == 1 ? "微信" : (payType==2?"支付宝":"云闪付")) + "成功完成感谢费支付,谢谢使用!", userInfo.getId(), 1); |
| | | } |
| | | |
| | |
| | | System.out.println("预留:"+srcReserve); |
| | | |
| | | if(integer==3){ |
| | | orderCrossCityService.payOrderCrossCityCallback(orderId,"",4,targetOrderId); |
| | | orderCrossCityService.payOrderCrossCityCallback(orderId,"",4,targetOrderId,null); |
| | | } |
| | | if(integer==4){ |
| | | orderCrossCityService.payCancelOrderCrossCity(orderId,"",4); |
| | | orderCrossCityService.payCancelOrderCrossCity(orderId,"",4,null); |
| | | } |
| | | if(integer==5){ |
| | | orderLogisticsService.payOrderLogisticsCallback(orderId,",",4); |
| | | orderLogisticsService.payOrderLogisticsCallback(orderId,",",4,null); |
| | | } |
| | | if(integer==6){ |
| | | orderPrivateCarService.payOrderPrivateCarCallback(orderId,",",4); |
| | | orderPrivateCarService.payOrderPrivateCarCallback(orderId,",",4,null); |
| | | } |
| | | if(integer==9){ |
| | | orderTaxiService.payOrderTaxiCallback(orderId,"",4,paymentId); |
| | | orderTaxiService.payOrderTaxiCallback(orderId,"",4,paymentId,null); |
| | | } |
| | | if(integer==1){ |
| | | orderPrivateCarService.payCancelOrderPrivateCar(orderId,",",4); |
| | | orderPrivateCarService.payCancelOrderPrivateCar(orderId,",",4,null); |
| | | } |
| | | if(integer==8){ |
| | | orderTaxiService.payCancelOrderTaxi(orderId,"",4); |
| | | orderTaxiService.payCancelOrderTaxi(orderId,"",4,null); |
| | | } |
| | | if(integer==2){ |
| | | orderCrossCityService.payThankYouFeeCallback(orderId,targetOrderId,4); |
| | | orderCrossCityService.payThankYouFeeCallback(orderId,targetOrderId,4,null); |
| | | } |
| | | |
| | | if(integer==10){ |
| | | orderLogisticsService.payThankYouFeeCallback(orderId,targetOrderId,4); |
| | | orderLogisticsService.payThankYouFeeCallback(orderId,targetOrderId,4,null); |
| | | } |
| | | if(integer==11){ |
| | | orderPrivateCarService.payThankYouFeeCallback(orderId,targetOrderId,4); |
| | | orderPrivateCarService.payThankYouFeeCallback(orderId,targetOrderId,4,null); |
| | | } |
| | | if(integer==12){ |
| | | orderTaxiService.payThankYouFeeCallback(orderId,targetOrderId,4); |
| | | orderTaxiService.payThankYouFeeCallback(orderId,targetOrderId,4,null); |
| | | } |
| | | if(integer==13){ //补差价 |
| | | orderLogisticsService.payOrderLogisticsSpreadCallback(orderId,targetOrderId,4); |
| | |
| | | Integer type = Integer.valueOf(split[1]); |
| | | switch (type){ |
| | | case 1: |
| | | orderPrivateCarService.payCancelOrderPrivateCar(id, order_id, 1); |
| | | orderPrivateCarService.payCancelOrderPrivateCar(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.payCancelOrderTaxi(id, order_id, 1); |
| | | orderTaxiService.payCancelOrderTaxi(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.payCancelOrderCrossCity(id, order_id, 1); |
| | | orderCrossCityService.payCancelOrderCrossCity(id, order_id, 1,out_trade_no); |
| | | break; |
| | | } |
| | | |
| | |
| | | Integer type = Integer.valueOf(split[1]); |
| | | switch (type){ |
| | | case 1: |
| | | orderPrivateCarService.payCancelOrderPrivateCar(id, order_id, 1); |
| | | orderPrivateCarService.payCancelOrderPrivateCar(id, order_id, 1,null); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.payCancelOrderTaxi(id, order_id, 1); |
| | | orderTaxiService.payCancelOrderTaxi(id, order_id, 1,null); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.payCancelOrderCrossCity(id, order_id, 1); |
| | | orderCrossCityService.payCancelOrderCrossCity(id, order_id, 1,null); |
| | | break; |
| | | } |
| | | } |
| | |
| | | Integer type = Integer.valueOf(split[1]); |
| | | switch (type){ |
| | | case 1: |
| | | orderPrivateCarService.payCancelOrderPrivateCar(id, order_id, 2); |
| | | orderPrivateCarService.payCancelOrderPrivateCar(id, order_id, 2,null); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.payCancelOrderTaxi(id, order_id, 2); |
| | | orderTaxiService.payCancelOrderTaxi(id, order_id, 2,null); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.payCancelOrderCrossCity(id, order_id, 2); |
| | | orderCrossCityService.payCancelOrderCrossCity(id, order_id, 2,null); |
| | | break; |
| | | } |
| | | PrintWriter out = response.getWriter(); |
| | |
| | | Integer type = Integer.valueOf(split[1]); |
| | | switch (type){ |
| | | case 1: |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 1); |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 1,0); |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 1,0,out_trade_no); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 1,null); |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 1,null,out_trade_no); |
| | | break; |
| | | case 4: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 5: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | } |
| | | |
| | |
| | | Integer type = Integer.valueOf(split[1]); |
| | | switch (type){ |
| | | case 1: |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 1); |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 1,0); |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 1,0,out_trade_no); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 1,null); |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 1,null,out_trade_no); |
| | | break; |
| | | case 4: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 5: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | } |
| | | |
| | |
| | | Integer type = Integer.valueOf(split[1]); |
| | | switch (type){ |
| | | case 1: |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 2); |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 2,out_trade_no); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 2,0); |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 2,0,out_trade_no); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 2,null); |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 2,null,out_trade_no); |
| | | break; |
| | | case 4: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2,out_trade_no); |
| | | break; |
| | | case 5: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2,out_trade_no); |
| | | break; |
| | | } |
| | | PrintWriter out = response.getWriter(); |
| | |
| | | String[] s = out_trade_no.split("_"); |
| | | switch (Integer.valueOf(s[1])){ |
| | | case 1: |
| | | orderPrivateCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderPrivateCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 2: |
| | | orderTaxiService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderTaxiService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 3: |
| | | orderCrossCityService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderCrossCityService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 4: |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 5: |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 6: |
| | | orderCharteredCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderCharteredCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 7: |
| | | orderCallService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderCallService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | } |
| | | |
| | | PrintWriter out = response.getWriter(); |
| | |
| | | String[] s = out_trade_no.split("_"); |
| | | switch (Integer.valueOf(s[1])){ |
| | | case 1: |
| | | orderPrivateCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderPrivateCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,null); |
| | | case 2: |
| | | orderTaxiService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderTaxiService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,null); |
| | | case 3: |
| | | orderCrossCityService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderCrossCityService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,null); |
| | | case 4: |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,null); |
| | | case 5: |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,null); |
| | | case 6: |
| | | orderCharteredCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderCharteredCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,null); |
| | | case 7: |
| | | orderCallService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderCallService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,null); |
| | | } |
| | | } |
| | | // cloudPay(map.get("total_fee"),map.get("transaction_id"),1); |
| | |
| | | String[] s = out_trade_no.split("_"); |
| | | switch (Integer.valueOf(s[1])){ |
| | | case 1: |
| | | orderPrivateCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2); |
| | | orderPrivateCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2,null); |
| | | case 2: |
| | | orderTaxiService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2); |
| | | orderTaxiService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2,null); |
| | | case 3: |
| | | orderCrossCityService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2); |
| | | orderCrossCityService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2,null); |
| | | case 4: |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2); |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2,null); |
| | | case 5: |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2); |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2,null); |
| | | case 6: |
| | | orderCharteredCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2); |
| | | orderCharteredCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2,null); |
| | | case 7: |
| | | orderCallService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2); |
| | | orderCallService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 2,null); |
| | | } |
| | | |
| | | PrintWriter out = response.getWriter(); |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.CharteredCar.model.OrderCharteredCar; |
| | | import com.stylefeng.guns.modular.account.controller.AppOrderController; |
| | | import com.stylefeng.guns.modular.call.dao.OrderCallMapper; |
| | | import com.stylefeng.guns.modular.call.model.OrderCall; |
| | |
| | | import com.stylefeng.guns.modular.system.service.ISysIntegralService; |
| | | import com.stylefeng.guns.modular.system.service.ISystemNoticeService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | import com.stylefeng.guns.modular.system.util.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.system.util.PayMoneyUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.UUIDUtil; |
| | | import com.stylefeng.guns.modular.taxi.model.PaymentRecord; |
| | | import com.stylefeng.guns.modular.taxi.service.IPaymentRecordService; |
| | | import com.stylefeng.guns.modular.taxi.service.ITransactionDetailsService; |
| | |
| | | this.updateById(orderCall); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, 1, 6, orderCall.getId(), 7, money); |
| | | incomeService.saveData(1, 1, 6, orderCall.getId(), 7, money,null); |
| | | systemNoticeService.addSystemNotice(1, "您已使用余额成功完成感谢费支付,谢谢使用!", uid, 1); |
| | | |
| | | } |
| | |
| | | private AppOrderController appOrderController; |
| | | |
| | | @Override |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception { |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception { |
| | | OrderCall orderCall = this.selectById(orderId); |
| | | PaymentRecord query = paymentRecordService.query(3, orderCall.getUserId(), 1, orderId, 7, payType, 1); |
| | | query.setState(2); |
| | |
| | | this.updateById(orderCall); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, 1, 6, orderCall.getId(), 7, query.getAmount()); |
| | | incomeService.saveData(1, 1, 6, orderCall.getId(), 7, query.getAmount(),out_trade_no); |
| | | systemNoticeService.addSystemNotice(1, "您已使用" + (payType == 1 ? "微信" : (payType==2?"支付宝":"云闪付")) + "成功完成感谢费支付,谢谢使用!", userInfo.getId(), 1); |
| | | } |
| | | } |
| | |
| | | |
| | | private String splitAllocation; |
| | | |
| | | @TableField("outTradeNo") |
| | | private String outTradeNo; |
| | | |
| | | public String getOutTradeNo() { |
| | | return outTradeNo; |
| | | } |
| | | |
| | | public void setOutTradeNo(String outTradeNo) { |
| | | this.outTradeNo = outTradeNo; |
| | | } |
| | | |
| | | public String getBillNo() { |
| | | return billNo; |
| | | } |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payOrderCrossCityCallback(Integer id, String order_id, Integer type,String no) throws Exception; |
| | | void payOrderCrossCityCallback(Integer id, String order_id, Integer type,String no,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payCancelOrderCrossCity(Integer id, String order_id, Integer type) throws Exception; |
| | | void payCancelOrderCrossCity(Integer id, String order_id, Integer type,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | |
| | | import com.stylefeng.guns.modular.crossCity.dao.LinePriceMapper; |
| | | import com.stylefeng.guns.modular.crossCity.dao.LineShiftDriverMapper; |
| | | import com.stylefeng.guns.modular.crossCity.dao.OrderCrossCityMapper; |
| | | import com.stylefeng.guns.modular.crossCity.model.Line; |
| | | import com.stylefeng.guns.modular.crossCity.model.LineShiftDriver; |
| | | import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity; |
| | | import com.stylefeng.guns.modular.crossCity.server.ILineService; |
| | | import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; |
| | | import com.stylefeng.guns.modular.crossCity.warpper.OrderCrossCityWarpper; |
| | | import com.stylefeng.guns.modular.smallLogistics.dao.OrderLogisticsMapper; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.specialTrain.dao.OrderPrivateCarMapper; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | |
| | | import com.stylefeng.guns.modular.taxi.dao.OrderTaxiMapper; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import com.stylefeng.guns.modular.taxi.model.PaymentRecord; |
| | | import com.stylefeng.guns.modular.taxi.model.TransactionDetails; |
| | | import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; |
| | | import com.stylefeng.guns.modular.taxi.service.IPaymentRecordService; |
| | | import com.stylefeng.guns.modular.taxi.service.ITransactionDetailsService; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.stylefeng.guns.modular.taxi.service.impl.OrderTaxiServiceImpl.orderIds; |
| | | |
| | | |
| | | @Service |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void payOrderCrossCityCallback(Integer id, String order_id, Integer type,String no) throws Exception { |
| | | public void payOrderCrossCityCallback(Integer id, String order_id, Integer type,String no,String out_trade_no) throws Exception { |
| | | OrderCrossCity orderCrossCity = this.selectById(id); |
| | | orderCrossCity.setOutTradeNo(out_trade_no); |
| | | |
| | | |
| | | PaymentRecord query = paymentRecordService.query(1, orderCrossCity.getUserId(), 1, Integer.valueOf(id), 3, type, 1); |
| | | if(null != query && query.getState() == 1){ |
| | | //添加交易明细 |
| | |
| | | orderCancelService.updateById(orderCancel); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderCrossCity.getCompanyId(), 3, orderCrossCity.getId(), 3, query.getMoney()); |
| | | incomeService.saveData(1, orderCrossCity.getCompanyId(), 3, orderCrossCity.getId(), 3, query.getMoney(),null); |
| | | |
| | | this.deleteTask(id);//删除定时任务 |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void payCancelOrderCrossCity(Integer id, String order_id, Integer type) throws Exception { |
| | | public void payCancelOrderCrossCity(Integer id, String order_id, Integer type,String out_trade_no) throws Exception { |
| | | OrderCrossCity orderCrossCity = this.selectById(id); |
| | | orderCrossCity.setOutTradeNo(out_trade_no); |
| | | PaymentRecord query = paymentRecordService.query(1, orderCrossCity.getUserId(), 1, Integer.valueOf(id), 3, type, 1); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | |
| | | } |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderCrossCity.getCompanyId(), 3, orderCrossCity.getId(), 3, query.getAmount()); |
| | | incomeService.saveData(1, orderCrossCity.getCompanyId(), 3, orderCrossCity.getId(), 3, query.getAmount(),out_trade_no); |
| | | |
| | | this.deleteTask(orderCrossCity.getId());//删除定时任务 |
| | | |
| | |
| | | this.updateById(orderCrossCity); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderCrossCity.getDriverId(), 6, orderCrossCity.getId(), 3, money); |
| | | incomeService.saveData(2, orderCrossCity.getDriverId(), 6, orderCrossCity.getId(), 3, money,null); |
| | | Driver driver = driverService.selectById(orderCrossCity.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception { |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType, String out_trade_no) throws Exception { |
| | | OrderCrossCity orderCrossCity = this.selectById(orderId); |
| | | UserInfo userInfo = userInfoService.selectById(orderCrossCity.getUserId()); |
| | | PaymentRecord query = paymentRecordService.query(3, userInfo.getId(), 1, orderId, 3, payType, 1); |
| | |
| | | this.updateById(orderCrossCity); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderCrossCity.getDriverId(), 6, orderCrossCity.getId(), 3, query.getAmount()); |
| | | incomeService.saveData(2, orderCrossCity.getDriverId(), 6, orderCrossCity.getId(), 3, query.getAmount(),out_trade_no); |
| | | Driver driver = driverService.selectById(orderCrossCity.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(new BigDecimal(query.getAmount())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(new BigDecimal(query.getAmount())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | log.info("用户业务入驻修改返回参数:{}", response); |
| | | return response; |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | // 1. 数据初始化,填入对应的商户配置 |
| | | MerConfig merConfig = new MerConfig(); |
| | | // merConfig.setProcutId(huiFuProperties.getProductId()); |
| | | // merConfig.setSysId(huiFuProperties.getSysId()); |
| | | // merConfig.setRsaPrivateKey(huiFuProperties.getRsaPrivateKey()); |
| | | // merConfig.setRsaPublicKey(huiFuProperties.getRsaPublicKey()); |
| | | merConfig.setProcutId("KAZX"); |
| | | merConfig.setSysId("6666000182995771"); |
| | | merConfig.setRsaPrivateKey("MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCR6W3ynQJL7f2C8vFYMcQkcirpkif9ZhLq1374jIlV87nv0T9uIm6DoW8LyNEl9w2Yc5qoBv70tt/oVpemA6IZY6NXzE2USNi/sv2qUTtapcIRYxe4acCfY8K+x+p7W2e6wUWIpl9qgZA+UnFmHQ0HT6Ywzq2jJL92JdIs147Ud1aVi3aX8LYItj0z3ZKwZQkaJawZSWQk2+EdPfN059L2qFkPtnT7JIthAdUTJYZA13K4tzw6mXp/DbgwVmLhrlmwl/ccSv2Q0ABfEk7jIxF1nZmCmSy3HrEw9xWyrg1BC+DgXBdyF0OEtpNfv+UW080syUVBNN0irHVuDP81BaAjAgMBAAECggEAGlBZprZQErdxz6rWgYxADj6UpJjaI2XEJZwFZveZUOnqb2hyIv+MpKp5Z0upBErApey7SHAyjJlqWfE72hGvqxp/+7Z5izNz+2ZhPtT1ekyIajBPt89CkLwiA9vz2plKZLC0RIeUj5WcGNEvaDX3AomHtCehwtk+uiTp+XJKbOBtkkQszcdCGY1DVoQ0ppFoINnM9VLbEzaFaG7VS3eFkU4cf2CwcrnJB1RncyPFK+bGFvjkLM/eQbsh8YxkBqaGz/8UM1Na1SEidqdyUF71ltqnI0u8pLe0V+5jugVW+3lPL/p1C3i7mAbQOs4yqRWlFaGVTzOawoQUOPVwDpzeeQKBgQDs1P7F4wURqX1qZR0hSTqOigg48ychaOF66new3SuWk2CVBy8Q8b7odGSPyxJSGZvFLoznPYuSaXCtQ935WWfjB7Z5JpSWCi9BmJnkh41k/KvgMqAEGkZP6ul/zFnDWj94VwXEBz3TuRk574vK2coWoxjM6h1dlJjRBVVTs8dnrQKBgQCduKCjPDUuOHbcNn3VsaHEZX1XyiXN5gds08o61PjiHM42wYXxfUt59nBJmg2yAVRIrKYHfswJcxb5XUTDI5ZhCBnIPrdrQzj7FNadm/7mKDvSsvZdpfTiHY341XnvCq7OcNNj8g5fVsWF769strepQReSug7xgX7ojPvVcAZhDwKBgD57KwP2Er5IIuhQ6NCBS0uTqvurWqV70BDnjtBAaWF+XDq0/HvR63XUTzuIbbrvOqNY1p+jIxFrc+iiQQupxLimrkNkJEs5QKJjqiYahPkhmA68DG9Ip0gqR5QJy5y4UIplGwZOiscyzC72vcC0mJZETSSylzC7JV3vtEUy5ua5AoGAEwlDqjAMIyYBgpa5HV+xLKkrNbtaUL2gy8vMLsmhuHjNkuJMrlb3EyNhbiC/4moyqArehy0Qp1tSvIo7UGotLkzx/69CKBoW+IcNWDyJyXG1trqO7cKoCdqTViM98lIRwyzu9rMydONeN8o0HCT5id4nYDhAsXl1vc+2XY6F1pUCgYEA0dxGHBTKD/WzIvTYGYD6Xx224Y84mO6x2Mu16zFoq/NjuIdKi2O+92yrKDCMMCqaY77fXvWD3eI7QYYlbKAOqdLKVipTbhnBccDyNbtYHVg59t4xS+K6HyD+quVkL9n40UkxSZbKZBQhqt+vlQy0FUgONFii1ACZO0A8Sc/bvn4="); |
| | | merConfig.setRsaPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsWrruP9JBxrUd8uEX5Z8y7pg/UIr5RNHSgDnHqNI1hbi2MfTzB5vZ275wSFFaLDD9BesgDWqsUepPS/opROlDCg9y6WYH8mkN23NmHL9F8kT48OMmH722am+Hp0XVMMwXqA0oNt4f7oW6kDemjZW8/RT4vIE7cyxoxSsVRvjqSpx9wDgFLPWh3o0pHQaoxLyeUsGBATHFrxEDlosBvsuXjMcgjPKXALrcemzKOhBmBkLgyxNVmh61ZK+FNXd+/X4PeZlnWf54NRQAUKe1308E6IIaszo+CjneKuhj1m/X4f7AIvxAqlhuCV5E/DfKRmGopxaWqdtE960Y/H4SmBh2wIDAQAB"); |
| | | BasePay.initWithMerConfig(merConfig); |
| | | |
| | | // 2.组装请求参数 |
| | | Map<String, Object> paramsInfo = new HashMap<>(); |
| | | // 请求流水号 |
| | | paramsInfo.put("req_seq_id", "rQ20251119164316677154"); |
| | | // 请求日期 |
| | | paramsInfo.put("req_date", "20251119"); |
| | | // 出款方商户号 |
| | | paramsInfo.put("out_huifu_id", "6666000182995771"); |
| | | // 支付金额 |
| | | paramsInfo.put("ord_amt", "0.01"); |
| | | // 分账对象 |
| | | paramsInfo.put("acct_split_bunch", "{\"acct_infos\":[{\"div_amt\":\"0.01\",\"huifu_id\":\"6666000183361451\"}]}"); |
| | | // 安全信息 |
| | | paramsInfo.put("risk_check_data", "{\"sub_product\":\"1\",\"transfer_type\":\"05\"}"); |
| | | // 手续费承担方标识余额支付手续费承担方标识;商户余额支付扣收规则为接口指定承担方时必填!枚举值:<br/>OUT:出款方;<br/>IN:分账接受方。<br/><font color="green">示例值:IN</font> |
| | | paramsInfo.put("trans_fee_take_flag", "OUT"); |
| | | // 核验值verify_type不为空时必填。当verify_type=SMS时,填写用户收到的短信验证码 |
| | | // paramsInfo.put("verify_value", "test"); |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/trade/acctpayment/pay", paramsInfo, null, false);; |
| | | System.out.println(response); |
| | | } |
| | | } |
| File was renamed from UserJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/DouGongPayUtil.java |
| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | package com.stylefeng.guns.modular.huifu.biz; |
| | | |
| | | import cn.hutool.http.HttpRequest; |
| | | import cn.hutool.http.HttpResponse; |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.alipay.api.AlipayClient; |
| | | import com.alipay.api.DefaultAlipayClient; |
| | | import com.alipay.api.request.AlipaySystemOauthTokenRequest; |
| | | import com.alipay.api.response.AlipaySystemOauthTokenResponse; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.huifu.bspay.sdk.opps.core.BasePay; |
| | | import com.huifu.bspay.sdk.opps.core.config.MerConfig; |
| | | import com.huifu.bspay.sdk.opps.core.utils.DateTools; |
| | | import com.huifu.bspay.sdk.opps.core.utils.SequenceTools; |
| | | import com.stylefeng.guns.core.util.HttpUtils; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongBasicDataBiz; |
| | | import com.stylefeng.guns.modular.huifu.properties.HuiFuProperties; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | |
| | |
| | | import java.util.Base64; |
| | | import java.util.Date; |
| | | import java.util.TreeMap; |
| | | |
| | | import static com.aliyun.oss.model.RoutingRule.Protocol.Http; |
| | | |
| | | /** |
| | | * 斗拱支付工具类 |
| | |
| | | HttpResponse execute = post.execute(); |
| | | System.out.println(execute.body()); |
| | | JSONObject jsonObject = JSONObject.parseObject(execute.body()); |
| | | jsonObject.put("req_seq_id",req_seq_id); |
| | | return ResultUtil.success(jsonObject); |
| | | } |
| | | |
| | |
| | | private String splitAllocation; |
| | | |
| | | |
| | | @TableField("outTradeNo") |
| | | private String outTradeNo; |
| | | |
| | | public String getOutTradeNo() { |
| | | return outTradeNo; |
| | | } |
| | | |
| | | public void setOutTradeNo(String outTradeNo) { |
| | | this.outTradeNo = outTradeNo; |
| | | } |
| | | |
| | | public String getTelXOne() { |
| | | return telXOne; |
| | | } |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payOrderLogisticsCallback(Integer id, String order_id, Integer type) throws Exception; |
| | | void payOrderLogisticsCallback(Integer id, String order_id, Integer type,String outTradeNo) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.account.controller.AppOrderController; |
| | | import com.stylefeng.guns.modular.crossCity.dao.OrderCrossCityMapper; |
| | | import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity; |
| | | import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.smallLogistics.dao.OrderLogisticsMapper; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogisticsSpread; |
| | |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsSpreadService; |
| | | import com.stylefeng.guns.modular.specialTrain.dao.OrderPrivateCarMapper; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.dao.*; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | |
| | | import com.stylefeng.guns.modular.taxi.dao.OrderTaxiMapper; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import com.stylefeng.guns.modular.taxi.model.PaymentRecord; |
| | | import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; |
| | | import com.stylefeng.guns.modular.taxi.service.IPaymentRecordService; |
| | | import com.stylefeng.guns.modular.taxi.service.ITransactionDetailsService; |
| | | import com.unionpay.upyzt.exception.UpyztException; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | |
| | | @Override |
| | | public void payOrderLogisticsCallback(Integer id, String order_id, Integer type) throws Exception { |
| | | public void payOrderLogisticsCallback(Integer id, String order_id, Integer type,String outTradeNo) throws Exception { |
| | | OrderLogistics orderLogistics = this.selectById(id); |
| | | orderLogistics.setOutTradeNo(outTradeNo); |
| | | |
| | | PaymentRecord query = paymentRecordService.query(1, orderLogistics.getUserId(), 1, Integer.valueOf(id), orderLogistics.getType(), type, 1); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | |
| | | this.updateById(orderLogistics); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderLogistics.getDriverId(), 6, orderLogistics.getId(), orderLogistics.getType(), money); |
| | | incomeService.saveData(2, orderLogistics.getDriverId(), 6, orderLogistics.getId(), orderLogistics.getType(), money,null); |
| | | Driver driver = driverService.selectById(orderLogistics.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception { |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception { |
| | | OrderLogistics orderLogistics = this.selectById(orderId); |
| | | UserInfo userInfo = userInfoService.selectById(orderLogistics.getUserId()); |
| | | PaymentRecord query = paymentRecordService.query(3, userInfo.getId(), 1, orderId, orderLogistics.getType(), payType, 1); |
| | |
| | | this.updateById(orderLogistics); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderLogistics.getDriverId(), 6, orderLogistics.getId(), orderLogistics.getType(), query.getAmount()); |
| | | incomeService.saveData(2, orderLogistics.getDriverId(), 6, orderLogistics.getId(), orderLogistics.getType(), query.getAmount(),out_trade_no); |
| | | Driver driver = driverService.selectById(orderLogistics.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(new BigDecimal(query.getAmount())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(new BigDecimal(query.getAmount())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | |
| | | private String splitAllocation; |
| | | |
| | | @TableField("outTradeNo") |
| | | /** |
| | | * 交易流水号 |
| | | */ |
| | | private String outTradeNo; |
| | | |
| | | public String getOutTradeNo() { |
| | | return outTradeNo; |
| | | } |
| | | |
| | | public void setOutTradeNo(String outTradeNo) { |
| | | this.outTradeNo = outTradeNo; |
| | | } |
| | | |
| | | public Integer getSpellSuccess() { |
| | | return spellSuccess; |
| | | } |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payCancelOrderPrivateCar(Integer id, String order_id, Integer type) throws Exception; |
| | | void payCancelOrderPrivateCar(Integer id, String order_id, Integer type,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payOrderPrivateCarCallback(Integer id, String order_id, Integer type) throws Exception; |
| | | void payOrderPrivateCarCallback(Integer id, String order_id, Integer type,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | |
| | | /** |
| | | * 获取订单详情页(服务中的页面) |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aliyun.oss.ServiceException; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | |
| | | import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity; |
| | | import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; |
| | | import com.stylefeng.guns.modular.crossCity.server.impl.OrderCrossCityServiceImpl; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.specialTrain.dao.OrderPrivateCarMapper; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | |
| | | import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; |
| | | import com.stylefeng.guns.modular.taxi.service.IPaymentRecordService; |
| | | import com.stylefeng.guns.modular.taxi.service.ITransactionDetailsService; |
| | | import javafx.concurrent.Task; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpEntity; |
| | |
| | | orderCancelService.updateById(orderCancel); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderPrivateCar.getCompanyId(), 3, orderPrivateCar.getId(), 1, query.getMoney()); |
| | | incomeService.saveData(1, orderPrivateCar.getCompanyId(), 3, orderPrivateCar.getId(), 1, query.getMoney(),null); |
| | | |
| | | this.deleteTask(id);//删除定时任务 |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void payCancelOrderPrivateCar(Integer id, String order_id, Integer type) throws Exception { |
| | | public void payCancelOrderPrivateCar(Integer id, String order_id, Integer type,String out_trade_no) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(id); |
| | | orderPrivateCar.setOutTradeNo(out_trade_no); |
| | | PaymentRecord query = paymentRecordService.query(1, orderPrivateCar.getUserId(), 1, Integer.valueOf(id), 1, type, 1); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | |
| | | } |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderPrivateCar.getCompanyId(), 3, orderPrivateCar.getId(), 1, query.getAmount()); |
| | | incomeService.saveData(1, orderPrivateCar.getCompanyId(), 3, orderPrivateCar.getId(), 1, query.getAmount(),out_trade_no); |
| | | |
| | | this.deleteTask(orderPrivateCar.getId());//删除定时任务 |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void payOrderPrivateCarCallback(Integer id, String order_id, Integer type) throws Exception { |
| | | public void payOrderPrivateCarCallback(Integer id, String order_id, Integer type,String out_trade_no) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(id); |
| | | orderPrivateCar.setOutTradeNo(out_trade_no); |
| | | |
| | | PaymentRecord query = paymentRecordService.query(1, orderPrivateCar.getUserId(), 1, Integer.valueOf(id), 1, type, 1); |
| | | if(null != query && query.getState() == 1){ |
| | | //添加交易明细 |
| | |
| | | this.updateById(orderPrivateCar); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderPrivateCar.getDriverId(), 6, orderPrivateCar.getId(), 1, money); |
| | | incomeService.saveData(2, orderPrivateCar.getDriverId(), 6, orderPrivateCar.getId(), 1, money,null); |
| | | Driver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception { |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception { |
| | | System.out.println(orderId+"_"+order_id+"_"+payType); |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | UserInfo userInfo = userInfoService.selectById(orderPrivateCar.getUserId()); |
| | |
| | | this.updateById(orderPrivateCar); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderPrivateCar.getDriverId(), 6, orderPrivateCar.getId(), 1, query.getAmount()); |
| | | incomeService.saveData(2, orderPrivateCar.getDriverId(), 6, orderPrivateCar.getId(), 1, query.getAmount(),out_trade_no); |
| | | Driver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(new BigDecimal(query.getAmount())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(new BigDecimal(query.getAmount())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | @ApiModelProperty("司机活动收入分类(1=邀请司机注册,2=邀请用户注册,3=快车累计在线,4=车租车累计在线,5=跨城累计在线,6=订单数奖励)") |
| | | private Integer activityType; |
| | | |
| | | |
| | | @TableField("reqSeqId") |
| | | private String reqSeqId; |
| | | @TableField("orgReqSeqId") |
| | | private String orgReqSeqId; |
| | | |
| | | public String getReqSeqId() { |
| | | return reqSeqId; |
| | | } |
| | | |
| | | public void setReqSeqId(String reqSeqId) { |
| | | this.reqSeqId = reqSeqId; |
| | | } |
| | | |
| | | public String getOrgReqSeqId() { |
| | | return orgReqSeqId; |
| | | } |
| | | |
| | | public void setOrgReqSeqId(String orgReqSeqId) { |
| | | this.orgReqSeqId = orgReqSeqId; |
| | | } |
| | | |
| | | public Integer getActivityType() { |
| | | return activityType; |
| | | } |
| | |
| | | * @param money |
| | | * @throws Exception |
| | | */ |
| | | void saveData(Integer userType, Integer objectId, Integer type, Integer incomeId, Integer orderType, Double money) throws Exception; |
| | | void saveData(Integer userType, Integer objectId, Integer type, Integer incomeId, Integer orderType, Double money,String orgReqSeqId) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void saveData(Integer userType, Integer objectId, Integer type, Integer incomeId, Integer orderType, Double money) throws Exception { |
| | | public void saveData(Integer userType, Integer objectId, Integer type, Integer incomeId, Integer orderType, Double money,String orgReqSeqId) throws Exception { |
| | | Income income = new Income(); |
| | | income.setUserType(userType); |
| | | income.setObjectId(objectId); |
| | |
| | | income.setMoney(new BigDecimal(money).setScale(2, RoundingMode.HALF_EVEN).doubleValue()); |
| | | income.setInsertTime(new Date()); |
| | | income.setActivityType(2); |
| | | income.setOrgReqSeqId(orgReqSeqId); |
| | | this.insert(income); |
| | | } |
| | | |
| | |
| | | BigDecimal multiply1 = new BigDecimal(payMoney).multiply(new BigDecimal(percent / 100)); |
| | | //抽成金额小于最低金额,司机收入为0 |
| | | if(multiply1.compareTo(new BigDecimal(d)) < 0){ |
| | | saveData(1, 1, 2, orderId, orderType, d); |
| | | saveData(1, 1, 2, orderId, orderType, d,null); |
| | | //司机收入 |
| | | BigDecimal subtract = new BigDecimal(payMoney).subtract(new BigDecimal(d)); |
| | | if(subtract.compareTo(BigDecimal.ZERO) > 0){ |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue()); |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue(),null); |
| | | return subtract; |
| | | } |
| | | return new BigDecimal(0); |
| | |
| | | if(multiply1.compareTo(new BigDecimal(d)) >= 0 && multiply1.compareTo(new BigDecimal(g)) < 0){ |
| | | //司机收入 |
| | | BigDecimal subtract = new BigDecimal(payMoney).subtract(multiply1); |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue()); |
| | | saveData(1, 1, 2, orderId, orderType, multiply1.doubleValue()); |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue(),null); |
| | | saveData(1, 1, 2, orderId, orderType, multiply1.doubleValue(),null); |
| | | return subtract; |
| | | } |
| | | if(multiply1.compareTo(new BigDecimal(g)) >= 0){ |
| | | //司机收入 |
| | | BigDecimal subtract = new BigDecimal(payMoney).subtract(new BigDecimal(g)); |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue()); |
| | | saveData(1, 1, 2, orderId, orderType, g); |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue(),null); |
| | | saveData(1, 1, 2, orderId, orderType, g,null); |
| | | return subtract; |
| | | } |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.system.dao.TaxiCardMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.system.util.GDMapGeocodingUtil; |
| | | import com.stylefeng.guns.modular.system.util.PayMoneyUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | |
| | | |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, taxiCardPayment.getCompanyId(), 5, taxiCardPayment.getId(), null, taxiCardPayment.getPayMoney()); |
| | | incomeService.saveData(1, taxiCardPayment.getCompanyId(), 5, taxiCardPayment.getId(), null, taxiCardPayment.getPayMoney(),null); |
| | | systemNoticeService.addSystemNotice(1, "您已使用余额成功完成出行卡支付,谢谢使用!", uid, 1); |
| | | } |
| | | if(payType==4){ |
| | |
| | | } |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, taxiCardPayment.getCompanyId(), 5, taxiCardPayment.getId(), null, taxiCardPayment.getPayMoney()); |
| | | incomeService.saveData(1, taxiCardPayment.getCompanyId(), 5, taxiCardPayment.getId(), null, taxiCardPayment.getPayMoney(),null); |
| | | systemNoticeService.addSystemNotice(1, "您已使用" + (taxiCardPayment.getPayType() == 1 ? "微信" : (taxiCardPayment.getPayType()==2?"支付宝":"云闪付")) + "成功完成出行卡支付,谢谢使用!", taxiCardPayment.getUserId(), 1); |
| | | System.out.println("wxdck okok"); |
| | | }catch (Exception e){ |
| | |
| | | import com.stylefeng.guns.core.util.JwtTokenUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.account.controller.AppOrderController; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.system.dao.*; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.crypto.Cipher; |
| | |
| | | for(Map<String, Object> map : query){ |
| | | if(Double.valueOf(String.valueOf(map.get("money"))).compareTo(0D) > 0){ |
| | | bigDecimal = bigDecimal.add(new BigDecimal(String.valueOf(map.get("money")))); |
| | | incomeService.saveData(2, driver.getId(), 1, Integer.valueOf(String.valueOf(map.get("id"))), null, Double.valueOf(String.valueOf(map.get("money")))); |
| | | incomeService.saveData(2, driver.getId(), 1, Integer.valueOf(String.valueOf(map.get("id"))), null, Double.valueOf(String.valueOf(map.get("money"))),null); |
| | | } |
| | | } |
| | | driver.setActivityMoney(bigDecimal.add(new BigDecimal(null == driver.getActivityMoney() ? 0 : driver.getActivityMoney())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | @TableField("bindId") |
| | | private String bindId; |
| | | |
| | | |
| | | |
| | | private String splitAllocation; |
| | | |
| | | @TableField("outTradeNo") |
| | | private String outTradeNo; |
| | | |
| | | public String getOutTradeNo() { |
| | | return outTradeNo; |
| | | } |
| | | |
| | | public void setOutTradeNo(String outTradeNo) { |
| | | this.outTradeNo = outTradeNo; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payOrderTaxiCallback(Integer id, String order_id, Integer type,Integer paymentId) throws Exception; |
| | | void payOrderTaxiCallback(Integer id, String order_id, Integer type,Integer paymentId,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payCancelOrderTaxi(Integer id, String order_id, Integer type) throws Exception; |
| | | void payCancelOrderTaxi(Integer id, String order_id, Integer type,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity; |
| | | import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; |
| | | import com.stylefeng.guns.modular.crossCity.server.impl.OrderCrossCityServiceImpl; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongPayUtil; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.specialTrain.dao.OrderPrivateCarMapper; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | |
| | | import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; |
| | | import com.stylefeng.guns.modular.taxi.service.IPaymentRecordService; |
| | | import com.stylefeng.guns.modular.taxi.service.ITransactionDetailsService; |
| | | import org.bouncycastle.crypto.tls.MACAlgorithm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpEntity; |
| | |
| | | orderCancelService.updateById(orderCancel); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderTaxi.getCompanyId(), 3, orderTaxi.getId(), 2, query.getMoney()); |
| | | incomeService.saveData(1, orderTaxi.getCompanyId(), 3, orderTaxi.getId(), 2, query.getMoney(),null); |
| | | |
| | | this.deleteTask(id);//删除定时任务 |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void payOrderTaxiCallback(Integer id, String order_id, Integer type,Integer paymentId) throws Exception { |
| | | public void payOrderTaxiCallback(Integer id, String order_id, Integer type,Integer paymentId,String out_trade_no) throws Exception { |
| | | OrderTaxi orderTaxi = this.selectById(id); |
| | | orderTaxi.setOutTradeNo(out_trade_no); |
| | | PaymentRecord query = paymentRecordService.query(1, orderTaxi.getUserId(), 1, Integer.valueOf(id), 2, type, 1); |
| | | if(null != query && query.getState() == 1){ |
| | | //添加交易明细 |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void payCancelOrderTaxi(Integer id, String order_id, Integer type) throws Exception { |
| | | public void payCancelOrderTaxi(Integer id, String order_id, Integer type,String out_trade_no) throws Exception { |
| | | OrderTaxi orderTaxi = this.selectById(id); |
| | | orderTaxi.setOutTradeNo(out_trade_no); |
| | | PaymentRecord query = paymentRecordService.query(1, orderTaxi.getUserId(), 1, Integer.valueOf(id), 2, type, 1); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | |
| | | } |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderTaxi.getCompanyId(), 3, orderTaxi.getId(), 2, query.getAmount()); |
| | | incomeService.saveData(1, orderTaxi.getCompanyId(), 3, orderTaxi.getId(), 2, query.getAmount(),out_trade_no); |
| | | |
| | | this.deleteTask(orderTaxi.getId());//删除定时任务 |
| | | |
| | |
| | | this.updateById(orderTaxi); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderTaxi.getDriverId(), 6, orderTaxi.getId(), 2, money); |
| | | incomeService.saveData(2, orderTaxi.getDriverId(), 6, orderTaxi.getId(), 2, money,null); |
| | | Driver driver = driverService.selectById(orderTaxi.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception { |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception { |
| | | OrderTaxi orderTaxi = this.selectById(orderId); |
| | | UserInfo userInfo = userInfoService.selectById(orderTaxi.getUserId()); |
| | | PaymentRecord query = paymentRecordService.query(3, userInfo.getId(), 1, orderId, 2, payType, 1); |
| | |
| | | this.updateById(orderTaxi); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderTaxi.getDriverId(), 6, orderTaxi.getId(), 2, query.getAmount()); |
| | | incomeService.saveData(2, orderTaxi.getDriverId(), 6, orderTaxi.getId(), 2, query.getAmount(),out_trade_no); |
| | | Driver driver = driverService.selectById(orderTaxi.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(new BigDecimal(query.getAmount())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(new BigDecimal(query.getAmount())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |