更新notice
This commit is contained in:
parent
b9320ecd9c
commit
4ee3765cf4
@ -12,6 +12,9 @@ import com.lovenav.service.CommentService;
|
|||||||
import io.swagger.models.auth.In;
|
import io.swagger.models.auth.In;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -24,6 +27,9 @@ public class CommentServiceImpl implements CommentService {
|
|||||||
// 评论功能
|
// 评论功能
|
||||||
@Override
|
@Override
|
||||||
public String Reply1(Comment comment){
|
public String Reply1(Comment comment){
|
||||||
|
Date date = new Date(System.currentTimeMillis());
|
||||||
|
comment.setCommentTime(date);
|
||||||
|
comment.setUpdateTime(date);
|
||||||
int result = commentDao.insert(comment);
|
int result = commentDao.insert(comment);
|
||||||
HashMap<String, Object> hashMap = new HashMap<>();
|
HashMap<String, Object> hashMap = new HashMap<>();
|
||||||
if(result > 0){
|
if(result > 0){
|
||||||
|
@ -7,6 +7,7 @@ import com.lovenav.service.NoticeService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -15,6 +16,8 @@ public class NoticeServiceImpl implements NoticeService {
|
|||||||
private NoticeDao noticeDao;
|
private NoticeDao noticeDao;
|
||||||
public String add(Notice notice){
|
public String add(Notice notice){
|
||||||
HashMap<String,Object> hashMap = new HashMap<>();
|
HashMap<String,Object> hashMap = new HashMap<>();
|
||||||
|
Date date = new Date(System.currentTimeMillis());
|
||||||
|
notice.setCreatetime(date);
|
||||||
int result = noticeDao.insert(notice);
|
int result = noticeDao.insert(notice);
|
||||||
if(result>0){
|
if(result>0){
|
||||||
hashMap.put("code",200);
|
hashMap.put("code",200);
|
||||||
|
Loading…
Reference in New Issue
Block a user