Compare commits

..

No commits in common. "11a216ab39c5e66aecfd5fb56de0a4727d4e88dd" and "bcdae44440ee6adde32f26f2afd4a11bf9fe1803" have entirely different histories.

14 changed files with 132 additions and 173 deletions

View File

@ -5,7 +5,6 @@ import java.util.stream.Collectors;
import com.playlet.common.core.domain.entity.SysDept;
import com.playlet.common.core.domain.entity.SysUser;
import com.playlet.common.utils.StringUtils;
import com.playlet.system.domain.PlayletPublicDetail;
import com.playlet.system.service.ISysDeptService;
import com.playlet.system.service.ISysUserService;
@ -150,17 +149,7 @@ public class PlayletPublicAccountController extends BaseController
{
PlayletPublicAccount playletPublicAccount = playletPublicAccountService.selectPlayletPublicAccountById(id);
mmap.put("playletPublicAccount", playletPublicAccount);
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);
mmap.put("users",sysUserService.selectUserList(new SysUser()));
return prefix + "/edit";
}

View File

@ -218,13 +218,6 @@ public class PlayletPublicDetailController extends BaseController
for (String str : arr) {
PublicDetailTag tag = new PublicDetailTag();
tag.setTag(str);
if(StringUtils.isNotEmpty(playletPublicDetail.getDetailTag())){
for (String tagName : playletPublicDetail.getDetailTag().split(",")) {
if(str.equals(tagName)){
tag.setFlag(true);
}
}
}
tags.add(tag);
}
mmap.put("tags", tags);

View File

@ -10,6 +10,4 @@ public class PublicDetailTag {
private String tag;
private Boolean flag;
}

View File

@ -38,26 +38,16 @@ public class PublicDetailShareAppServiceImpl implements PublicDetailShareAppServ
if(userOne != null){
publicDetailShare.setReaderOneName(userOne.getName());
// 增加1的阅读标签
if(userOne.getRemark() == null || !userOne.getRemark().contains(detail.getDetailTag())){
if(userOne.getRemark() == null){
userOne.setRemark(detail.getDetailTag());
}else {
userOne.setRemark(userOne.getRemark()+"|" + detail.getDetailTag());
}
if(!userOne.getRemark().contains(detail.getDetailTag())){
userOne.setRemark(userOne.getRemark()+"|" + detail.getDetailTag());
iPlayletPublicUserService.updateById(userOne);
}
}
if(userTwo != null){
publicDetailShare.setReaderTwoName(userTwo.getName());
// 增加用户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());
}
iPlayletPublicUserService.updateById(userTwo);
}
userTwo.setRemark(userTwo.getRemark()+"|" + detail.getDetailTag());
iPlayletPublicUserService.updateById(userTwo);
}
// 查询是否二次记录
long readCount = iPublicDetailShareService.lambdaQuery()

View File

@ -34,6 +34,12 @@
<input class="form-control" type="text" name="publicAccountLimit">
</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">
<label class="col-sm-3 control-label is-required">显示排序:</label>
<div class="col-sm-8">

View File

