Просмотр исходного кода

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

release_toaliyun_real
Stormeye Wu 7 лет назад
Родитель
Сommit
30e9a7401b
3 измененных файлов: 9 добавлений и 1 удалений
  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 Просмотреть файл

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


+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxSubsidy.java Просмотреть файл

@@ -73,6 +73,9 @@ public class WxSubsidy implements Serializable {
/**支付失败原因*/ /**支付失败原因*/
@io.swagger.annotations.ApiModelProperty(value="支付失败原因",name="failReason") @io.swagger.annotations.ApiModelProperty(value="支付失败原因",name="failReason")
private String 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 Просмотреть файл

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


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


Загрузка…
Отмена
Сохранить