From 18975859f0cd4889073b4ea582c175a46e2fcba6 Mon Sep 17 00:00:00 2001
From: whywhyo <1511349576@qq.com>
Date: 星期三, 06 九月 2023 13:36:12 +0800
Subject: [PATCH] 4238789

---
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfLogServiceImpl.java          |   21 +++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java          |   16 ++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java        |   12 ++
 zhang-content/src/main/java/com/ruoyi/service/ZfLogService.java                   |   17 ++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java    |   12 ++
 zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java    |   12 ++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java      |   12 ++
 zhang-content/src/main/java/com/ruoyi/mapper/ZfLogMapper.java                     |   17 ++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java |    1 
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java   |   46 ++++--
 zhang-content/src/main/java/com/ruoyi/domain/ZfLog.java                           |   51 ++++++++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java      |   15 ++
 ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java      |    2 
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java       |   15 ++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfLogController.java     |   72 ++++++++++++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java        |   13 ++
 16 files changed, 306 insertions(+), 28 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java
index bde087b..c8edbbc 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java
@@ -33,6 +33,7 @@
     //鏂板鎴栦慨鏀瑰熀鏈俊鎭�
     @PostMapping()
     public AjaxResult updateData(@RequestBody MarryInfoDto marryInfoDto){
+
         return marrySelfService.updateData(marryInfoDto);
     }
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfLogController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfLogController.java
new file mode 100644
index 0000000..9b7ade9
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfLogController.java
@@ -0,0 +1,72 @@
+package com.ruoyi.web.controller.zhang;
+
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.common.utils.MapUtils;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.domain.ZfLog;
+import com.ruoyi.service.ZfLogService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+import java.util.Arrays;
+
+import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
+import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE;
+
+/**
+ * <p>
+ *  鍓嶇鎺у埗鍣�
+ * </p>
+ *
+ * @author ojq
+ * @since 2023-09-06
+ */
+@RestController
+@RequestMapping("/log")
+public class ZfLogController {
+
+    @Resource
+    private ZfLogService zfLogService;
+
+    @GetMapping("/list")
+    public AjaxResult list(){
+        Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
+        Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
+
+        Page<ZfLog> zfLogPage = new Page<>(pageNum,pageSize);
+        Page<ZfLog> page = zfLogService.page(zfLogPage);
+
+        return AjaxResult.success(MapUtils.getResult(page));
+    }
+
+
+    @GetMapping("{id}")
+    public AjaxResult getById(@PathVariable Long id){
+        ZfLog byId = zfLogService.getById(id);
+        return AjaxResult.success(byId);
+
+    }
+
+    @PostMapping()
+    public AjaxResult save(@RequestBody ZfLog zfLog){
+        zfLogService.save(zfLog);
+        return AjaxResult.success();
+    }
+
+    @PutMapping()
+    public AjaxResult update(@RequestBody ZfLog zfLog){
+        zfLogService.updateById(zfLog);
+        return AjaxResult.success();
+    }
+
+    @DeleteMapping("/{ids}")
+    private AjaxResult delete(@PathVariable Long[] ids){
+        zfLogService.removeBatchByIds(Arrays.asList(ids));
+        return AjaxResult.success();
+    }
+
+}
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
index 9c6d884..2a0d5cd 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -115,7 +115,7 @@
                 // 闈欐�佽祫婧愶紝鍙尶鍚嶈闂�
                 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                 .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