@ -82,6 +82,11 @@
align: "left"
},
{
field: 'detailTags',
title: '文章标签',
align: "left"
},
{
field: 'orderNum',
title: '排序',
align: "left"

View File

@ -35,6 +35,12 @@
<input class="form-control" type="text" name="publicAccountLimit" th:field="*{publicAccountLimit}" id="publicAccountLimit" required>
</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">
<label class="col-sm-3 control-label is-required">显示排序:</label>
<div class="col-sm-8">

View File

@ -61,7 +61,7 @@
<label class="col-sm-3 control-label">运营人员:</label>
<div class="col-sm-8">
<select id="managerIds" class="form-control select2-multiple" multiple>
<option th:each="user:${users}" th:value="${user.userId}" th:text="${user.userName}" th:selected="${user.flag}" ></option>
<option th:each="user:${users}" th:value="${user.userId}" th:text="${user.userName}"></option>
</select>
</div>
</div>

View File

@ -4,7 +4,6 @@
<head>
<meta name="referrer" content="same-origin">
<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 :: bootstrap-fileinput-css" />
</head>
@ -96,10 +95,11 @@
</div>
</div>
<div class="form-group">
<label class="col-xs-2 control-label">文章标签:</label>
<div class="col-xs-10">
<select id="detailTags" class="form-control select2-multiple" multiple>
<option th:each="tag:${tags}" th:value="${tag.tag}" th:text="${tag.tag}"></option>
<label class="col-sm-2 control-label">文章标签:</label>
<div class="col-sm-10">
<select id="detailTag" name="detailTag" class="form-control m-b" required>
<option th:each="tag:${tags}" th:value="${tag.tag}"
th:text="${tag.tag}"></option>
</select>
</div>
</div>
@ -175,7 +175,6 @@
</div>
<th:block th:include="include :: footer" />
<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 :: tingmce-min-js" />
@ -185,13 +184,6 @@
focusCleanup: true
});
$(function() {
$('#detailTags').select2({
placeholder: "请选择文章标签",
allowClear: true
});
})
// 详情页
$("#imgUrlFile").fileinput({
uploadUrl: ctx + 'tool/oss/uploadFromPlaylet',
@ -253,8 +245,7 @@
function submitHandler() {
if ($.validate.form()) {
var content = tinymce.get('mytextarea').getContent();
var detailTag = $.form.selectSelects("detailTags");
$.operate.save(prefix + "/add", $('#form-detail-add').serialize() + encodeURIComponent(content) + "&detailTag=" + detailTag);
$.operate.save(prefix + "/add", $('#form-detail-add').serialize() + encodeURIComponent(content));
}
}

View File

@ -4,7 +4,6 @@
<head>
<meta name="referrer" content="same-origin">
<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 :: bootstrap-fileinput-css" />
</head>
@ -85,10 +84,11 @@
</div>
</div>
<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">
<select id="detailTags" class="form-control select2-multiple" multiple>
<option th:each="tag:${tags}" th:value="${tag.tag}" th:text="${tag.tag}" th:selected="${tag.flag}"></option>
<select id="detailTag" name="detailTag" class="form-control m-b" required>
<option th:each="tag:${tags}" th:value="${tag.tag}"
th:text="${tag.tag}" th:field="*{detailTag}"></option>
</select>
</div>
</div>
@ -104,7 +104,6 @@
</form>
</div>
<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 :: bootstrap-fileinput-js" />
<th:block th:include="include :: tingmce-min-js" />
@ -114,18 +113,10 @@
focusCleanup: true
});
$(function() {
$('#detailTags').select2({
placeholder: "请选择文章标签",
allowClear: true
});
})
function submitHandler() {
if ($.validate.form()) {
var content = tinymce.get('mytextarea').getContent();
var detailTag = $.form.selectSelects("detailTags");
$.operate.save(prefix + "/edit", $('#form-detail-edit').serialize() + encodeURIComponent(content) + "&detailTag=" + detailTag);
$.operate.save(prefix + "/edit", $('#form-detail-edit').serialize() + encodeURIComponent(content));
}
}

View File

@ -10,39 +10,27 @@
<input name="deptId" type="hidden" id="treeId"/>
<h4 class="form-header h4">基本信息</h4>
<div class="row">
<div class="col-sm-6">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">登录账号名</label>
<label class="col-sm-4 control-label is-required">用户名称</label>
<div class="col-sm-8">
<input id="loginName" name="loginName" placeholder="请输入登录账号名" class="form-control" type="text" maxlength="30" required>
<input name="userName" placeholder="请输入用户名称" class="form-control" type="text" maxlength="30" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">用户性别</label>
<label class="col-sm-4 control-label">归属部门</label>
<div class="col-sm-8">
<select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
<div class="input-group">
<input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择归属部门" class="form-control">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">登录密码:</label>
<div class="col-sm-8">
<div class="input-group">
<input id="password" name="password" placeholder="请输入登录密码" class="form-control" type="password" th:value="${@config.getKey('sys.user.initPassword')}" required>
<span class="input-group-addon" title="登录密码,鼠标按下显示密码"
onmousedown="$('#password').attr('type','text')"
onmouseup="$('#password').attr('type','password')"><i class="fa fa-key"></i></span>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">手机号码:</label>
@ -54,16 +42,6 @@
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">用户昵称:</label>
<div class="col-sm-8">
<input name="userName" placeholder="请输入用户昵称" class="form-control" type="text" maxlength="30" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">邮箱:</label>
@ -79,11 +57,34 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-xs-4 control-label">角色:</label>
<div class="col-xs-8">
<label th:each="role:${roles}" class="check-box">
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:disabled="${role.status == '1'}">
</label>
<label class="col-sm-4 control-label is-required">登录账号:</label>
<div class="col-sm-8">
<input id="loginName" name="loginName" placeholder="请输入登录账号" class="form-control" type="text" maxlength="30" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">登录密码:</label>
<div class="col-sm-8">
<div class="input-group">
<input id="password" name="password" placeholder="请输入登录密码" class="form-control" type="password" th:value="${@config.getKey('sys.user.initPassword')}" required>
<span class="input-group-addon" title="登录密码,鼠标按下显示密码"
onmousedown="$('#password').attr('type','text')"
onmouseup="$('#password').attr('type','password')"><i class="fa fa-key"></i></span>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">用户性别:</label>
<div class="col-sm-8">
<select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
@ -100,10 +101,10 @@
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="col-sm-12">
<div class="form-group">
<label class="col-xs-4 control-label is-required">岗位:</label>
<div class="col-xs-8">
<label class="col-xs-2 control-label">岗位:</label>
<div class="col-xs-4">
<select id="post" class="form-control select2-multiple" multiple>
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:disabled="${post.status == '1'}"></option>
</select>
@ -112,14 +113,13 @@
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="col-sm-12">
<div class="form-group">
<label class="col-sm-4 control-label is-required">归属部门:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择归属部门" class="form-control">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
<label class="col-xs-2 control-label">角色:</label>
<div class="col-xs-10">
<label th:each="role:${roles}" class="check-box">
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:disabled="${role.status == '1'}">
</label>
</div>
</div>
</div>

