river 4 years ago
parent 996c59417b
commit caeb3fbf64
  1. 26
      dq-financial-crms/src/main/java/com/daqing/financial/crms/config/IPageConfig.java
  2. 72
      dq-financial-crms/src/main/resources/bootstrap.properties
  3. 11
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java
  4. 6
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/UserLoginDao.java
  5. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/UserLoginService.java
  6. 2
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/UserService.java
  7. 14
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java
  8. 20
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java
  9. 72
      dq-financial-hrms-auth/src/main/resources/bootstrap.properties
  10. 8
      dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml
  11. 8
      dq-financial-hrms/pom.xml
  12. 26
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/config/IPageConfig.java
  13. 4
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/feign/HrmsAuthFeignService.java
  14. 12
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java
  15. 78
      dq-financial-hrms/src/main/resources/bootstrap.properties
  16. 6
      dq-framework-common/src/main/java/com/daqing/framework/model/response/PromptSuccess.java
  17. 50
      dq-govern-gateway/src/main/resources/bootstrap.properties

@ -1,13 +1,13 @@
//package com.daqing.financial.crms.config;
//
//import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class IPageConfig {
// @Bean
// public PaginationInterceptor paginationInterceptor() {
// return new PaginationInterceptor();
// }
//}
package com.daqing.financial.crms.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class IPageConfig {
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
}
}

@ -1,59 +1,59 @@
# 开发和测试环境(dev)
#服务名称
spring.application.name=dq-financial-crms
#配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.142:8848
spring.cloud.nacos.config.namespace=1f69d47e-0aeb-4a1e-8ab4-0e84dfb86354
#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
# 正式环境(prod)
#服务名称
#spring.application.name=dq-financial-crms
##配置中心地址
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=25ce05e2-a0eb-4842-92e4-d8b550a489dd
#spring.cloud.nacos.config.server-addr=192.168.31.142:8848
#spring.cloud.nacos.config.namespace=1f69d47e-0aeb-4a1e-8ab4-0e84dfb86354
##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.port=6379
#spring.redis.password=dq123456
#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
# 正式环境(prod)
#服务名称
spring.application.name=dq-financial-crms
#配置中心地址
spring.cloud.nacos.config.server-addr=120.78.127.12:8848
spring.cloud.nacos.config.namespace=25ce05e2-a0eb-4842-92e4-d8b550a489dd
#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

