|
@@ -10,7 +10,9 @@ import com.yohoufo.common.ApiResponse; |
|
@@ -10,7 +10,9 @@ import com.yohoufo.common.ApiResponse; |
10
|
import com.yohoufo.common.annotation.IgnoreSession;
|
10
|
import com.yohoufo.common.annotation.IgnoreSession;
|
11
|
import com.yohoufo.common.annotation.IgnoreSignature;
|
11
|
import com.yohoufo.common.annotation.IgnoreSignature;
|
12
|
import com.yohoufo.common.exception.UfoServiceException;
|
12
|
import com.yohoufo.common.exception.UfoServiceException;
|
|
|
13
|
+import com.yohoufo.dal.order.model.SellerOrder;
|
13
|
import com.yohoufo.order.event.AuditFailedEvent;
|
14
|
import com.yohoufo.order.event.AuditFailedEvent;
|
|
|
15
|
+import com.yohoufo.order.service.impl.SellerOrderService;
|
14
|
import com.yohoufo.order.service.seller.SellerOrderCancelService;
|
16
|
import com.yohoufo.order.service.seller.SellerOrderCancelService;
|
15
|
import com.yohoufo.order.service.impl.visitor.AuditCancelCase;
|
17
|
import com.yohoufo.order.service.impl.visitor.AuditCancelCase;
|
16
|
import com.yohoufo.order.service.seller.ImportPublishExcutor;
|
18
|
import com.yohoufo.order.service.seller.ImportPublishExcutor;
|
|
@@ -21,6 +23,7 @@ import org.slf4j.Logger; |
|
@@ -21,6 +23,7 @@ import org.slf4j.Logger; |
21
|
import org.springframework.beans.factory.annotation.Autowired;
|
23
|
import org.springframework.beans.factory.annotation.Autowired;
|
22
|
import org.springframework.web.bind.annotation.RequestBody;
|
24
|
import org.springframework.web.bind.annotation.RequestBody;
|
23
|
import org.springframework.web.bind.annotation.RequestMapping;
|
25
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
26
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
24
|
import org.springframework.web.bind.annotation.RestController;
|
27
|
import org.springframework.web.bind.annotation.RestController;
|
25
|
|
28
|
|
26
|
/**
|
29
|
/**
|
|
@@ -41,6 +44,8 @@ public class ErpSellerGoodsController { |
|
@@ -41,6 +44,8 @@ public class ErpSellerGoodsController { |
41
|
@Autowired
|
44
|
@Autowired
|
42
|
private SellerAddressService sellerAddressService;
|
45
|
private SellerAddressService sellerAddressService;
|
43
|
|
46
|
|
|
|
47
|
+ @Autowired
|
|
|
48
|
+ private SellerOrderService sellerOrderService;
|
44
|
/**
|
49
|
/**
|
45
|
* 批量导入skup
|
50
|
* 批量导入skup
|
46
|
* @param req
|
51
|
* @param req
|
|
@@ -107,4 +112,27 @@ public class ErpSellerGoodsController { |
|
@@ -107,4 +112,27 @@ public class ErpSellerGoodsController { |
107
|
return response.build();
|
112
|
return response.build();
|
108
|
}
|
113
|
}
|
109
|
}
|
114
|
}
|
|
|
115
|
+
|
|
|
116
|
+ /**
|
|
|
117
|
+ * 后台下架
|
|
|
118
|
+ * 在遥远的未来或者根本就没有未来
|
|
|
119
|
+ * 那就用"也许"来表达下,未来也许需要MQ方式
|
|
|
120
|
+ * @param sellerOrder
|
|
|
121
|
+ * @return
|
|
|
122
|
+ */
|
|
|
123
|
+ @RequestMapping(value="/offShelveByErp")
|
|
|
124
|
+ @ResponseBody
|
|
|
125
|
+ @IgnoreSession
|
|
|
126
|
+ @IgnoreSignature
|
|
|
127
|
+ public ApiResponse offShelveByErp(@RequestBody SellerOrder sellerOrder) {
|
|
|
128
|
+
|
|
|
129
|
+ logger.info("in ufo.sellerOrder.cancel, sellerOrder {}", sellerOrder);
|
|
|
130
|
+ boolean result = sellerOrderService.offShelveByErp(sellerOrder.getSkup()) ;
|
|
|
131
|
+ String msg = "后台下架成功";
|
|
|
132
|
+ if(!result){
|
|
|
133
|
+ msg = "后台下架失败";
|
|
|
134
|
+ return new ApiResponse.ApiResponseBuilder().data(result).code(400).message(msg).build();
|
|
|
135
|
+ }
|
|
|
136
|
+ return new ApiResponse.ApiResponseBuilder().data(result).code(200).message(msg).build();
|
|
|
137
|
+ }
|
110
|
} |
138
|
} |