View File

@ -11,41 +11,21 @@
<input name="deptId" type="hidden" th:field="*{deptId}" id="treeId"/>
<h4 class="form-header h4">基本信息</h4>
<div class="row">
<div class="col-sm-6">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">登录账号名</label>
<label class="col-sm-4 control-label is-required">用户名称</label>
<div class="col-sm-8">
<input class="form-control" type="text" readonly="true" th:field="*{loginName}"/>
<input name="userName" placeholder="请输入用户名称" class="form-control" type="text" maxlength="30" th:field="*{userName}" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">用户性别:</label>
<div class="col-sm-8">
<select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sex}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">用户昵称:</label>
<div class="col-sm-8">
<input name="userName" placeholder="请输入用户昵称" class="form-control" type="text" maxlength="30" th:field="*{userName}" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">手机号码:</label>
<label class="col-sm-4 control-label">归属部门:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" th:field="*{phonenumber}">
<span class="input-group-addon"><i class="fa fa-mobile"></i></span>
<input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" id="treeName" th:field="*{dept.deptName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
@ -54,11 +34,12 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-xs-4 control-label">角色:</label>
<div class="col-xs-8">
<label th:each="role:${roles}" class="check-box">
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:checked="${role.flag}" th:disabled="${role.status == '1'}">
</label>
<label class="col-sm-4 control-label">手机号码:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" th:field="*{phonenumber}">
<span class="input-group-addon"><i class="fa fa-mobile"></i></span>
</div>
</div>
</div>
</div>
@ -77,7 +58,28 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">岗位:</label>
<label class="col-sm-4 control-label is-required">登录账号:</label>
<div class="col-sm-8">
<input class="form-control" type="text" readonly="true" th:field="*{loginName}"/>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">用户状态:</label>
<div class="col-sm-8">
<label class="toggle-switch switch-solid">
<input type="checkbox" id="status" th:checked="${user.status == '0' ? true : false}">
<span></span>
</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">岗位:</label>
<div class="col-sm-8">
<select id="post" class="form-control select2-multiple" multiple>
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:selected="${post.flag}" th:disabled="${post.status == '1'}"></option>
@ -87,25 +89,23 @@
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">用户状态</label>
<label class="col-sm-4 control-label">用户性别</label>
<div class="col-sm-8">
<label class="toggle-switch switch-solid">
<input type="checkbox" id="status" th:checked="${user.status == '0' ? true : false}">
<span></span>
</label>
<select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sex}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="col-sm-12">
<div class="form-group">
<label class="col-sm-4 control-label is-required">归属部门:</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" id="treeName" th:field="*{dept.deptName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
<label class="col-xs-2 control-label">角色:</label>
<div class="col-xs-10">
<label th:each="role:${roles}" class="check-box">
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:checked="${role.flag}" th:disabled="${role.status == '1'}">
</label>
</div>
</div>
</div>

View File

@ -75,8 +75,6 @@ public class SysUser extends BaseEntity
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
private boolean flag;
/** 最后登录IP */
@Excel(name = "最后登录IP", type = Type.EXPORT)
private String loginIp;
@ -108,14 +106,6 @@ public class SysUser extends BaseEntity
}
public boolean isFlag() {
return flag;
}
public void setFlag(boolean flag) {
this.flag = flag;
}
public SysUser(Long userId)
{
this.userId = userId;

View File

@ -96,15 +96,15 @@
update playlet_public_account
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="publicType != null and publicType != ''">public_type = #{publicType},</if>
<if test="detailType != null and detailType != ''">detail_type = #{detailType},</if>
<if test="detailTags != null and detailTags != ''">detail_tags = #{detailTags},</if>
<if test="introduction != null and introduction != ''">introduction = #{introduction},</if>
<if test="authorAlias != null and authorAlias != ''">author_alias = #{authorAlias},</if>
<if test="managerId != null and managerId != ''">manager_id = #{managerId},</if>
<if test="managerIds != null and managerIds != ''">manager_ids = #{managerIds},</if>
<if test="logoUrl != null and logoUrl != ''">logo_url = #{logoUrl},</if>
<if test="address != null and address != ''">address = #{address},</if>
<if test="publicType != null">public_type = #{publicType},</if>
<if test="detailType != null">detail_type = #{detailType},</if>
<if test="detailTags != null">detail_tags = #{detailTags},</if>
<if test="introduction != null">introduction = #{introduction},</if>
<if test="authorAlias != null">author_alias = #{authorAlias},</if>
<if test="managerId != null">manager_id = #{managerId},</if>
<if test="managerIds != null">manager_ids = #{managerIds},</if>
<if test="logoUrl != null">logo_url = #{logoUrl},</if>
<if test="address != null">address = #{address},</if>
<if test="originalContentCount != null">original_content_count = #{originalContentCount},</if>
<if test="followersCount != null">followers_count = #{followersCount},</if>
<if test="createBy != null">create_by = #{createBy},</if>