|
@@ -77,15 +77,15 @@ public class ProductController { |
|
@@ -77,15 +77,15 @@ public class ProductController { |
77
|
@IgnoreSession
|
77
|
@IgnoreSession
|
78
|
@RequestMapping(params = "method=ufo.product.storage.leastprice")
|
78
|
@RequestMapping(params = "method=ufo.product.storage.leastprice")
|
79
|
//@Cachable(expire=600)
|
79
|
//@Cachable(expire=600)
|
80
|
- public StorageLeastPriceResp queryStorageLeastprice(
|
80
|
+ public ApiResponse queryStorageLeastprice(
|
81
|
@RequestParam(value = "storage_id", required = true) Integer storageId) {
|
81
|
@RequestParam(value = "storage_id", required = true) Integer storageId) {
|
82
|
|
82
|
|
83
|
- return queryStorageLeastprice();
|
83
|
+ return new ApiResponse.ApiResponseBuilder().data(queryStorageLeastprice()).code(200).message("storage.leastprice").build();
|
84
|
}
|
84
|
}
|
85
|
|
85
|
|
86
|
|
86
|
|
87
|
private StorageLeastPriceResp queryStorageLeastprice(){
|
87
|
private StorageLeastPriceResp queryStorageLeastprice(){
|
88
|
- String mockJson = "{\"storage_least_price\":{\"storage_id\":2,\"least_price\":124.3}}";
|
88
|
+ String mockJson = "{\"storage_least_price\":[{\"storage_id\":2,\"least_price\":124.3}]}";
|
89
|
StorageLeastPriceResp resp = UfoJsonUtil.safelyParseObject(mockJson, StorageLeastPriceResp.class);
|
89
|
StorageLeastPriceResp resp = UfoJsonUtil.safelyParseObject(mockJson, StorageLeastPriceResp.class);
|
90
|
return resp;
|
90
|
return resp;
|
91
|
}
|
91
|
}
|
|
@@ -95,10 +95,10 @@ public class ProductController { |
|
@@ -95,10 +95,10 @@ public class ProductController { |
95
|
@IgnoreSession
|
95
|
@IgnoreSession
|
96
|
@RequestMapping(params = "method=ufo.product.storage.data")
|
96
|
@RequestMapping(params = "method=ufo.product.storage.data")
|
97
|
//@Cachable(expire=600)
|
97
|
//@Cachable(expire=600)
|
98
|
- public StorageDataResp queryStorageInfo(
|
98
|
+ public ApiResponse queryStorageInfo(
|
99
|
@RequestParam(value = "storage_id", required = true) Integer storageId) {
|
99
|
@RequestParam(value = "storage_id", required = true) Integer storageId) {
|
100
|
|
100
|
|
101
|
- return queryStorageData();
|
101
|
+ return new ApiResponse.ApiResponseBuilder().data(queryStorageData()).code(200).message("storage.data").build();
|
102
|
}
|
102
|
}
|
103
|
|
103
|
|
104
|
|
104
|
|