提交 a07bb4cb authored 作者: liuhaiquan's avatar liuhaiquan

Merge remote-tracking branch 'origin/test' into test

...@@ -29,9 +29,12 @@ public class OwnerCaseOutParam { ...@@ -29,9 +29,12 @@ public class OwnerCaseOutParam {
@ApiModelProperty(value = "账户类型: 1:保证金 2:预付运费", example = "1") @ApiModelProperty(value = "账户类型: 1:保证金 2:预付运费", example = "1")
private Integer accountType; private Integer accountType;
@ApiModelProperty(value = "提现银行", example = "浙江银行") @ApiModelProperty(value = "提现银行开户行", example = "浙江银行开户行")
private String ownerOpenBank; private String ownerOpenBank;
@ApiModelProperty(value = "提现银行", example = "浙江银行")
private String ownerAccountBank;
@ApiModelProperty(value = "提现银行卡号", example = "62213545878787") @ApiModelProperty(value = "提现银行卡号", example = "62213545878787")
private String ownerBankAccount; private String ownerBankAccount;
......
...@@ -65,16 +65,16 @@ public class TempYftBankController { ...@@ -65,16 +65,16 @@ public class TempYftBankController {
* 订单支付模式 * 订单支付模式
*/ */
public static void bankTest() throws Exception { public static void bankTest() throws Exception {
ClassPathResource classPathResource = new ClassPathResource("bank/config-nbbank.json"); // ClassPathResource classPathResource = new ClassPathResource("bank/config-nbbank.json");
InputStream inputStream = null; // InputStream inputStream = null;
try { // try {
inputStream = classPathResource.getInputStream(); // inputStream = classPathResource.getInputStream();
boolean initResult = NBOpenSDK.init(inputStream); // boolean initResult = NBOpenSDK.init(inputStream);
log.info("NBSDK初始化状态:{}", initResult); // log.info("NBSDK初始化状态:{}", initResult);
log.info("sdk版本信息:{}", NBOpenSDK.getVersionInfo()); // log.info("sdk版本信息:{}", NBOpenSDK.getVersionInfo());
} catch (IOException e) { // } catch (IOException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
unionPayDirectOrder(); unionPayDirectOrder();
} }
...@@ -281,16 +281,16 @@ public class TempYftBankController { ...@@ -281,16 +281,16 @@ public class TempYftBankController {
* 转账直连下单 * 转账直连下单
*/ */
public static void bankTest1() throws Exception { public static void bankTest1() throws Exception {
ClassPathResource classPathResource = new ClassPathResource("bank/config-nbbank.json"); // ClassPathResource classPathResource = new ClassPathResource("bank/config-nbbank.json");
InputStream inputStream = null; // InputStream inputStream = null;
try { // try {
inputStream = classPathResource.getInputStream(); // inputStream = classPathResource.getInputStream();
boolean initResult = NBOpenSDK.init(inputStream); // boolean initResult = NBOpenSDK.init(inputStream);
log.info("NBSDK初始化状态:{}", initResult); // log.info("NBSDK初始化状态:{}", initResult);
log.info("sdk版本信息:{}", NBOpenSDK.getVersionInfo()); // log.info("sdk版本信息:{}", NBOpenSDK.getVersionInfo());
} catch (IOException e) { // } catch (IOException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
directBankTransferOrder(); directBankTransferOrder();
} }
......
...@@ -5,11 +5,14 @@ import com.nbopen.api.*; ...@@ -5,11 +5,14 @@ import com.nbopen.api.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.core.io.ClassPathResource;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -19,15 +22,66 @@ import java.util.Map; ...@@ -19,15 +22,66 @@ import java.util.Map;
@Api(tags = "宁波银行回调") @Api(tags = "宁波银行回调")
public class NbBankController { public class NbBankController {
static {
ClassPathResource classPathResource = new ClassPathResource("bank/config-nbbank.json");
InputStream inputStream = null;
try {
inputStream = classPathResource.getInputStream();
boolean initResult = NBOpenSDK.init(inputStream);
log.info("NBSDK初始化状态:{}", initResult);
log.info("sdk版本信息:{}", NBOpenSDK.getVersionInfo());
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* 解密后
* {
* "data": {
* "clearDate": "20231205",
* "merId": "EFT33021200556315",
* "merSeqNo": "20231205165038",
* "payMethod": "L",
* "pyerInfList": [
* {
* "coreSeqNo": "",
* "customerId": "",
* "pyerAcctBankName": "",
* "pyerAcctBankNo": "",
* "pyerAcctName": "黑玫瑰",
* "pyerAcctNo": "86041110000076809",
* "signNo": "00",
* "transAmt": "0.01",
* "transDtTm": "2023-12-05 16:54:22"
* }
* ],
* "realTrxAmt": "0.01",
* "transDate": "20231205",
* "transSeqNo": "2023120516503906838128gg6DOzjP",
* "transStatus": "00",
* "trxAmt": "0.01"
* },
* "head": {
* "rqsJrnlNo": "16071726224843844",
* "rspCode": "000000",
* "rspDate": "2023-12-05",
* "rspMsg": "处理成功",
* "rspTime": "17:13:43:943"
* }
* }
*/
@ApiOperation(value = "notify", notes = "<br>By:艾庆国") @ApiOperation(value = "notify", notes = "<br>By:艾庆国")
@RequestMapping(value = "/notify", method = RequestMethod.POST) @RequestMapping(value = "/notify", method = RequestMethod.POST)
public SDKResponse notify(@RequestBody Map<String, Object> body) throws Exception { public Object notify(@RequestBody Map<String, Object> body) throws Exception {
log.info("宁波银行回调, data:{}", JSON.toJSONString(body)); log.info("宁波银行回调, data:{}", JSON.toJSONString(body));
try { try {
RequestApiData requestApiData = new RequestApiData(); RequestApiData requestApiData = new RequestApiData();
requestApiData.setAppkey("77667c76_3503_4c04_95f7_fc10938c7942"); requestApiData.setAppkey("77667c76_3503_4c04_95f7_fc10938c7942");
requestApiData.setData(JSON.toJSONString(body)); requestApiData.setData(JSON.parseObject(JSON.toJSONString(body)));
requestApiData.setServiceId("notifyMerchant"); requestApiData.setServiceId("notifyMerchant");
RequestHead requestHead = new RequestHead(); RequestHead requestHead = new RequestHead();
...@@ -50,7 +104,7 @@ public class NbBankController { ...@@ -50,7 +104,7 @@ public class NbBankController {
return getResultSuc(); return getResultSuc();
} }
private SDKResponse getResultSuc() throws Exception { private Object getResultSuc() throws Exception {
Map<String, String> data = new HashMap<>(); Map<String, String> data = new HashMap<>();
data.put("errorCode", "000000"); data.put("errorCode", "000000");
...@@ -72,13 +126,13 @@ public class NbBankController { ...@@ -72,13 +126,13 @@ public class NbBankController {
SDKResponse result = NBOpenSDK.encryptMessage(request); SDKResponse result = NBOpenSDK.encryptMessage(request);
log.info("加密后: "+JSON.toJSONString(result)); log.info("加密后: "+JSON.toJSONString(result));
return result; return result.getData();
} }
private SDKResponse getResultFail() throws Exception { private Object getResultFail() throws Exception {
Map<String, String> data = new HashMap<>(); Map<String, String> data = new HashMap<>();
data.put("errorCode", "ER001"); data.put("errorCode", "ER001");
data.put("errorMsg", "成功"); data.put("errorMsg", "失败");
RequestApiData requestApiData = new RequestApiData(); RequestApiData requestApiData = new RequestApiData();
requestApiData.setAppkey("77667c76_3503_4c04_95f7_fc10938c7942"); requestApiData.setAppkey("77667c76_3503_4c04_95f7_fc10938c7942");
...@@ -96,7 +150,7 @@ public class NbBankController { ...@@ -96,7 +150,7 @@ public class NbBankController {
SDKResponse result = NBOpenSDK.encryptMessage(request); SDKResponse result = NBOpenSDK.encryptMessage(request);
log.info("加密后: "+JSON.toJSONString(result)); log.info("加密后: "+JSON.toJSONString(result));
return result; return result.getData();
} }
} }
...@@ -251,7 +251,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -251,7 +251,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
entity.setCaseOutBalance(caseOutBalance); entity.setCaseOutBalance(caseOutBalance);
entity.setOwnerUserNo(param.getOwnerUserNo()); entity.setOwnerUserNo(param.getOwnerUserNo());
entity.setStatus(OwnerAccountEnum.CaseOutStatus.PENDING_PAYMENT.getCode()); entity.setStatus(OwnerAccountEnum.CaseOutStatus.PENDING_PAYMENT.getCode());
entity.setCaseOutBank(param.getOwnerOpenBank()); entity.setCaseOutBank(param.getOwnerBankAccount());
entity.setCaseOutBankNumber(param.getOwnerBankAccount()); entity.setCaseOutBankNumber(param.getOwnerBankAccount());
entity.setCreateBy(loginUserInfo.getUserName()); entity.setCreateBy(loginUserInfo.getUserName());
......
...@@ -89,7 +89,7 @@ public class OwnerRunningWaterRecordSqlProvider { ...@@ -89,7 +89,7 @@ public class OwnerRunningWaterRecordSqlProvider {
public String prepaidFreightOwnerAccountPageList(@Param(value = "page") Page<OwnerAccountRunningWaterRecordVO> page, @Param("param") PageAppPrepaidFreightAccountParam param) { public String prepaidFreightOwnerAccountPageList(@Param(value = "page") Page<OwnerAccountRunningWaterRecordVO> page, @Param("param") PageAppPrepaidFreightAccountParam param) {
String sql = new SQL() {{ String sql = new SQL() {{
SELECT("a.id, a.owner_user_no," + SELECT("a.id, a.owner_user_no,a.relation_id" +
" a.owner_user_name,a.running_water_no, a.mobile, a.account_type, a.running_water_type,a.order_id,a.order_no,a.order_child_id,a.order_child_no,a.alteration_balance," + " a.owner_user_name,a.running_water_no, a.mobile, a.account_type, a.running_water_type,a.order_id,a.order_no,a.order_child_id,a.order_child_no,a.alteration_balance," +
" a.account_balance,a.usable_balance,a.take_out_balance,a.frozen_balance,a.create_by,date_format(a.create_time, '%Y-%m-%d %H:%i:%s') as create_time"); " a.account_balance,a.usable_balance,a.take_out_balance,a.frozen_balance,a.create_by,date_format(a.create_time, '%Y-%m-%d %H:%i:%s') as create_time");
FROM("owner_running_water_record a"); FROM("owner_running_water_record a");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论