|
|
|
|
@ -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<SysTag> list = tagService.selectDeptList(tag);
|
|
|
|
|
ExcelUtil<SysTag> util = new ExcelUtil<SysTag>(SysTag.class);
|
|
|
|
|
util.exportExcel(response, list, "标签信息数据");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|