...
|
...
|
@@ -3,6 +3,7 @@ package com.yohoufo.product.controller; |
|
|
import com.yoho.tools.docs.ApiOperation;
|
|
|
import com.yohoufo.common.utils.UfoJsonUtil;
|
|
|
import com.yohoufo.product.response.ProductDetailResp;
|
|
|
import com.yohoufo.product.response.SortTemplateResp;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
...
|
...
|
@@ -14,6 +15,7 @@ import com.yohoufo.common.annotation.IgnoreSignature; |
|
|
import com.yohoufo.common.cache.Cachable;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
public class ProductController {
|
|
|
|
...
|
...
|
@@ -41,4 +43,24 @@ public class ProductController { |
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(name = "ufo.product.sort.template", desc="商品列表")
|
|
|
@IgnoreSignature
|
|
|
@IgnoreSession
|
|
|
@RequestMapping(params = "method=ufo.product.sort.template")
|
|
|
//@Cachable(expire=600)
|
|
|
public ApiResponse querySortTemplateData(
|
|
|
@RequestParam(value = "skns", required = false) String skns) {
|
|
|
|
|
|
if (null == skns) {
|
|
|
return new ApiResponse(500, "skns Is Null", null);
|
|
|
}
|
|
|
return new ApiResponse.ApiResponseBuilder().data(querySortTemplateData()).code(200).message("product data").build();
|
|
|
}
|
|
|
|
|
|
private SortTemplateResp querySortTemplateData(){
|
|
|
String mockJson = "{\"list\":[{\"src\":\"http://img13.static.yhbimg.com/goodsimg/2012/11/07/15/02c24ff8521007bad91dfa5d55e667d8f7.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80\",\"title\":\"鞋子\"},{\"src\":\"http://img13.static.yhbimg.com/goodsimg/2012/11/07/15/02c24ff8521007bad91dfa5d55e667d8f7.jpg?imageMogr2/thumbnail/{width}x{height}/background/d2hpdGU=/position/center/quality/80\",\"title\":\"袜子\"}]}";
|
|
|
SortTemplateResp resp = UfoJsonUtil.safelyParseObject(mockJson, SortTemplateResp.class);
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|