Просмотр исходного кода

1、修改预警确认代码;2、修改预警忽略代码;

tags/v1.2.0^2
wanjing 1 год назад
Родитель
Сommit
d0d435f0bd
4 измененных файлов: 5 добавлений и 5 удалений
  1. +1
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/WarningController.java
  2. +1
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/warning/confirm/WarningConfirmService.java
  3. +1
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/warning/ignore/WarningIgnoreService.java
  4. +2
    -2
      tuoheng-admin/src/main/resources/mapper/WarningMapper.xml

+ 1
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/WarningController.java Просмотреть файл

@@ -51,7 +51,7 @@ public class WarningController {
* 预警确认
*/
@PostMapping("/confirm")
public JsonResult confirm(@RequestBody WarningConfirmRequest request){
public JsonResult confirm(WarningConfirmRequest request){
return warningService.confirm(request);
}


+ 1
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/service/warning/confirm/WarningConfirmService.java Просмотреть файл

@@ -57,7 +57,7 @@ public class WarningConfirmService {
*/
private JsonResult check(Integer tenantId, WarningConfirmRequest request) {
// 判断预警id是否为空
if (ObjectUtil.isNotNull(request.getId())) {
if (ObjectUtil.isNull(request.getId())) {
throw new ServiceException("预警ID为空");
}
Warning warning = warningMapper.selectOne(new LambdaQueryWrapper<Warning>()

+ 1
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/service/warning/ignore/WarningIgnoreService.java Просмотреть файл

@@ -57,7 +57,7 @@ public class WarningIgnoreService {
*/
private JsonResult check(Integer tenantId, Integer id) {
// 判断预警id是否为空
if (ObjectUtil.isNotNull(id)) {
if (ObjectUtil.isNull(id)) {
throw new ServiceException("预警ID为空");
}
Warning warning = warningMapper.selectOne(new LambdaQueryWrapper<Warning>()

+ 2
- 2
tuoheng-admin/src/main/resources/mapper/WarningMapper.xml Просмотреть файл

@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>

<update id="confirm" parameterType="hashmap">
update th_inspection_file
update th_warning
<trim prefix="SET" suffixOverrides=",">
<if test="status != null"> status = #{status}, </if>
<if test="updateUser != null and updateUser != ''"> update_user = #{updateUser}, </if>
@@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>

<update id="ignore" parameterType="hashmap">
update th_inspection_file
update th_warning
<trim prefix="SET" suffixOverrides=",">
<if test="status != null"> status = #{status}, </if>
<if test="updateUser != null and updateUser != ''"> update_user = #{updateUser}, </if>

Загрузка…
Отмена
Сохранить