From 144dcb2c5face20014f4f86e2a5cff00cc3b97b4 Mon Sep 17 00:00:00 2001 From: "zhiyong.ning" <354350178@qq.com> Date: Fri, 19 Mar 2021 18:02:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=94=A8=E6=88=B7token=E6=9C=89=E6=95=88?= =?UTF-8?q?=E6=9C=9F=E6=94=B9=E4=B8=BA=E4=B8=80=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yipin/liuwanr/service/UserInfoService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/yipin/liuwanr/service/UserInfoService.java b/src/main/java/com/yipin/liuwanr/service/UserInfoService.java index f382083..54c735e 100644 --- a/src/main/java/com/yipin/liuwanr/service/UserInfoService.java +++ b/src/main/java/com/yipin/liuwanr/service/UserInfoService.java @@ -453,7 +453,7 @@ public class UserInfoService { List studentList = userInfoMapper.queryStudentAll(id,roleId,schoolId); obj.put("studentList",studentList); ValueOperations redis = stringRedisTemplate.opsForValue(); - redis.set(token,date, 30 * 60, TimeUnit.SECONDS); + redis.set(token,date, 24, TimeUnit.HOURS); resp.put("retcode", 200); resp.put("retvalue", obj); }else { From 9d5b71e352d6106b7ec76f940baa3e0760cbf578 Mon Sep 17 00:00:00 2001 From: "zhiyong.ning" <354350178@qq.com> Date: Tue, 23 Mar 2021 10:58:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CustomerController.java | 8 ++++- .../controller/UserInfoController.java | 30 +++++++++++++++++++ .../yipin/liuwanr/mapper/CustomerMapper.java | 2 ++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/yipin/liuwanr/controller/CustomerController.java b/src/main/java/com/yipin/liuwanr/controller/CustomerController.java index 3e0e856..3479beb 100644 --- a/src/main/java/com/yipin/liuwanr/controller/CustomerController.java +++ b/src/main/java/com/yipin/liuwanr/controller/CustomerController.java @@ -241,12 +241,18 @@ public class CustomerController { * 查询学校 */ @GetMapping("/querySchool") - Response querySchool(@RequestParam String schoolName) { + Response querySchool(@RequestParam String schoolName,@RequestParam Integer provinceId,@RequestParam Integer cityId) { Response resp = new Response(); School school = new School(); if (schoolName != null || schoolName != "") { school.setSchoolName(schoolName); } + if (provinceId !=null){ + school.setProvinceId(provinceId); + } + school.setCityId(cityId); + if (cityId !=null ){ + } HashMap ret = customerService.querySchool(school); resp.setStatus(200); resp.setErrmessage("Parameter effective"); diff --git a/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java b/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java index 0ea5907..464a0c6 100644 --- a/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java +++ b/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java @@ -331,6 +331,36 @@ public class UserInfoController { return resp; } + /** + * 登陆查询学校/职战 + */ + @GetMapping("/zzLoginSchoolClient") + Response zzLoginSchoolClient(@RequestParam("account") String account, @RequestParam("password") String password , HttpServletRequest req, HttpServletResponse res) { + Response resp = new Response(); + UserInfo userInfo = new UserInfo(); + userInfo.setSchoolId(2105);//暂定学校id + if (account == null || account=="") { + resp.setStatus(300); + resp.setErrmessage("用户账号为空,登录失败!"); + }else if(password ==null || password=="") { + resp.setStatus(300); + resp.setErrmessage("用户密码为空,登录失败!"); + }else{ + userInfo.setAccount(account); + userInfo.setPassword(password); + HashMap ret = userInfoService.loginSchoolClient(userInfo); + int status = (int) ret.get("retcode"); + if (200 == status) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + } + return resp; + } + /** * 服务端登陆 */ diff --git a/src/main/java/com/yipin/liuwanr/mapper/CustomerMapper.java b/src/main/java/com/yipin/liuwanr/mapper/CustomerMapper.java index c4e8114..30e2d62 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/CustomerMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/CustomerMapper.java @@ -89,6 +89,8 @@ public interface CustomerMapper { //查询行业 @Select({" "}) List querySchool(School school); From f90841de503f1634e637bf9dc93b9c654bf6d4d0 Mon Sep 17 00:00:00 2001 From: "zhiyong.ning" <354350178@qq.com> Date: Tue, 23 Mar 2021 14:54:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yipin/liuwanr/controller/UserInfoController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java b/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java index 464a0c6..091485f 100644 --- a/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java +++ b/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java @@ -305,10 +305,10 @@ public class UserInfoController { * 登陆查询学校/电子科大 */ @GetMapping("/loginSchoolClient") - Response loginSchoolClient(@RequestParam("account") String account, @RequestParam("password") String password , HttpServletRequest req, HttpServletResponse res) { + Response loginSchoolClient(@RequestParam("account") String account, @RequestParam("password") String password, @RequestParam("schoolId") Integer schoolId , HttpServletRequest req, HttpServletResponse res) { Response resp = new Response(); UserInfo userInfo = new UserInfo(); - userInfo.setSchoolId(2105);//暂定学校id + userInfo.setSchoolId(schoolId);//暂定学校id if (account == null || account=="") { resp.setStatus(300); resp.setErrmessage("用户账号为空,登录失败!");