| | |
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityFlashSaleService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
|
| | | import com.yeshi.fanli.service.inter.money.UserMoneyExtraService;
|
| | | import com.yeshi.fanli.service.inter.monitor.MonitorService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderService;
|
| | | import com.yeshi.fanli.service.inter.order.ShareGoodsActivityOrderService;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserGoodsStorageService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserMoneyExtraService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getSpecialActivities")
|
| | | public void getSpecialActivities(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | public void getSpecialActivities(AcceptData acceptData, Long uid, PrintWriter out, String callback) {
|
| | | int platformCode = Constant.getPlatformCode(acceptData.getPlatform());
|
| | | List<Special> listSpecial = specialService.listByVersion(0, Integer.MAX_VALUE, "special_activities",
|
| | | platformCode, Integer.parseInt(acceptData.getVersion()));
|
| | |
|
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
|
| | | acceptData.getPackages());
|
| | | if (system == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "系统不存在"));
|
| | | return;
|
| | | List<Special> list = new ArrayList<Special>();
|
| | | if (listSpecial != null) {
|
| | | list.addAll(listSpecial);
|
| | | }
|
| | |
|
| | | try {
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | | Special special = list.get(i);
|
| | |
|
| | | List<Special> list = new ArrayList<Special>();
|
| | | // 专题活动
|
| | | String specialCard = "special_activities";
|
| | |
|
| | | List<Special> listSpecial = specialService.listPageBySystemAndCard(0, Integer.MAX_VALUE, specialCard,
|
| | | system.getId());
|
| | |
|
| | | if (listSpecial != null) {
|
| | | list.addAll(listSpecial);
|
| | | JumpDetailV2 jumpDetail = special.getJumpDetail();
|
| | | if (jumpDetail != null) {
|
| | | jumpDetail.setNeedLogin(special.isJumpLogin());
|
| | | special.setJumpDetail(jumpDetail);
|
| | | }
|
| | |
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | | Special special = list.get(i);
|
| | | String name = special.getName();
|
| | | if (StringUtil.isNullOrEmpty(name)) {
|
| | | continue;
|
| | | }
|
| | |
|
| | | JumpDetailV2 jumpDetail = special.getJumpDetail();
|
| | | if (jumpDetail != null) {
|
| | | jumpDetail.setNeedLogin(special.isJumpLogin());
|
| | | special.setJumpDetail(jumpDetail);
|
| | | }
|
| | |
|
| | | String name = special.getName();
|
| | | if (StringUtil.isNullOrEmpty(name)) {
|
| | | continue;
|
| | | }
|
| | |
|
| | | // 是否需要弹出框
|
| | | if (name.equals("账户等级特权")) {
|
| | | if (!VersionUtil.greaterThan_1_5_60(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | list.remove(i);
|
| | | i--;
|
| | | } else {
|
| | | if (uid != null) {
|
| | | special.setElastic(userTaoLiJinOriginService.hasRankHongBao(uid));
|
| | | }
|
| | | // 是否需要弹出框
|
| | | if (name.equals("账户等级特权")) {
|
| | | if (!VersionUtil.greaterThan_1_5_60(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | list.remove(i);
|
| | | i--;
|
| | | } else {
|
| | | if (uid != null) {
|
| | | special.setElastic(userTaoLiJinOriginService.hasRankHongBao(uid));
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("special", JsonUtil.getApiCommonGson().toJson(list));
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("special", JsonUtil.getApiCommonGson().toJson(list));
|
| | | if (StringUtil.isNullOrEmpty(callback))
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | else
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(root));
|
| | | }
|
| | | }
|