标签管理-标签内容
This commit is contained in:
+9
-1
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
@@ -55,7 +57,13 @@ public class SysCategory implements Serializable,Comparable<SysCategory>{
|
|||||||
/**描述*/
|
/**描述*/
|
||||||
@Excel(name = "描述", width = 15)
|
@Excel(name = "描述", width = 15)
|
||||||
private java.lang.String description;
|
private java.lang.String description;
|
||||||
|
/**
|
||||||
|
* 是否为标签内容-数据字典(1是 0否)
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否为标签内容-数据字典(1是 0否)", width = 15)
|
||||||
|
@Dict(dictTable = "onl_cgform_field", dicText = "is_tag_dict", dicCode = "is_tag_dict")
|
||||||
|
@ApiModelProperty(value = "是否为标签内容-数据字典(1是 0否)")
|
||||||
|
private java.lang.Integer isTagDict;
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(SysCategory o) {
|
public int compareTo(SysCategory o) {
|
||||||
//比较条件我们定的是按照code的长度升序
|
//比较条件我们定的是按照code的长度升序
|
||||||
|
|||||||
+4
-6
@@ -91,24 +91,22 @@ public class SysDict implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 是否为标签内容-数据字典(1是 0否)
|
* 是否为标签内容-数据字典(1是 0否)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "是否为标签内容-数据字典(1是 0否)", width = 15)
|
@Excel(name = "展示区域", width = 15, dictTable = "sys_dict", dicText = "is_tag_dict", dicCode = "is_tag_dict")
|
||||||
@ApiModelProperty(value = "是否为标签内容-数据字典(1是 0否)")
|
|
||||||
private java.lang.Integer isTagDict;
|
private java.lang.Integer isTagDict;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是只读(2字段固定,内部可配1固定字段 0非固定字段)
|
* 是否是只读(2字段固定,内部可配1固定字段 0非固定字段)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)", width = 15)
|
@Excel(name = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)", width = 15, dictTable = "onl_cgform_field", dicText = "is_read_only", dicCode = "is_read_only")
|
||||||
|
@Dict(dictTable = "onl_cgform_field", dicText = "is_read_only", dicCode = "is_read_only")
|
||||||
@ApiModelProperty(value = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)")
|
@ApiModelProperty(value = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)")
|
||||||
private java.lang.Integer isReadOnly;
|
private java.lang.Integer isReadOnly;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标签类型 1下拉选择 2树形结构
|
* 表单控件类型
|
||||||
*/
|
*/
|
||||||
@Excel(name = "标签类型 1下拉选择 2树形结构", width = 15)
|
@Excel(name = "标签类型 1下拉选择 2树形结构", width = 15)
|
||||||
@ApiModelProperty(value = "标签类型 1下拉选择 2树形结构")
|
@ApiModelProperty(value = "标签类型 1下拉选择 2树形结构")
|
||||||
@Dict(dicCode = "attribute_type")
|
@Dict(dicCode = "attribute_type")
|
||||||
private java.lang.String attributeType;
|
private java.lang.String attributeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+7
-5
@@ -83,17 +83,19 @@ public class SysDictItem implements Serializable {
|
|||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
/**是否为标签内容-数据字典(1是 0否)*/
|
/**是否为标签内容-数据字典(1是 0否)*/
|
||||||
@Excel(name = "是否为标签内容-数据字典(1是 0否)", width = 15)
|
@Excel(name = "展示区域", width = 15, dictTable = "sys_dict", dicText = "is_tag_dict", dicCode = "is_tag_dict")
|
||||||
@ApiModelProperty(value = "是否为标签内容-数据字典(1是 0否)")
|
@Dict(dictTable = "onl_cgform_field", dicText = "is_tag_dict", dicCode = "is_tag_dict")
|
||||||
private java.lang.Integer isTagDict;
|
private java.lang.Integer isTagDict;
|
||||||
|
|
||||||
/**是否是只读(2字段固定,内部可配1固定字段 0非固定字段)*/
|
/**是否是只读(2字段固定,内部可配1固定字段 0非固定字段)*/
|
||||||
@Excel(name = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)", width = 15)
|
@Excel(name = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)", width = 15, dictTable = "onl_cgform_field", dicText = "is_read_only", dicCode = "is_read_only")
|
||||||
|
@Dict(dictTable = "onl_cgform_field", dicText = "is_read_only", dicCode = "is_read_only")
|
||||||
@ApiModelProperty(value = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)")
|
@ApiModelProperty(value = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)")
|
||||||
private java.lang.Integer isReadOnly;
|
private java.lang.Integer isReadOnly;
|
||||||
|
|
||||||
/**表单控件类型*/
|
/**表单控件类型*/
|
||||||
@Excel(name = "表单控件类型", width = 15)
|
@Excel(name = "标签类型 1下拉选择 2树形结构", width = 15)
|
||||||
@ApiModelProperty(value = "表单控件类型")
|
@ApiModelProperty(value = "标签类型 1下拉选择 2树形结构")
|
||||||
|
@Dict(dicCode = "attribute_type")
|
||||||
private java.lang.String attributeType;
|
private java.lang.String attributeType;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -39,7 +39,7 @@ public interface ISysDictService extends IService<SysDict> {
|
|||||||
List<String> queryTableDictByKeys(String table, String text, String code, String keys);
|
List<String> queryTableDictByKeys(String table, String text, String code, String keys);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询展示区域
|
* 查询选项内容--数据字典名称
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -149,4 +149,6 @@ public interface ISysDictService extends IService<SysDict> {
|
|||||||
*/
|
*/
|
||||||
void refreshCache();
|
void refreshCache();
|
||||||
|
|
||||||
|
|
||||||
|
SysDict queryById(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-2
@@ -7,6 +7,7 @@ import com.jero.common.api.vo.Result;
|
|||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||||
import com.jero.modules.tag.service.IOnlCgformTagService;
|
import com.jero.modules.tag.service.IOnlCgformTagService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -55,6 +56,9 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
|||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
|
|
||||||
|
onlCgformTagService.selectShowAreaById(onlCgformTag.getArea_id());
|
||||||
|
|
||||||
QueryWrapper<OnlCgformTag> queryWrapper = QueryGenerator.initQueryWrapper(onlCgformTag, req.getParameterMap());
|
QueryWrapper<OnlCgformTag> queryWrapper = QueryGenerator.initQueryWrapper(onlCgformTag, req.getParameterMap());
|
||||||
Page<OnlCgformTag> page = new Page<OnlCgformTag>(pageNo, pageSize);
|
Page<OnlCgformTag> page = new Page<OnlCgformTag>(pageNo, pageSize);
|
||||||
IPage<OnlCgformTag> pageList = onlCgformTagService.page(page, queryWrapper);
|
IPage<OnlCgformTag> pageList = onlCgformTagService.page(page, queryWrapper);
|
||||||
@@ -69,8 +73,8 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
|||||||
@AutoLog(value = "标签管理-列表查询")
|
@AutoLog(value = "标签管理-列表查询")
|
||||||
@ApiOperation(value="标签管理-列表查询", notes="标签管理-列表查询")
|
@ApiOperation(value="标签管理-列表查询", notes="标签管理-列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<List<OnlCgformTag>> queryList() {
|
public Result<List<OnlCgformTag>> queryList(@Validated @RequestBody OnlCgformArea onlCgformArea) {
|
||||||
List<OnlCgformTag> list = onlCgformTagService.queryList();
|
List<OnlCgformTag> list = onlCgformTagService.queryList(onlCgformArea);
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -69,7 +70,8 @@ public class OnlCgformArea implements Serializable {
|
|||||||
private java.lang.String enName;
|
private java.lang.String enName;
|
||||||
|
|
||||||
/**所属模块(1文档库,0文档拆分)*/
|
/**所属模块(1文档库,0文档拆分)*/
|
||||||
@Excel(name = "所属模块(1文档库,0文档拆分)", width = 15)
|
@Excel(name = "所属模块(1文档库,0文档拆分", width = 15, dicCode = "module")
|
||||||
|
@Dict(dicCode = "module")
|
||||||
@ApiModelProperty(value = "所属模块(1文档库,0文档拆分)")
|
@ApiModelProperty(value = "所属模块(1文档库,0文档拆分)")
|
||||||
private java.lang.String isModel;
|
private java.lang.String isModel;
|
||||||
|
|
||||||
|
|||||||
+6
@@ -127,6 +127,12 @@ public class OnlCgformTag implements Serializable {
|
|||||||
@ApiModelProperty(value = "展示区域")
|
@ApiModelProperty(value = "展示区域")
|
||||||
private java.lang.String showArea;
|
private java.lang.String showArea;
|
||||||
|
|
||||||
|
/**展示区域*/
|
||||||
|
@Excel(name = "展示区域", width = 15, dictTable = "onl_cgform_area", dicText = "id", dicCode = "id")
|
||||||
|
@Dict(dictTable = "onl_cgform_area", dicText = "id", dicCode = "id")
|
||||||
|
@ApiModelProperty(value = "展示区域")
|
||||||
|
private java.lang.String area_id;
|
||||||
|
|
||||||
/**是否查询条件0否 1是*/
|
/**是否查询条件0否 1是*/
|
||||||
@Excel(name = "是否查询条件0否 1是", width = 15, dictTable = "onl_cgform_field", dicText = "is_query", dicCode = "is_query")
|
@Excel(name = "是否查询条件0否 1是", width = 15, dictTable = "onl_cgform_field", dicText = "is_query", dicCode = "is_query")
|
||||||
@Dict(dictTable = "onl_cgform_field", dicText = "is_query", dicCode = "is_query")
|
@Dict(dictTable = "onl_cgform_field", dicText = "is_query", dicCode = "is_query")
|
||||||
|
|||||||
+10
-1
@@ -2,6 +2,7 @@ package com.jero.modules.tag.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -54,12 +55,20 @@ public interface IOnlCgformTagService extends IService<OnlCgformTag> {
|
|||||||
*/
|
*/
|
||||||
OnlCgformTag queryById(String id);
|
OnlCgformTag queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过area_id查询展示区域
|
||||||
|
*
|
||||||
|
* @param area_id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<OnlCgformTag> selectShowAreaById(String area_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OnlCgformTag> queryList();
|
List<OnlCgformTag> queryList(OnlCgformArea onlCgformArea);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同一“所属模块”下的“属性名称”不能重复
|
* 同一“所属模块”下的“属性名称”不能重复
|
||||||
|
|||||||
+20
-2
@@ -1,8 +1,11 @@
|
|||||||
package com.jero.modules.tag.service.impl;
|
package com.jero.modules.tag.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||||
import com.jero.modules.tag.mapper.OnlCgformTagMapper;
|
import com.jero.modules.tag.mapper.OnlCgformTagMapper;
|
||||||
import com.jero.modules.tag.service.IOnlCgformTagService;
|
import com.jero.modules.tag.service.IOnlCgformTagService;
|
||||||
@@ -85,14 +88,29 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
|
|||||||
return getById(id);
|
return getById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过area_id查询展示区域
|
||||||
|
*
|
||||||
|
* @param area_id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<OnlCgformTag> selectShowAreaById(String area_id) {
|
||||||
|
QueryWrapper<OnlCgformTag> queryWrapper=new QueryWrapper<>();
|
||||||
|
queryWrapper.select("show_area").eq("id",area_id);
|
||||||
|
return list(queryWrapper);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OnlCgformTag> queryList() {
|
public List<OnlCgformTag> queryList(OnlCgformArea onlCgformArea) {
|
||||||
return list();
|
UpdateWrapper<OnlCgformTag> updateWrapper=new UpdateWrapper<>();
|
||||||
|
updateWrapper.set("area_id",onlCgformArea.getId());
|
||||||
|
updateWrapper.set("is_model",onlCgformArea.getIsModel());
|
||||||
|
return list(updateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user