Commit 0b72a500 authored by tangwei's avatar tangwei

解决冲突

parents 6be70214 3605580e
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.amosprojectentity.StdUserEmpower;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;
import java.util.Map;
......
......@@ -19,23 +19,23 @@ import javax.sql.DataSource;
import java.util.Properties;
@Configuration
@MapperScan(basePackages = "com.yeejoin.amos.boot.module.jxiop.api.amosprojectmapper", sqlSessionFactoryRef = "amosProjectSqlSessionFactory")
@MapperScan(basePackages = "com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper", sqlSessionFactoryRef = "amosProjectSqlSessionFactory")
public class AmosProjectDbConfig {
private Logger logger = LoggerFactory.getLogger(AmosProjectDbConfig.class);
// 精确到 master 目录,以便跟其他数据源隔离
private static final String MAPPER_LOCATION = "classpath*:mapper/amosproject/*.xml";
@Value("${spring.db5.datasource.url}")
@Value("${spring.db6.datasource.url}")
private String dbUrl;
@Value("${spring.db5.datasource.username}")
@Value("${spring.db6.datasource.username}")
private String username;
@Value("${spring.db5.datasource.password}")
@Value("${spring.db6.datasource.password}")
private String password;
@Value("${spring.db5.datasource.driver-class-name}")
@Value("${spring.db6.datasource.driver-class-name}")
private String driverClassName;
......
......@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper.UserEmpowerMappe
import com.yeejoin.amos.boot.module.jxiop.biz.service.IPermissionService;
import org.apache.kafka.common.metrics.Stat;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
......@@ -22,21 +23,24 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Service
public class IPermissionServiceImpl implements IPermissionService {
@Autowired
private RedisUtils redisUtils;
@Autowired
private UserEmpowerMapper userEmpowerMapper;
@Autowired
private StationBasicMapper stationBasicMapper;
@Autowired
public IPermissionServiceImpl(RedisUtils redisUtils, UserEmpowerMapper userEmpowerMapper, StationBasicMapper stationBasicMapper) {
this.redisUtils = redisUtils;
this.userEmpowerMapper = userEmpowerMapper;
this.stationBasicMapper = stationBasicMapper;
}
// @Autowired
// public IPermissionServiceImpl(RedisUtils redisUtils, UserEmpowerMapper userEmpowerMapper, StationBasicMapper stationBasicMapper) {
// this.redisUtils = redisUtils;
// this.userEmpowerMapper = userEmpowerMapper;
// this.stationBasicMapper = stationBasicMapper;
// }
@Override
public List<String> getCurrentUserPermissions() {
......
......@@ -26,15 +26,15 @@ spring.db6.datasource.password=Yeejoin@2020
spring.db6.datasource.driver-class-name: com.mysql.cj.jdbc.Driver
## eureka properties:
eureka.instance.hostname=172.16.10.220
eureka.instance.hostname=139.9.173.44
eureka.client.serviceUrl.defaultZone=http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties:
spring.redis.database=1
spring.redis.host=172.16.10.220
spring.redis.host=139.9.173.44
spring.redis.port=6379
spring.redis.password=yeejoin@2020
openHealth=true
spring.cache.type=GENERIC
j2cache.open-spring-cache=true
j2cache.cache-clean-mode=passive
......@@ -66,10 +66,10 @@ lettuce.timeout=10000
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.220:1883
emqx.broker=tcp://139.9.173.44:2883
emqx.user-name=admin
emqx.password=public
mqtt.scene.host=mqtt://172.16.10.220:8083/mqtt
mqtt.scene.host=mqtt://139.9.173.44:8083/mqtt
mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000
......@@ -84,7 +84,7 @@ password: taosdata
#spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.url=jdbc:TAOS-RS://139.9.170.47:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.url=jdbc:TAOS-RS://10.20.0.203:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.username=root
spring.db3.datasource.password=taosdata
spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
......@@ -92,7 +92,7 @@ spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
# 分析专用td数据库 analyse_data
#spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db4.datasource.url=jdbc:TAOS-RS://139.9.170.47:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.url=jdbc:TAOS-RS://10.20.0.203:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.username=root
spring.db4.datasource.password=taosdata
spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
......@@ -149,7 +149,7 @@ amos.secret.key=qaz
#eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url=tcp://172.16.10.220:61616
spring.activemq.broker-url=tcp://139.9.173.44:61616
spring.activemq.user=admin
spring.activemq.password=admin
spring.jms.pub-sub-domain=false
......
......@@ -91,12 +91,16 @@ public class EquipAlarmEventServiceImpl extends BaseService<EquipAlarmEventDto,
// } else if ("false".equals(i.getValue())) {
// i.setValue("分");
// }
long mills = i.getCreatedTime() / 1000000;
long mills = i.getCreatedTime() ;
car.setTimeInMillis(mills);
// System.out.println(sdf.format(car.getTime()));
i.setTime(sdf.format(car.getTime()));
// car.add(Calendar.HOUR, 12);
// System.out.println(sdf.format(car.getTime()));
String time = sdf.format(car.getTime());
if (time.contains("1970")) {
mills = i.getCreatedTime()/ 1000000;
car.setTimeInMillis(mills);
time = sdf.format(car.getTime());
}
i.setTime(time);
});
PageInfo<EquipAlarmEvent> page = new PageInfo(alarmEventList);
......
......@@ -166,10 +166,16 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent
i.setValue("分");
}
i.setStationName("升压站");
long mills = i.getCreatedTime() / 1000000;
long mills = i.getCreatedTime() ;
car.setTimeInMillis(mills);
// System.out.println(sdf.format(car.getTime()));
i.setTime(sdf.format(car.getTime()));
String time = sdf.format(car.getTime());
if (time.contains("1970")) {
mills = i.getCreatedTime()/ 1000000;
car.setTimeInMillis(mills);
time = sdf.format(car.getTime());
}
i.setTime(time);
});
PageInfo<EquipAlarmEvent> page = new PageInfo(alarmEventList);
// 构建平台数据
......
......@@ -69,7 +69,7 @@ public class EquipAlarmEventServiceImpl
// System.out.println(sdf.format(car.getTime()));
String time = sdf.format(car.getTime());
if (time.contains("1970")) {
mills = i.getCreatedTime()/ 1000000;;
mills = i.getCreatedTime()/ 1000000;
car.setTimeInMillis(mills);
time = sdf.format(car.getTime());
}
......
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