Browse Source

报警预警处理bug修正

zhengjie 1 năm trước cách đây
mục cha
commit
ec876da95e
20 tập tin đã thay đổi với 186 bổ sung31 xóa
  1. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/TFallSolveMapper.java
  2. 10 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/THealthSolveMapper.java
  3. 9 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/TOtherSolveMapper.java
  4. 10 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRailSolveMapper.java
  5. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/TSosSolveMapper.java
  6. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ITFallSolveService.java
  7. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ITHealthSolveService.java
  8. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ITOtherSolveService.java
  9. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ITRailSolveService.java
  10. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ITSosSolveService.java
  11. 12 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TFallSolveServiceImpl.java
  12. 12 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/THealthSolveServiceImpl.java
  13. 12 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TOtherSolveServiceImpl.java
  14. 12 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRailSolveServiceImpl.java
  15. 12 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TSosSolveServiceImpl.java
  16. 8 4
      ruoyi-system/src/main/resources/mapper/system/TFallSolveMapper.xml
  17. 8 4
      ruoyi-system/src/main/resources/mapper/system/THealthSolveMapper.xml
  18. 8 4
      ruoyi-system/src/main/resources/mapper/system/TOtherSolveMapper.xml
  19. 8 4
      ruoyi-system/src/main/resources/mapper/system/TRailSolveMapper.xml
  20. 9 5
      ruoyi-system/src/main/resources/mapper/system/TSosSolveMapper.xml

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TFallSolveMapper.java

@@ -19,6 +19,14 @@ public interface TFallSolveMapper
      */
     public TFallSolve selectTFallSolveById(Integer id);
 
+    /**
+     * 查询跌倒告警
+     *
+     * @param aid 跌倒告警主键
+     * @return 跌倒告警
+     */
+    public TFallSolve selectTFallSolveByAid(Integer aid);
+
     /**
      * 查询跌倒告警列表
      * 

+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/THealthSolveMapper.java

@@ -1,6 +1,8 @@
 package com.ruoyi.system.mapper;
 
 import java.util.List;
+
+import com.ruoyi.system.domain.TFallSolve;
 import com.ruoyi.system.domain.THealthSolve;
 
 /**
@@ -19,6 +21,14 @@ public interface THealthSolveMapper
      */
     public THealthSolve selectTHealthSolveById(Integer id);
 
+    /**
+     * 查询健康告警处理
+     *
+     * @param aid 健康告警处理主键
+     * @return 健康告警处理
+     */
+    public THealthSolve selectTHealthSolveByAid(Integer aid);
+
     /**
      * 查询健康告警处理列表
      * 

+ 9 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TOtherSolveMapper.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
 
 import java.util.List;
 import com.ruoyi.system.domain.TOtherSolve;
+import com.ruoyi.system.domain.TSosSolve;
 
 /**
  * 其他告警处理Mapper接口
@@ -19,6 +20,14 @@ public interface TOtherSolveMapper
      */
     public TOtherSolve selectTOtherSolveById(Integer id);
 
+    /**
+     * 查询其他告警处理
+     *
+     * @param aid 其他告警处理主键
+     * @return 其他告警处理
+     */
+    public TOtherSolve selectTOtherSolveByAid(Integer aid);
+
     /**
      * 查询其他告警处理列表
      * 

+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TRailSolveMapper.java

@@ -1,6 +1,8 @@
 package com.ruoyi.system.mapper;
 
 import java.util.List;
+
+import com.ruoyi.system.domain.TOtherSolve;
 import com.ruoyi.system.domain.TRailSolve;
 
 /**
@@ -19,6 +21,14 @@ public interface TRailSolveMapper
      */
     public TRailSolve selectTRailSolveById(Integer id);
 
+    /**
+     * 查询围栏告警处理
+     *
+     * @param aid 围栏告警处理主键
+     * @return 围栏告警处理
+     */
+    public TRailSolve selectTRailSolveByAid(Integer aid);
+
     /**
      * 查询围栏告警处理列表
      * 

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TSosSolveMapper.java

@@ -19,6 +19,14 @@ public interface TSosSolveMapper
      */
     public TSosSolve selectTSosSolveById(Integer id);
 
