| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.util.SystemInfoUtil;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | | import com.yeshi.fanli.dto.ConfigParamsDTO;
|
| | | 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.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.jd.JDGoodsException;
|
| | |
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
|
| | | import com.yeshi.fanli.vo.goods.GoodsDetailVO;
|
| | | import com.yeshi.fanli.vo.homemodule.BannerVO;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
| | | public void getJDClass(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("list", jdGoodsService.getSpecialClass());
|
| | | root.put("jdLink", configService.get(ConfigKeyEnum.jingdongH5Link.getKey()));
|
| | | root.put("jdLink", configService.getValue(ConfigKeyEnum.jingdongH5Link.getKey(), SystemInfoUtil.getSystem(acceptData)));
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | }
|
| | |
|
| | |
| | | public void getGoodsInfo(AcceptData acceptData, Long cid, Integer page, PrintWriter out) {
|
| | | JSONObject root = new JSONObject();
|
| | | if (cid == 1 && page == 1) {
|
| | | List<SwiperPicture> topPicList = swiperPictureService.getByBannerCardAndVersion("jingdong_special_index",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | | List<BannerVO> topPicList = swiperPictureService.getByBannerCardAndVersion("jingdong_special_index",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()),acceptData.getSystem());
|
| | | if (topPicList == null) {
|
| | | topPicList = new ArrayList<SwiperPicture>();
|
| | | topPicList = new ArrayList<BannerVO>();
|
| | | }
|
| | | root.put("listPic", JsonUtil.getApiCommonGson().toJson(topPicList));
|
| | |
|
| | | int platformCode = Constant.getPlatformCode(acceptData.getPlatform());
|
| | |
|
| | | List<Special> listSpecial = specialService.listByPlaceKey("jingdong_special_index", platformCode, Integer.parseInt(acceptData.getVersion()));
|
| | | List<Special> listSpecial = specialService.listByPlaceKey("jingdong_special_index", platformCode, Integer.parseInt(acceptData.getVersion()),acceptData.getSystem());
|
| | | if (listSpecial == null) {
|
| | | listSpecial = new ArrayList<Special>();
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | List<JDGoods> goodsList = jdGoodsService.specialSearch(page, cid);
|
| | | List<JDGoods> goodsList = jdGoodsService.specialSearch(page, cid,acceptData.getSystem());
|
| | | JSONArray array = new JSONArray();
|
| | | if (goodsList != null && goodsList.size() > 0) {
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | acceptData.getVersion(),acceptData.getSystem());
|
| | |
|
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|