doum
4 小时以前 8fd09daba5c89106b4a9aacd8d5ef9354afc93be
server/dmmall_service/src/main/java/com/doumee/service/business/impl/NoticeServiceImpl.java
@@ -7,6 +7,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.NoticeMapper;
import com.doumee.dao.business.join.MemberJoinMapper;
@@ -420,6 +421,19 @@
    }
    @Override
    public void autoRead(Integer memberId,Integer noticeType){
        noticeMapper.update(new UpdateWrapper<Notice>().lambda()
                .set(Notice::getStatus,Constants.ONE)
                .set(Notice::getEditDate, DateUtil.getCurrDateTime())
                .eq(Notice::getMemberId,memberId)
                .ne(Objects.nonNull(noticeType)&&Constants.equalsInteger(noticeType,Constants.ZERO),Notice::getObjType,Constants.TWO)
                .eq(Objects.nonNull(noticeType)&&Constants.equalsInteger(noticeType,Constants.ONE),Notice::getObjType,Constants.TWO)
                .eq(Notice::getStatus,Constants.ZERO)
        );
    }