From 032cee85a1fc0a69055f1c0d454d60aa988049ed Mon Sep 17 00:00:00 2001 From: "jiakun.lin" Date: Mon, 26 Apr 2021 14:58:22 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../liuwanr/controller/UserController.java | 24 +++++++++++++++++++ .../com/yipin/liuwanr/mapper/UserMapper.java | 4 ++++ .../yipin/liuwanr/service/UserService.java | 14 +++++++++++ 3 files changed, 42 insertions(+) diff --git a/src/main/java/com/yipin/liuwanr/controller/UserController.java b/src/main/java/com/yipin/liuwanr/controller/UserController.java index 897a8b0..e8bfdcc 100644 --- a/src/main/java/com/yipin/liuwanr/controller/UserController.java +++ b/src/main/java/com/yipin/liuwanr/controller/UserController.java @@ -556,4 +556,28 @@ public class UserController { } return resp; } + + /** + * 查询邮箱是否存在 + */ + @GetMapping("/queryEmail") + Response queryEmail(@RequestParam String email) { + Response resp = new Response(); + if (email==null||email=="") {//前台传来的值是否为空 + resp.setStatus(300); + resp.setErrmessage("邮箱为空!查询失败!"); + }else { + HashMap ret = userService.queryEmail(email); + 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/UserMapper.java b/src/main/java/com/yipin/liuwanr/mapper/UserMapper.java index 5750558..b2a37fb 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/UserMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/UserMapper.java @@ -286,4 +286,8 @@ public interface UserMapper { @Update("update user set lastTimeOfLanding=#{time},logInNumber=#{logInNumber} where userId=#{userId}") void updateUserQ(@Param("time")String time,@Param("logInNumber") Integer logInNumber,@Param("userId") Integer userId); + + //查询用户邮箱 + @Select("SELECT u.email,u.userId from hr_user_info u where isdel = 0 and email = #{email}") + List queryEmail(String email); } \ No newline at end of file diff --git a/src/main/java/com/yipin/liuwanr/service/UserService.java b/src/main/java/com/yipin/liuwanr/service/UserService.java index ca48336..6dd8fc3 100644 --- a/src/main/java/com/yipin/liuwanr/service/UserService.java +++ b/src/main/java/com/yipin/liuwanr/service/UserService.java @@ -423,4 +423,18 @@ public class UserService { } return resp; } + + public HashMap queryEmail(String email) { + HashMap resp = new HashMap(); + try { + resp.put("retvalue", userMapper.queryEmail(email)); + resp.put("retcode", 200); + } catch (RuntimeException e) { + logger.error(e.getMessage()); + resp.put("retcode", 500); + resp.put("retvalue", "查询手机号失败!"); + return resp; + } + return resp; + } } From df29a46e60a14881bb9ca79d461e14d79000511f Mon Sep 17 00:00:00 2001 From: "jiakun.lin" Date: Tue, 27 Apr 2021 17:59:53 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E7=A7=91=E5=A4=A7=EF=BC=8C=E8=81=8C?= =?UTF-8?q?=E7=AB=99=20=E6=9C=8D=E5=8A=A1=E7=AB=AF=EF=BC=8C=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E7=AB=AF=E7=99=BB=E5=BD=95=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserInfoController.java | 54 +++--------- .../yipin/liuwanr/mapper/UserInfoMapper.java | 25 +++++- .../liuwanr/service/UserInfoService.java | 88 +++++++++++++++++-- 3 files changed, 115 insertions(+), 52 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java b/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java index 660542a..9568ee5 100644 --- a/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java +++ b/src/main/java/com/yipin/liuwanr/controller/UserInfoController.java @@ -305,10 +305,9 @@ public class UserInfoController { * 登陆查询学校/电子科大 */ @GetMapping("/loginSchoolClient") - Response loginSchoolClient(@RequestParam("account") String account, @RequestParam("password") String password, @RequestParam("schoolId") Integer schoolId , HttpServletRequest req, HttpServletResponse res) { + Response loginSchoolClient(@RequestParam("account") String account, @RequestParam("password") String password, @RequestParam("schoolId") Integer schoolId , + @RequestParam("source") Integer source, HttpServletRequest req, HttpServletResponse res) { Response resp = new Response(); - UserInfo userInfo = new UserInfo(); - userInfo.setSchoolId(schoolId);//暂定学校id if (account == null || account=="") { resp.setStatus(300); resp.setErrmessage("用户账号为空,登录失败!"); @@ -316,9 +315,7 @@ public class UserInfoController { resp.setStatus(300); resp.setErrmessage("用户密码为空,登录失败!"); }else{ - userInfo.setAccount(account); - userInfo.setPassword(password); - HashMap ret = userInfoService.loginSchoolClient(userInfo); + HashMap ret = userInfoService.loginSchoolClient(account,password,schoolId,source); int status = (int) ret.get("retcode"); if (200 == status) { resp.setStatus(status); @@ -331,54 +328,29 @@ 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; - } + /** * 服务端登陆 + * + * @param account source是0就是用户账号、1则是手机号或邮箱 + * @param password 密码 + * @param source 来源区分 */ @GetMapping("/adminLogins") - Response adminLogins(@RequestParam("account") String account, @RequestParam("password") String password,HttpServletRequest req, HttpServletResponse res) { + Response adminLogins(@RequestParam("account") String account, @RequestParam("password") String password, + @RequestParam("source") Integer source, HttpServletRequest req, HttpServletResponse res) { Response resp = new Response(); - UserInfo userInfo = new UserInfo(); + HashMap map = new HashMap<>(); if (account == null) { resp.setStatus(300); resp.setErrmessage("用户账号为空,登录失败!"); - }else if(password ==null) { + }else if(password == null) { resp.setStatus(300); resp.setErrmessage("用户密码为空,登录失败!"); } else{ - userInfo.setAccount(account); - userInfo.setPassword(password); - HashMap ret = userInfoService.adminLogins(userInfo); + HashMap ret = userInfoService.adminLogins(account,password,source); int status = (int) ret.get("retcode"); if (200 == status) { diff --git a/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java b/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java index e2b0e7b..c5564f8 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java @@ -129,11 +129,23 @@ public interface UserInfoMapper { UserInfo logins(UserInfo userInfo); //登陆 - @Select("SELECT token,userId,userName,roleId,userAvatars,password from hr_user_info where isdel=0 and (account = #{account} or phone = #{account}) and password = #{password}") + @Select({""}) UserInfo adminLogins(UserInfo userInfo); //登陆账号密码 - @Select("SELECT hui.schoolId,hui.account,hui.cityId,hui.countries,hui.creationTime,hui.dateBirth,hui.documentType,hui.educationDegree,hui.email,hui.iDNumber,hui.logInNumber,hui.phone,hui.provinceId,hui.sex,hui.uniqueIdentificationAccount,hui.userAvatars,hui.userId,hui.userName,hui.weChatID,hui.password from hr_user_info hui where hui.isdel=0 and (hui.account = #{account} or hui.phone = #{account}) and password = #{password} ") + @Select({""}) UserInfo loginsAP(UserInfo userInfo); //查询用户角色 @@ -338,7 +350,14 @@ public interface UserInfoMapper { ""}) void deleteOrganizationRelationship(Integer userId); - @Select("SELECT disableAccount FROM hr_user_info u LEFT JOIN student s ON u.userId = s.userId WHERE s.schoolId = #{schoolId} AND (account = #{account} OR phone = #{account}) AND u.isdel = 0 AND s.isdel = 0") + @Select({""}) Integer queryDisableAccount(UserInfo userInfo); @Select("select roleId from hr_user_info where userId = #{userId}") diff --git a/src/main/java/com/yipin/liuwanr/service/UserInfoService.java b/src/main/java/com/yipin/liuwanr/service/UserInfoService.java index 1d6c499..0df73e2 100644 --- a/src/main/java/com/yipin/liuwanr/service/UserInfoService.java +++ b/src/main/java/com/yipin/liuwanr/service/UserInfoService.java @@ -28,6 +28,8 @@ import javax.annotation.Resource; import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; @Service @@ -392,10 +394,28 @@ public class UserInfoService { return resp; } //登陆获取学校/电子科大 - public HashMap loginSchoolClient(UserInfo userInfo){ + public HashMap loginSchoolClient(String account,String password,Integer schoolId,Integer source){ HashMap resp = new HashMap(); HashMap obj = new HashMap(); - Integer schoolId = userInfo.getSchoolId(); + UserInfo userInfo = new UserInfo(); + userInfo.setPassword(password); + userInfo.setSchoolId(schoolId); + if (source == 0){ + //账号 + userInfo.setAccount(account); + }else if(source == 1){ + if (checkPhone(account)){ + //手机号 + userInfo.setPhone(account); + }else if (checkEmail(account)){ + //邮箱 + userInfo.setEmail(account); + }else { + //防止邮箱,手机号格式错误 sql能正确执行 + userInfo.setAccount("!@#$%^&*()_+"); + } + } + Integer state = userInfoMapper.queryDisableAccount(userInfo); if (state==null){ resp.put("retcode",300); @@ -406,7 +426,7 @@ public class UserInfoService { //区分密码大小写 boolean num = false; if (user != null){ - num = userInfo.getPassword().equals(user.getPassword()); + num = password.equals(user.getPassword()); } if(user!=null && num == true) { @@ -475,14 +495,31 @@ public class UserInfoService { } //登陆 - public HashMap adminLogins(UserInfo userInfo){ + public HashMap adminLogins(String account,String password,Integer source){ HashMap resp = new HashMap(); + UserInfo user = new UserInfo(); + user.setPassword(password); try { - UserInfo user=userInfoMapper.adminLogins(userInfo); + if (source == 0){ + user.setAccount(account); + }else if (source == 1){ + if (checkPhone(account)){ + //手机号 + user.setPhone(account); + }else if (checkEmail(account)){ + //邮箱 + user.setEmail(account); + }else { + //防止邮箱,手机号格式错误 sql能正确执行 + user.setAccount("!@#$%^&*()_+"); + } + } + user = userInfoMapper.adminLogins(user); + //区分密码大小写 boolean num = false; if (user != null){ - num = userInfo.getPassword().equals(user.getPassword()); + num = password.equals(user.getPassword()); user.setPassword(null); } if(user != null){ @@ -504,8 +541,8 @@ public class UserInfoService { userInfoMapper.updateLogInNumber(user); String token = user.getToken(); ValueOperations redis = stringRedisTemplate.opsForValue(); - redis.set(token,lastLoginTime, 24, TimeUnit.HOURS); - user.setDataTime(lastLoginTime); + //redis.set(token,lastLoginTime, 24, TimeUnit.HOURS); + //user.setDataTime(lastLoginTime); resp.put("retvalue",user); resp.put("retcode", 200); } @@ -827,4 +864,39 @@ public class UserInfoService { } return resp; } + + /** + * 验证邮箱 + * @param email + * @return + */ + public boolean checkEmail(String email){ + boolean flag = false; + try{ + Pattern regex = Pattern.compile("^([a-zA-Z]|[0-9])(\\w|\\-)+@[a-zA-Z0-9]+\\.([a-zA-Z]{2,4})$"); + Matcher matcher = regex.matcher(email); + flag = matcher.matches(); + }catch(Exception e){ + flag = false; + } + return flag; + } + + /** + * 验证手机号码 + * @param phone + * @return + */ + public boolean checkPhone(String phone){ + boolean flag = false; + try{ + Pattern regex = Pattern.compile("^1[3456789]\\d{9}$"); + Matcher matcher = regex.matcher(phone); + flag = matcher.matches(); + }catch(Exception e){ + flag = false; + } + return flag; + } + } From 5d194d832d373e65ec7c3dfd9beefab9bac7b340 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Wed, 28 Apr 2021 15:39:16 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E8=81=8C=E7=AB=99=E6=AD=A3=E5=BC=8F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../liuwanr/controller/PetController.java | 20 ++---- .../resources/application-prod.properties | 38 +++++++++++ .../resources/application-test.properties | 41 ++++-------- src/main/resources/application.properties | 65 +------------------ 5 files changed, 60 insertions(+), 106 deletions(-) create mode 100644 src/main/resources/application-prod.properties diff --git a/pom.xml b/pom.xml index 5d82d82..1b0714e 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ - ROOT + root org.apache.maven.plugins diff --git a/src/main/java/com/yipin/liuwanr/controller/PetController.java b/src/main/java/com/yipin/liuwanr/controller/PetController.java index 8f1b804..18b58f7 100644 --- a/src/main/java/com/yipin/liuwanr/controller/PetController.java +++ b/src/main/java/com/yipin/liuwanr/controller/PetController.java @@ -1,20 +1,12 @@ package com.yipin.liuwanr.controller; -import java.util.HashMap; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - import com.yipin.liuwanr.entity.Pet; import com.yipin.liuwanr.entity.Response; import com.yipin.liuwanr.service.PetService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.HashMap; @RestController @RequestMapping("/pet") @@ -26,7 +18,7 @@ public class PetController { @PostMapping("/create") Response createPet(@RequestHeader("X-UUID") String uuid, @RequestBody Pet pet) { Response resp = new Response(); - HashMap ret = petService.create(uuid, pet); + HashMap ret = petService.create(uuid, pet); int status = (int) ret.get("retcode"); if(200 == status){ resp.setStatus(status); @@ -82,7 +74,7 @@ public class PetController { } else{ resp.setStatus(status); - resp.setErrmessage(ret.get("retvalue").toString()); + resp.setErrmessage(ret.get("retvalue").toString() ); } return resp; } diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties new file mode 100644 index 0000000..6427289 --- /dev/null +++ b/src/main/resources/application-prod.properties @@ -0,0 +1,38 @@ +server.port=8090 +server.servlet.context-path=/liuwanr + +#\u6B63\u5F0F\u6570\u636E\u5E93\u8FDE\u63A5 +spring.datasource.url=jdbc:mysql://rm-wz90d92p0pf083nxzno.mysql.rds.aliyuncs.com:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai +spring.datasource.username=root +spring.datasource.password=HuoRan@2021 +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver + +#redis\u914D\u7F6E +spring.redis.database=0 +spring.redis.host=127.0.0.1 +spring.redis.password= +spring.redis.port=6379 +spring.redis.timeout=3000 +spring.redis.jedis.pool.max-idle=500 +spring.redis.jedis.pool.min-idle=50 +spring.redis.jedis.pool.max-active=2000 +spring.redis.jedis.pool.max-wait=1000 + +#\u65E5\u5FD7\u7EA7\u522B +logging.level.jdbc=OFF +logging.level.jdbc.sqltiming=DEBUG +logging.level.jdbc.resultsettable=DEBUG +logging.level.com.yipin.liuwar.mapper=DEBUG +logging.level.com.yipin.liuwanr.mapper=DEBUG + +spring.elasticsearch.rest.uris=http://es-cn-v641e944a0006xtwy.elasticsearch.aliyuncs.com:9200 +spring.elasticsearch.rest.username=elastic +spring.elasticsearch.rest.password=1qaz@WSX + +# maxFileSize \u5355\u4E2A\u6570\u636E\u5927\u5C0F +spring.servlet.multipart.maxFileSize = 1024MB +# maxRequestSize \u662F\u603B\u6570\u636E\u5927\u5C0F +spring.servlet.multipart.maxRequestSize=10240MB + +pagehelper.reasonable=false + diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties index 192779a..4924092 100644 --- a/src/main/resources/application-test.properties +++ b/src/main/resources/application-test.properties @@ -1,21 +1,13 @@ -# See http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html -spring.thymeleaf.cache=false -spring.main.show-banner=false - -logging.level.jdbc=OFF -logging.level.jdbc.sqltiming=DEBUG -logging.level.jdbc.resultsettable=DEBUG -logging.level.com.yipin.liuwar.mapper=DEBUG +server.port=8090 +server.servlet.context-path=/liuwanr -spring.datasource.url=jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/keda?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai +#\u6D4B\u8BD5\u6570\u636E\u5E93\u8FDE\u63A5 +spring.datasource.url=jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai spring.datasource.username=super spring.datasource.password=huoran888 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -spring.mina.port=9123 -spring.mina.buffersize=2048 -spring.mina.idletime=15 - +#redis\u914D\u7F6E spring.redis.database=0 spring.redis.host=127.0.0.1 spring.redis.password=msdw@2021 @@ -25,29 +17,22 @@ spring.redis.jedis.pool.max-idle=500 spring.redis.jedis.pool.min-idle=50 spring.redis.jedis.pool.max-active=2000 spring.redis.jedis.pool.max-wait=1000 -#spring.redis.pool.max-idle=500 -#spring.redis.pool.min-idle=50 -#spring.redis.pool.max-active=2000 -#spring.redis.pool.max-wait=1000 + +#\u65E5\u5FD7\u7EA7\u522B +logging.level.jdbc=OFF +logging.level.jdbc.sqltiming=DEBUG +logging.level.jdbc.resultsettable=DEBUG +logging.level.com.yipin.liuwar.mapper=DEBUG +logging.level.com.yipin.liuwanr.mapper=DEBUG spring.elasticsearch.rest.uris=http://es-cn-v641e944a0006xtwy.elasticsearch.aliyuncs.com:9200 spring.elasticsearch.rest.username=elastic spring.elasticsearch.rest.password=1qaz@WSX -pagehelper.reasonable=false - # maxFileSize \u5355\u4E2A\u6570\u636E\u5927\u5C0F spring.servlet.multipart.maxFileSize = 1024MB # maxRequestSize \u662F\u603B\u6570\u636E\u5927\u5C0F spring.servlet.multipart.maxRequestSize=10240MB -logging.level.com.yipin.liuwanr.mapper=debug - -#redis-cluster -redis.cluster.maxTotal=200 -redis.cluster.maxIdle=8 -redis.cluster.minIdle=3 -redis.cluster.nodes=192.168.136.191:8000,192.168.136.191:8001,192.168.136.191:8002 +pagehelper.reasonable=false -server.port=8090 -server.servlet.context-path= /liuwanr \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 63313e8..bab924b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,63 +1,2 @@ -# See http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html -spring.thymeleaf.cache=false -spring.main.show-banner=false - -logging.level.jdbc=OFF -logging.level.jdbc.sqltiming=DEBUG -logging.level.jdbc.resultsettable=DEBUG -logging.level.com.yipin.liuwar.mapper=DEBUG - -#Ʒliuwanr -ְվĿ -#spring.datasource.url=jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/huoran?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true -#spring.datasource.username=super -#spring.datasource.password=huoran888 -#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver - -#Ȼʽ -ƴĿ -spring.datasource.url=jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/keda?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai -spring.datasource.username=super -spring.datasource.password=huoran888 -spring.datasource.driver-class-name=com.mysql.jdbc.Driver - - - - -spring.mina.port=9123 -spring.mina.buffersize=2048 -spring.mina.idletime=15 - -spring.redis.database=0 -spring.redis.host=127.0.0.1 -spring.redis.password= -spring.redis.port=6379 -spring.redis.timeout=3000 -spring.redis.jedis.pool.max-idle=500 -spring.redis.jedis.pool.min-idle=50 -spring.redis.jedis.pool.max-active=2000 -spring.redis.jedis.pool.max-wait=1000 -#spring.redis.pool.max-idle=500 -#spring.redis.pool.min-idle=50 -#spring.redis.pool.max-active=2000 -#spring.redis.pool.max-wait=1000 - -spring.elasticsearch.rest.uris=http://es-cn-v641e944a0006xtwy.elasticsearch.aliyuncs.com:9200 -spring.elasticsearch.rest.username=elastic -spring.elasticsearch.rest.password=1qaz@WSX - -pagehelper.reasonable=false - -# maxFileSize \u5355\u4E2A\u6570\u636E\u5927\u5C0F -spring.servlet.multipart.maxFileSize = 1024MB -# maxRequestSize \u662F\u603B\u6570\u636E\u5927\u5C0F -spring.servlet.multipart.maxRequestSize=10240MB - -logging.level.com.yipin.liuwanr.mapper=debug - -#redis-cluster -redis.cluster.maxTotal=200 -redis.cluster.maxIdle=8 -redis.cluster.minIdle=3 -redis.cluster.nodes=192.168.136.191:8000,192.168.136.191:8001,192.168.136.191:8002 - -server.port=8090 -server.servlet.context-path= /liuwanr \ No newline at end of file +#\u9009\u62E9\u6307\u5B9A\u73AF\u5883,\u76EE\u524D\u53EA\u6709\u6D4B\u8BD5\u548C\u6B63\u5F0F\u73AF\u5883 +spring.profiles.active=prod \ No newline at end of file From 5f23361244aa9805e62093d8b7fd4b79b7324cdc Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Thu, 29 Apr 2021 16:07:25 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-prod.properties | 11 +++++++++++ src/main/resources/application-test.properties | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 6427289..7895a9e 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -18,6 +18,17 @@ spring.redis.jedis.pool.min-idle=50 spring.redis.jedis.pool.max-active=2000 spring.redis.jedis.pool.max-wait=1000 +#redis-cluster +redis.cluster.maxTotal=200 +redis.cluster.maxIdle=8 +redis.cluster.minIdle=3 +redis.cluster.nodes=192.168.136.191:8000,192.168.136.191:8001,192.168.136.191:8002 + +spring.mina.port=9123 +spring.mina.buffersize=2048 +spring.mina.idletime=15 +spring.main.show-banner=false + #\u65E5\u5FD7\u7EA7\u522B logging.level.jdbc=OFF logging.level.jdbc.sqltiming=DEBUG diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties index 4924092..b008d14 100644 --- a/src/main/resources/application-test.properties +++ b/src/main/resources/application-test.properties @@ -18,6 +18,17 @@ spring.redis.jedis.pool.min-idle=50 spring.redis.jedis.pool.max-active=2000 spring.redis.jedis.pool.max-wait=1000 +#redis-cluster +redis.cluster.maxTotal=200 +redis.cluster.maxIdle=8 +redis.cluster.minIdle=3 +redis.cluster.nodes=192.168.136.191:8000,192.168.136.191:8001,192.168.136.191:8002 + +spring.mina.port=9123 +spring.mina.buffersize=2048 +spring.mina.idletime=15 +spring.main.show-banner=false + #\u65E5\u5FD7\u7EA7\u522B logging.level.jdbc=OFF logging.level.jdbc.sqltiming=DEBUG From 1e3b1c7dec8d614601558377133b85b2aa5df734 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Fri, 7 May 2021 14:26:05 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=88=A4=E6=96=AD=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E9=87=8D=E5=A4=8D=E5=A4=84=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=A7=92=E8=89=B2id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java b/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java index e2b0e7b..c45a925 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java @@ -274,7 +274,7 @@ public interface UserInfoMapper { void updateStaffLogInNumber(UserInfo user); //查询账号是否存在 - @Select("SELECT account,email,userName,userId,uniqueIdentificationAccount,phone from hr_user_info where isdel = 0 and account = #{account}") + @Select("SELECT account,email,userName,userId,uniqueIdentificationAccount,phone,roleId from hr_user_info where isdel = 0 and account = #{account}") List queryAccountIsExist(String account); //查询账号是否存在 From 8334037c81ce46010d0bb18df05c30ecbc2a83fb Mon Sep 17 00:00:00 2001 From: "jiakun.lin" Date: Sat, 8 May 2021 11:48:29 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-test.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties index b008d14..3574706 100644 --- a/src/main/resources/application-test.properties +++ b/src/main/resources/application-test.properties @@ -10,7 +10,7 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver #redis\u914D\u7F6E spring.redis.database=0 spring.redis.host=127.0.0.1 -spring.redis.password=msdw@2021 +spring.redis.password= spring.redis.port=6379 spring.redis.timeout=3000 spring.redis.jedis.pool.max-idle=500