| | |
| | | import com.yeshi.fanli.entity.taobao.TLJFreeBuyGoods;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.exception.user.UserInfoException;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.goods.ShareGoodsService;
|
| | |
| | | * @param uid
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "gerFreeList", method = RequestMethod.POST)
|
| | | public void gerFreeList(AcceptData acceptData, int page, Long uid, PrintWriter out) {
|
| | | @RequestMapping(value = "gerFreeList")
|
| | | public void gerFreeList(String callback, AcceptData acceptData, int page, Long uid, PrintWriter out) {
|
| | | if (uid == null || uid <= 0) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | | }
|
| | |
|
| | | String day = TimeUtil.getGernalTime(java.lang.System.currentTimeMillis());
|
| | | List<TLJFreeBuyGoods> listFree = tljFreeBuyGoodsService.listByDay(day);
|
| | | if (listFree == null) {
|
| | | // TODO
|
| | | listFree = new ArrayList<TLJFreeBuyGoods>();
|
| | | }
|
| | |
|
| | |
| | | data.put("count", array.size());
|
| | | data.put("list", array);
|
| | | if (page == 1) {
|
| | | List<SwiperPicture> bannerList = swiperPictureService.getByBannerCard("free_buy_banner");
|
| | | if (bannerList != null && bannerList.size() > 0) {
|
| | | data.put("topPicture", bannerList.get(0).getSrc());
|
| | | } else {
|
| | | data.put("topPicture", "");
|
| | | try {
|
| | | data.put("portrait", userInfoService.getUserInfo(uid).getPortrait());
|
| | | } catch (UserInfoException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(1, e.getMsg()));
|
| | | return;
|
| | | }
|
| | |
|
| | | String state = "已过期";
|
| | |
| | |
|
| | | data.put("state", state);
|
| | | data.put("balance","新人红包:" + balance.setScale(2) + "元");
|
| | | data.put("ruleUrl", configTaoLiJinService.getValueByKey("new_user_free_buy_list_rule"));
|
| | | data.put("rule", configTaoLiJinService.getValueByKey("new_user_free_buy_list_rule"));
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | }
|