| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.json.JSONArray;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | |
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.FloatAD;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.FloatAD.FloatADTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | |
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.vo.homemodule.BannerVO;
|
| | | import com.yeshi.fanli.vo.user.UserDialogBtnVO;
|
| | | import com.yeshi.fanli.vo.user.UserDialogVO;
|
| | | import com.yeshi.fanli.vo.user.VIPUpgradedNotifyVO;
|
| | |
| | | data.put("taoBaoCart", source);
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | // 我的界面banner
|
| | | List<SwiperPicture> banner = swiperPictureService.getByBannerCardAndVersion("my_interface_banner",
|
| | | acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | | if (banner == null)
|
| | | banner = new ArrayList<SwiperPicture>();
|
| | | data.put("banner", JsonUtil.getApiCommonGson().toJson(banner));
|
| | | // IOS正在上线版本
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())
|
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
|
| | | data.put("banner", new JSONArray());
|
| | | } else {
|
| | | // 我的界面banner
|
| | | List<BannerVO> banner = swiperPictureService.getByBannerCardAndVersion("my_interface_banner",
|
| | | acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | | if (banner == null)
|
| | | banner = new ArrayList<BannerVO>();
|
| | | data.put("banner", JsonUtil.getApiCommonGson().toJson(banner));
|
| | | }
|
| | | }
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | |
| | | }
|
| | |
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | // TODO 验证是否是导师
|
| | | UserVIPPreInfo info = userVIPPreInfoService.getLatestProcessInfo(uid);
|
| | |
|
| | | JSONObject inner = new JSONObject();
|
| | | inner.put("link", userVipConfigService.getValueByKey("vip_link"));
|
| | | inner.put("ion", "http://img.flqapp.com/resource/vip/icon_vip.png");
|
| | |
| | | inner.put("btnName", "升级会员");
|
| | |
|
| | | if (uid != null) {
|
| | | if (info!=null&&info.getProcess()==UserVIPPreInfo.PROCESS_3) {
|
| | | if (info != null && info.getProcess() >= UserVIPPreInfo.PROCESS_3) {
|
| | | inner.put("link", userVipConfigService.getValueByKey("vip_link"));
|
| | | inner.put("ion", "http://img.flqapp.com/resource/vip/icon_tearcher.png");
|
| | | inner.put("title", "拿五险与津贴 享导师权益");
|
| | | inner.put("btnName", "升级会员");
|
| | | if (info.getProcess() == UserVIPPreInfo.PROCESS_4)
|
| | | inner.put("btnName", "板栗快省");
|
| | | else
|
| | | inner.put("btnName", "升级导师");
|
| | | } else {
|
| | | UserVIPPreInfo userVIPPreInfo = userVIPPreInfoService.getLatestProcessInfo(uid);
|
| | | if (userVIPPreInfo != null) {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | data.put("vip", inner);
|
| | | // IOS正在上线
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())
|
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
|
| | | } else
|
| | | data.put("vip", inner);
|
| | | // 平台规则
|
| | | String platformRuleLink = configService.get(ConfigKeyEnum.platformRule.getKey());
|
| | | data.put("platformRule", platformRuleLink);
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | // 云发单链接
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | boolean cloudOpen = configService.isRobotCloudOpen();
|
| | | if (!cloudOpen && uid != null) {
|
| | | List<String> testUsers = configService.getTestUsers();
|
| | | if (testUsers != null && testUsers.contains(uid+"")) {
|
| | | cloudOpen = true;
|
| | | }
|
| | | }
|
| | | |
| | | if (cloudOpen) {
|
| | | data.put("cloudLink", configService.get(ConfigKeyEnum.robotCloudLink.getKey())); |
| | | }
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("获取失败"));
|