diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/SysTag.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/SysTag.java
index 52940d1..7447028 100644
--- a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/SysTag.java
+++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/SysTag.java
@@ -1,5 +1,6 @@
package com.flossom.common.core.domain.entity;
+import com.flossom.common.core.annotation.Excel;
import com.flossom.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -30,9 +31,11 @@ public class SysTag extends BaseEntity
private String ancestors;
/** 标签名称 */
+ @Excel(name = "标签名称")
private String tagName;
/** 显示顺序 */
+ @Excel(name = "排序顺序")
private Integer orderNum;
/** 负责人 */
@@ -45,6 +48,7 @@ public class SysTag extends BaseEntity
private String email;
/** 标签状态:0正常,1停用 */
+ @Excel(name = "标签状态:0正常,1停用")
private String status;
/** 标签状态:1小程序标签,2企微标签 */
diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserTagMapper.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserTagMapper.java
index 4c11851..7ee20b2 100644
--- a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserTagMapper.java
+++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserTagMapper.java
@@ -53,6 +53,14 @@ public interface WxUserTagMapper {
*/
public int deleteWxUserTagById(Long id);
+ /**
+ * 删除微信用户标签关联
+ *
+ * @param tagId 标签关联主键
+ * @return 结果
+ */
+ public int deleteWxUserTagByTagId(Long tagId);
+
/**
* 批量删除微信用户标签关联
*
diff --git a/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserTagMapper.xml b/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserTagMapper.xml
index 01d0487..2989917 100644
--- a/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserTagMapper.xml
+++ b/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserTagMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
@@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
\ No newline at end of file
+
+
+ delete from wx_user_tag where tag_id = #{tagId}
+
+
diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/SysTagController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/SysTagController.java
index 1735059..be24934 100644
--- a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/SysTagController.java
+++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/SysTagController.java
@@ -2,9 +2,11 @@ package com.flossom.system.controller;
import com.flossom.common.core.constant.UserConstants;
import com.flossom.common.core.domain.R;
+import com.flossom.common.core.domain.SysFiringInfo;
import com.flossom.common.core.domain.entity.SysDept;
import com.flossom.common.core.domain.entity.SysTag;
import com.flossom.common.core.utils.StringUtils;
+import com.flossom.common.core.utils.poi.ExcelUtil;
import com.flossom.common.core.web.controller.BaseController;
import com.flossom.common.core.web.domain.AjaxResult;
import com.flossom.common.log.annotation.Log;
@@ -13,11 +15,13 @@ import com.flossom.common.security.annotation.RequiresPermissions;
import com.flossom.common.security.utils.SecurityUtils;
import com.flossom.system.service.ISysDeptService;
import com.flossom.system.service.ISysTagService;
+import com.flossom.system.service.IWxUserTagService;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -30,6 +34,8 @@ import java.util.List;
public class SysTagController extends BaseController {
@Autowired
private ISysTagService tagService;
+ @Autowired
+ private IWxUserTagService wxUserTagService;
/**
* 获取标签列表
@@ -106,6 +112,8 @@ public class SysTagController extends BaseController {
if (tagService.hasChildByDeptId(id)) {
return warn("存在下级标签,不允许删除");
}
+ wxUserTagService.deleteWxUserTagByTagId(id);
+ // 删除用户标签
// if (tagService.checkDeptExistUser(id))
// {
// return warn("标签存在用户,不允许删除");
@@ -143,4 +151,17 @@ public class SysTagController extends BaseController {
public R getWecomTags() {
return R.ok(tagService.getWecomTags());
}
+
+ /**
+ * 导出标签信息数据信息
+ */
+ @RequiresPermissions("system:tagInfo:export")
+ @Log(title = "标签信息数据信息", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, SysTag tag)
+ {
+ List list = tagService.selectDeptList(tag);
+ ExcelUtil util = new ExcelUtil(SysTag.class);
+ util.exportExcel(response, list, "标签信息数据");
+ }
}
diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserTagService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserTagService.java
index 48c83ff..4266fe3 100644
--- a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserTagService.java
+++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserTagService.java
@@ -58,4 +58,12 @@ public interface IWxUserTagService {
* @return 结果
*/
public int deleteWxUserTagById(Long id);
+
+ /**
+ * 删除微信用户标签关联
+ *
+ * @param tagId 标签关联主键
+ * @return 结果
+ */
+ public int deleteWxUserTagByTagId(Long tagId);
}
diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserTagServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserTagServiceImpl.java
index 917caa0..462025b 100644
--- a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserTagServiceImpl.java
+++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserTagServiceImpl.java
@@ -87,4 +87,9 @@ public class WxUserTagServiceImpl implements IWxUserTagService {
public int deleteWxUserTagById(Long id) {
return wxUserTagMapper.deleteWxUserTagById(id);
}
+
+ @Override
+ public int deleteWxUserTagByTagId(Long tagId) {
+ return wxUserTagMapper.deleteWxUserTagByTagId(tagId);
+ }
}
diff --git a/flossom-ui/src/api/system/wechatTab.js b/flossom-ui/src/api/system/wechatTab.js
index c6355ed..04e714a 100644
--- a/flossom-ui/src/api/system/wechatTab.js
+++ b/flossom-ui/src/api/system/wechatTab.js
@@ -1,6 +1,6 @@
import request from '@/utils/request'
-// 查询部门列表
+// 查询标签列表
export function listDept(query) {
return request({
url: '/system/tagInfo/list',
@@ -9,7 +9,7 @@ export function listDept(query) {
})
}
-// 查询部门列表(排除节点)
+// 查询标签列表(排除节点)
export function listDeptExcludeChild(deptId) {
return request({
url: '/system/tagInfo/list/exclude/' + deptId,
@@ -17,7 +17,7 @@ export function listDeptExcludeChild(deptId) {
})
}
-// 查询部门详细
+// 查询标签详细
export function getDept(deptId) {
return request({
url: '/system/tagInfo/' + deptId,
@@ -25,7 +25,7 @@ export function getDept(deptId) {
})
}
-// 新增部门
+// 新增标签
export function addDept(data) {
return request({
url: '/system/tagInfo',
@@ -34,7 +34,7 @@ export function addDept(data) {
})
}
-// 修改部门
+// 修改标签
export function updateDept(data) {
return request({
url: '/system/tagInfo',
@@ -43,7 +43,7 @@ export function updateDept(data) {
})
}
-// 删除部门
+// 删除标签
export function delDept(deptId) {
return request({
url: '/system/tagInfo/' + deptId,
@@ -51,7 +51,7 @@ export function delDept(deptId) {
})
}
-// 查询部门下拉树结构
+// 查询标签下拉树结构
export function tagTreeSelect(query) {
return request({
url: '/system/tagInfo/tagTree',
diff --git a/flossom-ui/src/views/system/companyTag/index.vue b/flossom-ui/src/views/system/companyTag/index.vue
index 9429acd..03a690c 100644
--- a/flossom-ui/src/views/system/companyTag/index.vue
+++ b/flossom-ui/src/views/system/companyTag/index.vue
@@ -36,6 +36,16 @@
+
+ 导出
+
{});
+ },
+ /** 导出按钮操作 */
+ handleExport() {
+ this.download('system/tagInfo/export', {
+ ...this.queryParams
+ }, `info_${new Date().getTime()}.xlsx`)
}
}
};
diff --git a/flossom-ui/src/views/system/leaveMessage/index.vue b/flossom-ui/src/views/system/leaveMessage/index.vue
index b82db0b..14350a2 100644
--- a/flossom-ui/src/views/system/leaveMessage/index.vue
+++ b/flossom-ui/src/views/system/leaveMessage/index.vue
@@ -96,7 +96,7 @@
-
+
{{ parseTime(scope.row.createTime,'{y}-{m}-{d} {h}:{i}') }}
diff --git a/flossom-ui/src/views/system/scriptMessage/index.vue b/flossom-ui/src/views/system/scriptMessage/index.vue
index 71aad0c..2e6eda6 100644
--- a/flossom-ui/src/views/system/scriptMessage/index.vue
+++ b/flossom-ui/src/views/system/scriptMessage/index.vue
@@ -143,13 +143,11 @@
-
{{ parseTime(scope.row.updateTime,'{y}-{m}-{d} {h}:{i}') }}
-
{{ parseTime(scope.row.createTime,'{y}-{m}-{d} {h}:{i}') }}
@@ -232,8 +230,8 @@
-
-
+
+
@@ -340,6 +338,36 @@ export default {
form: {},
// 表单校验
rules: {
+ messageType: [
+ { required: true, message: "类型不能为空", trigger: "blur" }
+ ],
+ messageTitle: [
+ { required: true, message: "消息标题不能为空", trigger: "blur" }
+ ],
+ messageContent: [
+ { required: true, message: "消息内容不能为空", trigger: "blur" }
+ ],
+ type: [
+ { required: true, message: "跳转类型不能为空", trigger: "blur" }
+ ],
+ link: [
+ { required: true, message: "参数不能为空", trigger: "blur" }
+ ],
+ redirectAppid: [
+ { required: true, message: "APPID不能为空", trigger: "blur" }
+ ],
+ linkParams: [
+ { required: true, message: "跳转参数不能为空", trigger: "blur" }
+ ],
+ redirectUrl: [
+ { required: true, message: "页面链接不能为空", trigger: "blur" }
+ ],
+ videoNo: [
+ { required: true, message: "视频号ID不能为空", trigger: "blur" }
+ ],
+ feedId: [
+ { required: true, message: "视频号feedId不能为空", trigger: "blur" }
+ ],
}
};
},
diff --git a/flossom-ui/src/views/system/wechatTag/index.vue b/flossom-ui/src/views/system/wechatTag/index.vue
index 5d5a84b..f184805 100644
--- a/flossom-ui/src/views/system/wechatTag/index.vue
+++ b/flossom-ui/src/views/system/wechatTag/index.vue
@@ -26,6 +26,16 @@
+
+ 导出
+
{});
+ },
+ /** 导出按钮操作 */
+ handleExport() {
+ this.download('system/tagInfo/export', {
+ ...this.queryParams
+ }, `info_${new Date().getTime()}.xlsx`)
}
}
};