From 7298d5354963a88643a543b51b90192dc9fc934c Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 11 九月 2025 18:43:14 +0800
Subject: [PATCH] 最新版本541200007

---
 server/system_service/src/main/java/com/doumee/service/system/impl/NoticesServiceImpl.java |   28 +++++++++++++---------------
 1 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/server/system_service/src/main/java/com/doumee/service/system/impl/NoticesServiceImpl.java b/server/system_service/src/main/java/com/doumee/service/system/impl/NoticesServiceImpl.java
index c7c5d13..cb2fa8b 100644
--- a/server/system_service/src/main/java/com/doumee/service/system/impl/NoticesServiceImpl.java
+++ b/server/system_service/src/main/java/com/doumee/service/system/impl/NoticesServiceImpl.java
@@ -6,9 +6,8 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.doumee.core.constants.ResponseStatus;
 import com.doumee.core.exception.BusinessException;
-import com.doumee.core.model.LoginUserInfo;
-import com.doumee.core.model.PageData;
-import com.doumee.core.model.PageWrap;
+import com.doumee.service.business.third.model.PageData;
+import com.doumee.service.business.third.model.PageWrap;
 import com.doumee.core.utils.Constants;
 import com.doumee.core.utils.Utils;
 import com.doumee.dao.system.dto.NoticesDTO;
@@ -18,7 +17,6 @@
 import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.shiro.SecurityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -120,7 +118,6 @@
         if (pageWrap.getModel().getReaded() != null) {
             queryWrapper.eq(Notices::getReaded, pageWrap.getModel().getReaded());
         }
-
         if(CollectionUtils.isNotEmpty(pageWrap.getSorts())){
             for(PageWrap.SortData sortData: pageWrap.getSorts()) {
                 if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
@@ -133,7 +130,6 @@
             queryWrapper.orderByDesc(Notices::getCreateDate);
         }
         PageData<Notices> pageData = PageData.from(noticesMapper.selectJoinPage(page,Notices.class, queryWrapper));
-
         return pageData;
     }
 
@@ -170,7 +166,7 @@
             queryWrapper.eq(Notices::getUserId, noticesDTO.getMemberId());
             queryWrapper.eq(Notices::getSendacopy,Constants.ONE);
             if(Objects.nonNull(noticesDTO.getNoRead())&&Constants.equalsInteger(noticesDTO.getNoRead(),Constants.ONE)){
-                queryWrapper.eq(Notices::getReaded,Constants.ONE);
+                queryWrapper.eq(Notices::getReaded,Constants.ZERO);
             }
         }else{
             queryWrapper.eq("1","2");
@@ -178,7 +174,8 @@
         queryWrapper.ge(noticesDTO.getStartDate() != null, Notices::getCreateDate, Utils.Date.getStart(noticesDTO.getStartDate() ));
         queryWrapper.le(noticesDTO.getEndDate() != null,  Notices::getCreateDate, Utils.Date.getEnd(noticesDTO.getEndDate() ));
         queryWrapper.eq(Objects.nonNull(noticesDTO.getType()),Notices::getType,noticesDTO.getType());
-        queryWrapper.eq(StringUtils.isNotBlank(noticesDTO.getTitle()),Notices::getTitle,noticesDTO.getTitle());
+//        queryWrapper.eq(Objects.nonNull(noticesDTO.getMemberId()),Notices::getUserId,noticesDTO.getMemberId());
+        queryWrapper.like(StringUtils.isNotBlank(noticesDTO.getTitle()),Notices::getTitle,noticesDTO.getTitle());
         queryWrapper.orderByDesc(Notices::getCreateDate);
         PageData<Notices> pageData = PageData.from(noticesMapper.selectJoinPage(page,Notices.class, queryWrapper));
         if(noticesDTO.getQueryType().equals(Constants.ZERO)){
@@ -203,14 +200,15 @@
         if(Objects.isNull(notices)){
             throw new BusinessException(ResponseStatus.DATA_EMPTY);
         }
-        if(Constants.equalsInteger(notices.getSendacopy(),Constants.ONE)){
-            if(Constants.equalsInteger(Constants.ZERO,notices.getReaded())){
-                noticesMapper.update(null,new UpdateWrapper<Notices>().lambda()
-                        .set(Notices::getReaded,Constants.ONE).eq(Notices::getId,noticesId));
-            }
-        }else{
-            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炴妱閫佹暟鎹�,鏃犳硶杩涜鏍囪");
+        if(Constants.equalsInteger(Constants.ZERO,notices.getReaded())){
+            noticesMapper.update(null,new UpdateWrapper<Notices>().lambda()
+                    .set(Notices::getReaded,Constants.ONE).eq(Notices::getId,noticesId));
         }
+//        if(Constants.equalsInteger(notices.getSendacopy(),Constants.ONE)){
+//
+//        }else{
+//            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炴妱閫佹暟鎹�,鏃犳硶杩涜鏍囪");
+//        }
     }
 
     /**

--
Gitblit v1.9.3