Commit e6a00bfc authored by maoying's avatar maoying

修改登录密码验证加密及配置文件修改

parent 4bdbf681
......@@ -13,7 +13,7 @@
<parent>
<groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysRoot</artifactId>
<version>2.0.6</version>
<version>3.0.1.3</version>
</parent>
<!-- <dependencies>
......
......@@ -14,14 +14,14 @@
<parent>
<groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysRoot</artifactId>
<version>2.0.6</version>
<version>3.0.1.3</version>
</parent>
<dependencies>
<dependency>
<groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysCommon</artifactId>
<version>2.0.6</version>
<version>3.0.1.3</version>
</dependency>
<dependency>
......@@ -73,18 +73,18 @@
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-feign-privilege</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.4.8-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-feign-systemctl</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.4.8-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-component-feign</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.4.8-SNAPSHOT</version>
</dependency>
<!-- <dependency>
......
......@@ -59,7 +59,7 @@ public class LoginController {
@Value("${security.productWeb}")
private String product;
@Value("${security.appKeyWeb}")
@Value("${security.appKey}")
private String appKey;
@ApiOperation(value = "通过userId登录", notes = "查询设备指标")
......
package com.yeejoin.amos.fas.business.feign;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
......@@ -8,43 +24,32 @@ import com.google.common.base.Joiner;
import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.component.feign.config.TokenOperation;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.fas.business.util.CacheFactory;
import com.yeejoin.amos.fas.business.util.CacheMap;
import com.yeejoin.amos.fas.business.vo.ReginParams;
import com.yeejoin.amos.fas.business.vo.Toke;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.exception.PermissionException;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.*;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
import com.yeejoin.amos.feign.privilege.model.IdPasswordAuthModel;
import com.yeejoin.amos.feign.privilege.model.PermissionModel;
import com.yeejoin.amos.feign.privilege.util.DesUtil;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
@Service("remoteSecurityService")
public class RemoteSecurityService {
@Value("${security.password}")
private String password;
@Value("${security.loginId}")
private String loginId;
@Value("${security.productWeb}")
private String productWeb;
@Value("${security.appKeyWeb}")
private String appKeyWeb;
@Value("${security.appKey}")
private String appKey;
@Autowired
......@@ -117,7 +122,7 @@ public class RemoteSecurityService {
List<AgencyUserModel> AgencyUserModel=null;
FeignClientResult feignClientResult;
try {
feignClientResult = Privilege.agencyUserClient.queryByCompanyId(Long.valueOf(companyId),null);
feignClientResult = Privilege.agencyUserClient.queryByCompanyId(Long.valueOf(companyId),null,null,true);
AgencyUserModel = ( List<AgencyUserModel>) feignClientResult.getResult();
} catch (InnerInvokException e) {
......@@ -141,7 +146,7 @@ public class RemoteSecurityService {
List<AgencyUserModel> agencyUserModel=null;
FeignClientResult feignClientResult;
try {
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds);
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds,null);
agencyUserModel = (List<AgencyUserModel>)feignClientResult.getResult();
} catch (InnerInvokException e) {
......@@ -153,7 +158,7 @@ public class RemoteSecurityService {
public Toke getServerToken() {
IdPasswordAuthModel dPasswordAuthModel=new IdPasswordAuthModel();
dPasswordAuthModel.setLoginId(loginId);
dPasswordAuthModel.setPassword(password);
dPasswordAuthModel.setPassword(DesUtil.encode(password, "qaz"));
Toke toke = null;
try {
toke = JSON.parseObject(redisTemplate.opsForValue().get(buildKey(loginId)), Toke.class);
......@@ -178,7 +183,7 @@ public class RemoteSecurityService {
if(map!=null){
toke.setToke(map.get("token").toString());
toke.setProduct(productWeb);
toke.setAppKey(appKeyWeb);
toke.setAppKey(appKey);
redisTemplate.opsForValue().set(buildKey(dPasswordAuthModel.getLoginId()), JSONObject.toJSONString(toke),28,TimeUnit.DAYS);
}
return toke;
......@@ -206,7 +211,7 @@ public class RemoteSecurityService {
List<AgencyUserModel> agencyUserModel=null;
FeignClientResult feignClientResult;
try {
feignClientResult = Privilege.agencyUserClient.queryByIds(userIds);
feignClientResult = Privilege.agencyUserClient.queryByIds(userIds,true);
agencyUserModel = (List<AgencyUserModel> ) feignClientResult.getResult();
} catch (InnerInvokException e) {
......@@ -309,7 +314,7 @@ public class RemoteSecurityService {
List<AgencyUserModel> agencyUserModel=null;
FeignClientResult feignClientResult = new FeignClientResult();
try {
feignClientResult = Privilege.agencyUserClient.queryByOrgCode(orgCode);
feignClientResult = Privilege.agencyUserClient.queryByOrgCode(orgCode,null);
} catch (InnerInvokException e) {
e.printStackTrace();
}
......@@ -366,7 +371,7 @@ public class RemoteSecurityService {
List<AgencyUserModel> agencyUserModel=null;
FeignClientResult feignClientResult;
try {
feignClientResult = Privilege.agencyUserClient.queryByDepartmentId(Long.valueOf(departmentId),null);
feignClientResult = Privilege.agencyUserClient.queryByDepartmentId(Long.valueOf(departmentId),null,null,true);
agencyUserModel = (List<AgencyUserModel>)feignClientResult.getResult();
} catch (InnerInvokException e) {
......@@ -478,7 +483,7 @@ public class RemoteSecurityService {
List<PermissionModel> dictionarieModel=null;
FeignClientResult feignClientResult;
try {
feignClientResult = Privilege.permissionClient.queryPermissionTree(appType,null,null,null);
feignClientResult = Privilege.permissionClient.queryPermissionTree(appType,null,null,null,appKey);
dictionarieModel = (List<PermissionModel>)feignClientResult.getResult();
} catch (InnerInvokException e) {
......
......@@ -86,13 +86,6 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Autowired
IEquipManageFeign iEquipManageFeign;
// @Autowired
// private IFmeaEquipmentPointDao iFmeaEquipmentPointDao;
// @Autowired
// private MongoTemplate mongoTemplate;
@Value("${windows.img.path}")
private String winImgPath;
......
......@@ -9,7 +9,7 @@
<parent>
<groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysRoot</artifactId>
<version>2.0.6</version>
<version>3.0.1.3</version>
</parent>
<dependencies>
......@@ -17,7 +17,7 @@
<dependency>
<groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysService</artifactId>
<version>2.0.6</version>
<version>3.0.1.3</version>
</dependency>
</dependencies>
......
#DB properties:
spring.datasource.url=jdbc:mysql://172.16.11.20:3306/autosys_business_v3.0.0.2?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=root_123
spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver
spring.datasource.hikari.maxLifetime = 1765000
spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
#系统服务账号,用户后端服务调用
security.password=a1234560
security.loginId=fas_autosys
#environment
#spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/
#应用product appkey
security.productWeb=STUDIO_APP_WEB
security.appKey =studio_normalapp_2681691
eureka.client.serviceUrl.defaultZone=http://172.16.11.20:10001/eureka/
eureka.client.register-with-eureka = true
eureka.client.fetch-registry = true
eureka.client.healthcheck.enabled = true
eureka.client.fetchRegistry = true
eureka.instance.prefer-ip-address=true
#DB properties:
spring.datasource.url=jdbc:mysql://172.16.10.66:3306/safety-business-3.0.1?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=root_123
spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver
spring.datasource.hikari.maxLifetime = 1765000
spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
#ws
params.remoteWebsocketUrl=http://172.16.11.36:10600/
#redis
spring.redis.database=0
spring.redis.host=172.16.10.85
spring.redis.database=1
spring.redis.host=172.16.11.20
spring.redis.port=6379
spring.redis.password=amos2019Redis
spring.redis.password=1234560
spring.redis.jedis.pool.max-active=200
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=10
......@@ -36,17 +39,16 @@ windows.img.path = C:\\
linux.img.path = /
file.uploadUrl=C:\\upload\\files\\
#picture read
file.readUrl=http://172.16.3.89:8083/file/getFile?in=
params.isPush=true
file.readUrl=http://172.16.11.33:8085/file/getFile?in=
#jpush 推送开关
params.isPush=false
## emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super
emqx.password=a123456
#�����
emqx.broker=tcp://172.16.11.33:1883
emqx.user-name=admin
emqx.password=public
#文件服务器地址
file.downLoad.url=http://39.98.246.31:8888/
#站端名称使用全拼
station.name = yinan
#是否开启将风险区域同步至仓库货位true开启,false关闭。默认关闭。
equipManage.fegin.isSyn=false
#DB properties:
spring.datasource.url=jdbc:mysql://172.16.11.20:3306/autosys_business_v3.0.0.2?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=root_123
spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver
spring.datasource.hikari.maxLifetime = 1765000
spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
#系统服务账号,用户后端服务调用
security.password=a1234560
security.loginId=fas_autosys
#environment
#spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://amos-eurka:10001/eureka/
#应用product appkey
security.productWeb=STUDIO_APP_WEB
security.appKey =studio_normalapp_2681691
eureka.client.serviceUrl.defaultZone=http://172.16.11.20:10001/eureka/
eureka.client.register-with-eureka = true
eureka.client.fetch-registry = true
eureka.client.healthcheck.enabled = true
eureka.client.fetchRegistry = true
eureka.instance.prefer-ip-address=true
#DB properties:
spring.datasource.url=jdbc:mysql://amos-mysql:3306/yeejoin_safety_business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=yeejoin_1234
spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver
spring.datasource.hikari.maxLifetime = 1765000
spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
#redis
spring.redis.database=1
spring.redis.host=amos-redis
spring.redis.host=172.16.11.20
spring.redis.port=6379
spring.redis.password=redis2020
spring.redis.password=1234560
spring.redis.jedis.pool.max-active=200
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=10
spring.redis.jedis.pool.min-idle=0
spring.redis.timeout=1000
#picture upload
windows.img.path = E:\\
windows.img.path = C:\\
linux.img.path = /
file.uploadUrl=D:\\upload\\files\\
file.uploadUrl=C:\\upload\\files\\
#picture read
file.readUrl=http://station-fireautosys:8083/file/getFile?in=
file.readUrl=http://172.16.11.33:8085/file/getFile?in=
#jpush 推送开关
params.isPush=false
## emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super
emqx.password=a123456
#\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
file.downLoad.url=http://172.16.10.175:8888/
#是否开启将风险区域同步至仓库货位true开启,false关闭。默认关闭。
equipManage.fegin.isSyn=false
emqx.broker=tcp://172.16.11.33:1883
emqx.user-name=admin
emqx.password=public
#文件服务器地址
file.downLoad.url=http://39.98.246.31:8888/
#系统服务账号,用户后端服务调用
security.password=a1234560
security.loginId=fas_autosys
#environment
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/
eureka.client.register-with-eureka = true
eureka.client.fetch-registry = true
eureka.client.healthcheck.enabled = true
eureka.client.fetchRegistry = true
eureka.instance.prefer-ip-address=true
#DB properties:
spring.datasource.url=jdbc:mysql://47.103.14.66:3306/91-safety-business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.url=jdbc:mysql://172.16.11.20:3306/autosys_business_v3.0.0.2?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=root_123
spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver
......@@ -18,28 +8,47 @@ spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
#系统服务账号,用户后端服务调用
security.password=a1234560
security.loginId=fas_autosys
#应用product appkey
security.productWeb=STUDIO_APP_WEB
security.appKey =studio_normalapp_2681691
eureka.client.serviceUrl.defaultZone=http://172.16.11.20:10001/eureka/
eureka.client.register-with-eureka = true
eureka.client.fetch-registry = true
eureka.client.healthcheck.enabled = true
eureka.client.fetchRegistry = true
eureka.instance.prefer-ip-address=true
#redis
spring.redis.database=1
spring.redis.host=127.0.0.1
spring.redis.host=172.16.11.20
spring.redis.port=6379
spring.redis.password=
spring.redis.password=1234560
spring.redis.jedis.pool.max-active=200
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=10
spring.redis.jedis.pool.min-idle=0
spring.redis.timeout=1000
#picture upload
windows.img.path = E:\\
windows.img.path = C:\\
linux.img.path = /
file.uploadUrl=D:\\upload\\files\\
file.uploadUrl=C:\\upload\\files\\
#picture read
file.readUrl=http://172.16.3.89:8083/file/getFile?in=
file.readUrl=http://172.16.11.33:8085/file/getFile?in=
#jpush 推送开关
params.isPush=false
## emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super
emqx.password=a123456
emqx.broker=tcp://172.16.11.33:1883
emqx.user-name=admin
emqx.password=public
#文件服务器地址
file.downLoad.url=http://39.98.246.31:8888/
#\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
file.downLoad.url=http://172.16.10.175:8888/
spring.application.name = AMOS-AUTOSYS
server.servlet.context-path=/fireAutoSys
server.port = 8085
#environment
spring.profiles.active=dev
#应用product appkey
security.productWeb=STUDIO_APP_WEB
security.appKeyWeb=studio_normalapp_2681691
#spring.freemarker.cache=false
spring.devtools.restart.enabled=true
......@@ -51,11 +49,16 @@ visual.fegin.name=maas-visual
dutyMode.fegin.name=AMOS-DUTYMODE
#队站装备管理名称,主要用于风险区域同步至仓库货位和订阅装备信息系统
equipManage.fegin.name=AMOS-EQUIPMANAGE
#feginName
number.plan.projectName=换流站消防专项预案
#jpush 服务名称
Push.fegin.name=AMOS-JPUSH
#feginName
number.plan.projectName=换流站消防专项预案
#站端名称使用全拼 与三维iotree 消息用到了,暂时统一设置为yinan
station.name = yinan
param.safetyIndexChange.cron = 0 0 2 * * ?
param.weather.url = http://wthrcdn.etouch.cn/weather_mini?citykey=
......@@ -70,6 +73,7 @@ rule.definition.default-agency=STATE_GRID
#Fegin service config
amos.feign.gennerator.use-gateway=true
# 消息推送类型
autoSys.push.type=mqtt
......
......@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.yeejoin.amos</groupId>
<artifactId>YeeAmosFireAutoSysRoot</artifactId>
<version>2.0.6</version>
<version>3.0.1.3</version>
<packaging>pom</packaging>
<name>YeeAmosFireAutoSysRoot</name>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment