فهرست منبع

'优化事件管理表-修改接口,新增“处理图片”和“处理内容”两个字段的代码逻辑'

james 11 ماه پیش
والد
کامیت
492af7a13d

+ 10 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/domain/PatrolInspectionEvent.java

@@ -83,6 +83,16 @@ public class PatrolInspectionEvent implements Serializable {
      */
     private LocalDateTime handleTime;
 
+    /**
+     * 处置图片
+     */
+    private String handleImage;
+
+    /**
+     * 处置内容
+     */
+    private String handleContent;
+
     /**
      * 备注
      */

+ 6 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionEventServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.usky.common.core.bean.CommonPage;
+import com.usky.common.core.exception.BusinessException;
 import com.usky.common.security.utils.SecurityUtils;
 import com.usky.fire.domain.PatrolInspectionEvent;
 import com.usky.fire.domain.PatrolInspectionPersonnel;
@@ -106,6 +107,11 @@ public class PatrolInspectionEventServiceImpl extends AbstractCrudService<Patrol
 
     @Override
     public void edit(PatrolInspectionEvent patrolInspectionEvent){
+        PatrolInspectionEvent one = this.getById(patrolInspectionEvent.getId());
+        if(one == null){
+            throw new BusinessException("没有对应记录数据");
+        }
+
         patrolInspectionEvent.setHandleStatus(1);
         patrolInspectionEvent.setHandleName(SecurityUtils.getUsername());
         patrolInspectionEvent.setHandleTime(LocalDateTime.now());

+ 2 - 0
service-fire/service-fire-biz/src/main/resources/mapper/fire/PatrolInspectionEventMapper.xml

@@ -16,6 +16,8 @@
         <result column="device_id" property="deviceId" />
         <result column="handle_name" property="handleName" />
         <result column="handle_time" property="handleTime" />
+        <result column="handle_image" property="handleImage" />
+        <result column="handle_content" property="handleContent" />
         <result column="remark" property="remark" />
         <result column="tenant_id" property="tenantId" />
         <result column="dept_id" property="deptId" />