package com.mindskip.xzs.service.impl;
|
|
import com.mindskip.xzs.context.WebContext;
|
import com.mindskip.xzs.domain.Notify;
|
import com.mindskip.xzs.repository.NotifyMapper;
|
import com.mindskip.xzs.service.NotifyService;
|
import lombok.RequiredArgsConstructor;
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
|
/**
|
* @author:xp
|
* @date:2024/7/15 15:02
|
*/
|
@Service
|
@RequiredArgsConstructor
|
public class NotifyServiceImpl implements NotifyService {
|
|
private final NotifyMapper notifyMapper;
|
private final WebContext webContext;
|
|
@Override
|
public void add(Notify notify) {
|
notifyMapper.add(notify);
|
}
|
|
@Override
|
public List<Notify> notifyMeList() {
|
return notifyMapper.notifyMeList(webContext.getCurrentUser().getId());
|
}
|
|
@Override
|
public void setHasRead(List<Integer> ids) {
|
notifyMapper.setHasRead(ids);
|
}
|
|
@Override
|
public List<Notify> adminNotifyList() {
|
return notifyMapper.adminNotifyList();
|
}
|
}
|