| | |
| | | import com.yeshi.fanli.entity.bus.tlj.DeviceTaoLiJinRecord;
|
| | | import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinOrigin;
|
| | | import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinOrigin.TaoLiJinOriginEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | | import com.yeshi.fanli.entity.config.AppHomeFloatImg;
|
| | | import com.yeshi.fanli.entity.taobao.ClientTBPid;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | |
| | | import com.yeshi.fanli.service.inter.tlj.DeviceTaoLiJinRecordService;
|
| | | import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinOriginService;
|
| | | import com.yeshi.fanli.service.inter.user.TBPidService;
|
| | | import com.yeshi.fanli.service.inter.user.UserActiveLogService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private UserTaoLiJinOriginService uerTaoLiJinOriginService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private DeviceTaoLiJinRecordService deviceTaoLiJinRecordService;
|
| | |
|
| | | |
| | | |
| | | @Resource
|
| | | private UserActiveLogService userActiveLogService;
|
| | |
|
| | | /**
|
| | | * 首页配置信息
|
| | | * s 首页配置信息
|
| | | *
|
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getHomeConfig", method = RequestMethod.POST)
|
| | | public void getHomeConfig(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | if (uid != null && uid == 0L)
|
| | | uid = null;
|
| | |
|
| | | AppHomeFloatImg appHomeFloatImg = configService.getAppHomeFloatImg();
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform()) && !Constant.IS_TEST) {
|
| | | appHomeFloatImg = null;
|
| | |
| | | }
|
| | |
|
| | | FloatAD floatAD = null;
|
| | | |
| | | if (uid == null) {
|
| | | DeviceTaoLiJinRecord deviceRecord = deviceTaoLiJinRecordService.getByDevice(acceptData.getDevice());
|
| | | if (deviceRecord == null) {
|
| | | floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX, 1);
|
| | | }
|
| | | } else {
|
| | | UserTaoLiJinOrigin userTaoLiJin = uerTaoLiJinOriginService.getByUidAndOrigin(uid, TaoLiJinOriginEnum.newbiesWin.name());
|
| | | if (userTaoLiJin == null) {
|
| | | floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX, 1);
|
| | |
|
| | | if (VersionUtil.greaterThan_1_5_60(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (uid == null) {
|
| | | DeviceTaoLiJinRecord deviceRecord = deviceTaoLiJinRecordService.getByDevice(acceptData.getDevice());
|
| | | if (deviceRecord == null) {
|
| | | floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX, 1);
|
| | | }
|
| | | } else {
|
| | | UserTaoLiJinOrigin userTaoLiJin = uerTaoLiJinOriginService.getByUidAndOrigin(uid,
|
| | | TaoLiJinOriginEnum.newbiesWin.name());
|
| | | if (userTaoLiJin == null) {
|
| | | floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX, 1);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | // 无新人弹框 则查询默认
|
| | | if (floatAD == null) {
|
| | | floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX, null);
|
| | | floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX, 0);
|
| | | }
|
| | | |
| | |
|
| | | if (floatAD != null) {
|
| | | JSONObject detail = new JSONObject();
|
| | | detail.put("img", floatAD.getPicture());
|
| | |
| | | data.put("htmlLink", configService.get("index_html_link_android"));
|
| | | }
|
| | |
|
| | | // 判断新老用户
|
| | | UserActiveLog da = null;
|
| | | if (uid != null)
|
| | | da = userActiveLogService.getFirstActiveInfo(uid);
|
| | | // 新人
|
| | | if (da == null || (System.currentTimeMillis() - da.getCreateTime().getTime()) <= 1000 * 60 * 60 * 24 * 15L) {
|
| | | data.put("userTimeType", 0);
|
| | | } else {// 老人
|
| | | data.put("userTimeType", 1);
|
| | | }
|
| | | data.put("hotFuctionLink", configService.get("hot_function_url"));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 消息中心弹框
|
| | | * |
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param out
|
| | |
| | | public void getMSGConfig(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | boolean show = false;
|
| | | if (uid != null ) {
|
| | | if (uid != null) {
|
| | | show = uerTaoLiJinOriginService.hasRankHongBao(uid);
|
| | | }
|
| | | |
| | |
|
| | | if (show) {
|
| | | FloatAD floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_MSGCENTER, null);
|
| | | if (floatAD != null) {
|
| | |
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @RequestMapping(value = "getTaoBaoCartConfig", method = RequestMethod.POST)
|
| | | public void getTaoBaoCartConfig(AcceptData acceptData, String position, Long uid, PrintWriter out) {
|
| | | if (uid == null || uid <= 0) {
|
| | |
| | | "android".equalsIgnoreCase(acceptData.getPlatform()) ? 1 : 2);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取邀请码帮助链接
|
| | | * |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getInviteCodeInputHelp", method = RequestMethod.POST)
|
| | | public void getInviteCodeInputHelp(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("helpUrl", configService.get("invite_code_input_help"));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | }
|