|
|
@@ -198,7 +198,7 @@ public class Content extends BaseContent<Content> implements ISortModel<Content>
|
|
|
}
|
|
|
return metadatas;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public String getMetadataByKey(String key) {
|
|
|
Metadata metadata = MetaDataQuery.me().findByTypeAndIdAndKey(METADATA_TYPE, getId(), key);
|
|
|
return metadata.getMetaValue();
|
|
|
@@ -467,4 +467,27 @@ public class Content extends BaseContent<Content> implements ISortModel<Content>
|
|
|
super.setSlug(slug);
|
|
|
}
|
|
|
|
|
|
+ //判断该移动端用户是否以及评论过此uu软文
|
|
|
+ public boolean isUuUserReplied(BigInteger uuUserId) {
|
|
|
+ if (uuUserId == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ long count = CommentQuery.me().findCountByContentIdAndUuUserId(getId(), uuUserId);
|
|
|
+ if (count > 0) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ //判断该官网用户是否以及评论过此uu软文
|
|
|
+ public boolean isUserReplied(BigInteger userId) {
|
|
|
+ if (userId == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ long count = CommentQuery.me().findCountByContentIdAndUserId(getId(), userId);
|
|
|
+ if (count > 0) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|