+    /**
+     * 查询SOS预警处理
+     *
+     * @param aid SOS预警主键
+     * @return SOS预警处理
+     */
+    public TSosSolve selectTSosSolveByAid(Integer aid);
+
     /**
      * 查询SOS预警处理列表
      * 

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ITFallSolveService.java

@@ -19,6 +19,14 @@ public interface ITFallSolveService
      */
     public TFallSolve selectTFallSolveById(Integer id);
 
+    /**
+     * 查询跌倒告警
+     *
+     * @param aid 跌倒告警主键
+     * @return 跌倒告警
+     */
+    public TFallSolve selectTFallSolveByAid(Integer aid);
+
     /**
      * 查询跌倒告警列表
      * 

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ITHealthSolveService.java

@@ -19,6 +19,14 @@ public interface ITHealthSolveService
      */
     public THealthSolve selectTHealthSolveById(Integer id);
 
+    /**
+     * 查询健康告警处理
+     *
+     * @param aid 健康告警处理主键
+     * @return 健康告警处理
+     */
+    public THealthSolve selectTHealthSolveByAid(Integer aid);
+
     /**
      * 查询健康告警处理列表
      * 

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ITOtherSolveService.java

@@ -19,6 +19,14 @@ public interface ITOtherSolveService
      */
     public TOtherSolve selectTOtherSolveById(Integer id);
 
+    /**
+     * 查询其他告警处理
+     *
+     * @param aid 其他告警处理主键
+     * @return 其他告警处理
+     */
+    public TOtherSolve selectTOtherSolveByAid(Integer aid);
+
     /**
      * 查询其他告警处理列表
      * 

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ITRailSolveService.java

@@ -19,6 +19,14 @@ public interface ITRailSolveService
      */
     public TRailSolve selectTRailSolveById(Integer id);
 
+    /**
+     * 查询围栏告警处理
+     *
+     * @param aid 围栏告警处理主键
+     * @return 围栏告警处理
+     */
+    public TRailSolve selectTRailSolveByAid(Integer aid);
+
     /**
      * 查询围栏告警处理列表
      * 

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ITSosSolveService.java

@@ -19,6 +19,14 @@ public interface ITSosSolveService
      */
     public TSosSolve selectTSosSolveById(Integer id);
 
