parent
18b2ce25da
commit
7d50e8a2cd
@ -0,0 +1,7 @@
|
||||
package com.luoo.user.dao;
|
||||
|
||||
import com.luoo.user.pojo.PublicationLike;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
|
||||
public interface PublicationLikeDao extends MongoRepository<PublicationLike,String> {
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.luoo.user.pojo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class PublicationLike implements Serializable {
|
||||
|
||||
|
||||
@Id
|
||||
private String _id;
|
||||
|
||||
private Integer type; // 1 期刊 2 评论
|
||||
|
||||
private String likedItemId;
|
||||
|
||||
private String thumbupAt; //被点赞人userid
|
||||
|
||||
private String commentContent; //被点赞的评论内容
|
||||
|
||||
private String avatar; //点赞人头像
|
||||
|
||||
|
||||
private String nickName; // 点赞人昵称
|
||||
|
||||
private String userId;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.luoo.user.service;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class MyService {
|
||||
|
||||
@Autowired
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
/**
|
||||
* 我收到的评论
|
||||
* @param userId
|
||||
*/
|
||||
public void getMyCommentReplyList(String userId) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 我收到的点赞
|
||||
* @param userId
|
||||
*/
|
||||
public void getMyThumbupList(String userId) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in new issue