-                .antMatchers("/login/**").permitAll()
+                .antMatchers("/login/**","/log/list").permitAll()
                 // 闄や笂闈㈠鐨勬墍鏈夎姹傚叏閮ㄩ渶瑕侀壌鏉冭璇�
                 .anyRequest().authenticated()
                 .and()
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfLog.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfLog.java
new file mode 100644
index 0000000..8bb6aa3
--- /dev/null
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfLog.java
@@ -0,0 +1,51 @@
+package com.ruoyi.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ojq
+ * @since 2023-09-06
+ */
+@Data
+@TableName("zf_log")
+public class ZfLog implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 涓婚敭
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 琚慨鏀规ā鍧�
+     */
+    private String module;
+
+    /**
+     * 淇敼鏃堕棿
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private LocalDateTime updateTime;
+
+    /**
+     * 淇敼浜�
+     */
+    private String updater;
+
+
+}
diff --git a/zhang-content/src/main/java/com/ruoyi/mapper/ZfLogMapper.java b/zhang-content/src/main/java/com/ruoyi/mapper/ZfLogMapper.java
new file mode 100644
index 0000000..b0c8f40
--- /dev/null
+++ b/zhang-content/src/main/java/com/ruoyi/mapper/ZfLogMapper.java
@@ -0,0 +1,17 @@
+package com.ruoyi.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.domain.ZfLog;
+
+/**
+ * <p>
+ *  Mapper 鎺ュ彛
+ * </p>
+ *
+ * @author ojq
+ * @since 2023-09-06
+ */
+public interface ZfLogMapper extends BaseMapper<ZfLog> {
+
+}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfLogService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfLogService.java
new file mode 100644
index 0000000..16153ee
--- /dev/null
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfLogService.java
@@ -0,0 +1,17 @@
+package com.ruoyi.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.domain.ZfLog;
+
+/**
+ * <p>
+ *  鏈嶅姟绫�
+ * </p>
+ *
+ * @author ojq
+ * @since 2023-09-06
+ */
+public interface ZfLogService extends IService<ZfLog> {
+
+}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
index 5277bea..c9bbfa2 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
@@ -16,6 +16,7 @@
 import com.ruoyi.service.IZfPropertyService;
 import com.ruoyi.service.ZAuthorityService;
 import com.ruoyi.service.ZInfoUserService;
+import com.ruoyi.service.ZfLogService;
 import com.ruoyi.util.ArraysUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -25,6 +26,7 @@
 import javax.annotation.Resource;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -382,6 +384,9 @@
         }
     }
 
+    @Resource
+    ZfLogService zfLogService;
+
     @Override
     public AjaxResult updateData(ZfProperty zfProperty) {
         ZInfoUser myself = zInfoUserService.getMyself();
@@ -398,6 +403,13 @@
             throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
         }
 
