refactor: 微信支付增加项目打包回调
This commit is contained in:
parent
424c7a8e5e
commit
a6b5a24cf8
@ -5,8 +5,6 @@ import cn.com.tenlion.operator.enums.ReconciliationStatusEnum;
|
|||||||
import cn.com.tenlion.operator.enums.ThirdPartyEnum;
|
import cn.com.tenlion.operator.enums.ThirdPartyEnum;
|
||||||
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
||||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargeDTO;
|
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargeDTO;
|
||||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayResultDTO;
|
|
||||||
import cn.com.tenlion.operator.pojo.dtos.customorg.CustomOrgDTO;
|
|
||||||
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
||||||
import cn.com.tenlion.operator.service.accountrecharge.IAccountRechargeService;
|
import cn.com.tenlion.operator.service.accountrecharge.IAccountRechargeService;
|
||||||
import cn.com.tenlion.operator.util.UserUtil;
|
import cn.com.tenlion.operator.util.UserUtil;
|
||||||
@ -14,7 +12,7 @@ import cn.com.tenlion.operator.util.pay.ALiPay;
|
|||||||
import cn.com.tenlion.operator.util.pay.PayResultDTO;
|
import cn.com.tenlion.operator.util.pay.PayResultDTO;
|
||||||
import cn.com.tenlion.operator.util.pay.PayUtil;
|
import cn.com.tenlion.operator.util.pay.PayUtil;
|
||||||
import cn.com.tenlion.operator.util.pay.WXPay;
|
import cn.com.tenlion.operator.util.pay.WXPay;
|
||||||
import cn.com.tenlion.operator.util.socket.MessageWebSocketServer;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
@ -34,7 +32,6 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.nio.file.attribute.UserPrincipal;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -92,6 +89,14 @@ public class AccountController extends DefaultBaseController {
|
|||||||
PayResultDTO payResultDTO = WXPay.queryPay(rechargeId);
|
PayResultDTO payResultDTO = WXPay.queryPay(rechargeId);
|
||||||
if (payResultDTO.getOrderStatus().equals("1") && payResultDTO.getMoney().equals(PayUtil.buiderMoney(dto.getRechargeMoney()))) {
|
if (payResultDTO.getOrderStatus().equals("1") && payResultDTO.getMoney().equals(PayUtil.buiderMoney(dto.getRechargeMoney()))) {
|
||||||
iAccountRechargeService.saveConfirmOnline(dto.getAccountRechargeId(), payResultDTO.getOrderId(), payResultDTO.getOrderSuccessTime());
|
iAccountRechargeService.saveConfirmOnline(dto.getAccountRechargeId(), payResultDTO.getOrderId(), payResultDTO.getOrderSuccessTime());
|
||||||
|
try {
|
||||||
|
JSONObject selfData = JSON.parseObject(dto.getSelfData());
|
||||||
|
if (selfData.containsKey("type") && StringUtils.equals("PROJ_PKG", selfData.getString("type"))) {
|
||||||
|
LOG.debug("通知付打包款成功");
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
@ -100,6 +105,14 @@ public class AccountController extends DefaultBaseController {
|
|||||||
return json.toJSONString();
|
return json.toJSONString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try {
|
||||||
|
JSONObject jsonObject = JSON.parseObject("错误");
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserUtil userUtil;
|
private UserUtil userUtil;
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @ClassName: AccountRechargeDTO
|
* @ClassName: AccountRechargeDTO
|
||||||
* @Description: 账户充值
|
* @Description: 账户充值
|
||||||
* @Author: CodeFactory
|
* @Author: CodeFactory
|
||||||
@ -63,7 +62,7 @@ public class AccountRechargeDTO {
|
|||||||
private String orgBank;
|
private String orgBank;
|
||||||
@ApiModelProperty(name = "rechargeRemark", value = "备注")
|
@ApiModelProperty(name = "rechargeRemark", value = "备注")
|
||||||
private String rechargeRemark;
|
private String rechargeRemark;
|
||||||
@ApiModelProperty(name = "selfData", value = "平台账户")
|
@ApiModelProperty(name = "selfData", value = "平台账户/自定义数据")
|
||||||
private String selfData;
|
private String selfData;
|
||||||
|
|
||||||
public String getOrgName() {
|
public String getOrgName() {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.com.tenlion.operator.pojo.vos.accountrecharge;
|
package cn.com.tenlion.operator.pojo.vos.accountrecharge;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||||
import ink.wgink.annotation.CheckNumberAnnotation;
|
import ink.wgink.annotation.CheckNumberAnnotation;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
@ -50,7 +51,7 @@ public class AccountRechargeVO {
|
|||||||
private String orgBank;
|
private String orgBank;
|
||||||
@ApiModelProperty(name = "rechargeRemark", value = "备注")
|
@ApiModelProperty(name = "rechargeRemark", value = "备注")
|
||||||
private String rechargeRemark;
|
private String rechargeRemark;
|
||||||
@ApiModelProperty(name = "selfData", value = "平台账户")
|
@ApiModelProperty(name = "selfData", value = "平台账户/自定义数据")
|
||||||
private String selfData;
|
private String selfData;
|
||||||
|
|
||||||
public String getUserId() {
|
public String getUserId() {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cn.com.tenlion.operator.util.pay;
|
package cn.com.tenlion.operator.util.pay;
|
||||||
|
|
||||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayResultDTO;
|
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayResultDTO;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.wechat.pay.java.service.payments.model.Transaction;
|
import com.wechat.pay.java.service.payments.model.Transaction;
|
||||||
import com.wechat.pay.java.service.payments.model.TransactionAmount;
|
import com.wechat.pay.java.service.payments.model.TransactionAmount;
|
||||||
import com.wechat.pay.java.service.payments.nativepay.NativePayService;
|
import com.wechat.pay.java.service.payments.nativepay.NativePayService;
|
||||||
|
@ -171,7 +171,7 @@ pay:
|
|||||||
# 微信服务器网关地址
|
# 微信服务器网关地址
|
||||||
url: https://api.mch.weixin.qq.com
|
url: https://api.mch.weixin.qq.com
|
||||||
# 接收结果通知地址.如果需要动态替换订单号,则以 {orderNo} 占位
|
# 接收结果通知地址.如果需要动态替换订单号,则以 {orderNo} 占位
|
||||||
notify-url: https://lg48844529.vicp.fun/operator/api/account/pay-wx/{orderNo}
|
notify-url: http://121.36.71.250:58038/operator/api/account/pay-wx/{orderNo}
|
||||||
# 单笔最大金额
|
# 单笔最大金额
|
||||||
max-money: 20000
|
max-money: 20000
|
||||||
# 单笔最小金额
|
# 单笔最小金额
|
||||||
|
Loading…
Reference in New Issue
Block a user