修改话费订单导出

dev-discount
袁野 2 years ago
parent 48547bb148
commit d0555e8d79
  1. 11
      hai-bweb/src/main/java/com/bweb/model/ExportOutRechargeOrder.java
  2. 31
      hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java
  3. 12
      hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java
  4. 1
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java
  5. 11
      hai-service/src/main/java/com/hai/model/OutRechargeOrderModel.java

@ -58,7 +58,8 @@ public class ExportOutRechargeOrder {
@ExcelProperty("充值状态")
private String rechargeStatusName;
@ExcelProperty("退款时间")
private Date refundTime;
// 错误消息
private String errorMessage;
@ -207,4 +208,12 @@ public class ExportOutRechargeOrder {
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public Date getRefundTime() {
return refundTime;
}
public void setRefundTime(Date refundTime) {
this.refundTime = refundTime;
}
}

@ -1,6 +1,7 @@
package com.hai.config;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
@ -9,7 +10,9 @@ import com.hai.common.utils.HttpsUtils;
import com.hai.common.utils.MD5Util;
import com.hai.common.utils.RedisUtil;
import com.hai.dao.HighGasOrderPushMapper;
import com.hai.entity.HighCouponCodeOther;
import com.hai.entity.HighGasOrderPush;
import com.hai.entity.HighUserCoupon;
import org.apache.commons.collections4.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
@ -130,7 +133,33 @@ public class HuiLianTongConfig {
map.put("sign", md5Capital(joiner.toString()));
String paramStr = "token="+MapUtils.getString(map, "token")+"&sign=" + MapUtils.getString(map, "sign")+"&jsonData=" + URLEncoder.encode(MapUtils.getString(map, "jsonData"),"UTF-8");
return HttpsUtils.doHuiLianTongPost(CommonSysConst.getSysConfig().getHuiliantongUrl() + "/coupon/api/coupon_corp/couJointDist?" + paramStr);
JSONObject object1 = HttpsUtils.doHuiLianTongPost(CommonSysConst.getSysConfig().getHuiliantongUrl() + "/coupon/api/coupon_corp/couJointDist?" + paramStr);
new Thread(() -> {
if (object1 != null && object1.getString("result").equals("success")) {
JSONArray dataArray = object1.getJSONArray("data");
for (Object data : dataArray) {
JSONObject dataObject = (JSONObject) data;
Map<String, Object> mapPost = new HashMap<>();
mapPost.put("orderNo" , orderNo);
mapPost.put("distCouCount" , "1");
mapPost.put("phone" , userPhone);
mapPost.put("distributorId" , "1JnL8YMV");
mapPost.put("couNo" , dataObject.getString("couNo"));
mapPost.put("status" , "20");
mapPost.put("couTypeCode" , dataObject.getString("couTypeCode"));
mapPost.put("validStartDate" , dataObject.getDate("validStartDate"));
mapPost.put("validEndDate" , dataObject.getDate("validEndDate"));
try {
HuiLianTongUnionCardConfig.syncPayOrder(mapPost);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}).start();
return object1;
}

@ -284,6 +284,18 @@ public class HuiLianTongUnionCardConfig {
}
/**
* @Author Sum1Dream
* @name submitSms.java
* @Description // 同步加油券订单
* @Date 10:08 上午 2022/1/13
* @Param [java.lang.String]
* @return com.alibaba.fastjson.JSONObject
*/
public static JSONObject syncPayOrder(Map<String, Object> map) throws Exception {
return request("fuelCouponsTest/syncPayOrder", map);
}
}

@ -67,6 +67,7 @@ public interface OutRechargeOrderMapperExt {
" order_no as orderNo," +
" operator_name as operatorName," +
" labor_union_card as laborUnionCard," +
" refund_time as refundTime," +
" case recharge_type when 1 then '快充' when 2 then '慢充' end rechargeTypeName ," +
" case pay_type when 2 then '微信支付' when 3 then '工会卡支付' when 4 then '银联支付' when null then '积分抵扣' end payTypeName," +
" recharge_content as rechargeContent,recharge_price as rechargePrice,pay_price as payPrice,discount_deduction_price as discountDeductionPrice,integral_deduction_price as integralDeductionPrice,pay_real_price as payRealPrice," +

@ -24,6 +24,7 @@ public class OutRechargeOrderModel extends OutRechargeOrder {
private String payStatusName;
private String rechargeStatusName;
private String laborUnionCard;
private Date refundTime;
@Override
public String getOrderNo() {
@ -185,4 +186,14 @@ public class OutRechargeOrderModel extends OutRechargeOrder {
public void setLaborUnionCard(String laborUnionCard) {
this.laborUnionCard = laborUnionCard;
}
@Override
public Date getRefundTime() {
return refundTime;
}
@Override
public void setRefundTime(Date refundTime) {
this.refundTime = refundTime;
}
}

Loading…
Cancel
Save