1.文案调整(完成)
归属人员 这个称呼改为 公众号负责人 作者花名: 这个成为改为 文章默认作者名 2.在创建文章的时候,没有填作者名,则将公众号作者名带入 (完成) 3.文章标签修改时增加默认示例,示例内容为:微信/淘系/视频号,且文本框调整为3行 (完成) 4.文章标签抽出来单独一个菜单 (完成) 5.用户阅读文章时,需要将文章标签存储到用户表 playlet_public_user
This commit is contained in:
parent
bcdae44440
commit
aa6e49fbb7
|
|
@ -5,6 +5,7 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.playlet.common.core.domain.entity.SysDept;
|
import com.playlet.common.core.domain.entity.SysDept;
|
||||||
import com.playlet.common.core.domain.entity.SysUser;
|
import com.playlet.common.core.domain.entity.SysUser;
|
||||||
|
import com.playlet.common.utils.StringUtils;
|
||||||
import com.playlet.system.domain.PlayletPublicDetail;
|
import com.playlet.system.domain.PlayletPublicDetail;
|
||||||
import com.playlet.system.service.ISysDeptService;
|
import com.playlet.system.service.ISysDeptService;
|
||||||
import com.playlet.system.service.ISysUserService;
|
import com.playlet.system.service.ISysUserService;
|
||||||
|
|
@ -149,7 +150,17 @@ public class PlayletPublicAccountController extends BaseController
|
||||||
{
|
{
|
||||||
PlayletPublicAccount playletPublicAccount = playletPublicAccountService.selectPlayletPublicAccountById(id);
|
PlayletPublicAccount playletPublicAccount = playletPublicAccountService.selectPlayletPublicAccountById(id);
|
||||||
mmap.put("playletPublicAccount", playletPublicAccount);
|
mmap.put("playletPublicAccount", playletPublicAccount);
|
||||||
mmap.put("users",sysUserService.selectUserList(new SysUser()));
|
List<SysUser> users = sysUserService.selectUserList(new SysUser());
|
||||||
|
if(StringUtils.isNotEmpty(playletPublicAccount.getManagerIds())){
|
||||||
|
for (String ids : playletPublicAccount.getManagerIds().split(",")) {
|
||||||
|
users.forEach(model->{
|
||||||
|
if(String.valueOf(model.getUserId()).equals(ids)){
|
||||||
|
model.setFlag(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mmap.put("users", users);
|
||||||
return prefix + "/edit";
|
return prefix + "/edit";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,13 @@ public class PlayletPublicDetailController extends BaseController
|
||||||
for (String str : arr) {
|
for (String str : arr) {
|
||||||
PublicDetailTag tag = new PublicDetailTag();
|
PublicDetailTag tag = new PublicDetailTag();
|
||||||
tag.setTag(str);
|
tag.setTag(str);
|
||||||
|
if(StringUtils.isNotEmpty(playletPublicDetail.getDetailTag())){
|
||||||
|
for (String tagName : playletPublicDetail.getDetailTag().split(",")) {
|
||||||
|
if(str.equals(tagName)){
|
||||||
|
tag.setFlag(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
tags.add(tag);
|
tags.add(tag);
|
||||||
}
|
}
|
||||||
mmap.put("tags", tags);
|
mmap.put("tags", tags);
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,6 @@ public class PublicDetailTag {
|
||||||
|
|
||||||
private String tag;
|
private String tag;
|
||||||
|
|
||||||
|
private Boolean flag;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,17 +38,27 @@ public class PublicDetailShareAppServiceImpl implements PublicDetailShareAppServ
|
||||||
if(userOne != null){
|
if(userOne != null){
|
||||||
publicDetailShare.setReaderOneName(userOne.getName());
|
publicDetailShare.setReaderOneName(userOne.getName());
|
||||||
// 增加1的阅读标签
|
// 增加1的阅读标签
|
||||||
if(!userOne.getRemark().contains(detail.getDetailTag())){
|
if(userOne.getRemark() == null || !userOne.getRemark().contains(detail.getDetailTag())){
|
||||||
|
if(userOne.getRemark() == null){
|
||||||
|
userOne.setRemark(detail.getDetailTag());
|
||||||
|
}else {
|
||||||
userOne.setRemark(userOne.getRemark()+"|" + detail.getDetailTag());
|
userOne.setRemark(userOne.getRemark()+"|" + detail.getDetailTag());
|
||||||
|
}
|
||||||
iPlayletPublicUserService.updateById(userOne);
|
iPlayletPublicUserService.updateById(userOne);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(userTwo != null){
|
if(userTwo != null){
|
||||||
publicDetailShare.setReaderTwoName(userTwo.getName());
|
publicDetailShare.setReaderTwoName(userTwo.getName());
|
||||||
// 增加用户2的阅读标签
|
// 增加用户2的阅读标签
|
||||||
|
if(userTwo.getRemark() == null || !userTwo.getRemark().contains(detail.getDetailTag())){
|
||||||
|
if(userTwo.getRemark() == null){
|
||||||
|
userTwo.setRemark(detail.getDetailTag());
|
||||||
|
}else {
|
||||||
userTwo.setRemark(userTwo.getRemark()+"|" + detail.getDetailTag());
|
userTwo.setRemark(userTwo.getRemark()+"|" + detail.getDetailTag());
|
||||||
|
}
|
||||||
iPlayletPublicUserService.updateById(userTwo);
|
iPlayletPublicUserService.updateById(userTwo);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// 查询是否二次记录
|
// 查询是否二次记录
|
||||||
long readCount = iPublicDetailShareService.lambdaQuery()
|
long readCount = iPublicDetailShareService.lambdaQuery()
|
||||||
.eq(PublicDetailShare::getReaderOneId, publicDetailShare.getReaderOneId())
|
.eq(PublicDetailShare::getReaderOneId, publicDetailShare.getReaderOneId())
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,6 @@
|
||||||
<input class="form-control" type="text" name="publicAccountLimit">
|
<input class="form-control" type="text" name="publicAccountLimit">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">文章自定义标签:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input class="form-control" type="text" name="detailTags">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">显示排序:</label>
|
<label class="col-sm-3 control-label is-required">显示排序:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
|
||||||
|
|
@ -82,11 +82,6 @@
|
||||||
align: "left"
|
align: "left"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'detailTags',
|
|
||||||
title: '文章标签',
|
|
||||||
align: "left"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'orderNum',
|
field: 'orderNum',
|
||||||
title: '排序',
|
title: '排序',
|
||||||
align: "left"
|
align: "left"
|
||||||
|
|
|
||||||
|
|
@ -35,12 +35,6 @@
|
||||||
<input class="form-control" type="text" name="publicAccountLimit" th:field="*{publicAccountLimit}" id="publicAccountLimit" required>
|
<input class="form-control" type="text" name="publicAccountLimit" th:field="*{publicAccountLimit}" id="publicAccountLimit" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label is-required">文章标签:</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input class="form-control" type="text" name="detailTags" th:field="*{detailTags}" id="detailTags" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">显示排序:</label>
|
<label class="col-sm-3 control-label is-required">显示排序:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
<label class="col-sm-3 control-label">运营人员:</label>
|
<label class="col-sm-3 control-label">运营人员:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select id="managerIds" class="form-control select2-multiple" multiple>
|
<select id="managerIds" class="form-control select2-multiple" multiple>
|
||||||
<option th:each="user:${users}" th:value="${user.userId}" th:text="${user.userName}"></option>
|
<option th:each="user:${users}" th:value="${user.userId}" th:text="${user.userName}" th:selected="${user.flag}" ></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta name="referrer" content="same-origin">
|
<meta name="referrer" content="same-origin">
|
||||||
<th:block th:include="include :: header('新增公众号文章详情')" />
|
<th:block th:include="include :: header('新增公众号文章详情')" />
|
||||||
|
<th:block th:include="include :: select2-css" />
|
||||||
<th:block th:include="include :: summernote-css" />
|
<th:block th:include="include :: summernote-css" />
|
||||||
<th:block th:include="include :: bootstrap-fileinput-css" />
|
<th:block th:include="include :: bootstrap-fileinput-css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
@ -95,11 +96,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-2 control-label">文章标签:</label>
|
<label class="col-xs-2 control-label">文章标签:</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-xs-10">
|
||||||
<select id="detailTag" name="detailTag" class="form-control m-b" required>
|
<select id="detailTags" class="form-control select2-multiple" multiple>
|
||||||
<option th:each="tag:${tags}" th:value="${tag.tag}"
|
<option th:each="tag:${tags}" th:value="${tag.tag}" th:text="${tag.tag}"></option>
|
||||||
th:text="${tag.tag}"></option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -175,6 +175,7 @@
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer" />
|
<th:block th:include="include :: footer" />
|
||||||
<th:block th:include="include :: summernote-js" />
|
<th:block th:include="include :: summernote-js" />
|
||||||
|
<th:block th:include="include :: select2-js" />
|
||||||
<th:block th:include="include :: bootstrap-fileinput-js" />
|
<th:block th:include="include :: bootstrap-fileinput-js" />
|
||||||
<th:block th:include="include :: bootstrap-fileinput-js" />
|
<th:block th:include="include :: bootstrap-fileinput-js" />
|
||||||
<th:block th:include="include :: tingmce-min-js" />
|
<th:block th:include="include :: tingmce-min-js" />
|
||||||
|
|
@ -184,6 +185,13 @@
|
||||||
focusCleanup: true
|
focusCleanup: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$('#detailTags').select2({
|
||||||
|
placeholder: "请选择文章标签",
|
||||||
|
allowClear: true
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
// 详情页
|
// 详情页
|
||||||
$("#imgUrlFile").fileinput({
|
$("#imgUrlFile").fileinput({
|
||||||
uploadUrl: ctx + 'tool/oss/uploadFromPlaylet',
|
uploadUrl: ctx + 'tool/oss/uploadFromPlaylet',
|
||||||
|
|
@ -245,7 +253,8 @@
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
var content = tinymce.get('mytextarea').getContent();
|
var content = tinymce.get('mytextarea').getContent();
|
||||||
$.operate.save(prefix + "/add", $('#form-detail-add').serialize() + encodeURIComponent(content));
|
var detailTag = $.form.selectSelects("detailTags");
|
||||||
|
$.operate.save(prefix + "/add", $('#form-detail-add').serialize() + encodeURIComponent(content) + "&detailTag=" + detailTag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta name="referrer" content="same-origin">
|
<meta name="referrer" content="same-origin">
|
||||||
<th:block th:include="include :: header('修改公众号文章详情')" />
|
<th:block th:include="include :: header('修改公众号文章详情')" />
|
||||||
|
<th:block th:include="include :: select2-css" />
|
||||||
<th:block th:include="include :: summernote-css" />
|
<th:block th:include="include :: summernote-css" />
|
||||||
<th:block th:include="include :: bootstrap-fileinput-css" />
|
<th:block th:include="include :: bootstrap-fileinput-css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
@ -84,11 +85,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-2 control-label">文章标签:</label>
|
<label class="col-sm-2 control-label">运营人员:</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<select id="detailTag" name="detailTag" class="form-control m-b" required>
|
<select id="detailTags" class="form-control select2-multiple" multiple>
|
||||||
<option th:each="tag:${tags}" th:value="${tag.tag}"
|
<option th:each="tag:${tags}" th:value="${tag.tag}" th:text="${tag.tag}" th:selected="${tag.flag}"></option>
|
||||||
th:text="${tag.tag}" th:field="*{detailTag}"></option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -104,6 +104,7 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer" />
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: select2-js" />
|
||||||
<th:block th:include="include :: summernote-js" />
|
<th:block th:include="include :: summernote-js" />
|
||||||
<th:block th:include="include :: bootstrap-fileinput-js" />
|
<th:block th:include="include :: bootstrap-fileinput-js" />
|
||||||
<th:block th:include="include :: tingmce-min-js" />
|
<th:block th:include="include :: tingmce-min-js" />
|
||||||
|
|
@ -113,10 +114,18 @@
|
||||||
focusCleanup: true
|
focusCleanup: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$('#detailTags').select2({
|
||||||
|
placeholder: "请选择文章标签",
|
||||||
|
allowClear: true
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
var content = tinymce.get('mytextarea').getContent();
|
var content = tinymce.get('mytextarea').getContent();
|
||||||
$.operate.save(prefix + "/edit", $('#form-detail-edit').serialize() + encodeURIComponent(content));
|
var detailTag = $.form.selectSelects("detailTags");
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-detail-edit').serialize() + encodeURIComponent(content) + "&detailTag=" + detailTag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,8 @@ public class SysUser extends BaseEntity
|
||||||
/** 删除标志(0代表存在 2代表删除) */
|
/** 删除标志(0代表存在 2代表删除) */
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
|
||||||
|
private boolean flag;
|
||||||
|
|
||||||
/** 最后登录IP */
|
/** 最后登录IP */
|
||||||
@Excel(name = "最后登录IP", type = Type.EXPORT)
|
@Excel(name = "最后登录IP", type = Type.EXPORT)
|
||||||
private String loginIp;
|
private String loginIp;
|
||||||
|
|
@ -106,6 +108,14 @@ public class SysUser extends BaseEntity
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isFlag() {
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlag(boolean flag) {
|
||||||
|
this.flag = flag;
|
||||||
|
}
|
||||||
|
|
||||||
public SysUser(Long userId)
|
public SysUser(Long userId)
|
||||||
{
|
{
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
|
|
|
||||||
|
|
@ -96,15 +96,15 @@
|
||||||
update playlet_public_account
|
update playlet_public_account
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="name != null">name = #{name},</if>
|
<if test="name != null">name = #{name},</if>
|
||||||
<if test="publicType != null">public_type = #{publicType},</if>
|
<if test="publicType != null and publicType != ''">public_type = #{publicType},</if>
|
||||||
<if test="detailType != null">detail_type = #{detailType},</if>
|
<if test="detailType != null and detailType != ''">detail_type = #{detailType},</if>
|
||||||
<if test="detailTags != null">detail_tags = #{detailTags},</if>
|
<if test="detailTags != null and detailTags != ''">detail_tags = #{detailTags},</if>
|
||||||
<if test="introduction != null">introduction = #{introduction},</if>
|
<if test="introduction != null and introduction != ''">introduction = #{introduction},</if>
|
||||||
<if test="authorAlias != null">author_alias = #{authorAlias},</if>
|
<if test="authorAlias != null and authorAlias != ''">author_alias = #{authorAlias},</if>
|
||||||
<if test="managerId != null">manager_id = #{managerId},</if>
|
<if test="managerId != null and managerId != ''">manager_id = #{managerId},</if>
|
||||||
<if test="managerIds != null">manager_ids = #{managerIds},</if>
|
<if test="managerIds != null and managerIds != ''">manager_ids = #{managerIds},</if>
|
||||||
<if test="logoUrl != null">logo_url = #{logoUrl},</if>
|
<if test="logoUrl != null and logoUrl != ''">logo_url = #{logoUrl},</if>
|
||||||
<if test="address != null">address = #{address},</if>
|
<if test="address != null and address != ''">address = #{address},</if>
|
||||||
<if test="originalContentCount != null">original_content_count = #{originalContentCount},</if>
|
<if test="originalContentCount != null">original_content_count = #{originalContentCount},</if>
|
||||||
<if test="followersCount != null">followers_count = #{followersCount},</if>
|
<if test="followersCount != null">followers_count = #{followersCount},</if>
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue