md
This commit is contained in:
parent
7ffe5d1c1a
commit
33dc7e58d5
@ -118,6 +118,68 @@ public class EmisCommonController extends EmisBaseController
|
||||
@Autowired
|
||||
RedissonService redissonService;
|
||||
|
||||
@Autowired
|
||||
private IEmisSettleBillPayLogService emisSettleBillPayLogService;
|
||||
|
||||
/**
|
||||
* 在线支付回调
|
||||
* @param method
|
||||
* @param data
|
||||
* @param signType
|
||||
* @param sign
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/payNotifyCallback")
|
||||
public String payNotifyCallback(String method,String data,String sign_type,String sign){
|
||||
log.info("payNotifyCallback start");
|
||||
|
||||
if(StringUtils.isAnyEmpty(method,data,sign)){
|
||||
return "fail";
|
||||
}
|
||||
|
||||
/*
|
||||
order_no String 订单号
|
||||
mer_id String 进件返回的商户ID
|
||||
amount Integer 支付金额(分)
|
||||
fee Integer 手续费(分为单位)。
|
||||
到账金额为:amount-fee
|
||||
time_created String 订单创建时间,yyyy-MM-dd HH:mm:ss
|
||||
time_expire String 订单超时时间,yyyy-MM-dd HH:mm:ss
|
||||
transaction_no String 支付渠道流水号
|
||||
channel String 支付渠道
|
||||
channel_type String 通道类型,请联系业务配置 例如 klt01
|
||||
trans_no String 平台交易流水号
|
||||
status Integer 交易状态
|
||||
0 订单创建
|
||||
10 未支付(待支付)
|
||||
11 用户支付中
|
||||
20 支付成功
|
||||
30 已关闭
|
||||
31 已撤销(刷卡支付)
|
||||
40 支付失败
|
||||
50 转入退款
|
||||
|
||||
err_msg String 错误消息
|
||||
*/
|
||||
|
||||
JSONObject jobjRst = JSONObject.parseObject(data);
|
||||
String payId = jobjRst.getString("order_no");
|
||||
if(StringUtils.isEmpty(payId)){
|
||||
return "fail";
|
||||
}
|
||||
|
||||
try {
|
||||
log.info("payNotifyCallback start");
|
||||
emisSettleBillPayLogService.checkPayStatus(payId);
|
||||
} catch (EmisBizError emisBizError) {
|
||||
emisBizError.printStackTrace();
|
||||
return emisBizError.getMessage();
|
||||
}
|
||||
|
||||
log.info("payNotifyCallback end");
|
||||
return "success";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取中心可用简单数
|
||||
* @param prefix
|
||||
@ -878,6 +940,7 @@ public class EmisCommonController extends EmisBaseController
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/notifyTraceByKD100")
|
||||
public String notifyTraceByKD100(){
|
||||
String lockKey="notifyTraceByKD100";
|
||||
|
||||
@ -248,9 +248,9 @@ public class EmisSettleBillPayLogServiceImpl implements IEmisSettleBillPayLogSer
|
||||
emisSettleBillPayLog.setPaySuccTime(new Date());
|
||||
emisSettleBillPayLogMapper.updateEmisSettleBillPayLog(emisSettleBillPayLog);
|
||||
|
||||
// 更新账单状态,插入支付微信支付收款记录,更新账单状态
|
||||
// 调整账户余额
|
||||
// sysAccountService.adjustAmount(emisSettleBillPayLog.getOrderNo(),emisSettleBillPayLog.getAccId(),emisSettleBillPayLog.getOwnerId(),emisSettleBillPayLog.getAmount(),"充值");
|
||||
// 获取支付账单,核销账单
|
||||
emisSettleBillPayLogMapper.selectEmisSettleBillPayLogByPayId(payId);
|
||||
|
||||
}else if("10".equals(status)){
|
||||
emisSettleBillPayLog.setPaid(0);
|
||||
emisSettleBillPayLog.setStatus(10);
|
||||
|
||||
@ -230,8 +230,8 @@
|
||||
a.settle_bill_no,
|
||||
sum( b.pay_money) AS totalPayMoney,
|
||||
sum( if( b.trade_date <![CDATA[ <= ]]> a.payment_due_date,b.pay_money,0) ) AS recdMoneyIn,
|
||||
sum( if(b.trade_date <![CDATA[ > ]]> a.payment_due_date and b.trade_date <![CDATA[ <= ]]> DATE_SUB( a.payment_due_date, INTERVAL - 30 DAY ),b.pay_money,0) ) AS recdPayMoney60D,
|
||||
sum( if(b.trade_date <![CDATA[ > ]]> DATE_SUB( a.payment_due_date, INTERVAL - 30 DAY ),b.pay_money,0) ) AS recdPayMoneyGreat60D
|
||||
sum( if(b.trade_date <![CDATA[ > ]]> a.payment_due_date and b.trade_date <![CDATA[ < ]]> DATE_SUB( a.payment_due_date, INTERVAL (a.credit_period-60) DAY ),b.pay_money,0) ) AS recdPayMoney60D,
|
||||
sum( if(b.trade_date <![CDATA[ >= ]]> DATE_SUB( a.payment_due_date, INTERVAL (a.credit_period-60) DAY ),b.pay_money,0) ) AS recdPayMoneyGreat60D
|
||||
FROM
|
||||
emis_settle_bill a,
|
||||
emis_settle_pay_record b,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user