From a7ad52353293223b66d041b5baca8661340ac9a9 Mon Sep 17 00:00:00 2001 From: yn147 <2270338776@qq.com> Date: 星期四, 20 七月 2023 11:33:03 +0800 Subject: [PATCH] zhyly登录 --- src/main/java/com/qxueyou/scc/sys/action/LoginController.java | 5 ++++- src/main/java/com/qxueyou/scc/controller/ClassController.java | 9 ++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/qxueyou/scc/controller/ClassController.java b/src/main/java/com/qxueyou/scc/controller/ClassController.java index c6037be..4f177a3 100644 --- a/src/main/java/com/qxueyou/scc/controller/ClassController.java +++ b/src/main/java/com/qxueyou/scc/controller/ClassController.java @@ -12,13 +12,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.qxueyou.scc.admin.classes.model.ClsClass; import com.qxueyou.scc.admin.classes.model.ClsSubjectChapter; @@ -48,6 +42,7 @@ */ @Api(tags="鐝骇绠$悊鎺ュ彛") @RestController +@CrossOrigin @RequestMapping("/admin/class") public class ClassController { diff --git a/src/main/java/com/qxueyou/scc/sys/action/LoginController.java b/src/main/java/com/qxueyou/scc/sys/action/LoginController.java index be0ded6..d361310 100644 --- a/src/main/java/com/qxueyou/scc/sys/action/LoginController.java +++ b/src/main/java/com/qxueyou/scc/sys/action/LoginController.java @@ -419,6 +419,9 @@ }else if("portal".equals(logType)){ hql = "from User where deleteFlag is false and email = ?"; params = CollectionUtils.newList(account); + }else if("zhyly".equals(logType)){ + hql = "from User where deleteFlag is false and mobilePhone = ? and creator != '绠$悊鍛�'"; + params = CollectionUtils.newList(account); }else{ if(StringUtils.isEmpty(password)) { return new Result(false, "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖"); @@ -491,7 +494,7 @@ // 瀛樺埌redis redisTemplate.opsForValue().set(UserInfoWrapper.SESSION_USER_INFO_KEY, wrapper); request.getSession().setAttribute(UserInfoWrapper.SESSION_USER_INFO_KEY, wrapper); - if ("study".equals(logType) || "portal".equals(logType)) { + if ("study".equals(logType) || "portal".equals(logType) || "zhyly".equals(logType)) { /*if (StringUtils.isEmpty(ClientUtils.getClassId()) && user.getRoles() == null) { return new Result(false, "璇ョ敤鎴锋湭鍔犲叆浠讳綍鐝骇鎴栨湭婵�娲伙紝璇疯仈绯荤彮涓讳换"); }*/ -- Gitblit v1.8.0