| | |
| | | package com.yeshi.fanli.controller;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.io.UnsupportedEncodingException;
|
| | | import java.math.BigDecimal;
|
| | | import java.net.URLEncoder;
|
| | | import java.text.MessageFormat;
|
| | |
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.taobao.api.ApiException;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSecondClass;
|
| | | import com.yeshi.fanli.entity.bus.recommend.RecommendDetails;
|
| | | import com.yeshi.fanli.entity.bus.recommend.RecommendSectionDetail;
|
| | | import com.yeshi.fanli.entity.bus.recommend.RecommendSectionGoods;
|
| | |
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoCouponService;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.ThreeSaleRankService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
|
| | | import com.yeshi.fanli.service.inter.user.ScanHistoryService;
|
| | | import com.yeshi.fanli.service.inter.user.ShamUserService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.AESUtil;
|
| | |
| | | private ClassRecommendGoodsService classRecommendGoodsService;
|
| | |
|
| | | @Resource
|
| | | private ScanHistoryService scanHistoryService;
|
| | |
|
| | | @Resource
|
| | | private ConfigService configService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | |
|
| | |
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Resource
|
| | | private ThreeSaleRankService threeSaleRankService;
|
| | |
|
| | | @Resource
|
| | | private BusinessSystemService businessSystemService;
|
| | |
|
| | | @Resource
|
| | |
| | | + Constant.systemCommonConfig.getAndroidPackageName();
|
| | |
|
| | | private static final String DOWNURL2 = "http://121.42.200.138/apk/fanliquan20180124.apk";
|
| | |
|
| | | @RequestMapping("classify")
|
| | | public String setClassify(long id, String key, String title, Model model) {
|
| | | String decodeKey = "";
|
| | | String decodeName = "";
|
| | | try {
|
| | | decodeKey = new String(key.getBytes("iso8859-1"), "UTF-8");
|
| | | decodeName = new String(title.getBytes("iso8859-1"), "UTF-8");
|
| | | } catch (UnsupportedEncodingException e) {
|
| | | decodeKey = key;
|
| | | decodeName = title;
|
| | | e.printStackTrace();
|
| | | }
|
| | | List<GoodsSecondClass> goodsSecondClassList = goodsSecondClassService.getGoodsSecondClassByGoodsClassId(id);
|
| | | List<TaoBaoGoodsBriefExtra> taoBaoGoodsBriefExtraList = scanHistoryService
|
| | | .getHotTaoBaoGoodsBriefExtras(decodeKey, 1);
|
| | | model.addAttribute("goodsSecondClassList", goodsSecondClassList);
|
| | | model.addAttribute("taoBaoGoodsBriefExtraList", taoBaoGoodsBriefExtraList);
|
| | | model.addAttribute("title", decodeName);
|
| | | return "classify";
|
| | | }
|
| | |
|
| | | @RequestMapping("coupon")
|
| | | public String conpon(Model model) {
|
| | |
| | | data.put("taoBaoCouponList", Utils.imgListSize(JsonUtil.getApiCommonGson().toJson(taoBaoCouponList)));
|
| | | data.put("proportion", proportion);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "getHotGoods", method = RequestMethod.POST)
|
| | | public void getHotGoods(String key, int page, PrintWriter out) {
|
| | | List<TaoBaoGoodsBriefExtra> taoBaoGoodsBriefExtraList = scanHistoryService.getHotTaoBaoGoodsBriefExtras(key,
|
| | | page);
|
| | | if (taoBaoGoodsBriefExtraList.size() > 0) {
|
| | | out.append(JsonUtil.loadTrueResult(taoBaoGoodsBriefExtraList));
|
| | | } else {
|
| | | out.append(JsonUtil.loadFalseResult("没有更多商品"));
|
| | | }
|
| | | }
|
| | |
|
| | | @RequestMapping("share")
|