package com.yeshi.fanli.controller.h5;
|
|
import java.io.PrintWriter;
|
import java.util.List;
|
|
import javax.annotation.Resource;
|
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.yeshi.utils.JsonUtil;
|
|
import com.yeshi.fanli.entity.accept.AcceptData;
|
import com.yeshi.fanli.service.inter.pdd.PDDGoodsService;
|
|
@Controller
|
@RequestMapping("api/h5/v1/pddgoods")
|
public class H5PDDGoodsController {
|
|
@Resource
|
private PDDGoodsService pddGoodsService;
|
|
/**
|
* 获取拼多多的图文详情
|
*
|
* @param acceptData
|
* @param callback
|
* @param id
|
* @param out
|
*/
|
@RequestMapping(value = "getImageList", method = RequestMethod.GET)
|
public void getCouponList(AcceptData acceptData, String callback, Long id, PrintWriter out) {
|
if (id == null || id == 0) {
|
out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("请上传商品ID")));
|
return;
|
}
|
List<String> list = pddGoodsService.getDetailImageList(id);
|
out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(list)));
|
}
|
|
}
|