@ -134,7 +134,7 @@ public class UserLoginController implements UserLoginControllerApi {
//response.sendRedirect(state+"?token="+token+"&head_img="+user.getHeadImg()+"&name="+URLEncoder.encode(user.getName(),"UTF-8"));
}
}else {
userService.weChatBinding(code,response);
userService.weChatBinding(code,response,state);
}
}
@ -168,15 +168,6 @@ public class UserLoginController implements UserLoginControllerApi {
return result ? ResponseResult.SUCCESS("短信发送成功") : ResponseResult.FAIL(55001,"短信发送失败");
}
/**
* 获取WeChatConfig配置类值的接口
*/
@GetMapping("/getWeChatConfig")
public ResponseResult getWeChatConfig(){
return new ResponseResult<WeChatConfig>().SUCCESS(userLoginService.getWeChatConfig());
}
/**
* 判断手机号是否存在
* @param mobile

@ -6,6 +6,8 @@ import com.daqing.framework.domain.hrms.request.LoginRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
/**
* @auther River
* @date 2020/9/22 14:55
@ -23,4 +25,8 @@ public interface UserLoginDao extends BaseMapper<UserEntity> {
int updateOpenIdByPhoneAccount(@Param("phoneAccount") String phoneAccount, @Param("wechatId") String wechatId);
Boolean updateWeChat(@Param("id") Long id, @Param("weChatId") String weChatId);
String getTokenByUserId(Long userId);
Boolean updateUserLogin(@Param("userId") Long userId, @Param("date") Date date);
}

@ -21,7 +21,5 @@ public interface UserLoginService extends IService<UserEntity> {
boolean bindPhoneAndOpenId(BindOpenIdRequest bindOpenIdRequest);
WeChatConfig getWeChatConfig();
int isPhoneExist(String mobile);
}

@ -13,5 +13,5 @@ public interface UserService extends IService<UserEntity> {
UserEntity saveWeChatUser(String code, HttpServletResponse response);
Boolean weChatBinding(String code,HttpServletResponse response);
Boolean weChatBinding(String code,HttpServletResponse response,String state);
}

@ -169,6 +169,8 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
loginLog.setNewestTime(new Date());
loginLogService.updateById(loginLog);
}
// 更新用户登录信息
this.getBaseMapper().updateUserLogin(userEntity.getId(),new Date());
//返回用户信息
LoginResponse loginResponse = new LoginResponse();
@ -233,18 +235,6 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
return count>0;
}
/**
* 获取WeChatConfig
*/
@Override
public WeChatConfig getWeChatConfig() {
WeChatConfig weChatConfigResponse = new WeChatConfig();
weChatConfigResponse.setOpenAppid(weChatConfig.getOpenAppid());
weChatConfigResponse.setOpenAppsecret(weChatConfig.getOpenAppsecret());
weChatConfigResponse.setOpenRedirectUrl(weChatConfig.getOpenRedirectUrl());
return weChatConfigResponse;
}
@Override
public int isPhoneExist(String mobile) {
return userLoginDao.selectCount(mobile);

@ -71,10 +71,10 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple
ResponseResult login = userLoginService.login(loginRequest);
LoginResponse data = (LoginResponse) login.getData();
SecurityUser userInfo = (SecurityUser) userDetailsService.loadUserByUsername(dbUser.getPhoneAccount());
userInfo.getCurrentUserInfo().setToken(data.getToken());
new UsernamePasswordAuthenticationToken(userInfo, null, userInfo.getAuthorities());
// SecurityUser userInfo = (SecurityUser) userDetailsService.loadUserByUsername(dbUser.getPhoneAccount());
//
// userInfo.getCurrentUserInfo().setToken(data.getToken());
// new UsernamePasswordAuthenticationToken(userInfo, null, userInfo.getAuthorities());
return dbUser;
}
@ -126,7 +126,7 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple
* 绑定微信的回调
*/
@Override
public Boolean weChatBinding(String code, HttpServletResponse response) {
public Boolean weChatBinding(String code, HttpServletResponse response,String state) {
String accessTokenUrl = String.format(weChatConfig.getOPEN_ACCESS_TOKEN_URL(),weChatConfig.getOpenAppid(),weChatConfig.getOpenAppsecret(),code);
@ -136,19 +136,19 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple
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);
Boolean result = this.getBaseMapper().updateWeChat(Long.parseLong(userId), openId);
Boolean result = this.getBaseMapper().updateWeChat(Long.parseLong(state), openId);
log.info("绑定成功---------------------------------------");
if (result){
String token = this.getBaseMapper().getTokenByUserId(Long.parseLong(state));
if (token != null){
try {
log.info("转发成功---------------------------------------");
response.sendRedirect("https://www.baidu.com?openId="+openId);
response.sendRedirect("http://www.huorantech.cn/dq/index.html#/workbench-manpower?token="+token);
}catch (IOException e){
e.printStackTrace();
}
}
}
return false;
}
}

@ -1,58 +1,58 @@
# 开发和测试环境(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=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
#
##正式环境(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.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=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.port=6379
#spring.redis.password=dq123456
#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
#正式环境(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

@ -50,4 +50,12 @@
UPDATE hrms_user SET wechat_id = #{weChatId} WHERE id = #{id}
</update>
<select id="getTokenByUserId" parameterType="long" resultType="string">
SELECT token FROM hrms_token WHERE user_id = #{userId}
</select>
<update id="updateUserLogin">
UPDATE hrms_user SET login_num = login_num + 1,lasttime = #{date} WHERE id = #{userId}
</update>
</mapper>

@ -26,21 +26,21 @@
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!-- <dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>-->
</dependency>
<dependency>
<!--<dependency>
<groupId>com.daqing.financial</groupId>
<artifactId>dq-financial-hrms-auth</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependency>-->
<!-- <dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>

