From c480eb65432f700d971d9a79173d77986df1df54 Mon Sep 17 00:00:00 2001
From: zqy <2522236926>
Date: 星期五, 24 五月 2024 16:46:23 +0800
Subject: [PATCH] 直播

---
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

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..afa01d1 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;
@@ -67,6 +65,11 @@
 
         //瑕佹煡鑷繁瀹跺涵鐨�
         ZInfoUser myself = zInfoUserService.getMyself();
+        if(myself==null)
+        {
+            //   System.out.println("ssssss");
+            return AjaxResult.success("鎮ㄦ病鍔犲叆鍒板搴旂殑瀹跺涵锛岃鑱旂郴绠$悊鍛�");
+        }
         Long familyId = myself.getFamilyId();
         //涔熻鏌ュ埆浜烘巿鏉冪殑
         List<ZAuthority> authority = zAuthorityService.getAuthority();
@@ -192,6 +195,9 @@
         }
     }
 
+    @Resource
+    ZfLogService zfLogService;
+
     @Override
     public AjaxResult updateData(ZfPet zfPet) {
         ZInfoUser myself = zInfoUserService.getMyself();
@@ -208,6 +214,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