Browse Source

[储值卡][新增]:补贴支付修改

release_toaliyun_real
Stormeye Wu 7 years ago
parent
commit
30e9a7401b
3 changed files with 9 additions and 1 deletions
  1. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/WxPayController.java
  2. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxSubsidy.java
  3. +5
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxSubsidyServiceImpl.java

+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/controller/WxPayController.java View File

@@ -189,7 +189,7 @@ public class WxPayController extends BaseController {
@RequestMapping(value = "/subsidyPay", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
public String _subsidyPayNotify(HttpServletRequest request) throws IOException, JDOMException {
logger.info("[" +getIpAddr() + "]微信支付回调");
logger.info("[" +getIpAddr() + "] 补贴微信支付回调");
InputStream inStream = request.getInputStream();
ByteArrayOutputStream outSteam = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];


+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxSubsidy.java View File

@@ -73,6 +73,9 @@ public class WxSubsidy implements Serializable {
/**支付失败原因*/
@io.swagger.annotations.ApiModelProperty(value="支付失败原因",name="failReason")
private String failReason;
/**支付者openId*/
@io.swagger.annotations.ApiModelProperty(value="支付失败原因",name="openId")
private String openId;





+ 5
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxSubsidyServiceImpl.java View File

@@ -114,6 +114,7 @@ public class WxSubsidyServiceImpl implements WxSubsidyService {
Double dChargeFee = Math.ceil(record.getAmount() * 1.0D * payAccount.getRate() / 10000);
Integer share_amount = record.getAmount() - dChargeFee.intValue();
record.setShareAmount(share_amount);
record.setShareRemainAmount(share_amount);
try {
wxSubsidyMapper.insertSelective(record);
} catch (Exception e) {
@@ -279,6 +280,7 @@ public class WxSubsidyServiceImpl implements WxSubsidyService {

String payOrderNo = paramMap.get("out_trade_no");
String transactionId = paramMap.get("transaction_id");
String openId = paramMap.get("sub_openid");
String timEndStr = paramMap.get("time_end");
Long payOrderId = Long.valueOf(payOrderNo);
WxSubsidy subsidy = wxSubsidyMapper.selectByPrimaryKey(payOrderId);
@@ -307,6 +309,9 @@ public class WxSubsidyServiceImpl implements WxSubsidyService {
timeEnd = new Date();
}
subsidy.setPayTimeEnd(timeEnd);
subsidy.setTransactionId(transactionId);
subsidy.setStatus(EnumPayStatus.PAY_STATUS_SUCCESS.getCode());
subsidy.setOpenId(openId);
subsidy.setUpdateTime(new Date());
try {
wxSubsidyMapper.updateByPrimaryKeySelective(subsidy);


Loading…
Cancel
Save