CAYK\miaosen.zhao 6 달 전
부모
커밋
668c5b4cdb
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/main/java/com/sunxung/factoring/service/invoicemanage/impl/InvoiceBasicInfoServiceImpl.java

+ 3 - 3
src/main/java/com/sunxung/factoring/service/invoicemanage/impl/InvoiceBasicInfoServiceImpl.java

@@ -158,10 +158,10 @@ public class InvoiceBasicInfoServiceImpl extends ServiceImpl<InvoiceBasicInfoMap
     @Override
     public InvoiceBasicInfo get(Long id) {
         User user = ThreadLocalUtil.getUser();
-        Long userId = null;
+        Long userId = user.getId();
         List<Long> userIds = userService.findUserIdByRole(ConstantUtil.PROJECT_MANAGER);
-        if(cn.hutool.core.collection.CollectionUtil.isNotEmpty(userIds) && userIds.contains(userId)){
-             userId = user.getId();
+        if(cn.hutool.core.collection.CollectionUtil.isNotEmpty(userIds) && !userIds.contains(userId)){
+            userId = null;
         }
         InvoiceBasicInfo invoiceBasicInfo = baseMapper.getListInfo(id,userId);
         return invoiceBasicInfo;