Showing
1 changed file
with
3 additions
and
2 deletions
@@ -5,6 +5,7 @@ import org.slf4j.LoggerFactory; | @@ -5,6 +5,7 @@ import org.slf4j.LoggerFactory; | ||
5 | import org.springframework.beans.factory.annotation.Autowired; | 5 | import org.springframework.beans.factory.annotation.Autowired; |
6 | import org.springframework.stereotype.Service; | 6 | import org.springframework.stereotype.Service; |
7 | 7 | ||
8 | +import com.alibaba.fastjson.JSON; | ||
8 | import com.alibaba.fastjson.JSONArray; | 9 | import com.alibaba.fastjson.JSONArray; |
9 | import com.alibaba.fastjson.JSONObject; | 10 | import com.alibaba.fastjson.JSONObject; |
10 | import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder; | 11 | import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder; |
@@ -38,7 +39,7 @@ public class ProductQueryServiceImpl implements IProductQueryService { | @@ -38,7 +39,7 @@ public class ProductQueryServiceImpl implements IProductQueryService { | ||
38 | logger.info("begin invoke ufo.product.series.template, param is:{}", params); | 39 | logger.info("begin invoke ufo.product.series.template, param is:{}", params); |
39 | ApiResponse apiResponse = ufoServiceCaller.call(SERIES_METHOD, ApiResponse.class, params); | 40 | ApiResponse apiResponse = ufoServiceCaller.call(SERIES_METHOD, ApiResponse.class, params); |
40 | if (null != apiResponse && apiResponse.getCode() == 200) { | 41 | if (null != apiResponse && apiResponse.getCode() == 200) { |
41 | - JSONObject productSeriesJSON = (JSONObject) apiResponse.getData(); | 42 | + JSONObject productSeriesJSON = (JSONObject) JSON.toJSON(apiResponse.getData()); |
42 | if (null != productSeriesJSON && null != productSeriesJSON.get("list")) { | 43 | if (null != productSeriesJSON && null != productSeriesJSON.get("list")) { |
43 | data = productSeriesJSON.getJSONArray("list"); | 44 | data = productSeriesJSON.getJSONArray("list"); |
44 | } | 45 | } |
@@ -83,7 +84,7 @@ public class ProductQueryServiceImpl implements IProductQueryService { | @@ -83,7 +84,7 @@ public class ProductQueryServiceImpl implements IProductQueryService { | ||
83 | logger.info("begin invoke ufo.product.sort.template, param is:{}", params); | 84 | logger.info("begin invoke ufo.product.sort.template, param is:{}", params); |
84 | ApiResponse apiResponse = ufoServiceCaller.call(CATEGORY_METHOD, ApiResponse.class, params); | 85 | ApiResponse apiResponse = ufoServiceCaller.call(CATEGORY_METHOD, ApiResponse.class, params); |
85 | if (null != apiResponse && apiResponse.getCode() == 200) { | 86 | if (null != apiResponse && apiResponse.getCode() == 200) { |
86 | - JSONObject productCategoryJSON = (JSONObject) apiResponse.getData(); | 87 | + JSONObject productCategoryJSON = (JSONObject) JSON.toJSON(apiResponse.getData()); |
87 | if (null != productCategoryJSON) { | 88 | if (null != productCategoryJSON) { |
88 | data = productCategoryJSON; | 89 | data = productCategoryJSON; |
89 | } | 90 | } |
-
Please register or login to post a comment