提交 f910d2e1 authored 作者: xc's avatar xc

xc

上级 bcec0b3b
...@@ -10,6 +10,7 @@ import org.springframework.data.domain.PageRequest; ...@@ -10,6 +10,7 @@ import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
...@@ -48,6 +49,7 @@ public class AttentionServiceImpl implements AttentionService { ...@@ -48,6 +49,7 @@ public class AttentionServiceImpl implements AttentionService {
} }
@Override @Override
@Transactional
public boolean updateStatus(List<Attention> attentions) { public boolean updateStatus(List<Attention> attentions) {
try{ try{
for(Attention attention:attentions){ for(Attention attention:attentions){
......
...@@ -9,9 +9,12 @@ import com.zjty.efs.log.tool.EfsLogUtil; ...@@ -9,9 +9,12 @@ import com.zjty.efs.log.tool.EfsLogUtil;
import com.zjty.efs.user.subject.entity.UserDo; import com.zjty.efs.user.subject.entity.UserDo;
import com.zjty.efs.user.subject.service.UserService; import com.zjty.efs.user.subject.service.UserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.Transient;
import org.springframework.data.domain.*; import org.springframework.data.domain.*;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
...@@ -27,6 +30,7 @@ public class NoticeServiceImpl implements NoticeService { ...@@ -27,6 +30,7 @@ public class NoticeServiceImpl implements NoticeService {
@Autowired @Autowired
UserService userService; UserService userService;
@Override @Override
@Transactional
public boolean addNotice(Notice notice) { public boolean addNotice(Notice notice) {
try{ try{
...@@ -81,6 +85,7 @@ public class NoticeServiceImpl implements NoticeService { ...@@ -81,6 +85,7 @@ public class NoticeServiceImpl implements NoticeService {
} }
@Override @Override
@Transactional
public boolean updateNotice(Notice notice) { public boolean updateNotice(Notice notice) {
try{ try{
notice.setStatus(0); notice.setStatus(0);
...@@ -94,6 +99,7 @@ public class NoticeServiceImpl implements NoticeService { ...@@ -94,6 +99,7 @@ public class NoticeServiceImpl implements NoticeService {
} }
@Override @Override
@Transactional
public Notice getNotice(int id) { public Notice getNotice(int id) {
try { try {
Notice notice = noticeDao.findById(id); Notice notice = noticeDao.findById(id);
...@@ -148,6 +154,7 @@ public class NoticeServiceImpl implements NoticeService { ...@@ -148,6 +154,7 @@ public class NoticeServiceImpl implements NoticeService {
} }
@Override @Override
@Transactional
public boolean updateStatus(List<Notice> notices) { public boolean updateStatus(List<Notice> notices) {
try { try {
String userId = ""; String userId = "";
...@@ -160,6 +167,7 @@ public class NoticeServiceImpl implements NoticeService { ...@@ -160,6 +167,7 @@ public class NoticeServiceImpl implements NoticeService {
String data = "[" +userDo.getUnit() + "][" + userDo.getDepartment() + "]的[" + userDo.getName() String data = "[" +userDo.getUnit() + "][" + userDo.getDepartment() + "]的[" + userDo.getName()
+ "修改"; + "修改";
for (Notice notice:notices){ for (Notice notice:notices){
notice.setStatus(1);
noticeDao.save(notice); noticeDao.save(notice);
data = data + "[" + notice.getTitle() + "]"; data = data + "[" + notice.getTitle() + "]";
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论