From 5d7b0a0bbcae6844e2296ef53c3f4c88293dacfe Mon Sep 17 00:00:00 2001
From: jinquanOu <1511349576@qq.com>
Date: 星期二, 11 六月 2024 18:18:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 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 3163216..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();
@@ -98,7 +101,7 @@
bean.setOwnData(0);
}
}
- ).collect(Collectors.toList());
+ ).sorted((a,b)-> b.getOwnData()-a.getOwnData()).collect(Collectors.toList());
}
@@ -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