更新notice

This commit is contained in:
sjm
2023-12-28 00:35:23 +08:00
parent b9320ecd9c
commit 4ee3765cf4
3 changed files with 10 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ import com.lovenav.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.HashMap;
@Service
@@ -15,6 +16,8 @@ public class NoticeServiceImpl implements NoticeService {
private NoticeDao noticeDao;
public String add(Notice notice){
HashMap<String,Object> hashMap = new HashMap<>();
Date date = new Date(System.currentTimeMillis());
notice.setCreatetime(date);
int result = noticeDao.insert(notice);
if(result>0){
hashMap.put("code",200);