2021年12月13日11:32:05

master
zhangmeng 2021-12-13 11:32:41 +08:00
parent d94ae7fafd
commit 9fc1132bbe
15 changed files with 85 additions and 527 deletions

View File

@ -518,4 +518,14 @@ public class UrlRequestController extends BaseController {
model.addAllAttributes(map);
return this.jumpPage("blog/v1/index");
}
@GetMapping("/blog/details/{id}")
public ModelAndView blog_details(Model model,@PathVariable("id") Long id) {
Map<String,Object> map = this.articleFeign.blog_common_page(id);
model.addAllAttributes(map);
Article article = this.articleFeign.findById(id);
model.addAttribute("article",article);
return this.jumpPage("blog/v1/details");
}
}

View File

@ -29,4 +29,7 @@ public interface ArticleFeign {
@GetMapping("/article/getListByPage")
Map<String,Object> getListByPage(@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize);
@GetMapping("/article/blog_common_page")
Map<String,Object> blog_common_page(@RequestParam("article_id") Long article_id);
}

View File

@ -74,6 +74,7 @@ mystyle:
- /blog/index
- /user/findByUserId
- /sysConfig/getSysConfig
- /blog/**
verification-code:
type: mysql
expiration-time: 300

View File

@ -3,7 +3,7 @@
<nav class="ui inverted attached segment m-padded-tb-mini ">
<div class="ui container">
<div class="ui inverted secondary stackable menu">
<h2 class="ui teal header item">${blogTools.title()!}</h2>
<h2 class="ui teal header item">${title!}</h2>
<a href="/blog/index" class="active m-item item m-mobile-hide"><i class="mini home icon"></i>&nbsp;&nbsp;&nbsp;首页</a>
<a href="/blog/category" class="m-item item m-mobile-hide"><i class="mini idea icon"></i>&nbsp;&nbsp;&nbsp;分类</a>
<a href="/blog/about" class="m-item item m-mobile-hide"><i class="mini info icon"></i>&nbsp;&nbsp;&nbsp;关于我</a>
@ -67,8 +67,8 @@
<div class="ui threaded comments" style="max-width: 100%;">
<h3 class="ui dividing header">评论</h3>
<#if blogTools.commentModelList(article.id)??>
<#list blogTools.commentModelList(article.id) as commentModel>
<#if commentModelList??>
<#list commentModelList as commentModel>
<div class="comment">
<a class="avatar">

View File

@ -5,7 +5,7 @@
<div class="four wide column">
<h4 class="ui inverted header">最新博客</h4>
<div class="ui inverted link list">
<#list blogTools.latest_blog() as blog>
<#list latest_blog as blog>
<a href="/blog/${blog.id}" class="item">${blog.title!}</a>
</#list>
</div>
@ -20,7 +20,7 @@
</div>
<div class="seven wide column">
<h4 class="ui inverted header">转身的背影在心底里沉沦</h4>
<p class="m-text-thin m-opacity-mini m-text-spaced">${blogTools.message()!}</p>
<p class="m-text-thin m-opacity-mini m-text-spaced">${message!}</p>
</div>
</div>
<div class="ui inverted section divider"></div>

View File

@ -19,6 +19,6 @@
<script src="${springMacroRequestContext.contextPath}/mystyle-cloud-web-blog/blog/waypoints/jquery.waypoints.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
<title>${blogTools.title()!}</title>
<title>${title!}</title>
</head>
<body>

View File

@ -4,7 +4,7 @@
<div class="ui container">
<div class="ui inverted secondary stackable menu">
<a href="/blog/document/index" target="_blank">
<h2 class="ui teal header item">${blogTools.title()!}</h2>
<h2 class="ui teal header item">${title!}</h2>
</a>
<a href="/blog/index" class="active m-item item m-mobile-hide"><i class="mini home icon"></i>&nbsp;&nbsp;&nbsp;首页</a>
<a href="/blog/category" class="m-item item m-mobile-hide"><i class="mini idea icon"></i>&nbsp;&nbsp;&nbsp;分类</a>
@ -31,7 +31,7 @@
</div>
<div class="right aligned column">
<h2 class="ui orange header m-inline-block m-text-thin">${blogTools.blog_count()!}</h2>
<h2 class="ui orange header m-inline-block m-text-thin">${blog_count!}</h2>
</div>
</div>
@ -65,7 +65,7 @@
</div>
</div>
<div class="item">
<i class="calendar icon"></i>${article.addTime?string('yyyy-MM-dd hh:mm:ss')}
<#-- <i class="calendar icon"></i>${article.addTime?string('yyyy-MM-dd hh:mm:ss')!}-->
</div>
<div class="item">
<i class="eye icon"></i>${article.views!}
@ -73,7 +73,7 @@
</div>
</div>
<div class="right aligned five wide column">
<a href="/blog/findBy/${article.id!}" id="article_details"
<a href="/mystyle-cloud-web-blog/blog/details/${article.id!}" id="article_details"
class="ui teal basic label m-padded-tb-tiny m-padded-tb-mini"> 认知升级</a>
</div>
</div>
@ -124,8 +124,8 @@
<div class="ui teal segment">
<div class="ui fluid vertical menu">
<#if blogTools.categoryList()??>
<#list blogTools.categoryList() as category>
<#if categoryList??>
<#list categoryList as category>
<a href="/blog/category?categoryId=${category.id!}" class="item">
${category.categoryName!}
<div class="ui teal basic left pointing label">${category.count!}</div>
@ -141,10 +141,10 @@
<div class="ui secondary segment">
<i class="bookmark icon"></i>最新推荐
</div>
<#if blogTools.latest_recommended()??>
<#list blogTools.latest_recommended() as article>
<#if latest_recommended??>
<#list latest_recommended as article>
<div class="ui segment">
<a href="/blog/${article.id!}" class="m-black m-text-thin">${article.title!}</a>
<a href="/mystyle-cloud-web-blog/blog/details/${article.id!}" class="m-black m-text-thin">${article.title!}</a>
</div>
</#list>
</#if>

View File

@ -1,326 +0,0 @@
<#include "../v1/header/header.ftl"/>
<!--导航-->
<nav class="ui inverted attached segment m-padded-tb-mini ">
<div class="ui container">
<div class="ui inverted secondary stackable menu">
<h2 class="ui teal header item">${blogTools.title()!}</h2>
<a href="/blog/index" class="active m-item item m-mobile-hide"><i class="mini home icon"></i>&nbsp;&nbsp;&nbsp;首页</a>
<a href="/blog/category" class="m-item item m-mobile-hide"><i class="mini idea icon"></i>&nbsp;&nbsp;&nbsp;分类</a>
<a href="/blog/about" class="m-item item m-mobile-hide"><i class="mini info icon"></i>&nbsp;&nbsp;&nbsp;关于我</a>
</div>
</div>
<a href="#" class="ui menu toggle black icon button m-top-right m-mobile-show">
<i class="sidebar icon"></i>
</a>
</nav>
<!--中间内容-->
<div id="waypoint" class="m-container-small m-padded-tb-big animated fadeIn">
<div class="ui container">
<div class="ui top attached segment">
<div class="ui horizontal link list">
<div class="item">
<#if article.avatar ??>
<img src="${article.avatar!}" alt="" class="ui avatar image">
</#if>
<div class="content"><a href="#" class="header"> ${article.username!}</a></div>
</div>
<div class="item">
<i class="calendar icon"></i>
<span>${article.addTime?string('yyyy-MM-dd hh:mm:ss')}</span>
</div>
<div class="item">
<i class="eye icon"></i> <span>${article.views!}</span>
</div>
</div>
</div>
<div class="ui attached padded segment">
<!--内容-->
<div class="ui right aligned basic segment">
<div class="ui orange basic label">原创</div>
</div>
<h2 class="ui center aligned header">${article.title!}</h2>
<br>
<!--中间主要内容部分-->
<div id="content" class="typo typo-selection js-toc-content m-padded-lr-responsive m-padded-tb-large">
${article.content!}
</div>
</div>
<div class="ui attached positive message">
<!--博客信息-->
<div class="ui middle aligned grid">
<div class="eleven wide column">
<ui class="list">
<li>转身的背影在心底沉沦</li>
<li>关山越,谁悲失路之人 萍水相逢,尽是他乡之客</li>
</ui>
</div>
</div>
</div>
<div class="ui bottom attached segment">
<!--留言区域列表-->
<div id="comment-container" class="ui teal segment">
<div>
<div class="ui threaded comments" style="max-width: 100%;">
<h3 class="ui dividing header">评论</h3>
<#if blogTools.commentModelList(article.id)??>
<#list blogTools.commentModelList(article.id) as commentModel>
<div class="comment">
<a class="avatar">
<img src="https://unsplash.it/100/100?image=1005" width="100px" height="100px">
</a>
<div class="content">
<a class="author">
<span>${commentModel.comment.nickName!}</span>
<#-- <div class="ui mini basic teal left pointing label m-padded-mini">博主</div>-->
</a>
<div class="metadata">
<span class="date">${commentModel.comment.addTime?string('yyyy-MM-dd hh:mm:ss')}</span>
</div>
<div class="text">
${commentModel.comment.content!}
</div>
<div class="actions">
<a class="reply"
data-commentid="${commentModel.comment.id!}"
data-commentnickname="${commentModel.comment.nickName!}"
data-type="reply"
data-comment-qq = "${commentModel.comment.QQ!}"
data-comment-email="${commentModel.comment.email!}"
onclick="reply(this)">回复</a>
</div>
</div>
<div class="comments">
<div class="comment">
<a class="avatar">
<img src="https://unsplash.it/100/100?image=1005">
</a>
<div class="content">
<a class="author">
<span>${commentModel.reply.username!}</span>
<div class="ui mini basic teal left pointing label m-padded-mini">
博主
</div>
&nbsp;<span
class="m-teal">@ ${commentModel.comment.nickName!}</span>
</a>
<div class="metadata">
<span class="date">${commentModel.reply.addTime?string('yyyy-MM-dd hh:mm:ss')!}</span>
</div>
<div class="text">
${commentModel.reply.content!}
</div>
<div class="actions">
<a class="reply"
data-commentid="${commentModel.comment.id!}"
data-commentnickname="${commentModel.comment.nickName!}"
data-type="reply"
data-comment-qq = "${commentModel.comment.QQ!}"
data-comment-email="${commentModel.comment.email!}"
onclick="reply(this)">回复</a>
</div>
</div>
</div>
</div>
</div>
</#list>
</#if>
</div>
</div>
</div>
<div id="comment-form" class="ui form">
<input type="hidden" name="articleId" id="articleId" value="${article.id!}">
<input type="hidden" name="type" id="type" value="">
<div class="field">
<textarea name="content" placeholder="请输入评论信息..."></textarea>
</div>
<div class="fields">
<div class="field m-mobile-wide m-margin-bottom-small">
<div class="ui left icon input">
<i class="user icon"></i>
<input type="text" name="nickname" placeholder="姓名" autocomplete="off">
</div>
</div>
<div class="field m-mobile-wide m-margin-bottom-small">
<div class="ui left icon input">
<i class="mail icon"></i>
<input type="text" name="email" placeholder="邮箱" autocomplete="off">
</div>
</div>
<div class="field m-margin-bottom-small m-mobile-wide">
<button id="commentpost-btn" type="button" class="ui teal button m-mobile-wide"><i
class="edit icon"></i>发布
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="toolbar" class="m-padded m-fixed m-right-bottom" style="">
<div class="ui vertical icon buttons ">
<button type="button" class="ui toc teal button">目录</button>
<a href="#comment-container" class="ui teal button">留言</a>
<button class="ui wechat icon button"><i class="weixin icon"></i></button>
<div id="toTop-button" class="ui icon button"><i class="chevron up icon"></i></div>
</div>
</div>
<div class="ui toc-container flowing popup transition hidden" style="width: 250px!important;">
<ol class="js-toc">
</ol>
</div>
<div id="qrcode" class="ui wechat-qr flowing popup transition hidden " style="width: 130px !important;">
<!--<img src="./static/images/wechat.jpg" alt="" class="ui rounded image" style="width: 120px !important;">-->
</div>
<br>
<br>
<#include "../v1/footer/footer.ftl"/>
<script>
$('.menu.toggle').click(function () {
$('.m-item').toggleClass('m-mobile-hide');
});
$('#payButton').popup({
popup: $('.payQR.popup'),
on: 'click',
position: 'bottom center'
});
tocbot.init({
// Where to render the table of contents.
tocSelector: '.js-toc',
// Where to grab the headings to build the table of contents.
contentSelector: '.js-toc-content',
// Which headings to grab inside of the contentSelector element.
headingSelector: 'h1, h2, h3',
});
$('.toc.button').popup({
popup: $('.toc-container.popup'),
on: 'click',
position: 'left center'
});
$('.wechat').popup({
popup: $('.wechat-qr'),
position: 'left center'
});
var serurl = "127.0.0.1:8080";
var url = "";
var qrcode = new QRCode("qrcode", {
text: serurl + url,
width: 110,
height: 110,
colorDark: "#000000",
colorLight: "#ffffff",
correctLevel: QRCode.CorrectLevel.H
});
$('#toTop-button').click(function () {
$(window).scrollTo(0, 500);
});
var waypoint = new Waypoint({
element: document.getElementById('waypoint'),
handler: function (direction) {
if (direction == 'down') {
$('#toolbar').show(100);
} else {
$('#toolbar').hide(500);
}
console.log('Scrolled to waypoint! ' + direction);
}
})
//评论表单验证
$('.ui.form').form({
fields: {
title: {
identifier: 'content',
rules: [{
type: 'empty',
prompt: '请输入评论内容'
}
]
},
content: {
identifier: 'nickname',
rules: [{
type: 'empty',
prompt: '请输入你的大名'
}]
},
type: {
identifier: 'email',
rules: [{
type: 'email',
prompt: '请填写正确的邮箱地址'
}]
}
}
});
$(function () {
$("#comment-container").load();
});
$('#commentpost-btn').click(function () {
var boo = $('.ui.form').form('validate form');
if (boo) {
console.log('校验成功');
postData();
} else {
console.log('校验失败');
}
});
function postData() {
$("#comment-container").load(
"/blog/comment/save",
{
"articleId": $("[name='articleId']").val(),
"type":"",
"nickname": $("[name='nickname']").val(),
"email": $("[name='email']").val(),
"content": $("[name='content']").val()
}, function (responseTxt, statusTxt, xhr) {
clearContent();
});
}
function clearContent() {
$("[name='content']").val('');
$("[name='content']").attr("placeholder", "请输入评论信息...");
}
function reply(obj) {
var commentId = $(obj).data('commentid');
var commentNickname = $(obj).data('commentnickname');
var type = $(obj).data('type');
$("[name='content']").attr("placeholder", "@" + commentNickname).focus();
$("[name='type']").val(type);
$(window).scrollTo($('#comment-form'), 500);
}
</script>
</body>
</html>

View File

@ -1,186 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>博客首页</title>
<link rel="stylesheet" href="${springMacroRequestContext.contextPath}/system/component/pear/css/pear.css"/>
<style type="text/css">
.nav-blog {
line-height: 20px;
padding-top: 24px;
font-size: 15px;
}
.layui-form-item {
margin-bottom: 0px;
margin-left: 35%;
margin-top: 40px;
clear: both;
*zoom: 1;
}
.cloud-card-component {
padding: 70px !important;
}
</style>
</head>
<body class="pear-container">
<form class="layui-form layui-form-pane">
<div class="layui-form-item">
<label class="layui-form-label layui-bg-black">文章标题</label>
<div class="layui-input-inline">
<input type="text" name="realName" id="realName" placeholder="" class="layui-input">
</div>
<div class="layui-inline">
<button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-search-btn"><i
class="layui-icon">&#xe615;</i> 搜 索
</button>
</div>
</div>
</form>
<table id="currentTableId"></table>
<script src="${springMacroRequestContext.contextPath}/system/component/layui/layui.js"></script>
<script src="${springMacroRequestContext.contextPath}/system/component/pear/pear.js"></script>
<script>
layui.use(['table', 'form', 'jquery', 'treetable', 'cardTable'], function () {
let table = layui.table;
let form = layui.form;
let $ = layui.jquery;
let treetable = layui.treetable;
let cardTable = layui.cardTable;
cardTable.render({
elem: '#currentTableId',
url: "/blog/list",// 数据 url 连接
loading: true,//是否加载
limit: 8, //每页数量默认是每行数量的双倍
linenum: 4, //每行数量 2,3,4,6
currentPage: 1,//当前页
limits:[], //页码
page: true, //是否分页
layout: ['count', 'prev', 'page', 'next','limit', 'skip'],//分页控件
request: {
pageName: 'pageNum' //页码的参数名称默认page
, limitName: 'pageSize' //每页数据量的参数名默认limit
, idName: 'id' //主键名称默认id
, titleName: 'title' //标题名称默认title
, imageName: 'image' //图片地址默认image
, remarkName: 'remark' //备注名称默认remark
, timeName: 'addTime' //时间名称默认time
, token:localStorage.getItem("token")
},
response: {
statusName: 'code' //规定数据状态的字段名称默认code
, statusCode: 2001 //规定成功的状态码默认0
, msgName: 'message' //规定状态信息的字段名称默认msg
, countName: 'count' //规定数据总数的字段名称默认count
, dataName: 'data' //规定数据列表的字段名称默认data
},
});
// 监听搜索操作
form.on('submit(data-search-btn)', function (data) {
queryJson = data.field;
cardTable.reload("currentTableId", {
where: queryJson,
});
return false;
});
form.on('submit(formDemo)', function (data) {
var encryptType = $("#encryptType").val();
if (encryptType == 'editPlusCodeGen') {
var code = editPlusCodeGen();
$("#content").val(code);
} else {
var obj = data.field;
obj['token'] = localStorage.getItem("token");
$.ajax({
url: '/crypt/encode',
data: obj,
type: 'post',
success: function (result) {
$("#content").val(result.data);
}
});
}
return false;
});
});
function editPlusCodeGen() {
var list = [0, 49345, 49537, 320, 49921, 960, 640, 49729, 50689, 1728, 1920, 51009, 1280, 50625, 50305, 1088, 52225, 3264, 3456, 52545, 3840, 53185, 52865, 3648, 2560, 51905, 52097, 2880, 51457, 2496, 2176, 51265, 55297, 6336, 6528, 55617, 6912, 56257, 55937, 6720, 7680, 57025, 57217, 8000, 56577, 7616, 7296, 56385, 5120, 54465, 54657, 5440, 55041, 6080, 5760, 54849, 53761, 4800, 4992, 54081, 4352, 53697, 53377, 4160, 61441, 12480, 12672, 61761, 13056, 62401, 62081, 12864, 13824, 63169, 63361, 14144, 62721, 13760, 13440, 62529, 15360, 64705, 64897, 15680, 65281, 16320, 16000, 65089, 64001, 15040, 15232, 64321, 14592, 63937, 63617, 14400, 10240, 59585, 59777, 10560, 60161, 11200, 10880, 59969, 60929, 11968, 12160, 61249, 11520, 60865, 60545, 11328, 58369, 9408, 9600, 58689, 9984, 59329, 59009, 9792, 8704, 58049, 58241, 9024, 57601, 8640, 8320, 57409, 40961, 24768, 24960, 41281, 25344, 41921, 41601, 25152, 26112, 42689, 42881, 26432, 42241, 26048, 25728, 42049, 27648, 44225, 44417, 27968, 44801, 28608, 28288, 44609, 43521, 27328, 27520, 43841, 26880, 43457, 43137, 26688, 30720, 47297, 47489, 31040, 47873, 31680, 31360, 47681, 48641, 32448, 32640, 48961, 32000, 48577, 48257, 31808, 46081, 29888, 30080, 46401, 30464, 47041, 46721, 30272, 29184, 45761, 45953, 29504, 45313, 29120, 28800, 45121, 20480, 37057, 37249, 20800, 37633, 21440, 21120, 37441, 38401, 22208, 22400, 38721, 21760, 38337, 38017, 21568, 39937, 23744, 23936, 40257, 24320, 40897, 40577, 24128, 23040, 39617, 39809, 23360, 39169, 22976, 22656, 38977, 34817, 18624, 18816, 35137, 19200, 35777, 35457, 19008, 19968, 36545, 36737, 20288, 36097, 19904, 19584, 35905, 17408, 33985, 34177, 17728, 34561, 18368, 18048, 34369, 33281, 17088, 17280, 33601, 16640, 33217, 32897, 16448];
var hexchars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'];
var regcode = new Array(29);
var i = 0, j = 0, k = 0;
var len, temp, sum, result;
var username = document.getElementById("text").value;
username = username.replace(/^\s+|\s+$/g, "");
for (i = 0; i < 5; i++, k++) {
for (j = 0; j < 5; j++, k++) {
regcode[k] = hexchars[parseInt(Math.random() * 16)];
}
if (k == 29) break;
regcode[k] = '-';
}
len = username.length;
sum = 1;
for (i = 0; i < len; i++)
sum += username.charCodeAt(i);
temp = (parseInt((sum + 23) / 6) + 3) * 7 % 16;
regcode[6] = hexchars[temp & 0xF];
sum = 1;
for (i = 0; i < len; i++)
sum += username.charCodeAt(i);
temp = parseInt((3 * sum + 39) / 8) % 16;
regcode[9] = hexchars[temp & 0xF];
sum = 1;
for (i = 0; i < len; i++)
sum += username.charCodeAt(i);
temp = parseInt((3 * sum + 19) / 9) % 16;
regcode[7] = hexchars[temp & 0xF];
sum = 1;
for (i = 0; i < len; i++)
sum += username.charCodeAt(i);
temp = parseInt((sum + 10) / 3) * 8 % 16;
regcode[10] = hexchars[temp & 0xF];
sum = 1;
for (i = 0; i < len; i++)
sum += username.charCodeAt(i);
temp = (parseInt((9 * sum + 10) / 3) + 36) % 16;
regcode[4] = hexchars[temp & 0xF];
sum = 1;
for (i = 0; i < len; i++)
sum += username.charCodeAt(i);
temp = parseInt((5 * sum + 11) / 5) % 16;
regcode[8] = hexchars[temp & 0xF];
result = 0;
for (i = 0; i < len; i++)
result = ((result >> 8) & 0xFF) ^ list[username.charCodeAt(i) ^ (result & 0xFF)];
result = result.toString(16).toUpperCase();
regcode[2] = result.charAt(0);
regcode[3] = result.charAt(1);
len = regcode.length;
result = 0;
for (i = 2; i < len; i++)
result = ((result >> 8) & 0xFF) ^ list[regcode[i].toString().charCodeAt(0) ^ (result & 0xFF)];
result = result.toString(16).toUpperCase();
regcode[0] = result.charAt(0);
regcode[1] = result.charAt(1);
return regcode.join('');
}
</script>
</body>
</html>

View File

@ -40,4 +40,7 @@ public interface ArticleControllerApi {
@ApiOperation("查询文章")
Map<String,Object> getListByPage(@RequestParam Integer pageNum,@RequestParam Integer pageSize);
@ApiOperation("获取博客公共部分信息")
public Map<String,Object> blog_common_page(@RequestParam("article_id") Long article_id);
}

View File

@ -6,6 +6,7 @@ import com.zhangmeng.blog.feign.SysConfigFeign;
import com.zhangmeng.blog.feign.UserFeign;
import com.zhangmeng.blog.service.ArticleService;
import com.zhangmeng.blog.service.CategoryService;
import com.zhangmeng.blog.tools.BlogTools;
import com.zhangmeng.model.base.baseController.BaseController;
import com.zhangmeng.model.base.baseUtil.CommonUtil;
import com.zhangmeng.model.dto.article.ArticleDto;
@ -49,6 +50,9 @@ public class ArticleController extends BaseController implements ArticleControll
@Autowired
private SysConfigFeign sysConfigFeign;
@Autowired
private BlogTools blogTools;
@Override
@PostMapping("/save")
public Result save(@RequestParam @RequestBody Map<String, Object> parms) {
@ -231,6 +235,28 @@ public class ArticleController extends BaseController implements ArticleControll
}
map.put("sysConfig",sysConfig);
map.put("articleModel", articleModel);
map.put("title",this.blogTools.title());
map.put("blog_count",blogTools.blog_count());
map.put("categoryList",blogTools.categoryList());
map.put("latest_recommended",blogTools.latest_recommended());
map.put("latest_blog",blogTools.latest_blog());
map.put("user",blogTools.userInfo());
map.put("message",blogTools.message());
return map;
}
@Override
@GetMapping("/blog_common_page")
public Map<String,Object> blog_common_page(@RequestParam("article_id") Long article_id){
Map<String,Object> map = new HashMap<>();
map.put("title",this.blogTools.title());
map.put("blog_count",blogTools.blog_count());
map.put("categoryList",blogTools.categoryList());
map.put("latest_recommended",blogTools.latest_recommended());
map.put("latest_blog",blogTools.latest_blog());
map.put("user",blogTools.userInfo());
map.put("message",blogTools.message());
map.put("commentModelList",blogTools.commentModelList(article_id));
return map;
}
}

View File

@ -0,0 +1,15 @@
package com.zhangmeng.blog.dao;
import com.zhangmeng.model.base.baseDao.AbstractBaseMapper;
import com.zhangmeng.model.entity.Reply;
import org.apache.ibatis.annotations.Mapper;
/**
* @author zhengmeng
* @version 1.0
* @date 20211717:44:40
*/
@Mapper
public interface ReplyDao extends AbstractBaseMapper<Reply> {
}

View File

@ -0,0 +1,9 @@
package com.zhangmeng.blog.dao;
import com.zhangmeng.model.base.baseDao.AbstractBaseMapper;
import com.zhangmeng.model.entity.Tags;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TagsDao extends AbstractBaseMapper<Tags> {
}

View File

@ -59,6 +59,8 @@ mystyle:
- /actuator/**
- /instances/**
- /article/getListByPage
- /article/findById
- /article/blog_common_page
management:
endpoints:
web:

View File

@ -111,4 +111,5 @@ mystyle:
- /mystyle-cloud-admin-manager/login
- /mystyle-cloud-oauth/user/login
- /mystyle-cloud-web-blog/blog/index
- /mystyle-cloud-web-blog/blog