admin
2021-09-24 f788607ff771a47bc60d6a86e00b3433c40f3d2c
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("请上传Method"));
@@ -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);