|
|
|
@@ -251,21 +251,21 @@ public class WxOrderController extends BaseController { |
|
|
|
data.put("out_order_no",order.getMainOrderId().toString()); |
|
|
|
// data.put("pay_expire_seconds",300); |
|
|
|
data.put("order_entry_schema",wxOrderService.getOrderEntrySchema(order.getMainOrderId())); |
|
|
|
List<Map<String,Object>> goodsValid = new ArrayList<>(); |
|
|
|
for (Long couponChannelId:order.getCouponChannelMap().keySet()) { |
|
|
|
Map<String,Object> goodsValidMap = new HashMap<>(); |
|
|
|
WxCouponChannel couponChannel = order.getCouponChannelMap().get(couponChannelId); |
|
|
|
goodsValidMap.put("goods_id",couponChannel.getTtSpuId()); |
|
|
|
WxCoupon wxCoupon = order.getCouponMap().get(couponChannel.getCouponId()); |
|
|
|
if(EnumCouponValidType.BETWEEN_TWO_TIME.getCode().equals(wxCoupon.getValidType())){ |
|
|
|
goodsValidMap.put("valid_start_time",wxCoupon.getValidStartDate().getTime()); |
|
|
|
goodsValidMap.put("valid_end_time",wxCoupon.getValidEndDate().getTime()); |
|
|
|
}else{ |
|
|
|
goodsValidMap.put("valid_duration",(long)wxCoupon.getValidDays()*24*3600*1000); |
|
|
|
} |
|
|
|
goodsValid.add(goodsValidMap); |
|
|
|
} |
|
|
|
data.put("order_valid_time",goodsValid); |
|
|
|
// List<Map<String,Object>> goodsValid = new ArrayList<>(); |
|
|
|
// for (Long couponChannelId:order.getCouponChannelMap().keySet()) { |
|
|
|
// Map<String,Object> goodsValidMap = new HashMap<>(); |
|
|
|
// WxCouponChannel couponChannel = order.getCouponChannelMap().get(couponChannelId); |
|
|
|
// goodsValidMap.put("goods_id",couponChannel.getTtSpuId()); |
|
|
|
// WxCoupon wxCoupon = order.getCouponMap().get(couponChannel.getCouponId()); |
|
|
|
// if(EnumCouponValidType.BETWEEN_TWO_TIME.getCode().equals(wxCoupon.getValidType())){ |
|
|
|
// goodsValidMap.put("valid_start_time",wxCoupon.getValidStartDate().getTime()); |
|
|
|
// goodsValidMap.put("valid_end_time",wxCoupon.getValidEndDate().getTime()); |
|
|
|
// }else{ |
|
|
|
// goodsValidMap.put("valid_duration",(long)wxCoupon.getValidDays()*24*3600*1000); |
|
|
|
// } |
|
|
|
// goodsValid.add(goodsValidMap); |
|
|
|
// } |
|
|
|
// data.put("order_valid_time",goodsValid); |
|
|
|
|
|
|
|
map.put("data",data); |
|
|
|
map.put("err_no",0); |
|
|
|
|