段飞宇
2 years ago
10 changed files with 124 additions and 137 deletions
@ -1,59 +1,59 @@ |
|||||||
package com.hnac.hzims.scheduled.config; |
// package com.hnac.hzims.scheduled.config;
|
||||||
|
//
|
||||||
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor; |
// import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
||||||
import lombok.extern.slf4j.Slf4j; |
// import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value; |
// import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean; |
// import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan; |
// import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration; |
// import org.springframework.context.annotation.Configuration;
|
||||||
|
//
|
||||||
/** |
// /**
|
||||||
* @Author WL |
// * @Author WL
|
||||||
* @Version v1.0 |
// * @Version v1.0
|
||||||
* @Serial 1.0 |
// * @Serial 1.0
|
||||||
* @Date 2022/1/8 10:23 |
// * @Date 2022/1/8 10:23
|
||||||
*/ |
// */
|
||||||
@Slf4j |
// @Slf4j
|
||||||
@Configuration |
// @Configuration
|
||||||
//指定任务Handler所在包路径
|
// //指定任务Handler所在包路径
|
||||||
public class XxlJobConfig { |
// public class XxlJobConfig {
|
||||||
|
//
|
||||||
|
//
|
||||||
@Value("${xxl.job.admin.addresses}") |
// @Value("${xxl.job.admin.addresses}")
|
||||||
private String adminAddresses; |
// private String adminAddresses;
|
||||||
|
//
|
||||||
@Value("${xxl.job.executor.appname}") |
// @Value("${xxl.job.executor.appname}")
|
||||||
private String appName; |
// private String appName;
|
||||||
|
//
|
||||||
@Value("${xxl.job.executor.ip}") |
// @Value("${xxl.job.executor.ip}")
|
||||||
private String ip; |
// private String ip;
|
||||||
|
//
|
||||||
@Value("${xxl.job.executor.port}") |
// @Value("${xxl.job.executor.port}")
|
||||||
private int port; |
// private int port;
|
||||||
|
//
|
||||||
@Value("${xxl.job.accessToken}") |
// @Value("${xxl.job.accessToken}")
|
||||||
private String accessToken; |
// private String accessToken;
|
||||||
|
//
|
||||||
@Value("${xxl.job.executor.logpath}") |
// @Value("${xxl.job.executor.logpath}")
|
||||||
private String logPath; |
// private String logPath;
|
||||||
|
//
|
||||||
@Value("${xxl.job.executor.logretentiondays}") |
// @Value("${xxl.job.executor.logretentiondays}")
|
||||||
private int logRetentionDays; |
// private int logRetentionDays;
|
||||||
|
//
|
||||||
|
//
|
||||||
@Bean(initMethod = "start", destroyMethod = "destroy") |
// @Bean(initMethod = "start", destroyMethod = "destroy")
|
||||||
public XxlJobSpringExecutor xxlJobExecutor() { |
// public XxlJobSpringExecutor xxlJobExecutor() {
|
||||||
log.info("====xxl-job config init===="); |
// log.info("====xxl-job config init====");
|
||||||
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor(); |
// XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
|
||||||
xxlJobSpringExecutor.setAdminAddresses(adminAddresses); |
// xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
|
||||||
xxlJobSpringExecutor.setAppName(appName); |
// xxlJobSpringExecutor.setAppName(appName);
|
||||||
xxlJobSpringExecutor.setIp(ip); |
// xxlJobSpringExecutor.setIp(ip);
|
||||||
xxlJobSpringExecutor.setPort(port); |
// xxlJobSpringExecutor.setPort(port);
|
||||||
xxlJobSpringExecutor.setAccessToken(accessToken); |
// xxlJobSpringExecutor.setAccessToken(accessToken);
|
||||||
xxlJobSpringExecutor.setLogPath(logPath); |
// xxlJobSpringExecutor.setLogPath(logPath);
|
||||||
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays); |
// xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
|
||||||
return xxlJobSpringExecutor; |
// return xxlJobSpringExecutor;
|
||||||
} |
// }
|
||||||
|
//
|
||||||
} |
// }
|
||||||
|
//
|
||||||
|
@ -1,10 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||||
<mapper namespace="com.hnac.hzims.scheduled.mapper.operation.HistoryAbnormalAlarmMapper"> |
|
||||||
<select id="getHistoryAbnormalAlarm" resultType="com.hnac.hzims.operational.alert.entity.HistoryAbnormalAlarmEntity"> |
|
||||||
select * from hzims_history_abnormal_alarm |
|
||||||
where station_id = #{stationId} |
|
||||||
and type = #{type} |
|
||||||
and status = 0 |
|
||||||
</select> |
|
||||||
</mapper> |
|
@ -1,26 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||||
<mapper namespace="com.hnac.hzims.scheduled.mapper.operation.StationMapper"> |
|
||||||
<select id="selectStationByType" resultType="com.hnac.hzims.operational.station.entity.StationEntity"> |
|
||||||
select * from hzims_station where IS_DELETED = 0 and REF_DEPT IS NOT NULL and `TYPE` IS NOT NULL |
|
||||||
<if test="serveType != null"> |
|
||||||
AND SERVE_TYPE = #{serveType} |
|
||||||
</if> |
|
||||||
<if test="stationType != null"> |
|
||||||
AND `TYPE` = #{stationType} |
|
||||||
</if> |
|
||||||
</select> |
|
||||||
|
|
||||||
|
|
||||||
<select id="selectAll" resultType="com.hnac.hzims.operational.station.entity.StationEntity"> |
|
||||||
select * from hzims_station where IS_DELETED = 0 and REF_DEPT IS NOT NULL AND REF_DOMAIN IS NOT NULL AND `TYPE` IS NOT NULL |
|
||||||
</select> |
|
||||||
|
|
||||||
|
|
||||||
<select id="selectStationByInCode" resultType="com.hnac.hzims.operational.station.entity.StationEntity"> |
|
||||||
SELECT * FROM hzims_station WHERE IS_DELETED = 0 and `CODE` IN |
|
||||||
<foreach collection="list" item="item" index="index" open="(" close=")" separator=","> |
|
||||||
#{item} |
|
||||||
</foreach> |
|
||||||
</select> |
|
||||||
</mapper> |
|
Loading…
Reference in new issue