wiki评论点赞
This commit is contained in:
@@ -12,7 +12,7 @@ import java.util.Date;
|
||||
* </p>
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2019-02-24
|
||||
* @since 2019-03-06
|
||||
*/
|
||||
public class WikiPageFile implements Serializable {
|
||||
|
||||
@@ -39,6 +39,11 @@ public class WikiPageFile implements Serializable {
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 文件UUID
|
||||
*/
|
||||
private String uuid;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
@@ -102,6 +107,13 @@ public class WikiPageFile implements Serializable {
|
||||
public void setFileUrl(String fileUrl) {
|
||||
this.fileUrl = fileUrl;
|
||||
}
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public void setUuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
public Long getCreateUserId() {
|
||||
return createUserId;
|
||||
}
|
||||
@@ -159,6 +171,7 @@ public class WikiPageFile implements Serializable {
|
||||
", pageId=" + pageId +
|
||||
", fileName=" + fileName +
|
||||
", fileUrl=" + fileUrl +
|
||||
", uuid=" + uuid +
|
||||
", createUserId=" + createUserId +
|
||||
", createUserName=" + createUserName +
|
||||
", createTime=" + createTime +
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* </p>
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2019-02-24
|
||||
* @since 2019-03-06
|
||||
*/
|
||||
public interface WikiPageFileMapper extends BaseMapper<WikiPageFile> {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ public class CodeGenerator {
|
||||
final String moduleName = "manage";
|
||||
// final String[] tableName = { "zyplayer_storage", "auth_info", "user_auth", "user_info" };
|
||||
// final String[] tableName = { "wiki_space", "wiki_page", "wiki_page_content", "wiki_page_file", "wiki_page_comment", "wiki_page_zan" };
|
||||
final String[] tableName = { "wiki_page" };
|
||||
final String[] tableName = { "wiki_page_file" };
|
||||
|
||||
// 代码生成器
|
||||
AutoGenerator mpg = new AutoGenerator();
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
* </p>
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2019-02-24
|
||||
* @since 2019-03-06
|
||||
*/
|
||||
public interface WikiPageFileService extends IService<WikiPageFile> {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
|
||||
* </p>
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2019-02-24
|
||||
* @since 2019-03-06
|
||||
*/
|
||||
@Service
|
||||
public class WikiPageFileServiceImpl extends ServiceImpl<WikiPageFileMapper, WikiPageFile> implements WikiPageFileService {
|
||||
|
||||
@@ -47,6 +47,7 @@ public class WikiPageZanServiceImpl extends ServiceImpl<WikiPageZanMapper, WikiP
|
||||
} else {
|
||||
wikiPageZan.setCreateTime(new Date());
|
||||
wikiPageZan.setCreateUserId(currentUser.getUserId());
|
||||
wikiPageZan.setCreateUserName(currentUser.getUsername());
|
||||
this.save(wikiPageZan);
|
||||
}
|
||||
int numAdd = wikiPageZan.getYn() == 1 ? 1 : -1;
|
||||
|
||||
Reference in New Issue
Block a user