+    /**
+     * 查询SOS预警处理
+     *
+     * @param aid SOS预警主键
+     * @return SOS预警处理
+     */
+    public TSosSolve selectTSosSolveByAid(Integer aid);
+
     /**
      * 查询SOS预警处理列表
      * 

+ 12 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TFallSolveServiceImpl.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
 
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.TFallSolveMapper;
@@ -32,6 +33,11 @@ public class TFallSolveServiceImpl implements ITFallSolveService
         return tFallSolveMapper.selectTFallSolveById(id);
     }
 
+    @Override
+    public TFallSolve selectTFallSolveByAid(Integer aid) {
+        return tFallSolveMapper.selectTFallSolveByAid(aid);
+    }
+
     /**
      * 查询跌倒告警列表
      * 
@@ -53,8 +59,12 @@ public class TFallSolveServiceImpl implements ITFallSolveService
     @Override
     public int insertTFallSolve(TFallSolve tFallSolve)
     {
-        tFallSolve.setCreateTime(DateUtils.getNowDate());
-        return tFallSolveMapper.insertTFallSolve(tFallSolve);
+        if (StringUtils.isNull(this.selectTFallSolveByAid(tFallSolve.getAid()))){
+            tFallSolve.setCreateTime(DateUtils.getNowDate());
+            return tFallSolveMapper.insertTFallSolve(tFallSolve);
+        }else{
+            return tFallSolveMapper.updateTFallSolve(tFallSolve);
+        }
     }
 
     /**

+ 12 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/THealthSolveServiceImpl.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
 
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.THealthSolveMapper;
@@ -32,6 +33,11 @@ public class THealthSolveServiceImpl implements ITHealthSolveService
         return tHealthSolveMapper.selectTHealthSolveById(id);
     }
 
+    @Override
+    public THealthSolve selectTHealthSolveByAid(Integer aid) {
+        return tHealthSolveMapper.selectTHealthSolveByAid(aid);
+    }
+
     /**
      * 查询健康告警处理列表
      * 
@@ -53,8 +59,12 @@ public class THealthSolveServiceImpl implements ITHealthSolveService
     @Override
     public int insertTHealthSolve(THealthSolve tHealthSolve)
     {
-        tHealthSolve.setCreateTime(DateUtils.getNowDate());
-        return tHealthSolveMapper.insertTHealthSolve(tHealthSolve);
+        if (StringUtils.isNull(this.selectTHealthSolveByAid(tHealthSolve.getAid()))){
+            tHealthSolve.setCreateTime(DateUtils.getNowDate());
+            return tHealthSolveMapper.insertTHealthSolve(tHealthSolve);
+        }else{
+            return tHealthSolveMapper.updateTHealthSolve(tHealthSolve);
+        }
     }
 
     /**

+ 12 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TOtherSolveServiceImpl.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
 
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.TOtherSolveMapper;
@@ -32,6 +33,11 @@ public class TOtherSolveServiceImpl implements ITOtherSolveService
         return tOtherSolveMapper.selectTOtherSolveById(id);
     }
 
+    @Override
+    public TOtherSolve selectTOtherSolveByAid(Integer aid) {
+        return tOtherSolveMapper.selectTOtherSolveByAid(aid);
+    }
+
     /**
      * 查询其他告警处理列表
      * 
@@ -53,8 +59,12 @@ public class TOtherSolveServiceImpl implements ITOtherSolveService
     @Override
     public int insertTOtherSolve(TOtherSolve tOtherSolve)
     {
-        tOtherSolve.setCreateTime(DateUtils.getNowDate());
-        return tOtherSolveMapper.insertTOtherSolve(tOtherSolve);
+        if (StringUtils.isNull(this.selectTOtherSolveByAid(tOtherSolve.getAid()))){
+            tOtherSolve.setCreateTime(DateUtils.getNowDate());
+            return tOtherSolveMapper.insertTOtherSolve(tOtherSolve);
+        }else{
+            return tOtherSolveMapper.updateTOtherSolve(tOtherSolve);
+        }
     }
 
     /**

+ 12 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TRailSolveServiceImpl.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
 
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.TRailSolveMapper;
@@ -32,6 +33,11 @@ public class TRailSolveServiceImpl implements ITRailSolveService
         return tRailSolveMapper.selectTRailSolveById(id);
     }
 
+    @Override
+    public TRailSolve selectTRailSolveByAid(Integer aid) {
+        return tRailSolveMapper.selectTRailSolveByAid(aid);
+    }
+
     /**
      * 查询围栏告警处理列表
      * 
@@ -53,8 +59,12 @@ public class TRailSolveServiceImpl implements ITRailSolveService
     @Override
     public int insertTRailSolve(TRailSolve tRailSolve)
     {
-        tRailSolve.setCreateTime(DateUtils.getNowDate());
-        return tRailSolveMapper.insertTRailSolve(tRailSolve);
+        if (StringUtils.isNull(this.selectTRailSolveByAid(tRailSolve.getAid()))){
+            tRailSolve.setCreateTime(DateUtils.getNowDate());
+            return tRailSolveMapper.insertTRailSolve(tRailSolve);
+        }else{
+            return tRailSolveMapper.updateTRailSolve(tRailSolve);
+        }
     }
 
     /**

+ 12 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TSosSolveServiceImpl.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
 
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.TSosSolveMapper;
@@ -32,6 +33,11 @@ public class TSosSolveServiceImpl implements ITSosSolveService
         return tSosSolveMapper.selectTSosSolveById(id);
     }
 
+    @Override
+    public TSosSolve selectTSosSolveByAid(Integer aid) {
+        return tSosSolveMapper.selectTSosSolveByAid(aid);
+    }
+
     /**
      * 查询SOS预警处理列表
      * 
@@ -53,8 +59,12 @@ public class TSosSolveServiceImpl implements ITSosSolveService
     @Override
     public int insertTSosSolve(TSosSolve tSosSolve)
     {
-        tSosSolve.setCreateTime(DateUtils.getNowDate());
-        return tSosSolveMapper.insertTSosSolve(tSosSolve);
+        if (StringUtils.isNull(this.selectTSosSolveByAid(tSosSolve.getAid()))){
+            tSosSolve.setCreateTime(DateUtils.getNowDate());
+            return tSosSolveMapper.insertTSosSolve(tSosSolve);
+        }else{
+            return tSosSolveMapper.updateTSosSolve(tSosSolve);
+        }
     }
 
     /**

+ 8 - 4
ruoyi-system/src/main/resources/mapper/system/TFallSolveMapper.xml

@@ -48,7 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTFallSolveVo"/>
         where id = #{id}
     </select>
-        
+    <select id="selectTFallSolveByAid"  resultMap="TFallSolveResult">
+        <include refid="selectTFallSolveVo"/>
+        where alarmid = #{aid}
+    </select>
+
     <insert id="insertTFallSolve" parameterType="TFallSolve" useGeneratedKeys="true" keyProperty="id">
         insert into t_fall_solve
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -79,13 +83,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userid != null">userid = #{userid},</if>
             <if test="deviceIdCode != null">device_id_code = #{deviceIdCode},</if>
             <if test="alarmMsg != null">alarm_msg = #{alarmMsg},</if>
-            <if test="solveStatus != null">solve_status = #{solveStatus},</if>
+            <if test="solve_status != null">solve_status = #{solve_status},</if>
             <if test="serviceUserid != null">service_userid = #{serviceUserid},</if>
             <if test="msg != null">msg = #{msg},</if>
             <if test="createTime != null">createtime = #{createTime},</if>
-            <if test="alarmid != null">alarmid = #{alarmid},</if>
+            <if test="aid != null">alarmid = #{aid},</if>
         </trim>
-        where id = #{id}
+        where alarmid = #{aid}
     </update>
 
     <delete id="deleteTFallSolveById" parameterType="Integer">

+ 8 - 4
ruoyi-system/src/main/resources/mapper/system/THealthSolveMapper.xml

@@ -48,7 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTHealthSolveVo"/>
         where id = #{id}
     </select>
-        
+    <select id="selectTHealthSolveByAid" resultMap="THealthSolveResult">
+        <include refid="selectTHealthSolveVo"/>
+        where alarmid = #{aid}
+    </select>
+
     <insert id="insertTHealthSolve" parameterType="THealthSolve" useGeneratedKeys="true" keyProperty="id">
         insert into t_health_solve
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -79,13 +83,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userid != null">userid = #{userid},</if>
             <if test="deviceIdCode != null">device_id_code = #{deviceIdCode},</if>
             <if test="alarmMsg != null">alarm_msg = #{alarmMsg},</if>
-            <if test="solveStatus != null">solve_status = #{solveStatus},</if>
+            <if test="solve_status != null">solve_status = #{solve_status},</if>
             <if test="serviceUserid != null">service_userid = #{serviceUserid},</if>
             <if test="msg != null">msg = #{msg},</if>
             <if test="createTime != null">createtime = #{createTime},</if>
-            <if test="alarmid != null">alarmid = #{alarmid},</if>
+            <if test="aid != null">alarmid = #{aid},</if>
         </trim>
-        where id = #{id}
+        where alarmid = #{aid}
     </update>
 
     <delete id="deleteTHealthSolveById" parameterType="Integer">

+ 8 - 4
ruoyi-system/src/main/resources/mapper/system/TOtherSolveMapper.xml

@@ -48,7 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTOtherSolveVo"/>
         where id = #{id}
     </select>
-        
+    <select id="selectTOtherSolveByAid" resultMap="TOtherSolveResult">
+        <include refid="selectTOtherSolveVo"/>
+        where alarmid = #{aid}
+    </select>
+
     <insert id="insertTOtherSolve" parameterType="TOtherSolve" useGeneratedKeys="true" keyProperty="id">
         insert into t_other_solve
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -79,13 +83,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userid != null">userid = #{userid},</if>
             <if test="deviceIdCode != null">device_id_code = #{deviceIdCode},</if>
             <if test="alarmMsg != null">alarm_msg = #{alarmMsg},</if>
-            <if test="solveStatus != null">solve_status = #{solveStatus},</if>
+            <if test="solve_status != null">solve_status = #{solve_status},</if>
             <if test="serviceUserid != null">service_userid = #{serviceUserid},</if>
             <if test="msg != null">msg = #{msg},</if>
             <if test="createTime != null">createtime = #{createTime},</if>
-            <if test="alarmid != null">alarmid = #{alarmid},</if>
+            <if test="aid != null">alarmid = #{aid},</if>
         </trim>
-        where id = #{id}
+        where alarmid = #{aid}
     </update>
 
     <delete id="deleteTOtherSolveById" parameterType="Integer">

+ 8 - 4
ruoyi-system/src/main/resources/mapper/system/TRailSolveMapper.xml

@@ -48,7 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTRailSolveVo"/>
         where id = #{id}
     </select>
-        
+    <select id="selectTRailSolveByAid" resultMap="TRailSolveResult">
+        <include refid="selectTRailSolveVo"/>
+        where alarmid = #{aid}
+    </select>
+
     <insert id="insertTRailSolve" parameterType="TRailSolve" useGeneratedKeys="true" keyProperty="id">
         insert into t_rail_solve
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -79,13 +83,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userid != null">userid = #{userid},</if>
             <if test="deviceIdCode != null">device_id_code = #{deviceIdCode},</if>
             <if test="alarmMsg != null">alarm_msg = #{alarmMsg},</if>
-            <if test="solveStatus != null">solve_status = #{solveStatus},</if>
+            <if test="solve_status != null">solve_status = #{solve_status},</if>
             <if test="serviceUserid != null">service_userid = #{serviceUserid},</if>
             <if test="msg != null">msg = #{msg},</if>
             <if test="createTime != null">createtime = #{createTime},</if>
-            <if test="alarmid != null">alarmid = #{alarmid},</if>
+            <if test="aid != null">alarmid = #{aid},</if>
         </trim>
-        where id = #{id}
+        where alarmid = #{aid}
     </update>
 
     <delete id="deleteTRailSolveById" parameterType="Integer">

+ 9 - 5
ruoyi-system/src/main/resources/mapper/system/TSosSolveMapper.xml

@@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTSosSolveVo">
-        select id, userid, device_id_code, alarm_msg, solve_status, service_userid, msg, createtime from t_sos_solve
+        select id, userid, device_id_code, alarm_msg, solve_status, service_userid, msg, createtime,alarmid from t_sos_solve
     </sql>
 
     <select id="selectTSosSolveList" parameterType="TSosSolve" resultMap="TSosSolveResult">
@@ -48,7 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTSosSolveVo"/>
         where id = #{id}
     </select>
-        
+    <select id="selectTSosSolveByAid" resultMap="TSosSolveResult">
+        <include refid="selectTSosSolveVo"/>
+        where alarmid = #{aid}
+    </select>
+
     <insert id="insertTSosSolve" parameterType="TSosSolve" useGeneratedKeys="true" keyProperty="id">
         insert into t_sos_solve
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -79,13 +83,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userid != null">userid = #{userid},</if>
             <if test="deviceIdCode != null">device_id_code = #{deviceIdCode},</if>
             <if test="alarmMsg != null">alarm_msg = #{alarmMsg},</if>
-            <if test="solveStatus != null">solve_status = #{solveStatus},</if>
+            <if test="solve_status != null">solve_status = #{solve_status},</if>
             <if test="serviceUserid != null">service_userid = #{serviceUserid},</if>
             <if test="msg != null">msg = #{msg},</if>
             <if test="createTime != null">createtime = #{createTime},</if>
-            <if test="alarmid != null">alarmid = #{alarmid},</if>
+            <if test="aid != null">alarmid = #{aid},</if>
         </trim>
-        where id = #{id}
+        where alarmid = #{aid}
     </update>
 
     <delete id="deleteTSosSolveById" parameterType="Integer">