| | |
| | | import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.exception.banner.SwiperPictureException;
|
| | | import com.yeshi.fanli.exception.tlj.UserTaoLiJinOriginException;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | | import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoLiJinUtil;
|
| | | <<<<<<< HEAD |
| | | import com.yeshi.fanli.vo.goods.GoodsDetailVO;
|
| | | import com.yeshi.fanli.vo.goods.MoneyInfoVO;
|
| | | import com.yeshi.fanli.vo.goods.OtherInfo;
|
| | | ======= |
| | | import com.yeshi.fanli.vo.goods.taobao.TLJBuyHongBaoVO;
|
| | | >>>>>>> refs/remotes/origin/master |
| | | import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
|
| | | import com.yeshi.fanli.vo.tlj.SpreadHongBao;
|
| | | import com.yeshi.fanli.vo.tlj.TaoLiJinDetailVO;
|
| | |
| | | BigDecimal thisMonthWin = userTaoLiJinOriginService.countMoneyByDate(uid, 3);
|
| | | BigDecimal lastMonthWin = userTaoLiJinOriginService.countMoneyByDate(uid, 4);
|
| | |
|
| | | BigDecimal zero = new BigDecimal(0);
|
| | | // 消耗
|
| | | BigDecimal todayUse = userTaoLiJinDetailService.countUseMoneyByDate(uid, 1);
|
| | | if (todayUse == null || todayUse.compareTo(zero) > 0) {
|
| | | todayUse = zero;
|
| | | }
|
| | | |
| | | BigDecimal yesterdayUse = userTaoLiJinDetailService.countUseMoneyByDate(uid, 2);
|
| | | if (yesterdayUse == null || yesterdayUse.compareTo(zero) > 0) {
|
| | | yesterdayUse = zero;
|
| | | }
|
| | | BigDecimal thisMonthUse = userTaoLiJinDetailService.countUseMoneyByDate(uid, 3);
|
| | | if (thisMonthUse == null || thisMonthUse.compareTo(zero) > 0) {
|
| | | thisMonthUse = zero;
|
| | | }
|
| | | BigDecimal lastMonthUse = userTaoLiJinDetailService.countUseMoneyByDate(uid, 4);
|
| | | if (lastMonthUse == null || lastMonthUse.compareTo(zero) > 0) {
|
| | | lastMonthUse = zero;
|
| | | }
|
| | | |
| | |
|
| | | // 问号链接
|
| | | String helpLink = configTaoLiJinService.getValueByKey("hongbao_help_link");
|
| | |
| | | }
|
| | |
|
| | | // 登录用户
|
| | | boolean isReceive = false;
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("icon", configTaoLiJinService.getValueByKey("taolijin_system_icon"));
|
| | |
|
| | |
| | | UserTaoLiJinOrigin userTaoLiJin = userTaoLiJinOriginService.getRankByThisMonth(uid, type);
|
| | | if (userTaoLiJin != null) { // 已领取
|
| | | isRank = true;
|
| | | isReceive = true;
|
| | | hasMoney = userTaoLiJin.getMoney();
|
| | | } else {
|
| | | isRank = false;
|
| | |
| | | data.put("content", "推广红包,好友福利!");
|
| | | data.put("type", 1);
|
| | | data.put("money", hasMoney.setScale(2).toString());
|
| | | data.put("usage", "领取成功,已存入“我的-推广红包”");
|
| | | if (isReceive) {
|
| | | data.put("usage", "本月领取,已存入“我的-推广红包”");
|
| | | } else {
|
| | | data.put("usage", "领取成功,已存入“我的-推广红包”");
|
| | | }
|
| | | data.put("jumpName", "去使用");
|
| | | data.put("jumpDetail", jumpDetailV2Service.getByTypeCache("share_goods_hot"));
|
| | | data.put("tip", configTaoLiJinService.getValueByKey("hongbao_rank_tip"));
|
| | |
| | | data.put("count", array.size());
|
| | | data.put("list", array);
|
| | | if (page == 1) {
|
| | | try {
|
| | | List<SwiperPicture> bannerList = swiperPictureService.getByBannerCard("zigoulijian_banner");
|
| | | if (bannerList != null && bannerList.size() > 0)
|
| | | data.put("topPicture", bannerList.get(0).getSrc());
|
| | | else
|
| | | data.put("topPicture", "");
|
| | | } catch (SwiperPictureException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | List<SwiperPicture> bannerList = swiperPictureService.getByBannerCard("zigoulijian_banner");
|
| | | |
| | | if (bannerList != null && bannerList.size() > 0)
|
| | | data.put("topPicture", bannerList.get(0).getSrc());
|
| | | else
|
| | | data.put("topPicture", "");
|
| | | |
| | | data.put("ruleUrl", configService.get("zigoulijian_rule"));
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|