dev-discount
胡锐 3 years ago
commit a6d54a51e2
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 2
      hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
  3. 24
      hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java
  4. 15
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java

File diff suppressed because one or more lines are too long

@ -333,8 +333,6 @@ public class OutRechargeOrderController {
weChatPayReqInfo.setMch_id(SysConst.getSysConfig().getWxMchId()); //商户号
weChatPayReqInfo.setSub_appid(SysConst.getSysConfig().getWxSubAppId()); //商户号
weChatPayReqInfo.setSub_mch_id("1614670195");
// weChatPayReqInfo.setOpenid(openId);
weChatPayReqInfo.setSub_openid(openId);
weChatPayReqInfo.setNonce_str(nonce_str); //随机字符串
weChatPayReqInfo.setBody(map.get("body").toString()); //商品描述

@ -23,10 +23,7 @@ import com.hai.enum_type.PayType;
import com.hai.enum_type.RechargePayType;
import com.hai.model.OrderRefundModel;
import com.hai.model.ResponseData;
import com.hai.service.HighRefundAuditService;
import com.hai.service.HighUserService;
import com.hai.service.OutRechargeOrderRecordService;
import com.hai.service.OutRechargeOrderService;
import com.hai.service.*;
import com.hai.service.pay.impl.GoodsOrderServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -70,6 +67,12 @@ public class CzOrderController {
@Resource
private HighUserService highUserService;
@Resource
private HighDiscountUserRelService highDiscountUserRelService;
@Resource
private HighDiscountAgentCodeService highDiscountAgentCodeService;
@Resource
private OutRechargeOrderRecordService rechargeOrderRecordService;
@ -256,6 +259,19 @@ public class CzOrderController {
outRechargeOrderService.updateOrder(order);
}
if (order.getMemDiscountId() != null) {
HighDiscountUserRel rel = highDiscountUserRelService.getRelById(order.getMemDiscountId());
if (rel != null) {
rel.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
rel.setUseTime(null);
highDiscountUserRelService.updateDiscountUserRel(rel);
HighDiscountAgentCode code = highDiscountAgentCodeService.getCodeById(rel.getDiscountAgentCodeId());
code.setStatus(2);
highDiscountAgentCodeService.updateCode(code);
}
}
new Thread(() -> {
HighUser highUser = highUserService.findByUserId(order.getUserId());
WxMsgConfig.rechargedFail(

@ -532,6 +532,21 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
order.setRefundFee(order.getPayRealPrice());
outRechargeOrderService.updateOrder(order);
}
if (order.getMemDiscountId() != null) {
HighDiscountUserRel rel = highDiscountUserRelService.getRelById(order.getMemDiscountId());
if (rel != null) {
rel.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
rel.setUseTime(null);
highDiscountUserRelService.updateDiscountUserRel(rel);
HighDiscountAgentCode code = highDiscountAgentCodeService.getCodeById(rel.getDiscountAgentCodeId());
code.setStatus(2);
highDiscountAgentCodeService.updateCode(code);
}
}
}
public String doRefundRequest(String mchId,String data) throws Exception {

Loading…
Cancel
Save