| | |
| | | import com.yeshi.buwan.domain.*; |
| | | import com.yeshi.buwan.domain.Collection; |
| | | import com.yeshi.buwan.domain.user.LoginUser; |
| | | import com.yeshi.buwan.dto.user.LoginInfoDto; |
| | | import com.yeshi.buwan.exception.user.LoginUserException; |
| | | import com.yeshi.buwan.exception.user.RegisterUserException; |
| | | import com.yeshi.buwan.service.imp.*; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumDataManager; |
| | | import com.yeshi.buwan.util.*; |
| | |
| | | object.put("data", array); |
| | | out.print(JsonUtil.loadTrueJson(object.toString())); |
| | | } else { |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(acceptData.getPlatform(), acceptData.getVersion()); |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(detailSystem, acceptData.getVersion()); |
| | | String cacheMD5 = "0"; |
| | | if (resourceList != null && resourceList.size() > 0) |
| | | for (Long l : resourceList) |
| | |
| | | object.put("data", array); |
| | | out.print(JsonUtil.loadTrueJson(object.toString())); |
| | | } else { |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(acceptData.getPlatform(), acceptData.getVersion()); |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(detailSystem, acceptData.getVersion()); |
| | | String cacheMD5 = "0"; |
| | | if (resourceList != null && resourceList.size() > 0) |
| | | for (Long l : resourceList) |
| | |
| | | i--; |
| | | } |
| | | } |
| | | |
| | | List<String> keyList = banQuanService.getBanQuanKeyListAll(Integer.parseInt(detailSystem.getId())); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | |
| | | boolean delete = false; |
| | | for (int j = 0; j < keyList.size(); j++) { |
| | | if (list.get(i).getName().contains(keyList.get(j))) { |
| | | delete = true; |
| | | break; |
| | | } |
| | | } |
| | | if (delete) { |
| | | list.remove(i); |
| | | i--; |
| | | } |
| | | |
| | | } |
| | | // |
| | | // List<String> keyList = banQuanService.getBanQuanKeyListAll(Integer.parseInt(detailSystem.getId())); |
| | | // for (int i = 0; i < list.size(); i++) { |
| | | // |
| | | // boolean delete = false; |
| | | // for (int j = 0; j < keyList.size(); j++) { |
| | | // if (list.get(i).getName().contains(keyList.get(j))) { |
| | | // delete = true; |
| | | // break; |
| | | // } |
| | | // } |
| | | // if (delete) { |
| | | // list.remove(i); |
| | | // i--; |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | for (int i = 0; i < list.size(); i++) { |
| | | ((VideoInfo) list.get(i)) |
| | |
| | | |
| | | DetailSystem ds = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(acceptData.getPlatform(), acceptData.getVersion()); |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(acceptData.getDetailSystem(), acceptData.getVersion()); |
| | | List<VideoInfo> list1 = StringUtil.isNullOrEmpty(videoId) |
| | | ? recommendService.guessLikeList(ds.getId(), 4, resourceList, CacheUtil.getMD5Long(resourceList)) |
| | | : recommendService.guessLikeList(ds.getId(), 4, videoId, resourceList, |
| | |
| | | return; |
| | | } |
| | | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(acceptData.getPlatform(), acceptData.getVersion()); |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(acceptData.getDetailSystem(), acceptData.getVersion()); |
| | | |
| | | DetailSystem ds = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | List<VideoInfo> list = recommendService.getRelativeVideoList(ds.getId(), 4, videoId, resourceList, |
| | |
| | | return; |
| | | } |
| | | |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(acceptData.getPlatform(), acceptData.getVersion()); |
| | | List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(acceptData.getDetailSystem(), acceptData.getVersion()); |
| | | |
| | | DetailSystem ds = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | List<VideoInfo> list1 = recommendService.peopleSee(ds.getId(), 4, videoId, resourceList, |
| | |
| | | if (StringUtil.isNullOrEmpty(nickName)) |
| | | nickName = "无名氏"; |
| | | |
| | | DetailSystem ds = systemService.getDetailSystemByPackage(acceptData.getPackageName()); |
| | | // 注册 --用户名,昵称,密码 |
| | | LoginUser user = new LoginUser(); |
| | | user.setCreatetime(System.currentTimeMillis() + ""); |
| | | user.setDetailsystem(ds.getId()); |
| | | user.setDevice(acceptData.getDevice()); |
| | | user.setLoginType(3); |
| | | user.setName(nickName); |
| | | user.setOpenid(account); |
| | | user.setPwd(StringUtil.Md5(pwd)); |
| | | user.setPortrait(savePortrait(portrait, request.getSession())); |
| | | user.setIpinfo(ip + ":" + port); |
| | | |
| | | String result = userService.registerByEmail(user); |
| | | if (result.contains("成功")) |
| | | LoginInfoDto loginInfoDto = new LoginInfoDto(); |
| | | loginInfoDto.setEmail(account); |
| | | loginInfoDto.setSystemId(acceptData.getDetailSystem().getSystem().getId()); |
| | | loginInfoDto.setLoginType(LoginUser.LOGIN_TYPE_EMAIL); |
| | | loginInfoDto.setPwd(StringUtil.Md5(pwd)); |
| | | loginInfoDto.setIpInfo(ip + ":" + port); |
| | | loginInfoDto.setNickName(nickName); |
| | | |
| | | |
| | | try { |
| | | userService.register(loginInfoDto); |
| | | out.print(JsonUtil.loadTrueJson("注册成功")); |
| | | else |
| | | out.print(JsonUtil.loadFalseJson(result)); |
| | | } catch (RegisterUserException e) { |
| | | out.print(JsonUtil.loadFalseJson(e.getMessage())); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | // systemService.getDetailSystemByPackage(packageName); |
| | | // 注册 --用户名,昵称,密码 |
| | | |
| | | LoginUser user = new LoginUser(); |
| | | user.setDevice(acceptData.getDevice()); |
| | | user.setLoginType(3); |
| | | user.setOpenid(account); |
| | | user.setPwd(StringUtil.Md5(pwd)); |
| | | user.setPortrait("http://buwan-1255749512.file.myqcloud.com/resource/ic_portrait_default.png"); |
| | | user = userService.loginByEmail(user); |
| | | if (user == null || user.getState() != LoginUser.STATE_NORMAL) |
| | | out.print(JsonUtil.loadFalseJson("账号或密码错误")); |
| | | else |
| | | LoginInfoDto loginInfoDto = new LoginInfoDto(); |
| | | loginInfoDto.setLoginType(LoginUser.LOGIN_TYPE_EMAIL); |
| | | loginInfoDto.setSystemId(acceptData.getDetailSystem().getSystem().getId()); |
| | | loginInfoDto.setEmail(account); |
| | | loginInfoDto.setPwd(StringUtil.Md5(pwd)); |
| | | try { |
| | | LoginUser user = userService.login(loginInfoDto); |
| | | out.print(JsonUtil.loadTrueJson(StringUtil.outPutResultJson(user))); |
| | | } catch (LoginUserException e) { |
| | | out.print(JsonUtil.loadFalseJson(e.getMessage())); |
| | | } |
| | | } |
| | | |
| | | /** |