From c9cfe7bcc6f309e7278cac8bddfce9f281fd5cde Mon Sep 17 00:00:00 2001 From: yn147 <2270338776@qq.com> Date: 星期二, 28 三月 2023 12:53:27 +0800 Subject: [PATCH] 门户登录 --- src/main/java/com/qxueyou/scc/sys/action/LoginController.java | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) 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 2e07cd7..7aa42d1 100644 --- a/src/main/java/com/qxueyou/scc/sys/action/LoginController.java +++ b/src/main/java/com/qxueyou/scc/sys/action/LoginController.java @@ -294,22 +294,25 @@ 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, "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖"); } - hql = "from User where deleteFlag is false and account = ? and password = ? "; + hql = "from User where deleteFlag is false and mobilePhone = ? and password = ? "; params = CollectionUtils.newList(account,password); } -- Gitblit v1.8.0