|
|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.iformall.controller; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.annotation.RedisCache; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
@@ -25,6 +26,7 @@ import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.data.redis.core.ValueOperations; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
@@ -408,8 +410,17 @@ public class WxCouponOrderController extends BaseController { |
|
|
|
if(StringUtils.isBlank(wxCouponOrder.getDeliveryInfo())){ |
|
|
|
return new ResultData(ErrorCode.COUPON_GOODS_DELIVERY_NULL); |
|
|
|
} |
|
|
|
try{ |
|
|
|
JSONObject jsonObject = JSONObject.parseObject(wxCouponOrder.getDeliveryInfo()); |
|
|
|
jsonObject.put("date",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); |
|
|
|
updateCouponOrder.setDeliveryInfo(JSONObject.toJSONString(jsonObject)); |
|
|
|
|
|
|
|
}catch(Exception e){ |
|
|
|
return new ResultData(ErrorCode.COUPON_GOODS_ADDRESS_ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
updateCouponOrder.setShippingStatus(EnumOrderShopingStatus.WAIT_DISTRIBUTION.getCode()); |
|
|
|
updateCouponOrder.setDeliveryInfo(wxCouponOrder.getDeliveryInfo()); |
|
|
|
|
|
|
|
}else{ |
|
|
|
return new ResultData(ErrorCode.COUPON_GOODS_TYPE_NOT_SUPPORTED); |
|
|
|
} |
|
|
|
|