@ -1,13 +1,13 @@
//package com.daqing.financial.hrms.config;
//
//import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class IPageConfig {
// @Bean
// public PaginationInterceptor paginationInterceptor() {
// return new PaginationInterceptor();
// }
//}
package com.daqing.financial.hrms.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class IPageConfig {
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
}
}

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.GetMapping;
@FeignClient("dq-financial-hrms-auth")
public interface HrmsAuthFeignService {
@GetMapping("/hrms/auth/userlogin/getWeChatConfig")
JSONObject getWeChatConfig();
// @GetMapping("/hrms/auth/userlogin/getWeChatConfig")
// JSONObject getWeChatConfig();
}

@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.daqing.financial.hrms.dao.EmployeeDao;
import com.daqing.financial.hrms.dao.UserDao;
import com.daqing.financial.hrms.feign.HrmsAuthFeignService;
import com.daqing.financial.hrms.service.UserService;
import com.daqing.framework.domain.hrms.EmployeeEntity;
import com.daqing.framework.domain.hrms.UserEntity;
@ -42,10 +41,6 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
@Autowired
private EmployeeDao employeeDao;
@Autowired
private HrmsAuthFeignService hrmsAuthFeignService;
/**
* 当前登录的用户信息
*/
@ -54,14 +49,7 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
String userId = this.getUserId();
EmployeeAndUserVO employeeAndUser = employeeDao.getEmployeeByUserId(Long.parseLong(userId));
if (employeeAndUser.getWechatId() == null || employeeAndUser.getWechatId().length() == 0){
JSONObject responseResult = hrmsAuthFeignService.getWeChatConfig();
JSONObject weChatConfig = responseResult.getJSONObject("data");
if (weChatConfig == null){
employeeAndUser.setWechatId(PromptSuccess.QR_CODE_FAIL);
}else {
employeeAndUser.setWechatId(String.format(weChatConfig.get("open_QRCODE_URL").toString(),weChatConfig.get("openAppid"),
weChatConfig.get("openRedirectUrl"),1)); // state=1作为回调时分辨绑定和登陆的标识
}
}else {
employeeAndUser.setWechatId(PromptSuccess.QR_CODE_BINDING_SUCCESS);
}

@ -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.port=6379
#spring.redis.password=dq123456
#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.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

@ -26,9 +26,9 @@ public class PromptSuccess {
public static final Long OVERDUE_TIME = 70L; // 过期时间,单位为秒
public static final String QR_CODE_FAIL = "二维码获取失败,请稍后重试";
public static final String QR_CODE_FAIL = "1"; // 没绑定
public static final String QR_CODE_BINDING_SUCCESS = "已绑定,扫码即可登录";
public static final String QR_CODE_BINDING_SUCCESS = "0"; // 已绑定
public static final String UPLOAD_FILE_PATH = "D://upload//";
public static final String UPLOAD_FILE_PATH = "//usr//local//nginx//html//admin//headImg//";
}

@ -1,40 +1,40 @@
#服务名称
#spring.application.name=dq-govern-gateway
###配置中心地址
##spring.cloud.nacos.config.server-addr=192.168.31.142:8848
##spring.cloud.nacos.config.namespace=772e2607-b929-4246-9671-ee5a36d74d25
##
##spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml
##spring.cloud.nacos.config.ext-config[0].group=dev
##spring.cloud.nacos.config.ext-config[0].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
# 正式环境(prod)
#服务名称
spring.application.name=dq-govern-gateway
#配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.142:8848
spring.cloud.nacos.config.namespace=772e2607-b929-4246-9671-ee5a36d74d25
spring.cloud.nacos.config.server-addr=120.78.127.12:8848
spring.cloud.nacos.config.namespace=68738215-903f-426c-8658-2dcd99b20009
spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.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.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
# 正式环境(prod)
#服务名称
#spring.application.name=dq-govern-gateway
##配置中心地址
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=68738215-903f-426c-8658-2dcd99b20009
#
#spring.cloud.nacos.config.ext-config[0].data-id=dq-govern-gateway.yml
#spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].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
Loading…
Cancel
Save