修复回调部分东西
This commit is contained in:
parent
e961916a6b
commit
feb38f18c3
|
|
@ -52,7 +52,7 @@ public class PayCallback implements IPayCallback {
|
|||
|
||||
if (AdapayStatusEnum.succeeded.code.equals(response.getString("status"))) {
|
||||
FinancialMaster update = new FinancialMaster();
|
||||
update.setId(response.getLong("order_no"));
|
||||
update.setOrderMasterCode(response.getString("order_no"));
|
||||
update.setPaymentId(response.getString("id"));
|
||||
financialMasterService.updateFinancialMaster(update);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ qiniu:
|
|||
adapay:
|
||||
debug: true
|
||||
prod-mode: true
|
||||
notifyUrl: 'http://www.opsoul.com/adapay/callback'
|
||||
notifyUrl: 'https://www.opsoul.com/adapay/callback'
|
||||
|
||||
jim:
|
||||
appKey: ''
|
||||
|
|
|
|||
|
|
@ -3,14 +3,12 @@ package com.ghy.common.adapay.callback;
|
|||
import com.ghy.common.adapay.callback.mapping.DrawCashReplyMapping;
|
||||
import com.ghy.common.adapay.callback.mapping.PayReplyMapping;
|
||||
import com.ghy.common.adapay.callback.mapping.RefundReplyMapping;
|
||||
import com.ghy.common.core.controller.BaseController;
|
||||
import com.huifu.adapay.core.AdapayCore;
|
||||
import com.huifu.adapay.core.util.AdapaySign;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
|
|
@ -19,12 +17,10 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
* @author HH 2022/3/25
|
||||
*/
|
||||
@RestController
|
||||
public class AdapayCallbackController {
|
||||
|
||||
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
public class AdapayCallbackController extends BaseController {
|
||||
|
||||
@PostMapping("/adapay/callback")
|
||||
public String callback(@RequestBody Event event) {
|
||||
public String callback(Event event) {
|
||||
logger.info(" 收单返回消息event" + event);
|
||||
//验签请参data
|
||||
String data = event.getData();
|
||||
|
|
|
|||
|
|
@ -7,23 +7,27 @@ package com.ghy.common.enums;
|
|||
*/
|
||||
public enum OrderStatus {
|
||||
|
||||
WAIT_PAY("0", "待支付"),
|
||||
PAID("1", "已支付"),
|
||||
CANCEL("2", "已取消");
|
||||
RECEIVE(0, "待接单"),
|
||||
PLAIN(1, "待排期"),
|
||||
GOING(2, "待上门"),
|
||||
SERVER(3, "服务中"),
|
||||
FINISH(4, "已完成"),
|
||||
CANCEL(5, "已取消");
|
||||
|
||||
private final String code;
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
OrderStatus(String code, String desc) {
|
||||
OrderStatus(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package com.ghy.common.enums;
|
||||
|
||||
/**
|
||||
* @author clunt
|
||||
* 付款状态
|
||||
*/
|
||||
public enum PayStatus {
|
||||
|
||||
WAIT_PAY(0, "待支付"),
|
||||
PAID(1, "已支付"),
|
||||
CANCEL(2, "已取消");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
PayStatus(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -80,7 +80,15 @@
|
|||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = SYSDATE()
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
<where>
|
||||
<if test="id !=null and id != 0">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="orderMasterCode !=null and orderMasterCode != ''">
|
||||
AND order_master_code = #{orderMasterCode}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</update>
|
||||
|
||||
<update id="paySucceeded">
|
||||
|
|
|
|||
Loading…
Reference in New Issue