From 5634ba20237b40c82f1d14bdb471804f579457fd Mon Sep 17 00:00:00 2001 From: river <1376754470@qq.com> Date: Fri, 23 Oct 2020 16:05:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../financial/hrauth/config/WeChatConfig.java | 6 -- .../controller/UserLoginController.java | 21 +++-- .../financial/hrauth/dao/UserLoginDao.java | 2 + .../financial/hrauth/service/UserService.java | 1 + .../service/impl/UserLoginServiceImpl.java | 3 +- .../hrauth/service/impl/UserServiceImpl.java | 32 +++++++ .../src/main/resources/bootstrap.properties | 86 +++++++++---------- .../mapper/hrauth/UserLoginMapper.xml | 5 ++ .../financial/hrms/config/CorsConfig.java | 70 +++++++-------- .../hrms/controller/UserController.java | 6 +- .../hrms/service/impl/UserServiceImpl.java | 12 +-- .../src/main/resources/bootstrap.properties | 82 +++++++++--------- .../src/main/resources/bootstrap.properties | 4 +- .../src/main/resources/jwt.properties | 5 +- 员工信息一览表.xlsx | 0 员工信息导入模板.xlsx | 0 16 files changed, 189 insertions(+), 146 deletions(-) delete mode 100644 员工信息一览表.xlsx delete mode 100644 员工信息导入模板.xlsx diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/config/WeChatConfig.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/config/WeChatConfig.java index 73153950..f719ef78 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/config/WeChatConfig.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/config/WeChatConfig.java @@ -37,12 +37,6 @@ public class WeChatConfig implements Serializable { @Value("${wxopen.redirect_url}") private String openRedirectUrl; - /** - * 绑定微信回调url - */ - @Value("${wxopen.wechat_binding_redirect_url}") - private String weChatBindingRedirectUrl; - /** * 微信开放平台二维码连接 */ diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java index c2d1bcd2..718b5a46 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java @@ -37,6 +37,7 @@ public class UserLoginController implements UserLoginControllerApi { @Autowired private WeChatConfig weChatConfig; + @Autowired private UserService userService; @@ -122,14 +123,18 @@ public class UserLoginController implements UserLoginControllerApi { public void wechatUserCallback(@RequestParam(value = "code",required = true) String code, String state, HttpServletResponse response) throws IOException { log.info("来了微信回调url============================="); - UserEntity user = userService.saveWeChatUser(code,response); - if(user != null){ - long times = 86400; - //生成jwt - String token = JwtUtils.createJWT(user.getId()+"","token", times); - // state 当前用户的页面地址,需要拼接 http:// 这样才不会站内跳转 - response.sendRedirect("http://www.huorantech.cn/dq/index.html#/Dashboard?token="+token); - //response.sendRedirect(state+"?token="+token+"&head_img="+user.getHeadImg()+"&name="+URLEncoder.encode(user.getName(),"UTF-8")); + if("STATE".equals(state)){ + UserEntity user = userService.saveWeChatUser(code,response); + if(user != null){ + long times = 86400; + //生成jwt + String token = JwtUtils.createJWT(user.getId()+"","token", times); + // state 当前用户的页面地址,需要拼接 http:// 这样才不会站内跳转 + response.sendRedirect("http://www.huorantech.cn/dq/index.html#/Dashboard?token="+token); + //response.sendRedirect(state+"?token="+token+"&head_img="+user.getHeadImg()+"&name="+URLEncoder.encode(user.getName(),"UTF-8")); + } + }else { + userService.weChatBinding(code,response); } } diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/UserLoginDao.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/UserLoginDao.java index 19a16ea9..b2b0b921 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/UserLoginDao.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/UserLoginDao.java @@ -21,4 +21,6 @@ public interface UserLoginDao extends BaseMapper { UserEntity selectByPhoneAccount(String phoneAccount); UserEntity findByOpenid(String openId); int updateOpenIdByPhoneAccount(@Param("phoneAccount") String phoneAccount, @Param("wechatId") String wechatId); + + Boolean updateWeChat(@Param("id") Long id, @Param("weChatId") String weChatId); } diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/UserService.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/UserService.java index ca7867ed..3e3365da 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/UserService.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/UserService.java @@ -13,4 +13,5 @@ public interface UserService extends IService { UserEntity saveWeChatUser(String code, HttpServletResponse response); + Boolean weChatBinding(String code,HttpServletResponse response); } diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java index 9da90996..7ce4a9cd 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java @@ -242,7 +242,7 @@ public class UserLoginServiceImpl extends ServiceImpl WeChatConfig weChatConfigResponse = new WeChatConfig(); weChatConfigResponse.setOpenAppid(weChatConfig.getOpenAppid()); weChatConfigResponse.setOpenAppsecret(weChatConfig.getOpenAppsecret()); - weChatConfigResponse.setOpenRedirectUrl(weChatConfig.getWeChatBindingRedirectUrl()); + weChatConfigResponse.setOpenRedirectUrl(weChatConfig.getOpenRedirectUrl()); return weChatConfigResponse; } @Override @@ -250,5 +250,4 @@ public class UserLoginServiceImpl extends ServiceImpl return userLoginDao.selectCount(mobile); } - } diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java index 1afdf45c..27b76050 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java @@ -117,4 +117,36 @@ public class UserServiceImpl extends ServiceImpl imple e.printStackTrace(); }*/ } + + /** + * 绑定微信的回调 + */ + @Override + public Boolean weChatBinding(String code, HttpServletResponse response) { + + String accessTokenUrl = String.format(weChatConfig.getOPEN_ACCESS_TOKEN_URL(),weChatConfig.getOpenAppid(),weChatConfig.getOpenAppsecret(),code); + + //获取access_token + Map baseMap = HttpUtils.doGet(accessTokenUrl); + if(baseMap == null || baseMap.isEmpty()){ + return false; + } + String openId = (String) baseMap.get("openid"); + /*HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String token = request.getHeader("token"); + String userId = RedisUtil.get("dq:token:"+token);*/ + //TODO:测试环境模拟从redis中拿取用户id + String userId = "1"; + Boolean result = this.getBaseMapper().updateWeChat(Long.parseLong(userId), openId); + log.info("绑定成功---------------------------------------"); + if (result){ + try { + log.info("转发成功---------------------------------------"); + response.sendRedirect("https://www.baidu.com?openId="+openId); + }catch (IOException e){ + e.printStackTrace(); + } + } + return false; + } } diff --git a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties index 1ab68e8e..72adf141 100644 --- a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties +++ b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties @@ -1,63 +1,63 @@ -# 开发和测试环境(dev) +#开发和测试环境(dev) +spring.application.name=dq-financial-hrms-auth + +spring.cloud.nacos.config.server-addr=192.168.31.142:8848 +spring.cloud.nacos.config.namespace=7632bdaa-3381-4669-b3f9-2fc73be451e8 +#spring.cloud.nacos.config.group=prod + +spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml +spring.cloud.nacos.config.ext-config[0].group=dev +spring.cloud.nacos.config.ext-config[0].refresh=true + +spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml +spring.cloud.nacos.config.ext-config[1].group=dev +spring.cloud.nacos.config.ext-config[1].refresh=true + +spring.cloud.nacos.config.ext-config[2].data-id=other.yml +spring.cloud.nacos.config.ext-config[2].group=dev +spring.cloud.nacos.config.ext-config[2].refresh=true + +spring.redis.host=192.168.232.128 +spring.redis.port=6379 +spring.redis.password= +spring.redis.database=0 +spring.redis.timeout=30000 +spring.redis.jedis.pool.max-active=8 +spring.redis.jedis.pool.max-wait=-1 +spring.redis.jedis.pool.max-idle=8 +spring.redis.jedis.pool.min-idle=0 + +##微信开放平台配置 +#wxopen.appid=wx3b7bca679da34921 +#wxopen.appsecret=c8de113c18052b4e2173d913511e486d +##回调地址 +#wxopen.redirect_url=http://www.occupationlab.com/apiHrmsAuth/hrms/auth/userlogin/user/callback +# +###正式环境(prod) #spring.application.name=dq-financial-hrms-auth # -#spring.cloud.nacos.config.server-addr=192.168.31.142:8848 -#spring.cloud.nacos.config.namespace=7632bdaa-3381-4669-b3f9-2fc73be451e8 +#spring.cloud.nacos.config.server-addr=120.78.127.12:8848 +#spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4 ##spring.cloud.nacos.config.group=prod # #spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml -#spring.cloud.nacos.config.ext-config[0].group=dev +#spring.cloud.nacos.config.ext-config[0].group=prod #spring.cloud.nacos.config.ext-config[0].refresh=true # #spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml -#spring.cloud.nacos.config.ext-config[1].group=dev +#spring.cloud.nacos.config.ext-config[1].group=prod #spring.cloud.nacos.config.ext-config[1].refresh=true # #spring.cloud.nacos.config.ext-config[2].data-id=other.yml -#spring.cloud.nacos.config.ext-config[2].group=dev +#spring.cloud.nacos.config.ext-config[2].group=prod #spring.cloud.nacos.config.ext-config[2].refresh=true # #spring.redis.host=127.0.0.1 #spring.redis.port=6379 -#spring.redis.password=123456 +#spring.redis.password=dq123456 #spring.redis.database=0 #spring.redis.timeout=30000 #spring.redis.jedis.pool.max-active=8 #spring.redis.jedis.pool.max-wait=-1 #spring.redis.jedis.pool.max-idle=8 -#spring.redis.jedis.pool.min-idle=0 - -##微信开放平台配置 -#wxopen.appid=wx3b7bca679da34921 -#wxopen.appsecret=c8de113c18052b4e2173d913511e486d -##回调地址 -#wxopen.redirect_url=http://www.occupationlab.com/apiHrmsAuth/hrms/auth/userlogin/user/callback -# -##正式环境(prod) -spring.application.name=dq-financial-hrms-auth - -spring.cloud.nacos.config.server-addr=120.78.127.12:8848 -spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4 -#spring.cloud.nacos.config.group=prod - -spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml -spring.cloud.nacos.config.ext-config[0].group=prod -spring.cloud.nacos.config.ext-config[0].refresh=true - -spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml -spring.cloud.nacos.config.ext-config[1].group=prod -spring.cloud.nacos.config.ext-config[1].refresh=true - -spring.cloud.nacos.config.ext-config[2].data-id=other.yml -spring.cloud.nacos.config.ext-config[2].group=prod -spring.cloud.nacos.config.ext-config[2].refresh=true - -spring.redis.host=127.0.0.1 -spring.redis.port=6379 -spring.redis.password=dq123456 -spring.redis.database=0 -spring.redis.timeout=30000 -spring.redis.jedis.pool.max-active=8 -spring.redis.jedis.pool.max-wait=-1 -spring.redis.jedis.pool.max-idle=8 -spring.redis.jedis.pool.min-idle=0 \ No newline at end of file +#spring.redis.jedis.pool.min-idle=0 \ No newline at end of file diff --git a/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml b/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml index af3fd3da..b5ed1710 100644 --- a/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml +++ b/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml @@ -45,4 +45,9 @@ update hrms_user set wechat_id = #{wechatId} where phone_account = #{phoneAccount} + + + UPDATE hrms_user SET wechat_id = #{weChatId} WHERE id = #{id} + + \ No newline at end of file diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/config/CorsConfig.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/config/CorsConfig.java index fc82045d..29f453dc 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/config/CorsConfig.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/config/CorsConfig.java @@ -1,34 +1,36 @@ -package com.daqing.financial.hrms.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.cors.CorsConfiguration; -import org.springframework.web.cors.UrlBasedCorsConfigurationSource; -import org.springframework.web.filter.CorsFilter; - -/** - * 实现基本的跨域请求 - * - * @auther River - * @date 2020/9/25 15:09 - */ -@Configuration -public class CorsConfig { - - @Bean - public CorsFilter corsFilter() { - final UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource(); - final CorsConfiguration corsConfiguration = new CorsConfiguration(); - /*是否允许请求带有验证信息*/ - corsConfiguration.setAllowCredentials(true); - /*允许访问的客户端域名*/ - corsConfiguration.addAllowedOrigin("*"); - /*允许服务端访问的客户端请求头*/ - corsConfiguration.addAllowedHeader("*"); - /*允许访问的方法名,GET POST等*/ - corsConfiguration.addAllowedMethod("*"); - urlBasedCorsConfigurationSource.registerCorsConfiguration("/**", corsConfiguration); - return new CorsFilter(urlBasedCorsConfigurationSource); - } -} -//TODO:跨域注解,上线时注解掉,网关已经统一处理了 +//package com.daqing.financial.hrms.config; +// +//import org.springframework.cloud.client.discovery.DiscoveryClient; +//import org.springframework.context.annotation.Bean; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.web.cors.CorsConfiguration; +//import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +//import org.springframework.web.filter.CorsFilter; +// +///** +// * 实现基本的跨域请求 +// * +// * @auther River +// * @date 2020/9/25 15:09 +// */ +//@Configuration +//public class CorsConfig { +// +// @Bean +// public CorsFilter corsFilter() { +// final UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource(); +// final CorsConfiguration corsConfiguration = new CorsConfiguration(); +// //是否允许请求带有验证信息 +// corsConfiguration.setAllowCredentials(true); +// //允许访问的客户端域名 +// corsConfiguration.addAllowedOrigin("*"); +// //允许服务端访问的客户端请求头 +// corsConfiguration.addAllowedHeader("*"); +// //允许访问的方法名,GET POST等 +// corsConfiguration.addAllowedMethod("*"); +// urlBasedCorsConfigurationSource.registerCorsConfiguration("/**", corsConfiguration); +// return new CorsFilter(urlBasedCorsConfigurationSource); +// } +// +//} +////TODO:跨域注解,上线时注解掉,网关已经统一处理了 diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/UserController.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/UserController.java index 5f80a560..e78002a8 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/UserController.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/UserController.java @@ -96,12 +96,12 @@ public class UserController implements UserControllerApi { /** * 微信绑定回调 */ - @GetMapping("/weChatCallback") + @GetMapping("/callbackBinding") public ResponseResult weChatCallback(@RequestParam("code") String code, HttpServletResponse response) throws IOException { - userService.weChatCallback(code,response); + Boolean result = userService.weChatCallback(code, response); - return null; + return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL(); } /** diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java index 4ed15308..43592986 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java @@ -58,7 +58,7 @@ public class UserServiceImpl extends ServiceImpl implements if (weChatConfig == null){ employeeAndUser.setWechatId("二维码获取失败,请稍后重试"); }else { - employeeAndUser.setWechatId(String.format(weChatConfig.get("OPEN_QRCODE_URL").toString(),weChatConfig.get("openAppid"), + employeeAndUser.setWechatId(String.format(weChatConfig.get("open_QRCODE_URL").toString(),weChatConfig.get("openAppid"), weChatConfig.get("openRedirectUrl"),weChatConfig.get("openAppsecret"))); } }else { @@ -214,7 +214,7 @@ public class UserServiceImpl extends ServiceImpl implements } String code = (int)((Math.random() * 9 + 1) * 100000)+ ""; // 发送短信 - Boolean result = SendSMS.sendCode(phone,"SMS_204155294",code); + Boolean result = SendSMS.sendCode(phone,"SMS_204986402",code); if (result){ RedisUtil.setEx(phone,code,PromptSuccess.OVERDUE_TIME); return true; @@ -251,15 +251,15 @@ public class UserServiceImpl extends ServiceImpl implements public Boolean weChatCallback(String code, HttpServletResponse response) { log.info("微信回调成功---------------------------------------"); - JSONObject responseResult = hrmsAuthFeignService.getWeChatConfig(); JSONObject weChatConfig = responseResult.getJSONObject("data"); - String accessTokenUrl = String.format(weChatConfig.get("OPEN_ACCESS_TOKEN_URL").toString(), weChatConfig.get("openAppid"), weChatConfig.get("openAppsecret"), code); + String accessTokenUrl = String.format(String.valueOf(weChatConfig.get("open_ACCESS_TOKEN_URL")), weChatConfig.get("openAppid"), weChatConfig.get("openAppsecret"), code); //获取access_token Map baseMap = HttpUtils.doGet(accessTokenUrl); - - if(baseMap == null || baseMap.isEmpty()){ return false; } + if(baseMap == null || baseMap.isEmpty()){ + return false; + } String openId = (String) baseMap.get("openid"); /*HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); String token = request.getHeader("token"); diff --git a/dq-financial-hrms/src/main/resources/bootstrap.properties b/dq-financial-hrms/src/main/resources/bootstrap.properties index 06998181..18172a22 100644 --- a/dq-financial-hrms/src/main/resources/bootstrap.properties +++ b/dq-financial-hrms/src/main/resources/bootstrap.properties @@ -1,61 +1,61 @@ -##服务名称 -#spring.application.name=dq-financial-hrms -##配置中心地址 -#spring.cloud.nacos.config.server-addr=192.168.31.142:8848 -#spring.cloud.nacos.config.namespace=4c56c2f9-b6a3-4e7b-88b8-b1001e86dfd6 -##spring.cloud.nacos.config.group=prod -# -#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml -#spring.cloud.nacos.config.ext-config[0].group=dev -#spring.cloud.nacos.config.ext-config[0].refresh=true -# -#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml -#spring.cloud.nacos.config.ext-config[1].group=dev -#spring.cloud.nacos.config.ext-config[1].refresh=true -# -#spring.cloud.nacos.config.ext-config[2].data-id=other.yml -#spring.cloud.nacos.config.ext-config[2].group=dev -#spring.cloud.nacos.config.ext-config[2].refresh=true -# -#spring.redis.host=127.0.0.1 -#spring.redis.port=6379 -#spring.redis.password=123456 -#spring.redis.database=0 -#spring.redis.timeout=30000 -#spring.redis.jedis.pool.max-active=8 -#spring.redis.jedis.pool.max-wait=-1 -#spring.redis.jedis.pool.max-idle=8 -#spring.redis.jedis.pool.min-idle=0 -# -#spring.servlet.multipart.max-file-size=10MB -#spring.servlet.multipart.max-request-size=10MB - -# 正式环境(prod) #服务名称 spring.application.name=dq-financial-hrms #配置中心地址 -spring.cloud.nacos.config.server-addr=120.78.127.12:8848 -spring.cloud.nacos.config.namespace=69614b55-1521-421c-ac58-dbe4a5b01b43 +spring.cloud.nacos.config.server-addr=192.168.31.142:8848 +spring.cloud.nacos.config.namespace=4c56c2f9-b6a3-4e7b-88b8-b1001e86dfd6 #spring.cloud.nacos.config.group=prod spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml -spring.cloud.nacos.config.ext-config[0].group=prod +spring.cloud.nacos.config.ext-config[0].group=dev spring.cloud.nacos.config.ext-config[0].refresh=true spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml -spring.cloud.nacos.config.ext-config[1].group=prod +spring.cloud.nacos.config.ext-config[1].group=dev spring.cloud.nacos.config.ext-config[1].refresh=true spring.cloud.nacos.config.ext-config[2].data-id=other.yml -spring.cloud.nacos.config.ext-config[2].group=prod +spring.cloud.nacos.config.ext-config[2].group=dev spring.cloud.nacos.config.ext-config[2].refresh=true -spring.redis.host=127.0.0.1 +spring.redis.host=192.168.232.128 spring.redis.port=6379 -spring.redis.password=dq123456 +spring.redis.password= spring.redis.database=0 spring.redis.timeout=30000 spring.redis.jedis.pool.max-active=8 spring.redis.jedis.pool.max-wait=-1 spring.redis.jedis.pool.max-idle=8 -spring.redis.jedis.pool.min-idle=0 \ No newline at end of file +spring.redis.jedis.pool.min-idle=0 + +spring.servlet.multipart.max-file-size=10MB +spring.servlet.multipart.max-request-size=10MB + +#正式环境(prod) +#服务名称 +#spring.application.name=dq-financial-hrms +###配置中心地址 +##spring.cloud.nacos.config.server-addr=120.78.127.12:8848 +##spring.cloud.nacos.config.namespace=69614b55-1521-421c-ac58-dbe4a5b01b43 +###spring.cloud.nacos.config.group=prod +## +##spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml +##spring.cloud.nacos.config.ext-config[0].group=prod +##spring.cloud.nacos.config.ext-config[0].refresh=true +## +##spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml +##spring.cloud.nacos.config.ext-config[1].group=prod +##spring.cloud.nacos.config.ext-config[1].refresh=true +## +##spring.cloud.nacos.config.ext-config[2].data-id=other.yml +##spring.cloud.nacos.config.ext-config[2].group=prod +##spring.cloud.nacos.config.ext-config[2].refresh=true +## +##spring.redis.host=127.0.0.1 +##spring.redis.port=6379 +##spring.redis.password=dq123456 +##spring.redis.database=0 +##spring.redis.timeout=30000 +##spring.redis.jedis.pool.max-active=8 +##spring.redis.jedis.pool.max-wait=-1 +##spring.redis.jedis.pool.max-idle=8 +##spring.redis.jedis.pool.min-idle=0 \ No newline at end of file diff --git a/dq-govern-gateway/src/main/resources/bootstrap.properties b/dq-govern-gateway/src/main/resources/bootstrap.properties index 79d36a2c..c821a64b 100644 --- a/dq-govern-gateway/src/main/resources/bootstrap.properties +++ b/dq-govern-gateway/src/main/resources/bootstrap.properties @@ -18,8 +18,8 @@ spring.redis.jedis.pool.max-wait=-1 spring.redis.jedis.pool.max-idle=8 spring.redis.jedis.pool.min-idle=0 -## 正式环境(prod) -##服务名称 +# 正式环境(prod) +#服务名称 #spring.application.name=dq-govern-gateway ##配置中心地址 #spring.cloud.nacos.config.server-addr=120.78.127.12:8848 diff --git a/dq-govern-gateway/src/main/resources/jwt.properties b/dq-govern-gateway/src/main/resources/jwt.properties index bcfab6af..40efcb9f 100644 --- a/dq-govern-gateway/src/main/resources/jwt.properties +++ b/dq-govern-gateway/src/main/resources/jwt.properties @@ -3,8 +3,9 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\ /apiHrmsAuth/hrms/auth/userlogin/verifyMobile,\ /apiHrmsAuth/hrms/auth/userlogin/wxLoginUrl,\ /apiHrmsAuth/hrms/auth/userlogin/user/callback,\ - /api-hrms/hrms/user/weChatCallback,\ /apiHrmsAuth/hrms/auth/userlogin/wxLoginUrl,\ + /api-hrms/hrms/user/callbackBinding,\ + /api-hrms/hrms/user/callback,\ /api-crms/sweagger-ui.html,\ /api-crms/crms/customer/excelTemplate,\ /api-crms/crms/customer/excelExport,\ @@ -12,3 +13,5 @@ jwt.ignoreUrlList=/apiHrmsAuth/hrms/auth/userlogin/getBackPwd,\ /apiHrmsAuth/hrms/auth/userlogin/bindPhoneAndOpenId,\ /apiHrmsAuth/hrms/auth/userlogin/sendCode,\ /apiHrmsAuth/hrms/auth/userlogin/isPhoneExist + + diff --git a/员工信息一览表.xlsx b/员工信息一览表.xlsx deleted file mode 100644 index e69de29b..00000000 diff --git a/员工信息导入模板.xlsx b/员工信息导入模板.xlsx deleted file mode 100644 index e69de29b..00000000