派生自 projectDept/qhighschool

yn147
2023-03-29 5db91cf38f04ad066163485665259808e828cbec
src/main/java/com/qxueyou/scc/sys/action/LoginController.java
@@ -294,18 +294,21 @@
    public Result platformLogin(@RequestParam("account") String account, @RequestParam("password") String password,String uuNumber,String uuReNumber,
                                HttpServletRequest request, HttpServletResponse response, String logType,String organizationId, String platForm) {
//      response.setHeader("Access-Control-Allow-Origin", "*");
       if(StringUtils.isEmpty(account)) {
          return new Result(false, "用户账号不能为空");
       }
      if (StringUtils.isEmpty(account)) {
         return new Result(false, "用户账号不能为空");
      }
//      System.out.println(account+password);
//      System.out.println("-------------------------"+organizationId+"--------------"+platForm+"-----------"+logType);
       String hql = null;
        List<Object> params = null;
      String hql = null;
      List<Object> params = null;
//        boolean flag=true;
       if("study".equals(logType)){
            hql = "from User where deleteFlag is false and account = ? and password = ? ";
            params =  CollectionUtils.newList(account,password);
        }else{
      if ("study".equals(logType)) {
         hql = "from User where deleteFlag is false and account = ? and password = ? ";
         params = CollectionUtils.newList(account, password);
      }else if("portal".equals(logType)){
         hql = "from User where deleteFlag is false and mobilePhone = ? and password = ? ";
         params = CollectionUtils.newList(account, password);
      }else{
            if(StringUtils.isEmpty(password)) {
            return new Result(false, "用户密码不能为空");
         }
@@ -371,7 +374,7 @@
      // 存到redis
      redisTemplate.opsForValue().set(UserInfoWrapper.SESSION_USER_INFO_KEY, wrapper);
      request.getSession().setAttribute(UserInfoWrapper.SESSION_USER_INFO_KEY, wrapper);
      if ("study".equals(logType)) {
      if ("study".equals(logType) || "portal".equals(logType)) {
         /*if (StringUtils.isEmpty(ClientUtils.getClassId()) && user.getRoles() == null) {
            return new Result(false, "该用户未加入任何班级或未激活,请联系班主任");
         }*/