From c58e01fe1dcc70c70a92568e5fad96cda9aed201 Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期四, 05 十月 2023 15:24:26 +0800
Subject: [PATCH] 增加报警过滤接口
---
ruoyi-admin/src/main/resources/application-prod-druid.yml | 2
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java | 4
ard-work/src/main/java/com/ruoyi/alarm/filter/mapper/ArdAlarmFilterMapper.java | 61 +++++
ruoyi-generator/src/main/resources/vm/java/domain.java.vm | 4
ruoyi-admin/src/main/resources/application-prod.yml | 55 ++--
ard-work/src/main/java/com/ruoyi/alarm/filter/controller/ArdAlarmFilterController.java | 112 ++++++++++
ard-work/src/main/java/com/ruoyi/alarm/filter/domain/ArdAlarmFilter.java | 115 ++++++++++
ard-work/src/main/java/com/ruoyi/alarm/filter/service/IArdAlarmFilterService.java | 61 +++++
ard-work/src/main/resources/mapper/alarm/ArdAlarmFilterMapper.xml | 105 +++++++++
ard-work/src/main/java/com/ruoyi/alarm/filter/service/impl/ArdAlarmFilterServiceImpl.java | 104 +++++++++
10 files changed, 591 insertions(+), 32 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/filter/controller/ArdAlarmFilterController.java b/ard-work/src/main/java/com/ruoyi/alarm/filter/controller/ArdAlarmFilterController.java
new file mode 100644
index 0000000..4410492
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/alarm/filter/controller/ArdAlarmFilterController.java
@@ -0,0 +1,112 @@
+package com.ruoyi.alarm.filter.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.alarm.filter.domain.ArdAlarmFilter;
+import com.ruoyi.alarm.filter.service.IArdAlarmFilterService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 鎶ヨ杩囨护Controller
+ *
+ * @author ard
+ * @date 2023-10-05
+ */
+@Api(tags = "鎶ヨ杩囨护鎺ュ彛")
+@RestController
+@RequestMapping("/alarm/filter")
+public class ArdAlarmFilterController extends BaseController
+{
+ @Autowired
+ private IArdAlarmFilterService ardAlarmFilterService;
+
+ /**
+ * 鏌ヨ鎶ヨ杩囨护鍒楄〃
+ */
+ @ApiOperation("鏌ヨ鎶ヨ杩囨护鍒楄〃")
+ @PreAuthorize("@ss.hasPermi('alarm:filter:list')")
+ @GetMapping("/list")
+ public AjaxResult list(ArdAlarmFilter ardAlarmFilter)
+ {
+ List<ArdAlarmFilter> list = ardAlarmFilterService.selectArdAlarmFilterList(ardAlarmFilter);
+ return success(list);
+ }
+
+ /**
+ * 瀵煎嚭鎶ヨ杩囨护鍒楄〃
+ */
+ @PreAuthorize("@ss.hasPermi('alarm:filter:export')")
+ @Log(title = "鎶ヨ杩囨护", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, ArdAlarmFilter ardAlarmFilter)
+ {
+ List<ArdAlarmFilter> list = ardAlarmFilterService.selectArdAlarmFilterList(ardAlarmFilter);
+ ExcelUtil<ArdAlarmFilter> util = new ExcelUtil<ArdAlarmFilter>(ArdAlarmFilter.class);
+ util.exportExcel(response, list, "鎶ヨ杩囨护鏁版嵁");
+ }
+
+ /**
+ * 鑾峰彇鎶ヨ杩囨护璇︾粏淇℃伅
+ */
+ @ApiOperation("鑾峰彇鎶ヨ杩囨护璇︾粏淇℃伅")
+ @PreAuthorize("@ss.hasPermi('alarm:filter:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") String id)
+ {
+ return success(ardAlarmFilterService.selectArdAlarmFilterById(id));
+ }
+
+ /**
+ * 鏂板鎶ヨ杩囨护
+ */
+ @ApiOperation("鏂板鎶ヨ杩囨护")
+ @PreAuthorize("@ss.hasPermi('alarm:filter:add')")
+ @Log(title = "鎶ヨ杩囨护", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody ArdAlarmFilter ardAlarmFilter)
+ {
+ return toAjax(ardAlarmFilterService.insertArdAlarmFilter(ardAlarmFilter));
+ }
+
+ /**
+ * 淇敼鎶ヨ杩囨护
+ */
+ @ApiOperation("淇敼鎶ヨ杩囨护")
+ @PreAuthorize("@ss.hasPermi('alarm:filter:edit')")
+ @Log(title = "鎶ヨ杩囨护", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody ArdAlarmFilter ardAlarmFilter)
+ {
+ return toAjax(ardAlarmFilterService.updateArdAlarmFilter(ardAlarmFilter));
+ }
+
+ /**
+ * 鍒犻櫎鎶ヨ杩囨护
+ */
+ @ApiOperation("鍒犻櫎鎶ヨ杩囨护")
+ @PreAuthorize("@ss.hasPermi('alarm:filter:remove')")
+ @Log(title = "鎶ヨ杩囨护", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable String[] ids)
+ {
+ return toAjax(ardAlarmFilterService.deleteArdAlarmFilterByIds(ids));
+ }
+}
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/filter/domain/ArdAlarmFilter.java b/ard-work/src/main/java/com/ruoyi/alarm/filter/domain/ArdAlarmFilter.java
new file mode 100644
index 0000000..cdc77a5
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/alarm/filter/domain/ArdAlarmFilter.java
@@ -0,0 +1,115 @@
+package com.ruoyi.alarm.filter.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 鎶ヨ杩囨护瀵硅薄 ard_alarm_filter
+ *
+ * @author ard
+ * @date 2023-10-05
+ */
+public class ArdAlarmFilter extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 涓婚敭 */
+ private String id;
+
+ /** 鐢ㄦ埛id */
+ @Excel(name = "鐢ㄦ埛id")
+ private String userId;
+
+ /** 鍚嶇О */
+ @Excel(name = "鍚嶇О")
+ private String name;
+
+ /** 鎶ヨ绫诲瀷 */
+ @Excel(name = "鎶ヨ绫诲瀷")
+ private String alarmType;
+
+ /** 寮�濮嬫椂闂� */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "寮�濮嬫椂闂�", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date beginTime;
+
+ /** 缁撴潫鏃堕棿 */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "缁撴潫鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date endTime;
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+ public void setUserId(String userId)
+ {
+ this.userId = userId;
+ }
+
+ public String getUserId()
+ {
+ return userId;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+ public void setAlarmType(String alarmType)
+ {
+ this.alarmType = alarmType;
+ }
+
+ public String getAlarmType()
+ {
+ return alarmType;
+ }
+ public void setBeginTime(Date beginTime)
+ {
+ this.beginTime = beginTime;
+ }
+
+ public Date getBeginTime()
+ {
+ return beginTime;
+ }
+ public void setEndTime(Date endTime)
+ {
+ this.endTime = endTime;
+ }
+
+ public Date getEndTime()
+ {
+ return endTime;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("userId", getUserId())
+ .append("name", getName())
+ .append("alarmType", getAlarmType())
+ .append("beginTime", getBeginTime())
+ .append("endTime", getEndTime())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .toString();
+ }
+}
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/filter/mapper/ArdAlarmFilterMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/filter/mapper/ArdAlarmFilterMapper.java
new file mode 100644
index 0000000..c3c12cd
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/alarm/filter/mapper/ArdAlarmFilterMapper.java
@@ -0,0 +1,61 @@
+package com.ruoyi.alarm.filter.mapper;
+
+import java.util.List;
+import com.ruoyi.alarm.filter.domain.ArdAlarmFilter;
+
+/**
+ * 鎶ヨ杩囨护Mapper鎺ュ彛
+ *
+ * @author ard
+ * @date 2023-10-05
+ */
+public interface ArdAlarmFilterMapper
+{
+ /**
+ * 鏌ヨ鎶ヨ杩囨护
+ *
+ * @param id 鎶ヨ杩囨护涓婚敭
+ * @return 鎶ヨ杩囨护
+ */
+ public ArdAlarmFilter selectArdAlarmFilterById(String id);
+
+ /**
+ * 鏌ヨ鎶ヨ杩囨护鍒楄〃
+ *
+ * @param ardAlarmFilter 鎶ヨ杩囨护
+ * @return 鎶ヨ杩囨护闆嗗悎
+ */
+ public List<ArdAlarmFilter> selectArdAlarmFilterList(ArdAlarmFilter ardAlarmFilter);
+
+ /**
+ * 鏂板鎶ヨ杩囨护
+ *
+ * @param ardAlarmFilter 鎶ヨ杩囨护
+ * @return 缁撴灉
+ */
+ public int insertArdAlarmFilter(ArdAlarmFilter ardAlarmFilter);
+
+ /**
+ * 淇敼鎶ヨ杩囨护
+ *
+ * @param ardAlarmFilter 鎶ヨ杩囨护
+ * @return 缁撴灉
+ */
+ public int updateArdAlarmFilter(ArdAlarmFilter ardAlarmFilter);
+
+ /**
+ * 鍒犻櫎鎶ヨ杩囨护
+ *
+ * @param id 鎶ヨ杩囨护涓婚敭
+ * @return 缁撴灉
+ */
+ public int deleteArdAlarmFilterById(String id);
+
+ /**
+ * 鎵归噺鍒犻櫎鎶ヨ杩囨护
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deleteArdAlarmFilterByIds(String[] ids);
+}
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/filter/service/IArdAlarmFilterService.java b/ard-work/src/main/java/com/ruoyi/alarm/filter/service/IArdAlarmFilterService.java
new file mode 100644
index 0000000..a3de5bb
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/alarm/filter/service/IArdAlarmFilterService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.alarm.filter.service;
+
+import java.util.List;
+import com.ruoyi.alarm.filter.domain.ArdAlarmFilter;
+
+/**
+ * 鎶ヨ杩囨护Service鎺ュ彛
+ *
+ * @author ard
+ * @date 2023-10-05
+ */
+public interface IArdAlarmFilterService
+{
+ /**
+ * 鏌ヨ鎶ヨ杩囨护
+ *
+ * @param id 鎶ヨ杩囨护涓婚敭
+ * @return 鎶ヨ杩囨护
+ */
+ public ArdAlarmFilter selectArdAlarmFilterById(String id);
+
+ /**
+ * 鏌ヨ鎶ヨ杩囨护鍒楄〃
+ *
+ * @param ardAlarmFilter 鎶ヨ杩囨护
+ * @return 鎶ヨ杩囨护闆嗗悎
+ */
+ public List<ArdAlarmFilter> selectArdAlarmFilterList(ArdAlarmFilter ardAlarmFilter);
+
+ /**
+ * 鏂板鎶ヨ杩囨护
+ *
+ * @param ardAlarmFilter 鎶ヨ杩囨护
+ * @return 缁撴灉
+ */
+ public int insertArdAlarmFilter(ArdAlarmFilter ardAlarmFilter);
+
+ /**
+ * 淇敼鎶ヨ杩囨护
+ *
+ * @param ardAlarmFilter 鎶ヨ杩囨护
+ * @return 缁撴灉
+ */
+ public int updateArdAlarmFilter(ArdAlarmFilter ardAlarmFilter);
+
+ /**
+ * 鎵归噺鍒犻櫎鎶ヨ杩囨护
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鎶ヨ杩囨护涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deleteArdAlarmFilterByIds(String[] ids);
+
+ /**
+ * 鍒犻櫎鎶ヨ杩囨护淇℃伅
+ *
+ * @param id 鎶ヨ杩囨护涓婚敭
+ * @return 缁撴灉
+ */
+ public int deleteArdAlarmFilterById(String id);
+}
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/filter/service/impl/ArdAlarmFilterServiceImpl.java b/ard-work/src/main/java/com/ruoyi/alarm/filter/service/impl/ArdAlarmFilterServiceImpl.java
new file mode 100644
index 0000000..f105536
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/alarm/filter/service/impl/ArdAlarmFilterServiceImpl.java
@@ -0,0 +1,104 @@
+package com.ruoyi.alarm.filter.service.impl;
+
+import java.util.Date;
+import java.util.List;
+
+import com.ruoyi.common.utils.DateUtils;
+
+import com.ruoyi.common.utils.uuid.IdUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.alarm.filter.mapper.ArdAlarmFilterMapper;
+import com.ruoyi.alarm.filter.domain.ArdAlarmFilter;
+import com.ruoyi.alarm.filter.service.IArdAlarmFilterService;
+
+/**
+ * 鎶ヨ杩囨护Service涓氬姟灞傚鐞�
+ *
+ * @author ard
+ * @date 2023-10-05
+ */
+@Service
+public class ArdAlarmFilterServiceImpl implements IArdAlarmFilterService {
+ @Autowired
+ private ArdAlarmFilterMapper ardAlarmFilterMapper;
+
+ /**
+ * 鏌ヨ鎶ヨ杩囨护
+ *
+ * @param id 鎶ヨ杩囨护涓婚敭
+ * @return 鎶ヨ杩囨护
+ */
+ @Override
+ public ArdAlarmFilter selectArdAlarmFilterById(String id) {
+ return ardAlarmFilterMapper.selectArdAlarmFilterById(id);
+ }
+
+ /**
+ * 鏌ヨ鎶ヨ杩囨护鍒楄〃
+ *
+ * @param ardAlarmFilter 鎶ヨ杩囨护
+ * @return 鎶ヨ杩囨护
+ */
+ @Override
+ public List<ArdAlarmFilter> selectArdAlarmFilterList(ArdAlarmFilter ardAlarmFilter) {
+ ardAlarmFilter.setUserId(SecurityUtils.getUserId());
+ return ardAlarmFilterMapper.selectArdAlarmFilterList(ardAlarmFilter);
+ }
+
+ /**
+ * 鏂板鎶ヨ杩囨护
+ *
+ * @param ardAlarmFilter 鎶ヨ杩囨护
+ * @return 缁撴灉
+ */
+ @Override
+ public int insertArdAlarmFilter(ArdAlarmFilter ardAlarmFilter) {
+ ardAlarmFilter.setId(IdUtils.simpleUUID());
+ ardAlarmFilter.setUserId(SecurityUtils.getUserId());
+ ardAlarmFilter.setBeginTime(DateUtils.covertTime(new Date()));
+ ardAlarmFilter.setCreateBy(SecurityUtils.getUsername());
+ ardAlarmFilter.setCreateTime(DateUtils.getNowDate());
+ return ardAlarmFilterMapper.insertArdAlarmFilter(ardAlarmFilter);
+ }
+
+ /**
+ * 淇敼鎶ヨ杩囨护
+ *
+ * @param ardAlarmFilter 鎶ヨ杩囨护
+ * @return 缁撴灉
+ */
+ @Override
+ public int updateArdAlarmFilter(ArdAlarmFilter ardAlarmFilter) {
+ ardAlarmFilter.setUpdateBy(SecurityUtils.getUsername());
+ ardAlarmFilter.setUpdateTime(DateUtils.getNowDate());
+ return ardAlarmFilterMapper.updateArdAlarmFilter(ardAlarmFilter);
+ }
+
+ /**
+ * 鎵归噺鍒犻櫎鎶ヨ杩囨护
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鎶ヨ杩囨护涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteArdAlarmFilterByIds(String[] ids) {
+ return ardAlarmFilterMapper.deleteArdAlarmFilterByIds(ids);
+ }
+
+ /**
+ * 鍒犻櫎鎶ヨ杩囨护淇℃伅
+ *
+ * @param id 鎶ヨ杩囨护涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteArdAlarmFilterById(String id) {
+ return ardAlarmFilterMapper.deleteArdAlarmFilterById(id);
+ }
+}
diff --git a/ard-work/src/main/resources/mapper/alarm/ArdAlarmFilterMapper.xml b/ard-work/src/main/resources/mapper/alarm/ArdAlarmFilterMapper.xml
new file mode 100644
index 0000000..2a5e9c2
--- /dev/null
+++ b/ard-work/src/main/resources/mapper/alarm/ArdAlarmFilterMapper.xml
@@ -0,0 +1,105 @@
+<?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.ruoyi.alarm.filter.mapper.ArdAlarmFilterMapper">
+
+ <resultMap type="ArdAlarmFilter" id="ArdAlarmFilterResult">
+ <result property="id" column="id"/>
+ <result property="userId" column="user_id"/>
+ <result property="name" column="name"/>
+ <result property="alarmType" column="alarm_type"/>
+ <result property="beginTime" column="begin_time"/>
+ <result property="endTime" column="end_time"/>
+ <result property="createBy" column="create_by"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+
+ <sql id="selectArdAlarmFilterVo">
+ select id,
+ user_id,
+ name,
+ alarm_type,
+ begin_time,
+ end_time,
+ create_by,
+ create_time,
+ update_by,
+ update_time
+ from ard_alarm_filter
+ </sql>
+
+ <select id="selectArdAlarmFilterList" parameterType="ArdAlarmFilter" resultMap="ArdAlarmFilterResult">
+ <include refid="selectArdAlarmFilterVo"/>
+ <where>
+ current_timestamp BETWEEN begin_time AND end_time
+ <if test="userId != null and userId != ''">and user_id = #{userId}</if>
+ <if test="name != null and name != ''">and name = #{name}</if>
+ <if test="alarmType != null and alarmType != ''">and alarm_type = #{alarmType}</if>
+ </where>
+ </select>
+
+ <select id="selectArdAlarmFilterById" parameterType="String" resultMap="ArdAlarmFilterResult">
+ <include refid="selectArdAlarmFilterVo"/>
+ where id = #{id}
+ </select>
+
+ <insert id="insertArdAlarmFilter" parameterType="ArdAlarmFilter">
+ insert into ard_alarm_filter
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">id,</if>
+ <if test="userId != null">user_id,</if>
+ <if test="name != null">name,</if>
+ <if test="alarmType != null">alarm_type,</if>
+ <if test="beginTime != null">begin_time,</if>
+ <if test="endTime != null">end_time,</if>
+ <if test="createBy != null">create_by,</if>
+ <if test="createTime != null">create_time,</if>
+ <if test="updateBy != null">update_by,</if>
+ <if test="updateTime != null">update_time,</if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">#{id},</if>
+ <if test="userId != null">#{userId},</if>
+ <if test="name != null">#{name},</if>
+ <if test="alarmType != null">#{alarmType},</if>
+ <if test="beginTime != null">#{beginTime},</if>
+ <if test="endTime != null">#{endTime},</if>
+ <if test="createBy != null">#{createBy},</if>
+ <if test="createTime != null">#{createTime},</if>
+ <if test="updateBy != null">#{updateBy},</if>
+ <if test="updateTime != null">#{updateTime},</if>
+ </trim>
+ </insert>
+
+ <update id="updateArdAlarmFilter" parameterType="ArdAlarmFilter">
+ update ard_alarm_filter
+ <trim prefix="SET" suffixOverrides=",">
+ <if test="userId != null">user_id = #{userId},</if>
+ <if test="name != null">name = #{name},</if>
+ <if test="alarmType != null">alarm_type = #{alarmType},</if>
+ <if test="beginTime != null">begin_time = #{beginTime},</if>
+ <if test="endTime != null">end_time = #{endTime},</if>
+ <if test="createBy != null">create_by = #{createBy},</if>
+ <if test="createTime != null">create_time = #{createTime},</if>
+ <if test="updateBy != null">update_by = #{updateBy},</if>
+ <if test="updateTime != null">update_time = #{updateTime},</if>
+ </trim>
+ where id = #{id}
+ </update>
+
+ <delete id="deleteArdAlarmFilterById" parameterType="String">
+ delete
+ from ard_alarm_filter
+ where id = #{id}
+ </delete>
+
+ <delete id="deleteArdAlarmFilterByIds" parameterType="String">
+ delete from ard_alarm_filter where id in
+ <foreach item="id" collection="array" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </delete>
+</mapper>
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/application-prod-druid.yml b/ruoyi-admin/src/main/resources/application-prod-druid.yml
index ede32e6..5801e33 100644
--- a/ruoyi-admin/src/main/resources/application-prod-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-prod-druid.yml
@@ -6,7 +6,7 @@
# 涓诲簱鏁版嵁婧�
master:
driverClassName: org.postgresql.Driver
- url: jdbc:postgresql://112.98.126.2:35432/ry-vue?stringtype=unspecified
+ url: jdbc:postgresql://112.98.126.2:35432/ry-vue?stringtype=unspecified&TimeZone=Asia/Shanghai
username: postgres
password: Yykj.2017
# 浠庡簱鏁版嵁婧�
diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml
index 67cc120..dfb8cd4 100644
--- a/ruoyi-admin/src/main/resources/application-prod.yml
+++ b/ruoyi-admin/src/main/resources/application-prod.yml
@@ -39,34 +39,6 @@
max-active: 8
# #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級
max-wait: -1ms
-# 鏃ュ織閰嶇疆
-logging:
- level:
- authorize: info
- minio: info
- hikSdk: info
- stealAlarm: info
- websocket: info
- patrolInspectionTask: info
- mqtt: info
- guideQueue: info
- rongCloud: info
- cmd: info
- uav: info
- sy: info
-
-# webrtc-streamer閰嶇疆
-webrtc:
- enabled: false
- host: 192.168.5.229:8000
-
-# minio閰嶇疆
-minio:
- enabled: false
- endpoint: http://192.168.5.229:9001
- accessKey: admin
- secretKey: xzx12345
- path: F:/DATA
# forest閰嶇疆
forest:
backend: okhttp3 # 鍚庣HTTP妗嗘灦锛堥粯璁や负 okhttp3锛�
@@ -85,10 +57,37 @@
log-response-status: true # 鎵撳紑/鍏抽棴Forest鍝嶅簲鐘舵�佹棩蹇楋紙榛樿涓� true锛�
log-response-content: true # 鎵撳紑/鍏抽棴Forest鍝嶅簲鍐呭鏃ュ織锛堥粯璁や负 false锛�
async-mode: platform # [鑷獀1.5.27鐗堟湰璧峰彲鐢╙ 寮傛妯″紡锛堥粯璁や负 platform锛�
+# 鏃ュ織閰嶇疆
+logging:
+ level:
+ authorize: info
+ minio: info
+ hikSdk: info
+ stealAlarm: info
+ websocket: info
+ patrolInspectionTask: info
+ mqtt: info
+ guideQueue: info
+ rongCloud: info
+ cmd: info
+ uav: info
+ sy: info
+# webrtc-streamer閰嶇疆
+webrtc:
+ enabled: false
+ host: 192.168.5.229:8000
+# minio閰嶇疆
+minio:
+ enabled: false
+ endpoint: http://192.168.5.229:9001
+ accessKey: admin
+ secretKey: xzx12345
+ path: F:/DATA
#娴佸獟浣撹浆鐮佹湇鍔″櫒
mediamtx:
enabled: true
host: 192.168.5.229
+ software_decoding: true
#mqtt
mqtt:
host: tcp://192.168.5.229:1883
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
index 8ebc24c..1b54cd8 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
@@ -85,7 +85,9 @@
}
}
-
+ /**
+ * 杞崲Date鍘绘帀姣
+ */
public static final Date covertTime(Date date) {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Timestamp now = new Timestamp(date.getTime());
diff --git a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
index bd51c17..6c4bc28 100644
--- a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
@@ -40,8 +40,8 @@
#if($parentheseIndex != -1)
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
#elseif($column.javaType == 'Date')
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
#else
@Excel(name = "${comment}")
#end
--
Gitblit v1.9.3