From f788607ff771a47bc60d6a86e00b3433c40f3d2c Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 24 九月 2021 15:22:03 +0800 Subject: [PATCH] 接入视频直播 --- src/main/java/com/yeshi/buwan/controller/parser/web/WebUserParser.java | 31 +++++++++++++++---------------- 1 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/yeshi/buwan/controller/parser/web/WebUserParser.java b/src/main/java/com/yeshi/buwan/controller/parser/web/WebUserParser.java index 6921ec3..3a1a0fe 100644 --- a/src/main/java/com/yeshi/buwan/controller/parser/web/WebUserParser.java +++ b/src/main/java/com/yeshi/buwan/controller/parser/web/WebUserParser.java @@ -9,15 +9,13 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; -import org.omg.PortableServer.REQUEST_PROCESSING_POLICY_ID; import org.springframework.stereotype.Controller; -import com.yeshi.buwan.controller.parser.UserParser; import com.yeshi.buwan.domain.Attention; import com.yeshi.buwan.domain.Comment2; import com.yeshi.buwan.domain.CommentReply; -import com.yeshi.buwan.domain.DetailSystem; -import com.yeshi.buwan.domain.LoginUser; +import com.yeshi.buwan.domain.system.DetailSystem; +import com.yeshi.buwan.domain.user.LoginUser; import com.yeshi.buwan.domain.VideoInfo; import com.yeshi.buwan.service.imp.AttentionService; import com.yeshi.buwan.service.imp.CommentService; @@ -114,6 +112,7 @@ String key = request.getParameter("Key"); String page = request.getParameter("Page"); String contentType = request.getParameter("ContentType"); + String channel=request.getParameter("Channel"); if (StringUtil.isNullOrEmpty(method)) { out.print(JsonUtil.loadFalseJsonNoencript("璇蜂笂浼燤ethod")); @@ -143,7 +142,7 @@ key = StringUtil.getUTF8String(key, "ISO-8859-1"); DetailSystem detailSystem = systemService.getDetailSystemByPackage(packageName); - List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(platform, Integer.parseInt("0")); + List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(detailSystem, Integer.parseInt("1"),channel); String cacheMD5 = "0"; if (resourceList != null && resourceList.size() > 0) for (Long l : resourceList) @@ -264,17 +263,17 @@ DetailSystem detailSystem = systemService.getDetailSystemByPackage(packageName); - LoginUser lu = userService.getLoginUser(openid, detailSystem.getId(), Integer.parseInt(loginType), portrait, - name,UserParser.getIp(request)+":"+request.getRemotePort()); - if (lu != null) { - JSONObject object = new JSONObject(); - object.put("LoginUid", lu.getId()); - object.put("Name", lu.getName()); - object.put("Portrait", lu.getPortrait()); - out.print(JsonUtil.loadTrueJsonNoencript(object.toString())); - } else { +// LoginUser lu = userService.getLoginUser(openid, detailSystem.getId(), Integer.parseInt(loginType), portrait, +// name,UserParser.getIp(request)+":"+request.getRemotePort()); +// if (lu != null) { +// JSONObject object = new JSONObject(); +// object.put("LoginUid", lu.getId()); +// object.put("Name", lu.getName()); +// object.put("Portrait", lu.getPortrait()); +// out.print(JsonUtil.loadTrueJsonNoencript(object.toString())); +// } else { out.print(JsonUtil.loadFalseJsonNoencript("鐧诲綍澶辫触")); - } +// } } private String savePortrait(HttpServletRequest request) { @@ -678,7 +677,7 @@ int pageIndex = Integer.parseInt(page); java.util.List<Comment2> list1 = commentService.getComment2List(videoId, thirdType, pageIndex); - List<Comment2> list = new ArrayList<Comment2>(); + List<Comment2> list = new ArrayList<>(); if (list1 != null) for (Comment2 cm : list1) list.add(cm); -- Gitblit v1.8.0