| | |
| | |
|
| | | 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.google.gson.Gson;
|
| | |
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
|
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsResult;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.Special;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取专题渠道活动
|
| | | * |
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param callback
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getSpecialChannelActivity")
|
| | | public void getSpecialChannelActivity(AcceptData acceptData, Long uid, String callback, PrintWriter out) {
|
| | | List<Special> list = specialService.listByPlaceKey("special_channel_activity");
|
| | | // 删除尚未启用的过期的
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | | Special special = list.get(i);
|
| | | if (special.getState() == 1L) {
|
| | | list.remove(i--);
|
| | | }else{
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder().excludeFieldsWithoutExposeAnnotation();
|
| | | Gson gson = gsonBuilder.create();
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", count);
|
| | | data.put("list", gson.toJson(list));
|
| | | if (!StringUtil.isNullOrEmpty(callback)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } else
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | }
|