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

Merge remote-tracking branch 'origin/v10.7_borrowing_and_repayment_20240118'…

Merge remote-tracking branch 'origin/v10.7_borrowing_and_repayment_20240118' into v10.7_borrowing_and_repayment_20240118
package com.clx.performance.enums.nbbank;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import java.util.Optional;
public enum NbBankStatusEnum {
;
@Getter
@AllArgsConstructor
public enum Status {
TEMP(0, "中间态"),
SUCCESS(1, "交易成功"),
FAIL(2, "交易失败"),
ACCEPT(3, "交易已受理"),
INIT(4, "订单初始状态"),
NOT_FOUND(5, "交易不存在"),
TIMEOUT(6, "交易超时,须发起交易结果查询"),
;
private final Integer code;
private final String msg;
public static Optional<Status> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
public static String getMsgByCode(int code) {
return getByCode(code).map(Status::getMsg).orElse(null);
}
}
}
...@@ -31,7 +31,7 @@ public class NbBankOrderPayResultVO { ...@@ -31,7 +31,7 @@ public class NbBankOrderPayResultVO {
private String transSeqNo; private String transSeqNo;
@ApiModelProperty(value = "转账编号 (转账专用)", example = "123456") @ApiModelProperty(value = "转账编号 (转账专用)", example = "123456")
private String signNo; private String signNo;
@ApiModelProperty(value = "关单时间 (转账专用)", example = "") @ApiModelProperty(value = "关单时间", example = "")
private String closeDtTm; private String closeDtTm;
} }
\ No newline at end of file
...@@ -34,6 +34,6 @@ public class NbBankOrderResultVO { ...@@ -34,6 +34,6 @@ public class NbBankOrderResultVO {
private String signNo; private String signNo;
@ApiModelProperty(value = "交易状态:1交易成功 2交易失败 3交易已受理 4订单初始状态 5交易不存在 6交易超时", example = "1") @ApiModelProperty(value = "交易状态:1交易成功 2交易失败 3交易已受理 4订单初始状态 5交易不存在 6交易超时", example = "1")
private Integer transStatus; private Integer status;
} }
\ No newline at end of file
package com.clx.performance.component;
import com.clx.order.feign.OrderFeign;
import com.clx.order.vo.feign.FeignOrderInfoVO;
import com.clx.order.vo.pc.owner.OwnerQuotationDetailVO;
import com.clx.performance.dao.OrderChildDao;
import com.clx.performance.dao.OwnerRunningWaterRecordDao;
import com.clx.performance.dao.loan.OwnerLoanAccountDao;
import com.clx.performance.dao.loan.OwnerRepaymentDao;
import com.clx.performance.enums.OrderGoodsOverWeightEnum;
import com.clx.performance.enums.OwnerAccountEnum;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.enums.loan.OwnerRePaymentEnum;
import com.clx.performance.model.OrderChild;
import com.clx.performance.model.OrderGoods;
import com.clx.performance.model.OwnerRunningWaterRecord;
import com.clx.performance.model.loan.OwnerLoanAccount;
import com.clx.performance.model.loan.OwnerRepayment;
import com.clx.user.vo.feign.OwnerInfoFeignVO;
import com.msl.common.base.Optional;
import com.msl.common.exception.ServiceSystemException;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.util.List;
@Component
@AllArgsConstructor
public class OrderChildLoanComponent {
private final OrderFeign orderFeign;
private final OwnerRunningWaterRecordDao ownerRunningWaterRecordDao;
private final OrderChildDao orderChildDao;
private final OwnerLoanAccountDao ownerLoanAccountDao;
private final OwnerRepaymentDao ownerRepaymentDao;
public void getChildDetermine(FeignOrderInfoVO orderInfoVO, OwnerInfoFeignVO ownerInfoFeignVO, OrderGoods orderGoods) {
OwnerQuotationDetailVO quotationDetailVO = orderFeign.getQuotationByOrderNo(orderInfoVO.getOrderNo()).getData();
BigDecimal freightFreezeRate = quotationDetailVO.getFreightFreezeRate();
if (freightFreezeRate.compareTo(BigDecimal.ONE) == 0) {
//百分百预付不需要考虑借款账户
return;
}
//发货-是否可超标准 0 否 1 是
Integer overWeight = orderInfoVO.getOverWeight();
if (OrderGoodsOverWeightEnum.NO.getCode().equals(overWeight)) {
determine(orderGoods.getPendingOrderFreight().multiply(new BigDecimal(35)));
} else {
determine(orderGoods.getPendingOrderFreight().multiply(new BigDecimal(50)));
}
}
public void determine(BigDecimal orderChildPrice) {
List<OwnerRunningWaterRecord> runningWaterRecordList = ownerRunningWaterRecordDao.getOwnerRunningWaterRecord("");
BigDecimal frozen = runningWaterRecordList.stream().filter(item -> {
return item.getRunningWaterType().equals(OwnerAccountEnum.RunningWaterStatus.FROZEN.getCode())
&& item.getAccountType().equals(OwnerAccountEnum.AccountTypeStatus.PREPAID_FREIGHT_ACCOUNT.getCode())
;
}).map(OwnerRunningWaterRecord::getAlterationBalance).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal takeOut = runningWaterRecordList.stream().filter(item -> {
return item.getRunningWaterType().equals(OwnerAccountEnum.RunningWaterStatus.TAKE_OUT.getCode())
&& item.getAccountType().equals(OwnerAccountEnum.AccountTypeStatus.PREPAID_FREIGHT_ACCOUNT.getCode())
;
}).map(OwnerRunningWaterRecord::getAlterationBalance).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal subtract = frozen.subtract(takeOut);
if (subtract.compareTo(BigDecimal.ZERO) > 0) {
//查询未结算的运单(没有产生扣除流水的运单)
List<OrderChild> orderChildList = orderChildDao.selectInTransitOrderChildLtUnsettle("");
BigDecimal orderChildSum = orderChildList.stream().map(OrderChild::getWeight).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal ans = subtract.subtract(orderChildSum);
if (ans.compareTo(BigDecimal.ZERO) >= 0 && ans.compareTo(orderChildPrice) >= 0) {
//预付运费够
return;
}
}
// 进行借款判断
OwnerLoanAccount ownerLoanAccount = ownerLoanAccountDao.getOneByField(OwnerLoanAccount::getOwnerUserNo, null).get();
BigDecimal ownerLoanAccountSum = ownerLoanAccount.getVirtuallyUsableBalance().add(ownerLoanAccount.getFundingUsableBalance());
if (ownerLoanAccountSum.compareTo(orderChildPrice) < 0) {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_SAVE_FAIL, "货主已欠款");
}
//借款账户钱够,判断是否逾期
Optional<OwnerRepayment> optional = ownerRepaymentDao.getLimitOneByField(OwnerRepayment::getBeOverdue, OwnerRePaymentEnum.BeOverdue.YES.getCode());
if (optional.isPresent()) {
//逾期:不允许
throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_SAVE_FAIL, "货主已欠款");
}
}
}
...@@ -7,6 +7,7 @@ import com.msl.common.exception.ServiceSystemException; ...@@ -7,6 +7,7 @@ import com.msl.common.exception.ServiceSystemException;
import com.msl.common.utils.DateUtils; import com.msl.common.utils.DateUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.redisson.api.RLock; import org.redisson.api.RLock;
import org.redisson.api.RedissonClient; import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -76,7 +76,7 @@ public class TempBankController { ...@@ -76,7 +76,7 @@ public class TempBankController {
@RequestMapping(value = "/notify", method = RequestMethod.POST) @RequestMapping(value = "/notify", method = RequestMethod.POST)
public Result notify(NbBankOrderResultVO param) { public Result notify(NbBankOrderResultVO param) {
bankService.orderPayCallback(param.getMerSeqNo(), param.getTransSeqNo(), bankService.orderPayCallback(param.getMerSeqNo(), param.getTransSeqNo(),
param.getAmount(), param.getAmount(), param.getTransStatus(), param.getSignNo()); param.getAmount(), param.getAmount(), param.getStatus(), param.getSignNo());
return Result.ok(); return Result.ok();
} }
......
...@@ -43,29 +43,29 @@ public class TempController { ...@@ -43,29 +43,29 @@ public class TempController {
@ApiOperation(value = "test", notes = "<br>By:艾庆国") @ApiOperation(value = "test", notes = "<br>By:艾庆国")
@RequestMapping(value = "/test", method = RequestMethod.GET) @RequestMapping(value = "/test", method = RequestMethod.GET)
public Result<OrderChildLineStatisticsVO> test(Integer sendAddressId, Integer receiveAddressId) { public Result test() {
return Result.ok(carrierOrderChildService.getLineStatistics(sendAddressId, receiveAddressId));
}
@ApiOperation(value = "更新网运标识", notes = "<br>By:艾庆国")
@RequestMapping(value = "/updateInvoiceType", method = RequestMethod.POST)
public Result<Void> updateInvoiceType(String childNo, Integer invoiceType) {
tempService.updateInvoiceType(childNo, invoiceType);
return Result.ok(); return Result.ok();
} }
// @ApiOperation(value = "更新网运标识", notes = "<br>By:艾庆国")
// @RequestMapping(value = "/updateInvoiceType", method = RequestMethod.POST)
// public Result<Void> updateInvoiceType(String childNo, Integer invoiceType) {
//
// tempService.updateInvoiceType(childNo, invoiceType);
//
// return Result.ok();
// }
@ApiOperation(value = "司机违约结算单完成 (临时接口)", notes = "<br>By:艾庆国")
@RequestMapping(value = "/updateBreakContractDriverSettlementFinish", method = RequestMethod.POST)
public Result<Void> updateBreakContractDriverSettlementFinish(String settlementNo) {
tempService.updateBreakContractDriverSettlementFinish(settlementNo);
return Result.ok(); // @ApiOperation(value = "司机违约结算单完成 (临时接口)", notes = "<br>By:艾庆国")
} // @RequestMapping(value = "/updateBreakContractDriverSettlementFinish", method = RequestMethod.POST)
// public Result<Void> updateBreakContractDriverSettlementFinish(String settlementNo) {
//
// tempService.updateBreakContractDriverSettlementFinish(settlementNo);
//
// return Result.ok();
// }
@ApiOperation(value = "测试支付划账 (临时接口)", notes = "<br>By:胡宁宁") @ApiOperation(value = "测试支付划账 (临时接口)", notes = "<br>By:胡宁宁")
@RequestMapping(value = "/paymentTest", method = RequestMethod.GET) @RequestMapping(value = "/paymentTest", method = RequestMethod.GET)
...@@ -90,35 +90,35 @@ public class TempController { ...@@ -90,35 +90,35 @@ public class TempController {
// return Result.ok(); // return Result.ok();
// } // }
@ApiOperation(value = "运单支付运费同步 (临时接口)", notes = "<br>By:艾庆国") // @ApiOperation(value = "运单支付运费同步 (临时接口)", notes = "<br>By:艾庆国")
@RequestMapping(value = "/orderChildPaySync", method = RequestMethod.POST) // @RequestMapping(value = "/orderChildPaySync", method = RequestMethod.POST)
public Result<Void> orderChildPaySync(@RequestBody OrderChildPaySyncParam param) { // public Result<Void> orderChildPaySync(@RequestBody OrderChildPaySyncParam param) {
//
HttpDTO httpDTO = transportFeignService.orderChildPaySync(param); // HttpDTO httpDTO = transportFeignService.orderChildPaySync(param);
String decrypt = ThirdComponent.decrypt(httpDTO.getData()); // String decrypt = ThirdComponent.decrypt(httpDTO.getData());
log.info("{}", decrypt); // log.info("{}", decrypt);
return Result.ok(); // return Result.ok();
} // }
@ApiOperation(value = "货主结算单同步 (临时接口)", notes = "<br>By:艾庆国")
@RequestMapping(value = "/ownerSettlementSync", method = RequestMethod.POST)
public Result<Void> ownerSettlementSync(@RequestBody OwnerSettlementSyncParam param) {
HttpDTO httpDTO = transportFeignService.ownerSettlementSync(param); // @ApiOperation(value = "货主结算单同步 (临时接口)", notes = "<br>By:艾庆国")
String decrypt = ThirdComponent.decrypt(httpDTO.getData()); // @RequestMapping(value = "/ownerSettlementSync", method = RequestMethod.POST)
log.info("{}", decrypt); // public Result<Void> ownerSettlementSync(@RequestBody OwnerSettlementSyncParam param) {
return Result.ok(); //
} // HttpDTO httpDTO = transportFeignService.ownerSettlementSync(param);
// String decrypt = ThirdComponent.decrypt(httpDTO.getData());
// log.info("{}", decrypt);
// return Result.ok();
// }
@ApiOperation(value = "获取风控状态 (临时接口)", notes = "<br>By:艾庆国") // @ApiOperation(value = "获取风控状态 (临时接口)", notes = "<br>By:艾庆国")
@RequestMapping(value = "/getRiskStatus", method = RequestMethod.POST) // @RequestMapping(value = "/getRiskStatus", method = RequestMethod.POST)
public Result<Void> getRiskStatus(String childNo) { // public Result<Void> getRiskStatus(String childNo) {
ThirdOrderChildRiskStatusParam param = ThirdOrderChildRiskStatusParam.builder().build(); // ThirdOrderChildRiskStatusParam param = ThirdOrderChildRiskStatusParam.builder().build();
param.setChildNo(childNo); // param.setChildNo(childNo);
HttpDTO httpDTO = transportFeignService.getRiskStatus(param); // HttpDTO httpDTO = transportFeignService.getRiskStatus(param);
String decrypt = ThirdComponent.decrypt(httpDTO.getData()); // String decrypt = ThirdComponent.decrypt(httpDTO.getData());
log.info("{}", decrypt); // log.info("{}", decrypt);
return Result.ok(); // return Result.ok();
} // }
} }
...@@ -7,6 +7,7 @@ import com.nbopen.api.*; ...@@ -7,6 +7,7 @@ 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.apache.commons.lang.exception.ExceptionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
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;
...@@ -37,7 +38,7 @@ public class NbBankController { ...@@ -37,7 +38,7 @@ public class NbBankController {
nbBankNotifyService.payNotify(JSON.toJSONString(body)); nbBankNotifyService.payNotify(JSON.toJSONString(body));
return getResultSuc(); return getResultSuc();
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); log.info("宁波银行回调失败:{}", ExceptionUtils.getStackTrace(e));
return getResultFail(); return getResultFail();
} }
} }
......
package com.clx.performance.model.loan; package com.clx.performance.model.loan;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.msl.common.config.KeyColumn; import com.msl.common.config.KeyColumn;
import com.msl.common.model.HasKey; import com.msl.common.model.HasKey;
...@@ -8,11 +10,9 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -8,11 +10,9 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.io.Serializable;
/** /**
* @author kavin * @author kavin
...@@ -44,13 +44,29 @@ public class OwnerLoanAccount implements HasKey<Integer> { ...@@ -44,13 +44,29 @@ public class OwnerLoanAccount implements HasKey<Integer> {
@ApiModelProperty("账户类型: 默认3 借款账户") @ApiModelProperty("账户类型: 默认3 借款账户")
private Integer accountType; private Integer accountType;
@TableField("funding_amount") @TableField("funding_account_balance")
@ApiModelProperty("资金金额") @ApiModelProperty("资金账户金额")
private BigDecimal fundingAmount; private BigDecimal fundingAccountBalance;
@TableField("funding_usable_balance")
@ApiModelProperty("资金可用金额")
private BigDecimal fundingUsableBalance;
@TableField("funding_frozen_balance")
@ApiModelProperty("资金冻结金额")
private BigDecimal fundingFrozenBalance;
@TableField("virtually_account_balance")
@ApiModelProperty("虚拟币账户金额")
private BigDecimal virtuallyAccountBalance;
@TableField("virtually_usable_balance")
@ApiModelProperty("虚拟币可用余额")
private BigDecimal virtuallyUsableBalance;
@TableField("virtually_amount") @TableField("virtually_frozen_balance")
@ApiModelProperty("虚拟币额") @ApiModelProperty("虚拟币冻结余额")
private BigDecimal virtuallyAmount; private BigDecimal virtuallyFrozenBalance;
@TableField("funding_arrears") @TableField("funding_arrears")
@ApiModelProperty("资金欠款") @ApiModelProperty("资金欠款")
...@@ -75,6 +91,6 @@ public class OwnerLoanAccount implements HasKey<Integer> { ...@@ -75,6 +91,6 @@ public class OwnerLoanAccount implements HasKey<Integer> {
@Override @Override
@KeyColumn("id") @KeyColumn("id")
public Integer gainKey() { public Integer gainKey() {
return this.id; return this.id;
} }
} }
...@@ -312,6 +312,9 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -312,6 +312,9 @@ public class OrderChildServiceImpl implements OrderChildService {
throw new ServiceSystemException(PerformanceResultEnum.ORDER_WEIGHT_LACK); throw new ServiceSystemException(PerformanceResultEnum.ORDER_WEIGHT_LACK);
} }
//TODO 借款账户相关限制
OrderChild orderChild = new OrderChild(); OrderChild orderChild = new OrderChild();
orderChild.setChildNo(childNo); orderChild.setChildNo(childNo);
orderChild.setUserNo(userNo); orderChild.setUserNo(userNo);
......
...@@ -39,10 +39,15 @@ public class OwnerLoanAccountServiceImpl implements OwnerLoanAccountService { ...@@ -39,10 +39,15 @@ public class OwnerLoanAccountServiceImpl implements OwnerLoanAccountService {
entity.setOwnerUserNo(ownerUserNo); entity.setOwnerUserNo(ownerUserNo);
entity.setMobile(mobile); entity.setMobile(mobile);
entity.setOwnerUserName(ownerUserName); entity.setOwnerUserName(ownerUserName);
entity.setFundingAmount(BigDecimal.ZERO); entity.setFundingAccountBalance(BigDecimal.ZERO);
entity.setFundingAmount(BigDecimal.ZERO); entity.setFundingFrozenBalance(BigDecimal.ZERO);
entity.setVirtuallyAmount(BigDecimal.ZERO); entity.setFundingUsableBalance(BigDecimal.ZERO);
entity.setFundingArrears(BigDecimal.ZERO);
entity.setVirtuallyArrears(BigDecimal.ZERO); entity.setVirtuallyArrears(BigDecimal.ZERO);
entity.setVirtuallyAccountBalance(BigDecimal.ZERO);
entity.setVirtuallyUsableBalance(BigDecimal.ZERO);
entity.setVirtuallyFrozenBalance(BigDecimal.ZERO);
ownerLoanAccountDao.saveEntity(entity); ownerLoanAccountDao.saveEntity(entity);
} }
......
...@@ -156,8 +156,8 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService { ...@@ -156,8 +156,8 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
ownerLoanRecord.getOwnerUserNo()).get(); ownerLoanRecord.getOwnerUserNo()).get();
OwnerLoanAccount entity = new OwnerLoanAccount(); OwnerLoanAccount entity = new OwnerLoanAccount();
entity.setId(ownerLoanAccount.getId()); entity.setId(ownerLoanAccount.getId());
entity.setVirtuallyAmount(ownerLoanRecord.getLoanBalance()); /* entity.setVirtuallyAmount(ownerLoanRecord.getLoanBalance());
entity.setFundingAmount(BigDecimal.ZERO); entity.setFundingAmount(BigDecimal.ZERO);*/
entity.setModifiedTime(ownerLoanAccount.getModifiedTime()); entity.setModifiedTime(ownerLoanAccount.getModifiedTime());
Integer flag = ownerLoanAccountDao.updateAccountCAS(entity, LocalDateTime.now(), true); Integer flag = ownerLoanAccountDao.updateAccountCAS(entity, LocalDateTime.now(), true);
if (flag == 1) { if (flag == 1) {
...@@ -201,7 +201,7 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService { ...@@ -201,7 +201,7 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
.setLoanNo(ownerLoanRecord.getLoanNo()) .setLoanNo(ownerLoanRecord.getLoanNo())
.setRunningWaterType(RunningWaterTypeEnum.Status.LOAN.getCode()) .setRunningWaterType(RunningWaterTypeEnum.Status.LOAN.getCode())
.setAlterationBalance(ownerLoanRecord.getLoanBalance()) .setAlterationBalance(ownerLoanRecord.getLoanBalance())
.setAccountBalance(ownerLoanAccount.getFundingAmount().add(ownerLoanAccount.getVirtuallyAmount())) .setAccountBalance(ownerLoanAccount.getFundingAccountBalance().add(ownerLoanAccount.getVirtuallyAccountBalance()))
.setCreateBy("系统"); .setCreateBy("系统");
ownerLoanAccountRunningWaterRecordDao.saveEntity(record); ownerLoanAccountRunningWaterRecordDao.saveEntity(record);
} }
......
...@@ -62,13 +62,9 @@ public class SettlementServiceImpl implements SettlementService { ...@@ -62,13 +62,9 @@ public class SettlementServiceImpl implements SettlementService {
SettlementOwnerDetail settlementOwnerDetail = settlementOwnerDetailDao.getByChildNo(childNo).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND); SettlementOwnerDetail settlementOwnerDetail = settlementOwnerDetailDao.getByChildNo(childNo).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
SettlementDriverDetail settlementDriverDetail = settlementDriverDetailDao.getByChildNo(childNo).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND); SettlementDriverDetail settlementDriverDetail = settlementDriverDetailDao.getByChildNo(childNo).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
if (settlementOwnerDetail.getInvoiceType() != null) {
return;
}
// 开票金额 // 开票金额
settlementOwnerDetail.setInvoiceFreight(invoiceFreightCalc(orderChild.getSettlementWay(), settlementOwnerDetail)); settlementOwnerDetail.setInvoiceFreight(invoiceFreightCalc(orderChild.getSettlementWay(), settlementOwnerDetail));
if (settlementDriverDetail.getSettlementFreight().compareTo(BigDecimal.ZERO) <= 0) { if (settlementDriverDetail.getSettlementFreight().compareTo(BigDecimal.ZERO) <= 0) {
invoiceType = SettlementOwnerEnum.InvoiceType.ORDINARY.getCode();
settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode()); settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO); settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
} else { } else {
...@@ -77,71 +73,6 @@ public class SettlementServiceImpl implements SettlementService { ...@@ -77,71 +73,6 @@ public class SettlementServiceImpl implements SettlementService {
RabbitKeyConstants.ORDER_CHILD_SYNC_TRANSPORT_EXCHANGE, RabbitKeyConstants.ORDER_CHILD_SYNC_TRANSPORT_ROUTE_KEY, message RabbitKeyConstants.ORDER_CHILD_SYNC_TRANSPORT_EXCHANGE, RabbitKeyConstants.ORDER_CHILD_SYNC_TRANSPORT_ROUTE_KEY, message
); );
return; return;
// OrderGoods orderGoods = orderGoodsDao.getByOrderGoodsNo(orderChild.getOrderGoodsNo()).get();
// //是否通过风控,调用网络货运
// ThirdOrderChildBrokerParam param = transportSyncService.generateOrderChildSync(orderChild, orderGoods, settlementOwnerDetail, settlementDriverDetail);
// HttpDTO httpDTOResult = transportFeignService.orderChildSync(param);
// String decrypt = ThirdComponent.decrypt(httpDTOResult.getData());
// OrderChildSyncDTO bean = JSONUtil.toBean(decrypt, OrderChildSyncDTO.class);
// log.info("OrderChildSyncDTO信息为:{}", JSONUtil.parse(bean));
// if (bean.getCode() == 0) {
// Integer status = bean.getData().getStatus();
// if (status == 1) {
// //通过风控
// List<OwnerRunningWaterRecord> runningWaterRecordList = ownerRunningWaterRecordDao.getOwnerRunningWaterRecord(orderChild.getOrderNo());
// BigDecimal frozen = runningWaterRecordList.stream().filter(item -> {
// return item.getRunningWaterType().equals(OwnerAccountEnum.RunningWaterStatus.FROZEN.getCode())
// && item.getAccountType().equals(OwnerAccountEnum.AccountTypeStatus.PREPAID_FREIGHT_ACCOUNT.getCode())
// ;
// }).map(OwnerRunningWaterRecord::getAlterationBalance).reduce(BigDecimal.ZERO, BigDecimal::add);
//
// BigDecimal takeOut = runningWaterRecordList.stream().filter(item -> {
// return item.getRunningWaterType().equals(OwnerAccountEnum.RunningWaterStatus.TAKE_OUT.getCode())
// && item.getAccountType().equals(OwnerAccountEnum.AccountTypeStatus.PREPAID_FREIGHT_ACCOUNT.getCode())
// ;
// }).map(OwnerRunningWaterRecord::getAlterationBalance).reduce(BigDecimal.ZERO, BigDecimal::add);
// //设置预付运费金额
// BigDecimal ans = getPrepayFreightPay(orderChild.getSettlementWay(), settlementOwnerDetail, frozen);
// BigDecimal subtract = frozen.subtract(takeOut);
// log.info("冻结预付运费:{}, 扣除的流水总和:{}", frozen, takeOut);
// invoiceType = SettlementOwnerEnum.InvoiceType.ONLINE.getCode();
// settlementDriverDetail.setPrepayFreight(ans);
// //冻结的预付运费为0 或者 此刻预付运费也可能为0,那么就不用生成扣除相关流水逻辑
// if (subtract.compareTo(BigDecimal.ZERO) <= 0 || ans.compareTo(BigDecimal.ZERO) == 0) {
// settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
// settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
// } else {
// if (subtract.subtract(ans).compareTo(BigDecimal.ZERO) >= 0) {
// //账户扣钱并生成扣除流水
// generateTakeOutRunningWatter(orderChild, ans, settlementOwnerDetail, settlementDriverDetail);
// try {
// //网络货运钱包账户
// networkDriverRunningWaterRecordService.generateNetworkDriverRunningWaterRecord(
// settlementDriverDetail,
// NetworkDriverAccountEnum.RunningWaterStatus.SETTLEMENT.getCode()
// );
// //生成提现记录
// networkDriverRunningWaterRecordService.generateNetworkCaseOutRecord(settlementDriverDetail);
// }catch (Exception e) {
// log.info("运单同步网络货运生成司机运单结算流水失败:{}", e.getMessage());
// }
//
// } else {
// settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
// settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
//
// }
// }
//
// } else {
// settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
// settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
// settlementOwnerDetail.setFinalPaymentStatus(SettlementOwnerDetailEnum.FinalPaymentStatus.NO.getCode());
// }
// } else {
// throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_SYNC_ERROR);
//
// }
} }
// 结算金额 // 结算金额
......
...@@ -3,6 +3,7 @@ package com.clx.performance.service.impl.thirdparty.nbbank; ...@@ -3,6 +3,7 @@ package com.clx.performance.service.impl.thirdparty.nbbank;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.clx.performance.component.IdGenerateSnowFlake; import com.clx.performance.component.IdGenerateSnowFlake;
import com.clx.performance.enums.PerformanceResultEnum; import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.enums.nbbank.NbBankStatusEnum;
import com.clx.performance.service.thirdparty.nbbank.NbBankService; import com.clx.performance.service.thirdparty.nbbank.NbBankService;
import com.clx.performance.service.thirdparty.nbbank.NbBankThirdpartyService; import com.clx.performance.service.thirdparty.nbbank.NbBankThirdpartyService;
import com.clx.performance.utils.LocalDateTimeUtils; import com.clx.performance.utils.LocalDateTimeUtils;
...@@ -15,8 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -15,8 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
/** /**
* 易付通 * 易付通
...@@ -73,6 +72,7 @@ public class NbBankServiceImpl implements NbBankService { ...@@ -73,6 +72,7 @@ public class NbBankServiceImpl implements NbBankService {
String merSeqNo = idGenerateSnowFlake.nextIdToString(3L); String merSeqNo = idGenerateSnowFlake.nextIdToString(3L);
String merDtTm = LocalDateTimeUtils.formatTime(); String merDtTm = LocalDateTimeUtils.formatTime();
String closeDtTm = LocalDateTimeUtils.formatTime(LocalDateTimeUtils.parseTime(merDtTm).plusDays(30));
JSONObject data = bankThirdpartyService.unionPayDirectOrder(merSeqNo, merDtTm, amount, JSONObject data = bankThirdpartyService.unionPayDirectOrder(merSeqNo, merDtTm, amount,
payAcctOpenBankId,payAcctNo, payAcctNm); payAcctOpenBankId,payAcctNo, payAcctNm);
...@@ -86,6 +86,7 @@ public class NbBankServiceImpl implements NbBankService { ...@@ -86,6 +86,7 @@ public class NbBankServiceImpl implements NbBankService {
result.setMerDtTm(merDtTm); result.setMerDtTm(merDtTm);
result.setMerSeqNo(merSeqNo); result.setMerSeqNo(merSeqNo);
result.setTransSeqNo(transSeqNo); result.setTransSeqNo(transSeqNo);
result.setCloseDtTm(closeDtTm);
return result; return result;
} }
...@@ -101,20 +102,14 @@ public class NbBankServiceImpl implements NbBankService { ...@@ -101,20 +102,14 @@ public class NbBankServiceImpl implements NbBankService {
NbBankOrderResultVO result = new NbBankOrderResultVO(); NbBankOrderResultVO result = new NbBankOrderResultVO();
String transStatus = data.getString("transStatus"); String transStatus = data.getString("transStatus");
if (StringUtils.equals(transStatus, "00")){result.setTransStatus(1);} //交易成功
else if (StringUtils.equals(transStatus, "01")){result.setTransStatus(2);} //交易失败
else if (StringUtils.equals(transStatus, "02")){result.setTransStatus(3);} //交易已受理
else if (StringUtils.equals(transStatus, "80")){result.setTransStatus(4);} //订单初始状态
else if (StringUtils.equals(transStatus, "90")){result.setTransStatus(5);} //交易不存在
else if (StringUtils.equals(transStatus, "99")){result.setTransStatus(6);} //交易超时,须发起交易结果查询
BigDecimal trxAmt = data.getBigDecimal("trxAmt"); BigDecimal trxAmt = data.getBigDecimal("trxAmt");
BigDecimal realTrxAmt = data.getBigDecimal("realTrxAmt"); BigDecimal realTrxAmt = data.getBigDecimal("realTrxAmt");
String transSeqNo = data.getString("transSeqNo"); String transSeqNo = data.getString("transSeqNo");
String signNo = data.getString("signNo"); String signNo = data.getString("signNo");
result.setStatus(getStatus(transStatus));
result.setAmount(trxAmt==null? null : trxAmt.movePointLeft(2).intValue()); result.setAmount(trxAmt==null? null : trxAmt.movePointLeft(2).intValue());
result.setRealAmount(trxAmt==null? null : realTrxAmt.movePointLeft(2).intValue()); result.setRealAmount(realTrxAmt==null? null : realTrxAmt.movePointLeft(2).intValue());
result.setMerSeqNo(orgMerSeqNo); result.setMerSeqNo(orgMerSeqNo);
result.setTransSeqNo(transSeqNo); result.setTransSeqNo(transSeqNo);
result.setSignNo(signNo); result.setSignNo(signNo);
...@@ -137,15 +132,9 @@ public class NbBankServiceImpl implements NbBankService { ...@@ -137,15 +132,9 @@ public class NbBankServiceImpl implements NbBankService {
NbBankOrderResultVO result = new NbBankOrderResultVO(); NbBankOrderResultVO result = new NbBankOrderResultVO();
String transStatus = data.getString("transStatus"); String transStatus = data.getString("transStatus");
if (StringUtils.equals(transStatus, "00")){result.setTransStatus(1);} //交易成功
else if (StringUtils.equals(transStatus, "01")){result.setTransStatus(2);} //交易失败
else if (StringUtils.equals(transStatus, "02")){result.setTransStatus(3);} //交易已受理
else if (StringUtils.equals(transStatus, "80")){result.setTransStatus(4);} //订单初始状态
else if (StringUtils.equals(transStatus, "90")){result.setTransStatus(5);} //交易不存在
else if (StringUtils.equals(transStatus, "99")){result.setTransStatus(6);} //交易超时,须发起交易结果查询
String transSeqNo = data.getString("transSeqNo"); String transSeqNo = data.getString("transSeqNo");
result.setStatus(getStatus(transStatus));
result.setAmount(amount); result.setAmount(amount);
result.setRealAmount(amount); result.setRealAmount(amount);
result.setMerDtTm(merDtTm); result.setMerDtTm(merDtTm);
...@@ -157,7 +146,7 @@ public class NbBankServiceImpl implements NbBankService { ...@@ -157,7 +146,7 @@ public class NbBankServiceImpl implements NbBankService {
/** /**
* 退款 * 退款
* @Param type: 1普通退款 2银行转账退款 3银联订单支付撤单 * @Param type: 1普通退款(忽略) 2银行转账退款(支付成功) 3银联订单支付撤单(未支付)
* @param orgMerSeqNo 商户流水号(原) * @param orgMerSeqNo 商户流水号(原)
* @param amount 金额分 * @param amount 金额分
* @param orgTransSeqNo 第三方流水号 (原) * @param orgTransSeqNo 第三方流水号 (原)
...@@ -173,15 +162,9 @@ public class NbBankServiceImpl implements NbBankService { ...@@ -173,15 +162,9 @@ public class NbBankServiceImpl implements NbBankService {
NbBankOrderResultVO result = new NbBankOrderResultVO(); NbBankOrderResultVO result = new NbBankOrderResultVO();
String transStatus = data.getString("transStatus"); String transStatus = data.getString("transStatus");
if (StringUtils.equals(transStatus, "00")){result.setTransStatus(1);} //交易成功
else if (StringUtils.equals(transStatus, "01")){result.setTransStatus(2);} //交易失败
else if (StringUtils.equals(transStatus, "02")){result.setTransStatus(3);} //交易已受理
else if (StringUtils.equals(transStatus, "80")){result.setTransStatus(4);} //订单初始状态
else if (StringUtils.equals(transStatus, "90")){result.setTransStatus(5);} //交易不存在
else if (StringUtils.equals(transStatus, "99")){result.setTransStatus(6);} //交易超时,须发起交易结果查询
String transSeqNo = data.getString("transSeqNo"); String transSeqNo = data.getString("transSeqNo");
result.setStatus(getStatus(transStatus));
result.setAmount(amount); result.setAmount(amount);
result.setRealAmount(amount); result.setRealAmount(amount);
result.setMerDtTm(merDtTm); result.setMerDtTm(merDtTm);
...@@ -209,29 +192,11 @@ public class NbBankServiceImpl implements NbBankService { ...@@ -209,29 +192,11 @@ public class NbBankServiceImpl implements NbBankService {
merSeqNo, transSeqNo, trxAmt, realTrxAmt, transStatus, signNo); merSeqNo, transSeqNo, trxAmt, realTrxAmt, transStatus, signNo);
NbBankOrderResultVO result = new NbBankOrderResultVO(); NbBankOrderResultVO result = new NbBankOrderResultVO();
if (StringUtils.equals(transStatus, "00")){ //交易成功 result.setStatus(getStatus(transStatus));
result.setTransStatus(1);
}
if (StringUtils.equals(transStatus, "01")){ //交易失败
result.setTransStatus(2);
}
if (StringUtils.equals(transStatus, "02")){ //交易已受理
result.setTransStatus(3);
}
if (StringUtils.equals(transStatus, "80")){ //订单初始状态
result.setTransStatus(4);
}
if (StringUtils.equals(transStatus, "90")){ //交易不存在
result.setTransStatus(5);
}
if (StringUtils.equals(transStatus, "99")){ //交易超时,须发起交易结果查询
result.setTransStatus(6);
}
orderPayCallback(merSeqNo, transSeqNo, trxAmt, realTrxAmt, result.getTransStatus(), signNo); orderPayCallback(merSeqNo, transSeqNo, trxAmt, realTrxAmt, result.getStatus(), signNo);
} }
/** /**
* 银行回调 * 银行回调
* @param merSeqNo 商户流水号 * @param merSeqNo 商户流水号
...@@ -258,4 +223,19 @@ public class NbBankServiceImpl implements NbBankService { ...@@ -258,4 +223,19 @@ public class NbBankServiceImpl implements NbBankService {
return StringUtils.isBlank(signNo)? StringUtils.right(cardNo,7) : signNo; return StringUtils.isBlank(signNo)? StringUtils.right(cardNo,7) : signNo;
} }
/**
* 获取订单状态
*/
private Integer getStatus(String transStatus){
if (StringUtils.equals(transStatus, "00")){return NbBankStatusEnum.Status.SUCCESS.getCode();} //交易成功
else if (StringUtils.equals(transStatus, "01")){return NbBankStatusEnum.Status.FAIL.getCode();} //交易失败
else if (StringUtils.equals(transStatus, "02")){return NbBankStatusEnum.Status.ACCEPT.getCode();} //交易已受理
else if (StringUtils.equals(transStatus, "80")){return NbBankStatusEnum.Status.INIT.getCode();} //订单初始状态
else if (StringUtils.equals(transStatus, "90")){return NbBankStatusEnum.Status.NOT_FOUND.getCode();} //交易不存在
else if (StringUtils.equals(transStatus, "99")){return NbBankStatusEnum.Status.TIMEOUT.getCode();} //交易超时,须发起交易结果查询
return NbBankStatusEnum.Status.TEMP.getCode();
}
} }
...@@ -12,6 +12,7 @@ import com.clx.performance.utils.LocalDateTimeUtils; ...@@ -12,6 +12,7 @@ import com.clx.performance.utils.LocalDateTimeUtils;
import com.msl.common.exception.ServiceSystemException; import com.msl.common.exception.ServiceSystemException;
import com.nbopen.api.*; import com.nbopen.api.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.FileSystemResource;
...@@ -57,8 +58,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService { ...@@ -57,8 +58,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService {
log.info("宁波银行SDK初始化, 状态:{}", initResult); log.info("宁波银行SDK初始化, 状态:{}", initResult);
log.info("sdk版本信息:{}", NBOpenSDK.getVersionInfo()); log.info("sdk版本信息:{}", NBOpenSDK.getVersionInfo());
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); log.info("宁波银行SDK初始化失败:{}", ExceptionUtils.getStackTrace(e));
log.info("宁波银行SDK初始化失败");
} }
} }
...@@ -166,7 +166,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService { ...@@ -166,7 +166,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService {
return data; return data;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.info("宁波银行接口异常:{}", ExceptionUtils.getStackTrace(e));
} }
throw new ServiceSystemException(PerformanceResultEnum.NB_BANK_API_ERROR); throw new ServiceSystemException(PerformanceResultEnum.NB_BANK_API_ERROR);
...@@ -265,7 +265,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService { ...@@ -265,7 +265,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService {
return data; return data;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.info("宁波银行接口异常:{}", ExceptionUtils.getStackTrace(e));
} }
throw new ServiceSystemException(PerformanceResultEnum.NB_BANK_API_ERROR); throw new ServiceSystemException(PerformanceResultEnum.NB_BANK_API_ERROR);
...@@ -403,7 +403,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService { ...@@ -403,7 +403,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService {
return data; return data;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.info("宁波银行接口异常:{}", ExceptionUtils.getStackTrace(e));
} }
throw new ServiceSystemException(PerformanceResultEnum.NB_BANK_API_ERROR); throw new ServiceSystemException(PerformanceResultEnum.NB_BANK_API_ERROR);
...@@ -464,7 +464,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService { ...@@ -464,7 +464,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService {
return data; return data;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.info("宁波银行接口异常:{}", ExceptionUtils.getStackTrace(e));
} }
throw new ServiceSystemException(PerformanceResultEnum.NB_BANK_API_ERROR); throw new ServiceSystemException(PerformanceResultEnum.NB_BANK_API_ERROR);
...@@ -546,7 +546,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService { ...@@ -546,7 +546,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService {
return data; return data;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.info("宁波银行接口异常:{}", ExceptionUtils.getStackTrace(e));
} }
throw new ServiceSystemException(PerformanceResultEnum.NB_BANK_API_ERROR); throw new ServiceSystemException(PerformanceResultEnum.NB_BANK_API_ERROR);
......
...@@ -17,7 +17,7 @@ public class OwnerLoanAccountRunningWaterRecordSqlProvider { ...@@ -17,7 +17,7 @@ public class OwnerLoanAccountRunningWaterRecordSqlProvider {
SELECT(" id, owner_user_no as ownerUserNo, owner_user_name as ownerUserName, mobile, " + SELECT(" id, owner_user_no as ownerUserNo, owner_user_name as ownerUserName, mobile, " +
" running_water_no as runningWaterNo, loan_no as loanNo, child_no as childNo, " + " running_water_no as runningWaterNo, loan_no as loanNo, child_no as childNo, " +
" running_water_type as runningWaterType, " + " running_water_type as runningWaterType, " +
" alteration_balance as alterationBalance, account_balance as accountBalance, " + " alteration_balance as alterationBalance, useable_balance as useableBalance, frozen_balance as frozenBalance, account_balance as accountBalance, " +
" create_by as createBy, " + " create_by as createBy, " +
" date_format(create_time, '%Y-%m-%d %H:%i:%s') as createTime, " + " date_format(create_time, '%Y-%m-%d %H:%i:%s') as createTime, " +
" date_format(modified_time, '%Y-%m-%d %H:%i:%s') as modifiedTime " " date_format(modified_time, '%Y-%m-%d %H:%i:%s') as modifiedTime "
......
...@@ -15,16 +15,18 @@ public class OwnerLoanRecordSqlProvider { ...@@ -15,16 +15,18 @@ public class OwnerLoanRecordSqlProvider {
return new SQL(){{ return new SQL(){{
SELECT(" id, owner_user_no as ownerUserNo, owner_user_name as ownerUserName, mobile, " + SELECT(" id, owner_user_no as ownerUserNo, owner_user_name as ownerUserName, mobile, " +
" running_water_open_no as runningWaterOpenNo, " + " goods_name as goodsName, " +
" merchant_running_water_no as merchantRunningWaterNo, " + " running_water_open_no as runningWaterOpenNo, merchant_running_water_no as merchantRunningWaterNo, " +
" loan_no as loanNo, loan_type as loanType, loan_balance as loanBalance, " + " loan_no as loanNo, loan_type as loanType, loan_balance as loanBalance, " +
" borrower, borrower_account as borrowerAccount, " + " borrower, borrower_account as borrowerAccount, remittance_identification_code as remittanceIdentificationCode, " +
" lending_party as lendingParty, lending_party_account as lendingPartyAccount, " + " lending_party as lendingParty, lending_party_account as lendingPartyAccount, " +
" payee, payee_account as payeeAccount, " + " payee, payee_account as payeeAccount, " +
" status, " + " status, " +
" date_format(approve_time, '%Y-%m-%d %H:%i:%s') as approveTime, approve_by as approveBy, " + " date_format(approve_time, '%Y-%m-%d %H:%i:%s') as approveTime, approve_by as approveBy, " +
" reject_reason as rejectReason, date_format(loan_repayment_time, '%Y-%m-%d %H:%i:%s') as loanRepaymentTime, " + " reject_reason as rejectReason, date_format(loan_repayment_time, '%Y-%m-%d %H:%i:%s') as loanRepaymentTime, " +
" create_by as createBy, date_format(create_time, '%Y-%m-%d %H:%i:%s') as createTime, " + " pay_channel as payChannel, close_order_time as closeOrderTime, " +
" create_by as createBy, " +
" date_format(create_time, '%Y-%m-%d %H:%i:%s') as createTime, " +
" date_format(modified_time, '%Y-%m-%d %H:%i:%s') as modifiedTime " " date_format(modified_time, '%Y-%m-%d %H:%i:%s') as modifiedTime "
); );
......
...@@ -15,16 +15,16 @@ public class OwnerRepaymentSqlProvider { ...@@ -15,16 +15,16 @@ public class OwnerRepaymentSqlProvider {
return new SQL(){{ return new SQL(){{
SELECT(" id, owner_user_no as ownerUserNo, owner_user_name as ownerUserName, mobile, " + SELECT(" id, owner_user_no as ownerUserNo, owner_user_name as ownerUserName, mobile, " +
" running_water_open_no as runningWaterOpenNo, " + " running_water_open_no as runningWaterOpenNo, merchant_running_water_no as merchantRunningWaterNo, " +
" merchant_running_water_no as merchantRunningWaterNo, repayment_no as repaymentNo, repayment_balance as repaymentBalance, " + " repayment_no as repaymentNo, repayment_balance as repaymentBalance, " +
" payment, payment_account as paymentAccount, " + " payment, payment_account as paymentAccount, remittance_identification_code as remittanceIdentificationCode, " +
" date_format(payment_application_form_time, '%Y-%m-%d %H:%i:%s') as paymentApplicationFormTime, " +
" remittance_identification_code as remittanceIdentificationCode, " +
" goods_name as goodsName, " + " goods_name as goodsName, " +
" payee, payee_account as payeeAccount, loan_no as loanNo, status, pay_channel as payChannel, " + " payee, payee_account as payeeAccount, " +
" be_overdue as beOverdue, date_format(loan_repayment_time, '%Y-%m-%d %H:%i:%s') as loanRepaymentTime, " + " loan_no as loanNo, status, " +
" date_format(operate_time, '%Y-%m-%d %H:%i:%s') as operateTime, operate_by as operateBy, " + " pay_channel as payChannel, be_overdue as beOverdue, date_format(loan_repayment_time, '%Y-%m-%d %H:%i:%s') as loanRepaymentTime, " +
" create_by as createBy, date_format(create_time, '%Y-%m-%d %H:%i:%s') as createTime, " + " close_order_time as closeOrderTime, date_format(operate_time, '%Y-%m-%d %H:%i:%s') as operateTime, " +
" operate_by as operateBy, create_by as createBy, " +
" date_format(create_time, '%Y-%m-%d %H:%i:%s') as createTime, " +
" date_format(modified_time, '%Y-%m-%d %H:%i:%s') as modifiedTime " " date_format(modified_time, '%Y-%m-%d %H:%i:%s') as modifiedTime "
); );
......
{
"api": [
{
"appKey": "77667c76_3503_4c04_95f7_fc10938c7942",
"publicUrl": "https://open-test.nbcb.com.cn/sit/nbcb/api",
"platfromPublicKeyPath": "/app/nbbank/bankPubKey.cer",
"merchantPrivateKeyPath":"/app/nbbank/bankPrivateKey.sm2",
"merchantPrivateKeyPwd":"cfca",
"connectTimeout": 10000,
"readTimeout": 30000,
"merchantName":"",
"subMerchantName":"",
"subMerchantId":"",
"isProxy":false,
"proxyIp":"",
"proxyPort":80
}
],
"file": [
{
"uid":"TEST",
"publicFileUrl":"https://file-test.nbcb.com.cn/sit",
"clientIp":"127.0.0.1",
"passwd":"nbcb123456",
"apiVersion":"201809101526",
"isProxy":false,
"proxyIp":"",
"proxyPort":80
}
]
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论