| | |
| | | * 创建时间 |
| | | */ |
| | | private String createTime; |
| | | |
| | | /** |
| | | * 是否全部完成 |
| | | */ |
| | | private String isOk; |
| | | } |
| | |
| | | "/systemInfoOpen/", "/systemInfo/agentList", "/agentLogGo/minTask", "/agentGo/minTask", "/agentDiskGo/minTask", "/dceInfo/agentList", |
| | | "/login/toLogin", "/login/login", "/appInfo/agentList", "/dockerInfo/agentList", "/portInfo/agentList", "/license/", |
| | | "/static/", "/resources/", "/log/agentList", "/customInfo/agentList", "/agentCustomGo/minTask", "/dbInfo/agentList", "/agentDbTableGo/minTask", |
| | | "/agentHeathMonitorGo/minTask", "/agentDceInfoGo/minTask", "/agentSnmpInfoGo/minTask", "/snmpInfo/agentList"}; |
| | | "/agentHeathMonitorGo/minTask", "/agentDceInfoGo/minTask", "/agentSnmpInfoGo/minTask", "/snmpInfo/agentList","/api/"}; |
| | | |
| | | |
| | | //公众看板URL |
| | |
| | | public int deleteById(String[] id) throws Exception; |
| | | |
| | | void updateById(InspectionTask inspectionTask); |
| | | |
| | | List<InspectionTask> selectByDate(Map<String, Object> params); |
| | | } |
| | |
| | | return pageInfo; |
| | | } |
| | | |
| | | public List<InspectionTask> selectAllByParams(Map<String, Object> params)throws Exception { |
| | | return inspectionTaskMapper.selectAllByParams(params); |
| | | } |
| | | |
| | | /** |
| | | * 保存操作日志 |
| | | * |
| | |
| | | throws Exception { |
| | | inspectionTaskMapper.updateById(inspectionTask); |
| | | } |
| | | |
| | | public List<InspectionTask> selectByDate(Map<String, Object> params) { |
| | | return inspectionTaskMapper.selectByDate(params); |
| | | } |
| | | } |
| | |
| | | public void updateById(TaskInfo taskInfo) { |
| | | taskInfoMapper.updateById(taskInfo); |
| | | } |
| | | |
| | | public List<TaskInfo> selectAllByParams(Map<String, Object> params) throws Exception { |
| | | return taskInfoMapper.selectAllByParams(params); |
| | | } |
| | | } |
New file |
| | |
| | | package com.wgcloud.util; |
| | | |
| | | /** |
| | | * @author kdq |
| | | * @version 1.0.0 |
| | | * @ClassName CommonConstants.java |
| | | * @Description TODO |
| | | * @createTime 2023年05月11日 10:04:00 |
| | | */ |
| | | public interface CommonConstants { |
| | | Integer SUCCESS = 0; |
| | | Integer FAIL = 1; |
| | | } |
New file |
| | |
| | | package com.wgcloud.util; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author kdq |
| | | * @version 1.0.0 |
| | | * @ClassName R.java |
| | | * @Description TODO |
| | | * @createTime 2023年05月11日 10:00:00 |
| | | */ |
| | | @Data |
| | | public class R<T> implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private int code; |
| | | |
| | | private String msg; |
| | | |
| | | private T data; |
| | | |
| | | public static <T> R<T> ok() { |
| | | return restResult((T) null, CommonConstants.SUCCESS, (String)null); |
| | | } |
| | | |
| | | public static <T> R<T> ok(T data) { |
| | | return restResult(data, CommonConstants.SUCCESS, (String)null); |
| | | } |
| | | |
| | | public static <T> R<T> ok(T data, String msg) { |
| | | return restResult(data, CommonConstants.SUCCESS, msg); |
| | | } |
| | | |
| | | public static <T> R<T> failed() { |
| | | return restResult((T)null, CommonConstants.FAIL, (String)null); |
| | | } |
| | | |
| | | public static <T> R<T> failed(String msg) { |
| | | return restResult((T)null, CommonConstants.FAIL, msg); |
| | | } |
| | | |
| | | public static <T> R<T> failed(T data) { |
| | | return restResult(data, CommonConstants.FAIL, (String)null); |
| | | } |
| | | |
| | | public static <T> R<T> failed(T data, String msg) { |
| | | return restResult(data, CommonConstants.FAIL, msg); |
| | | } |
| | | |
| | | static <T> R<T> restResult(T data, int code, String msg) { |
| | | R<T> apiResult = new R(); |
| | | apiResult.setCode(code); |
| | | apiResult.setData(data); |
| | | apiResult.setMsg(msg); |
| | | return apiResult; |
| | | } |
| | | |
| | | public R() { |
| | | } |
| | | |
| | | public R(int code, String msg, T data) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | this.data = data; |
| | | } |
| | | |
| | | } |
| | |
| | | #是否将告警内容转为unicode,yes是,no否,在windows执行告警脚本时,一般需要转码,否则接受到会是乱码 |
| | | warnToUnicode: no |
| | | |
| | | donghuan: |
| | | ip: ip:port |
| | | loginUrl: /collect/api/login |
| | | deviceClassUrl: /collect/api/deviceClass/findAll |
| | | intelligentUrl: /collect/api/intelligent/findAll |
| | | findDevice: /collect/api/device/findDevice |
| | | findDeviceVar: /collect/api/device/findDeviceVar |
| | | findControlByDeviceId: /collect/api/realData/findControlByDeviceId |
| | | control: /collect/api/device/control |
| | | findValueByDeviceId: /collect/api/realData/findValueByDeviceId |
| | | findValueByIntelligentId: /collect/api/realData/findValueByIntelligentId |
| | | findValueByStationId: /collect/api/realData/findValueByStationId |
| | | meterDatas: /collect/api/realData/meterDatas |
| | | varDatas: /collect/api/realData/varDatas |
| | | alarm: /collect/api/alarm/findByPage |
| | | |
| | | |
| | |
| | | <result column="START_DATE" property="startDate" jdbcType="CHAR" /> |
| | | <result column="END_DATE" property="endDate" jdbcType="CHAR" /> |
| | | <result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="IS_OK" property="isOk" jdbcType="CHAR" /> |
| | | </resultMap> |
| | | |
| | | <sql id="tableColumnList"> |
| | | ID,TITLE, TYPE, PERIOD, SCOPE, START_DATE,END_DATE,CREATE_TIME |
| | | ID,TITLE, TYPE, PERIOD, SCOPE, START_DATE,END_DATE,CREATE_TIME,IS_OK |
| | | </sql> |
| | | |
| | | <sql id="queryByParams"> |
| | | <if test="TITLE != null"> |
| | | <if test="title != null"> |
| | | <![CDATA[ AND TITLE like '%'+#{title}+'%' ]]> |
| | | </if> |
| | | <if test="isOk != null"> |
| | | <![CDATA[ AND IS_OK = #{isOk} ]]> |
| | | </if> |
| | | </sql> |
| | | |
| | |
| | | </if> |
| | | <if test="createTime != null"> |
| | | CREATE_TIME = #{createTime}, |
| | | </if> |
| | | <if test="isOk != null"> |
| | | IS_OK = #{isOk}, |
| | | </if> |
| | | </set> |
| | | WHERE ID = #{id} |
| | |
| | | </delete> |
| | | |
| | | <insert id="insertList" parameterType="java.util.List" > |
| | | INSERT INTO INSPECTION_TASK (ID,TITLE, TYPE, PERIOD, SCOPE, START_DATE,END_DATE,CREATE_TIME) VALUES |
| | | INSERT INTO INSPECTION_TASK (ID,TITLE, TYPE, PERIOD, SCOPE, START_DATE,END_DATE,CREATE_TIME,IS_OK) VALUES |
| | | <foreach collection="list" item="item" index="index" separator="," > |
| | | (#{item.id},#{item.title},#{item.type},#{item.period},#{item.scope},#{item.startDate},#{item.endDate},#{item.createTime}) |
| | | (#{item.id},#{item.title},#{item.type},#{item.period},#{item.scope},#{item.startDate},#{item.endDate},#{item.createTime},#{item.isOk}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | |
| | | <if test="startDate != null" >START_DATE,</if> |
| | | <if test="endDate != null" >END_DATE,</if> |
| | | <if test="createTime != null" >CREATE_TIME</if> |
| | | <if test="isOk != null" >IS_OK</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | | <if test="id != null" >#{id},</if> |
| | |
| | | <if test="startDate != null" >#{startDate},</if> |
| | | <if test="endDate != null" >#{endDate},</if> |
| | | <if test="createTime != null" >#{createTime}</if> |
| | | <if test="isOk != null" >#{isOk}</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <select id="selectByAccountId" resultMap="resultMap" parameterType="java.lang.String"> |
| | | SELECT |
| | | ID,TITLE, TYPE, PERIOD, SCOPE, START_DATE,END_DATE,CREATE_TIME |
| | | ID,TITLE, TYPE, PERIOD, SCOPE, START_DATE,END_DATE,CREATE_TIME,IS_OK |
| | | FROM INSPECTION_TASK |
| | | </select> |
| | | |
| | |
| | | ORDER BY CREATE_TIME DESC |
| | | </select> |
| | | |
| | | <select id="selectByDate" parameterType="map" resultType="com.wgcloud.entity.InspectionTask"> |
| | | SELECT |
| | | <include refid="tableColumnList" /> |
| | | FROM INSPECTION_TASK |
| | | <where> |
| | | 1=1 |
| | | <if test="startDate != null"> |
| | | AND START_DATE > #{startDate}+' 00:00:00', |
| | | </if> |
| | | <if test="endDate != null"> |
| | | <![CDATA[ and END_DATE < #{endDate}+' 23:59:59' ]]> |
| | | </if> |
| | | </where> |
| | | ORDER BY CREATE_TIME DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </sql> |
| | | |
| | | <sql id="queryByParams"> |
| | | <if test="hostname != null"> |
| | | <if test="taskId != null"> |
| | | <![CDATA[ AND TASK_ID = #{taskId} ]]> |
| | | </if> |
| | | </sql> |