+        //鎿嶄綔鍚庡姞鍏ユ棩蹇�
+        ZfLog zfLog = new ZfLog();
+        zfLog.setUpdateTime(LocalDateTime.now());
+        zfLog.setModule("瀹跺涵璧勪骇");
+        zfLog.setUpdater(zInfoUserService.getMyself().getNickName());
+        zfLogService.save(zfLog);
+
         if(updateById(zfProperty)){
             return AjaxResult.success();
         }else {
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
index 03ad7c0..4b73ee4 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
@@ -18,6 +18,7 @@
 import com.ruoyi.service.ZInfoUserService;
 import com.ruoyi.service.ZfCleanService;
 
+import com.ruoyi.service.ZfLogService;
 import com.ruoyi.util.ArraysUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -25,6 +26,7 @@
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -53,6 +55,9 @@
 
     @Resource
     ZAuthorityService zAuthorityService;
+
+    @Resource
+    ZfLogService zfLogService;
 
     private LambdaQueryWrapper<ZfClean> buildCondition(ZfClean zfClean,List<Long> familyIdList) {
         LambdaQueryWrapper<ZfClean> lqw = new LambdaQueryWrapper<>();
@@ -450,6 +455,14 @@
             throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
         }
 
+        //鎿嶄綔鍚庡姞鍏ユ棩蹇�
+        ZfLog zfLog = new ZfLog();
+        zfLog.setUpdateTime(LocalDateTime.now());
+        zfLog.setModule("淇濇磥鏀剁撼");
+        zfLog.setUpdater(zInfoUserService.getMyself().getNickName());
+        zfLogService.save(zfLog);
+
+
         if(updateById(zfClean)){
             return AjaxResult.success();
         }else {
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
index f5e0788..415f1c4 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
@@ -19,6 +19,7 @@
 import com.ruoyi.service.ZAuthorityService;
 import com.ruoyi.service.ZInfoUserService;
 import com.ruoyi.service.ZfCollectionService;
+import com.ruoyi.service.ZfLogService;
 import com.ruoyi.util.ArraysUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -26,6 +27,7 @@
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -54,6 +56,9 @@
 
     @Resource
     ZfCollectionMapper zfCollectionMapper;
+
+    @Resource
+    ZfLogService zfLogService;
 
     private LambdaQueryWrapper<ZfCollection> buildCondition(ZfCollection zfCollection,List<Long> familyIdList) {
         LambdaQueryWrapper<ZfCollection> lqw = new LambdaQueryWrapper<>();
@@ -403,24 +408,31 @@
 
         //鍏堣褰曚笅璋佹洿鏂般�佷綍鏃舵洿鏂般�佹洿鏂颁簡鍝噷
 
-        LambdaQueryWrapper<ZfCollection> lqw = new LambdaQueryWrapper<>();
-        lqw.eq(ZfCollection::getId,zfCollection.getId());
-        zfCollectionService.getOne(lqw);
-        ZfCollection oldData = getOne(lqw);
+//        LambdaQueryWrapper<ZfCollection> lqw = new LambdaQueryWrapper<>();
+//        lqw.eq(ZfCollection::getId,zfCollection.getId());
+//        zfCollectionService.getOne(lqw);
+//        ZfCollection oldData = getOne(lqw);
+//
+//        String oldJson = JSONObject.toJSONString(oldData);
+//        String newJson = JSONObject.toJSONString(zfCollection);
+//
+//        Map oldMap = JSONObject.parseObject(oldJson, Map.class);
+//        Map newMap = JSONObject.parseObject(newJson, Map.class);
+//
+//        for (Object key : oldMap.keySet()) {
+//            if(newMap.get(key)!=null && !newMap.get(key).equals(oldMap.get(key))){
+//                System.out.println(newMap.get(key)+"     "+oldMap.get(key));
+//                Date date = new Date();
+//                System.out.println("鐢ㄦ埛"+myself.getNickName()+"鍦�"+date+"杩欎釜鏃堕棿"+"淇敼浜�<鏀惰棌鑽h獕>妯″潡鐨�"+key+"瀛楁");
+//            }
+//        }
 
-        String oldJson = JSONObject.toJSONString(oldData);
-        String newJson = JSONObject.toJSONString(zfCollection);
-
-        Map oldMap = JSONObject.parseObject(oldJson, Map.class);
-        Map newMap = JSONObject.parseObject(newJson, Map.class);
-
-        for (Object key : oldMap.keySet()) {
-            if(newMap.get(key)!=null && !newMap.get(key).equals(oldMap.get(key))){
-                System.out.println(newMap.get(key)+"     "+oldMap.get(key));
-                Date date = new Date();
-                System.out.println("鐢ㄦ埛"+myself.getNickName()+"鍦�"+date+"杩欎釜鏃堕棿"+"淇敼浜�<鏀惰棌鑽h獕>妯″潡鐨�"+key+"瀛楁");
-            }
-        }
+        //鎿嶄綔鍚庡姞鍏ユ棩蹇�
+        ZfLog zfLog = new ZfLog();
+        zfLog.setUpdateTime(LocalDateTime.now());
+        zfLog.setModule("鏀惰棌鑽h獕");
+        zfLog.setUpdater(zInfoUserService.getMyself().getNickName());
+        zfLogService.save(zfLog);
 
 
         if(updateById(zfCollection)){
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java
index 055825b..171b379 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfContactServiceImpl.java
@@ -14,9 +14,7 @@
 import com.ruoyi.domain.ZfContact;
 import com.ruoyi.domain.ZfContact;
 import com.ruoyi.mapper.ZfContactMapper;
-import com.ruoyi.service.ZAuthorityService;
-import com.ruoyi.service.ZInfoUserService;
-import com.ruoyi.service.ZfContactService;
+import com.ruoyi.service.*;
 import com.ruoyi.service.ZfContactService;
 import com.ruoyi.util.ArraysUtil;
 import lombok.extern.slf4j.Slf4j;
@@ -25,6 +23,7 @@
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -432,6 +431,9 @@
 
     }
 
+    @Resource
+    ZfLogService zfLogService;
+
     @Override
     public AjaxResult updateData(ZfContact zfContact) {
         ZInfoUser myself = zInfoUserService.getMyself();
@@ -448,6 +450,13 @@
             throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
         }
 
+        //鎿嶄綔鍚庡姞鍏ユ棩蹇�
+        ZfLog zfLog = new ZfLog();
+        zfLog.setUpdateTime(LocalDateTime.now());
+        zfLog.setModule("閫氳褰�");
+        zfLog.setUpdater(zInfoUserService.getMyself().getNickName());
+        zfLogService.save(zfLog);
+
         if(updateById(zfContact)){
             return AjaxResult.success();
         }else {
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
index 0a0818a..fc73747 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
@@ -10,15 +10,14 @@
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.domain.*;
 import com.ruoyi.mapper.ZfDoctorMapper;
-import com.ruoyi.service.ZAuthorityService;
-import com.ruoyi.service.ZInfoUserService;
-import com.ruoyi.service.ZfDoctorService;
+import com.ruoyi.service.*;
 import com.ruoyi.service.ZfDoctorService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -187,6 +186,9 @@
         }
     }
 
+    @Resource
+    ZfLogService zfLogService;
+
     @Override
     public AjaxResult updateData(ZfDoctor zfDoctor) {
         ZInfoUser myself = zInfoUserService.getMyself();
@@ -203,6 +205,13 @@
             throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
         }
 
+        //鎿嶄綔鍚庡姞鍏ユ棩蹇�
+        ZfLog zfLog = new ZfLog();
+        zfLog.setUpdateTime(LocalDateTime.now());
+        zfLog.setModule("瀹跺涵灏忓尰鐢�");
+        zfLog.setUpdater(zInfoUserService.getMyself().getNickName());
+        zfLogService.save(zfLog);
+
         if(updateById(zfDoctor)){
             return AjaxResult.success();
         }else {
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
index 58ca470..7fe58d2 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
@@ -17,6 +17,7 @@
 import com.ruoyi.service.ZAuthorityService;
 import com.ruoyi.service.ZInfoUserService;
 import com.ruoyi.service.ZfEconomyService;
+import com.ruoyi.service.ZfLogService;
 import com.ruoyi.util.ArraysUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -24,6 +25,7 @@
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -405,6 +407,9 @@
         }
     }
 
+    @Resource
+    ZfLogService zfLogService;
+
     @Override
     public AjaxResult updateData(ZfEconomy zfEconomy) {
         ZInfoUser myself = zInfoUserService.getMyself();
@@ -421,6 +426,13 @@
             throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
         }
 
+        //鎿嶄綔鍚庡姞鍏ユ棩蹇�
+        ZfLog zfLog = new ZfLog();
+        zfLog.setUpdateTime(LocalDateTime.now());
+        zfLog.setModule("瀹跺涵鏀舵敮鍙拌处");
+        zfLog.setUpdater(zInfoUserService.getMyself().getNickName());
+        zfLogService.save(zfLog);
+
         if(updateById(zfEconomy)){
             return AjaxResult.success();
         }else {
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
index 50ceebe..5ba7087 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
@@ -16,6 +16,7 @@
 import com.ruoyi.service.ZAuthorityService;
 import com.ruoyi.service.ZInfoUserService;
 import com.ruoyi.service.ZfEquipmentService;
+import com.ruoyi.service.ZfLogService;
 import com.ruoyi.util.ArraysUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -23,6 +24,7 @@
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -429,6 +431,9 @@
 
     }
 
+    @Resource
+    ZfLogService zfLogService;
+
     @Override
     public AjaxResult updateData(ZfEquipment zfEquipment) {
 
@@ -446,6 +451,13 @@
             throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
         }
 
+        //鎿嶄綔鍚庡姞鍏ユ棩蹇�
+        ZfLog zfLog = new ZfLog();
+        zfLog.setUpdateTime(LocalDateTime.now());
+        zfLog.setModule("瀹跺涵璁惧");
+        zfLog.setUpdater(zInfoUserService.getMyself().getNickName());
+        zfLogService.save(zfLog);
+
         if(updateById(zfEquipment)){
             return AjaxResult.success();
         }else {
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
index 88b3cf2..bb15fc9 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
@@ -17,6 +17,7 @@
 import com.ruoyi.service.ZAuthorityService;
 import com.ruoyi.service.ZInfoUserService;
 import com.ruoyi.service.ZfEventService;
+import com.ruoyi.service.ZfLogService;
 import com.ruoyi.util.ArraysUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -24,6 +25,7 @@
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -403,6 +405,9 @@
 
     }
 
+    @Resource
+    ZfLogService zfLogService;
+
     @Override
     public AjaxResult updateData(ZfEvent zfEvent) {
         ZInfoUser myself = zInfoUserService.getMyself();
@@ -419,6 +424,13 @@
             throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
         }
 
+        //鎿嶄綔鍚庡姞鍏ユ棩蹇�
+        ZfLog zfLog = new ZfLog();
+        zfLog.setUpdateTime(LocalDateTime.now());
+        zfLog.setModule("瀹跺ぇ浜嬭");
+        zfLog.setUpdater(zInfoUserService.getMyself().getNickName());
+        zfLogService.save(zfLog);
+
         if(updateById(zfEvent)){
             return AjaxResult.success();
         }else {
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfLogServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfLogServiceImpl.java
new file mode 100644
index 0000000..f896e57
--- /dev/null
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfLogServiceImpl.java
@@ -0,0 +1,21 @@
+package com.ruoyi.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.domain.ZfLog;
+import com.ruoyi.mapper.ZfLogMapper;
+import com.ruoyi.service.ZfLogService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  鏈嶅姟瀹炵幇绫�
+ * </p>
+ *
+ * @author ojq
+ * @since 2023-09-06
+ */
+@Service
+public class ZfLogServiceImpl extends ServiceImpl<ZfLogMapper, ZfLog> implements ZfLogService {
+
+}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
index 33cfa6d..d8ed24f 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
@@ -13,10 +13,7 @@
 import com.ruoyi.common.utils.uuid.IdUtils;
 import com.ruoyi.domain.*;
 import com.ruoyi.mapper.ZfPetMapper;
-import com.ruoyi.service.ZAuthorityService;
-import com.ruoyi.service.ZInfoUserService;
-import com.ruoyi.service.ZfMasterService;
-import com.ruoyi.service.ZfPetService;
+import com.ruoyi.service.*;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.util.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -25,6 +22,7 @@
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -192,6 +190,9 @@
         }
     }
 
+    @Resource
+    ZfLogService zfLogService;
+
     @Override
     public AjaxResult updateData(ZfPet zfPet) {
         ZInfoUser myself = zInfoUserService.getMyself();
@@ -208,6 +209,13 @@
             throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
         }
 
+        //鎿嶄綔鍚庡姞鍏ユ棩蹇�
+        ZfLog zfLog = new ZfLog();
+        zfLog.setUpdateTime(LocalDateTime.now());
+        zfLog.setModule("榄呭疇");
+        zfLog.setUpdater(zInfoUserService.getMyself().getNickName());
+        zfLogService.save(zfLog);
+
         if(updateById(zfPet)){
             return AjaxResult.success();
         }else {

--
Gitblit v1.9.1