提交慢充接口修改

dev-discount
袁野 3 years ago
parent 016ab5a301
commit e1450510b7
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 2
      hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java
  3. 6
      hai-bweb/src/main/java/com/bweb/excelListener/ImportRechargeOrderListener.java
  4. 4
      hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
  5. 4
      hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java
  6. 4
      hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java
  7. 2
      hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java
  8. 12
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java
  9. 4
      hai-service/src/main/java/com/hai/service/pay/impl/RechargeOrderServiceImpl.java

File diff suppressed because one or more lines are too long

@ -579,7 +579,7 @@ public class OutRechargeOrderController {
String orderNo = "CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5); String orderNo = "CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5);
JSONObject object = outRechargeOrderService.getMobile(outRechargeOrder.getRechargeContent(),outRechargeOrder.getOrderPrice().intValue(),orderNo); JSONObject object = outRechargeOrderService.getMobile(outRechargeOrder.getRechargeContent(),outRechargeOrder.getOrderPrice().intValue(),orderNo , outRechargeOrder.getRechargeType());
if (object.getInteger("code") != 200) { if (object.getInteger("code") != 200) {
log.error("getMobileRechargeByOrderId error!", "充值失败"); log.error("getMobileRechargeByOrderId error!", "充值失败");

@ -46,12 +46,6 @@ public class ImportRechargeOrderListener extends AnalysisEventListener<ExportOut
return; return;
} }
if (rechargeOrder.getRechargeType() != 2) {
data.setErrorMessage("当前话费订单充值类型为快充。");
errorData.add(data);
return;
}
if (Objects.equals(data.getStatusName(), "已完成")) { if (Objects.equals(data.getStatusName(), "已完成")) {
outRechargeOrderService.finishOrder(rechargeOrder.getId()); outRechargeOrderService.finishOrder(rechargeOrder.getId());
} else if (Objects.equals(data.getStatusName(), "失败")){ } else if (Objects.equals(data.getStatusName(), "失败")){

@ -474,8 +474,8 @@ public class OutRechargeOrderController {
outRechargeOrderService.goldPayOrder(userInfoModel.getHighUser().getId(), order.getId()); outRechargeOrderService.goldPayOrder(userInfoModel.getHighUser().getId(), order.getId());
if (order.getRechargeType() != null && order.getRechargeType() == 1) { if (order.getRechargeType() != null) {
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo()); JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo() , order.getRechargeType());
if (object.getInteger("code") != 200) { if (object.getInteger("code") != 200) {
order.setRechargeStatus(1); order.setRechargeStatus(1);
order.setStatus(2); order.setStatus(2);

@ -120,9 +120,9 @@ public class CzOrderController {
rechargeOrderRecord = new OutRechargeOrderRecord(); rechargeOrderRecord = new OutRechargeOrderRecord();
// 查询订单 // 查询订单
OutRechargeOrder order = outRechargeOrderService.findByOrderNo(dataObject.getString("out_order_id")); OutRechargeOrder order = outRechargeOrderService.findByOrderNo(dataObject.getString("out_order_id"));
if (order.getRechargeType() != null && order.getRechargeType() == 1) { if (order.getRechargeType() != null) {
String orderNo = "CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5); String orderNo = "CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5);
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , orderNo); JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , orderNo , order.getRechargeType());
if (object.getInteger("code") != 200) { if (object.getInteger("code") != 200) {
order.setRechargeStatus(1); order.setRechargeStatus(1);
order.setAbnormalMsg(object.getString("message")); order.setAbnormalMsg(object.getString("message"));

@ -391,8 +391,8 @@ public class UnionPayController {
order.setStatus(2); order.setStatus(2);
order.setPayType(4); order.setPayType(4);
order.setPayTime(new Date()); // 支付时间 order.setPayTime(new Date()); // 支付时间
if (order.getRechargeType() != null && order.getRechargeType() == 1) { if (order.getRechargeType() != null) {
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo()); JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo() , order.getRechargeType());
if (object.getInteger("code") != 200) { if (object.getInteger("code") != 200) {
order.setRechargeStatus(1); order.setRechargeStatus(1);
order.setAbnormalMsg(object.getString("message")); order.setAbnormalMsg(object.getString("message"));

@ -154,7 +154,7 @@ public interface OutRechargeOrderService {
* @Param [java.lang.String] * @Param [java.lang.String]
* @return com.alibaba.fastjson.JSONObject * @return com.alibaba.fastjson.JSONObject
*/ */
JSONObject getMobile(String phone , Integer amount , String orderNo) throws Exception; JSONObject getMobile(String phone , Integer amount , String orderNo , Integer isFast) throws Exception;
/** /**
* @Author Sum1Dream * @Author Sum1Dream

@ -343,8 +343,8 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
} }
order.setPaySerialNo(consumptionResult.getString("orderId")); // 支付流水号 order.setPaySerialNo(consumptionResult.getString("orderId")); // 支付流水号
order.setPayRealPrice(order.getPayPrice()); // 实付金额 order.setPayRealPrice(order.getPayPrice()); // 实付金额
if (order.getRechargeType() != null && order.getRechargeType() == 1) { if (order.getRechargeType() != null) {
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo()); JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo() ,order.getRechargeType());
if (object.getInteger("code") != 200) { if (object.getInteger("code") != 200) {
order.setRechargeStatus(1); order.setRechargeStatus(1);
order.setAbnormalMsg(object.getString("message")); order.setAbnormalMsg(object.getString("message"));
@ -387,7 +387,11 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
} }
@Override @Override
public JSONObject getMobile(String phone , Integer amount , String orderNo) throws Exception { public JSONObject getMobile(String phone , Integer amount , String orderNo , Integer isFast) throws Exception {
if (isFast == 2) {
isFast = 0;
}
String timestamp = String.valueOf(System.currentTimeMillis()); String timestamp = String.valueOf(System.currentTimeMillis());
@ -397,7 +401,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
map.put("out_order_id" , orderNo); map.put("out_order_id" , orderNo);
map.put("app_key" , CommonSysConst.getSysConfig().getCzAppKey()); map.put("app_key" , CommonSysConst.getSysConfig().getCzAppKey());
map.put("timestamp" , timestamp.substring(0,timestamp.length()-3)); map.put("timestamp" , timestamp.substring(0,timestamp.length()-3));
map.put("is_fast" , "1"); map.put("is_fast" , isFast);
map.put("notify_url" , CommonSysConst.getSysConfig().getCzNotifyUrl()); map.put("notify_url" , CommonSysConst.getSysConfig().getCzNotifyUrl());
String signStr = WxUtils.generateSignatureAppSecret(map, CommonSysConst.getSysConfig().getCzAppSecret() , WXPayConstants.SignType.MD5); String signStr = WxUtils.generateSignatureAppSecret(map, CommonSysConst.getSysConfig().getCzAppSecret() , WXPayConstants.SignType.MD5);

@ -70,8 +70,8 @@ public class RechargeOrderServiceImpl implements PayService {
order.setPayRealPrice(new BigDecimal(map.get("total_fee")).divide(new BigDecimal("100"))); // 实付金额 order.setPayRealPrice(new BigDecimal(map.get("total_fee")).divide(new BigDecimal("100"))); // 实付金额
order.setPayTime(new Date()); // 支付时间 order.setPayTime(new Date()); // 支付时间
order.setStatus(2); // 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款 order.setStatus(2); // 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款
if (order.getRechargeType() != null && order.getRechargeType() == 1) { if (order.getRechargeType() != null) {
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo()); JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo() , order.getRechargeType());
if (object.getInteger("code") != 200) { if (object.getInteger("code") != 200) {
order.setRechargeStatus(1); order.setRechargeStatus(1);
order.setAbnormalMsg(object.getString("message")); order.setAbnormalMsg(object.getString("message"));

Loading…
Cancel
Save