1
|
package com.yohoufo.product.controller;
|
1
|
package com.yohoufo.product.controller;
|
2
|
|
2
|
|
3
|
-import com.yoho.tools.docs.ApiOperation;
|
|
|
4
|
-import com.yohoufo.common.utils.UfoJsonUtil;
|
|
|
5
|
-import com.yohoufo.product.response.ProductDetailResp;
|
|
|
6
|
-import com.yohoufo.product.response.ProductSeriesTemplateResp;
|
|
|
7
|
-import com.yohoufo.product.response.StorageDataResp;
|
|
|
8
|
-import com.yohoufo.product.response.StorageLeastPriceResp;
|
|
|
9
|
-
|
|
|
10
|
-import javax.annotation.Resource;
|
|
|
11
|
-
|
|
|
12
|
import org.slf4j.Logger;
|
3
|
import org.slf4j.Logger;
|
13
|
import org.slf4j.LoggerFactory;
|
4
|
import org.slf4j.LoggerFactory;
|
14
|
import org.springframework.beans.factory.annotation.Autowired;
|
5
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
6
|
+import org.springframework.web.bind.annotation.RequestBody;
|
15
|
import org.springframework.web.bind.annotation.RequestMapping;
|
7
|
import org.springframework.web.bind.annotation.RequestMapping;
|
16
|
import org.springframework.web.bind.annotation.RequestParam;
|
8
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
9
|
+import org.springframework.web.bind.annotation.RestController;
|
17
|
|
10
|
|
|
|
11
|
+import com.yoho.tools.docs.ApiOperation;
|
18
|
import com.yohoufo.common.ApiResponse;
|
12
|
import com.yohoufo.common.ApiResponse;
|
19
|
import com.yohoufo.common.annotation.IgnoreSession;
|
13
|
import com.yohoufo.common.annotation.IgnoreSession;
|
20
|
import com.yohoufo.common.annotation.IgnoreSignature;
|
14
|
import com.yohoufo.common.annotation.IgnoreSignature;
|
21
|
import com.yohoufo.common.caller.UfoServiceCaller;
|
15
|
import com.yohoufo.common.caller.UfoServiceCaller;
|
22
|
-
|
|
|
23
|
-import org.springframework.web.bind.annotation.RestController;
|
16
|
+import com.yohoufo.common.utils.UfoJsonUtil;
|
|
|
17
|
+import com.yohoufo.product.request.StoragePriceBo;
|
|
|
18
|
+import com.yohoufo.product.response.ProductDetailResp;
|
|
|
19
|
+import com.yohoufo.product.response.ProductSeriesTemplateResp;
|
|
|
20
|
+import com.yohoufo.product.response.StorageDataResp;
|
|
|
21
|
+import com.yohoufo.product.response.StorageLeastPriceResp;
|
24
|
|
22
|
|
25
|
|
23
|
|
26
|
@RestController
|
24
|
@RestController
|
|
@@ -113,11 +111,7 @@ public class ProductController { |
|
@@ -113,11 +111,7 @@ public class ProductController { |
113
|
@IgnoreSignature
|
111
|
@IgnoreSignature
|
114
|
@IgnoreSession
|
112
|
@IgnoreSession
|
115
|
@RequestMapping(params = "method=ufo.product.createSkup")
|
113
|
@RequestMapping(params = "method=ufo.product.createSkup")
|
116
|
- public ApiResponse createSkup(
|
|
|
117
|
- @RequestParam(value = "skup", required = false) Integer skup,
|
|
|
118
|
- @RequestParam(value = "seller_uid", required = false) Integer sellerUid,
|
|
|
119
|
- @RequestParam(value = "price", required = false) String price) {
|
|
|
120
|
-
|
114
|
+ public ApiResponse createSkup(@RequestBody StoragePriceBo skupBo) {
|
121
|
return new ApiResponse(200, "创建成功!", Boolean.TRUE);
|
115
|
return new ApiResponse(200, "创建成功!", Boolean.TRUE);
|
122
|
}
|
116
|
}
|
123
|
|
117
|
|
|
@@ -125,6 +119,7 @@ public class ProductController { |
|
@@ -125,6 +119,7 @@ public class ProductController { |
125
|
@IgnoreSession
|
119
|
@IgnoreSession
|
126
|
@RequestMapping(params = "method=ufo.product.saleSkup")
|
120
|
@RequestMapping(params = "method=ufo.product.saleSkup")
|
127
|
public ApiResponse saleSkup(
|
121
|
public ApiResponse saleSkup(
|
|
|
122
|
+ @RequestParam(value = "product_id", required = false) Integer productId,
|
128
|
@RequestParam(value = "skup", required = false) Integer skup) {
|
123
|
@RequestParam(value = "skup", required = false) Integer skup) {
|
129
|
return new ApiResponse(200, "卖出成功!", Boolean.TRUE);
|
124
|
return new ApiResponse(200, "卖出成功!", Boolean.TRUE);
|
130
|
}
|
125
|
}
|
|
@@ -134,8 +129,8 @@ public class ProductController { |
|
@@ -134,8 +129,8 @@ public class ProductController { |
134
|
@RequestMapping(params = "method=ufo.product.cancelSaleSkup")
|
129
|
@RequestMapping(params = "method=ufo.product.cancelSaleSkup")
|
135
|
public ApiResponse cancelSaleSkup(
|
130
|
public ApiResponse cancelSaleSkup(
|
136
|
@RequestParam(value = "skup", required = false) Integer skup) {
|
131
|
@RequestParam(value = "skup", required = false) Integer skup) {
|
137
|
- serviceCaller.call("ufo.product.data", 99);
|
|
|
138
|
- return new ApiResponse(200, "取消卖出成功!", Boolean.TRUE);
|
132
|
+ ApiResponse resp = serviceCaller.call("ufo.product.data", ApiResponse.class ,99);
|
|
|
133
|
+ return new ApiResponse(200, "取消卖出成功!", resp);
|
139
|
}
|
134
|
}
|
140
|
|
135
|
|
141
|
} |
136
|
} |