更新notice

This commit is contained in:
sjm
2023-12-28 00:42:19 +08:00
parent 4ee3765cf4
commit 0804aa5e0f
5 changed files with 20 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@Service
public class NoticeServiceImpl implements NoticeService {
@@ -42,9 +43,9 @@ public class NoticeServiceImpl implements NoticeService {
return JSON.toJSONString(hashMap);
}
}
public String select(int id){
public String select(){
HashMap<String,Object> hashMap = new HashMap<>();
Notice result = noticeDao.selectByPrimaryKey(id);
List<Notice> result = noticeDao.selectAll();
if(result != null){
return JSON.toJSONString(result);
}else{