1
|
package com.yohoufo.product.controller;
|
1
|
package com.yohoufo.product.controller;
|
2
|
|
2
|
|
|
|
3
|
+import java.lang.reflect.Method;
|
|
|
4
|
+import java.math.BigDecimal;
|
|
|
5
|
+import java.util.ArrayList;
|
|
|
6
|
+import java.util.Collection;
|
|
|
7
|
+import java.util.HashMap;
|
|
|
8
|
+import java.util.List;
|
|
|
9
|
+import java.util.Map;
|
|
|
10
|
+import java.util.stream.Collectors;
|
|
|
11
|
+
|
|
|
12
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
13
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
14
|
+import org.slf4j.Logger;
|
|
|
15
|
+import org.slf4j.LoggerFactory;
|
|
|
16
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
17
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
18
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
19
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
20
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
21
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
22
|
+
|
3
|
import com.alibaba.fastjson.JSONObject;
|
23
|
import com.alibaba.fastjson.JSONObject;
|
4
|
import com.google.common.collect.Lists;
|
24
|
import com.google.common.collect.Lists;
|
5
|
import com.yoho.core.config.ConfigReader;
|
25
|
import com.yoho.core.config.ConfigReader;
|
|
@@ -14,10 +34,9 @@ import com.yohobuy.ufo.model.request.StoragePriceBo; |
|
@@ -14,10 +34,9 @@ import com.yohobuy.ufo.model.request.StoragePriceBo; |
14
|
import com.yohobuy.ufo.model.request.product.ProductImportTranItemBo;
|
34
|
import com.yohobuy.ufo.model.request.product.ProductImportTranItemBo;
|
15
|
import com.yohobuy.ufo.model.request.product.ProductRequestBo;
|
35
|
import com.yohobuy.ufo.model.request.product.ProductRequestBo;
|
16
|
import com.yohobuy.ufo.model.response.ProductDetailResp;
|
36
|
import com.yohobuy.ufo.model.response.ProductDetailResp;
|
|
|
37
|
+import com.yohobuy.ufo.model.response.StorageCheckResp;
|
17
|
import com.yohobuy.ufo.model.response.StorageDataResp;
|
38
|
import com.yohobuy.ufo.model.response.StorageDataResp;
|
18
|
import com.yohobuy.ufo.model.response.StorageInfoResp;
|
39
|
import com.yohobuy.ufo.model.response.StorageInfoResp;
|
19
|
-import com.yohobuy.ufo.model.response.StorageCheckResp;
|
|
|
20
|
-
|
|
|
21
|
import com.yohoufo.common.ApiResponse;
|
40
|
import com.yohoufo.common.ApiResponse;
|
22
|
import com.yohoufo.common.annotation.IgnoreSession;
|
41
|
import com.yohoufo.common.annotation.IgnoreSession;
|
23
|
import com.yohoufo.common.annotation.IgnoreSignature;
|
42
|
import com.yohoufo.common.annotation.IgnoreSignature;
|
|
@@ -27,27 +46,18 @@ import com.yohoufo.common.caller.UfoServiceCaller; |
|
@@ -27,27 +46,18 @@ import com.yohoufo.common.caller.UfoServiceCaller; |
27
|
import com.yohoufo.dal.product.model.StoragePrice;
|
46
|
import com.yohoufo.dal.product.model.StoragePrice;
|
28
|
import com.yohoufo.product.constants.ProductConstants;
|
47
|
import com.yohoufo.product.constants.ProductConstants;
|
29
|
import com.yohoufo.product.model.SkupInfo;
|
48
|
import com.yohoufo.product.model.SkupInfo;
|
30
|
-import com.yohoufo.product.response.*;
|
49
|
+import com.yohoufo.product.response.ProductSeriesTemplateResp;
|
|
|
50
|
+import com.yohoufo.product.response.ProductSimpleResp;
|
|
|
51
|
+import com.yohoufo.product.response.ProductSortTemplateResp;
|
|
|
52
|
+import com.yohoufo.product.response.SaleCategoryBo;
|
|
|
53
|
+import com.yohoufo.product.response.SecondHandProductResp;
|
|
|
54
|
+import com.yohoufo.product.response.SkupDetailForScreenResp;
|
|
|
55
|
+import com.yohoufo.product.response.StorageLeastPriceResp;
|
31
|
import com.yohoufo.product.service.ProductService;
|
56
|
import com.yohoufo.product.service.ProductService;
|
32
|
import com.yohoufo.product.service.impl.ProductBatchService;
|
57
|
import com.yohoufo.product.service.impl.ProductBatchService;
|
33
|
import com.yohoufo.product.service.impl.ProductPoolService;
|
58
|
import com.yohoufo.product.service.impl.ProductPoolService;
|
34
|
import com.yohoufo.product.service.impl.SeekToBuyStorageService;
|
59
|
import com.yohoufo.product.service.impl.SeekToBuyStorageService;
|
35
|
import com.yohoufo.product.service.impl.StoragePriceService;
|
60
|
import com.yohoufo.product.service.impl.StoragePriceService;
|
36
|
-import org.apache.commons.collections.CollectionUtils;
|
|
|
37
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
38
|
-import org.slf4j.Logger;
|
|
|
39
|
-import org.slf4j.LoggerFactory;
|
|
|
40
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
41
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
42
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
43
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
44
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
45
|
-import org.springframework.web.servlet.ModelAndView;
|
|
|
46
|
-
|
|
|
47
|
-import java.lang.reflect.Method;
|
|
|
48
|
-import java.math.BigDecimal;
|
|
|
49
|
-import java.util.*;
|
|
|
50
|
-import java.util.stream.Collectors;
|
|
|
51
|
|
61
|
|
52
|
@RestController
|
62
|
@RestController
|
53
|
public class ProductController {
|
63
|
public class ProductController {
|
|
@@ -1004,14 +1014,15 @@ public class ProductController { |
|
@@ -1004,14 +1014,15 @@ public class ProductController { |
1004
|
|
1014
|
|
1005
|
@ApiOperation(name = "ufo.product.sizeImage", desc = "查询尺码图片")
|
1015
|
@ApiOperation(name = "ufo.product.sizeImage", desc = "查询尺码图片")
|
1006
|
@RequestMapping(params = "method=ufo.product.sizeImage")
|
1016
|
@RequestMapping(params = "method=ufo.product.sizeImage")
|
1007
|
- public ApiResponse getSizeImage(@RequestParam(value = "product_id") Integer productId) {
|
|
|
1008
|
- if (null == productId) {
|
|
|
1009
|
- LOG.info("in method=ufo.product.sizeImage product_id Is Null or empty");
|
|
|
1010
|
- return new ApiResponse(400, "product_id Is Null or empty", null);
|
1017
|
+ public ApiResponse getSizeImage(@RequestParam(value = "product_id") Integer productId,
|
|
|
1018
|
+ @RequestParam(value = "brand_id") Integer brandId) {
|
|
|
1019
|
+ if (null == productId || null == brandId) {
|
|
|
1020
|
+ LOG.info("in method=ufo.product.sizeImage product_id and brand_id is Null or empty");
|
|
|
1021
|
+ return new ApiResponse(400, "product_id and brand_id is Null or empty", null);
|
1011
|
}
|
1022
|
}
|
1012
|
LOG.info("in method=ufo.product.sizeImage product_id is {}", productId);
|
1023
|
LOG.info("in method=ufo.product.sizeImage product_id is {}", productId);
|
1013
|
|
1024
|
|
1014
|
- String result =productService.getSizeImage(productId);
|
1025
|
+ String result =productService.getSizeImage(productId, brandId);
|
1015
|
return new ApiResponse.ApiResponseBuilder().code(200).data(result).message("getSizeImage success").build();
|
1026
|
return new ApiResponse.ApiResponseBuilder().code(200).data(result).message("getSizeImage success").build();
|
1016
|
}
|
1027
|
}
|
1017
|
} |
1028
|
} |