标签管理-标签项
This commit is contained in:
+28
-28
@@ -7,8 +7,8 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.IOnlCgformFieldService;
|
||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||
import com.jero.modules.tag.service.IOnlCgformTagService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -26,21 +26,21 @@ import java.util.List;
|
||||
/**
|
||||
* @Description: 标签管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-25
|
||||
* @Date: 2022-02-12
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="标签管理")
|
||||
@RestController
|
||||
@RequestMapping("/Field/onlCgformField")
|
||||
@RequestMapping("/tag/onlCgformTag")
|
||||
@Slf4j
|
||||
public class OnlCgformTagController extends JeroController<OnlCgformField, IOnlCgformFieldService> {
|
||||
public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgformTagService> {
|
||||
@Autowired
|
||||
private IOnlCgformFieldService onlCgformFieldService;
|
||||
private IOnlCgformTagService onlCgformTagService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param onlCgformField
|
||||
* @param onlCgformTag
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
@@ -49,13 +49,13 @@ public class OnlCgformTagController extends JeroController<OnlCgformField, IOnlC
|
||||
@AutoLog(value = "标签管理-分页列表查询")
|
||||
@ApiOperation(value="标签管理-分页列表查询", notes="标签管理-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(OnlCgformField onlCgformField,
|
||||
public Result<?> queryPageList(OnlCgformTag onlCgformTag,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<OnlCgformField> queryWrapper = QueryGenerator.initQueryWrapper(onlCgformField, req.getParameterMap());
|
||||
Page<OnlCgformField> page = new Page<OnlCgformField>(pageNo, pageSize);
|
||||
IPage<OnlCgformField> pageList = onlCgformFieldService.page(page, queryWrapper);
|
||||
QueryWrapper<OnlCgformTag> queryWrapper = QueryGenerator.initQueryWrapper(onlCgformTag, req.getParameterMap());
|
||||
Page<OnlCgformTag> page = new Page<OnlCgformTag>(pageNo, pageSize);
|
||||
IPage<OnlCgformTag> pageList = onlCgformTagService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@@ -67,36 +67,36 @@ public class OnlCgformTagController extends JeroController<OnlCgformField, IOnlC
|
||||
@AutoLog(value = "标签管理-列表查询")
|
||||
@ApiOperation(value="标签管理-列表查询", notes="标签管理-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OnlCgformField>> queryList() {
|
||||
List<OnlCgformField> list = onlCgformFieldService.queryList();
|
||||
public Result<List<OnlCgformTag>> queryList() {
|
||||
List<OnlCgformTag> list = onlCgformTagService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param onlCgformField
|
||||
* @param onlCgformTag
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标签管理-添加")
|
||||
@ApiOperation(value="标签管理-添加", notes="标签管理-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OnlCgformField onlCgformField) {
|
||||
onlCgformFieldService.add(onlCgformField);
|
||||
public Result<?> add(@Validated @RequestBody OnlCgformTag onlCgformTag) {
|
||||
onlCgformTagService.add(onlCgformTag);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param onlCgformField
|
||||
* @param onlCgformTag
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标签管理-编辑")
|
||||
@ApiOperation(value="标签管理-编辑", notes="标签管理-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody OnlCgformField onlCgformField) {
|
||||
onlCgformFieldService.editById(onlCgformField);
|
||||
public Result<?> edit(@Validated @RequestBody OnlCgformTag onlCgformTag) {
|
||||
onlCgformTagService.editById(onlCgformTag);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformField, IOnlC
|
||||
@ApiOperation(value="标签管理-通过id删除", notes="标签管理-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
onlCgformFieldService.deleteById(id);
|
||||
onlCgformTagService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformField, IOnlC
|
||||
@ApiOperation(value="标签管理-批量删除", notes="标签管理-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.onlCgformFieldService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
this.onlCgformTagService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
@@ -138,22 +138,22 @@ public class OnlCgformTagController extends JeroController<OnlCgformField, IOnlC
|
||||
@ApiOperation(value="标签管理-通过id查询", notes="标签管理-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
OnlCgformField onlCgformField = onlCgformFieldService.queryById(id);
|
||||
if(onlCgformField==null) {
|
||||
OnlCgformTag onlCgformTag = onlCgformTagService.queryById(id);
|
||||
if(onlCgformTag==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(onlCgformField);
|
||||
return Result.OK(onlCgformTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param onlCgformField
|
||||
* @param onlCgformTag
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, OnlCgformField onlCgformField) {
|
||||
return super.exportXls(request, onlCgformField, OnlCgformField.class, "标签管理");
|
||||
public ModelAndView exportXls(HttpServletRequest request, OnlCgformTag onlCgformTag) {
|
||||
return super.exportXls(request, onlCgformTag, OnlCgformTag.class, "标签管理");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -165,7 +165,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformField, IOnlC
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, OnlCgformField.class);
|
||||
return super.importExcel(request, response, OnlCgformTag.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
package com.jero.modules.tag.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 标签管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-12
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("onl_cgform_tag")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="onl_cgform_tag对象", description="标签管理")
|
||||
public class OnlCgformTag implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**所属模块(1文档库,0文档拆分*/
|
||||
@Excel(name = "所属模块(1文档库,0文档拆分", width = 15, dictTable = "onl_cgform_area", dicText = "所属模块", dicCode = "is_model")
|
||||
@Dict(dictTable = "onl_cgform_area", dicText = "所属模块", dicCode = "is_model")
|
||||
@ApiModelProperty(value = "所属模块(1文档库,0文档拆分")
|
||||
private String isModel;
|
||||
|
||||
/**字段备注*/
|
||||
@Excel(name = "字段备注", width = 15)
|
||||
@ApiModelProperty(value = "字段备注")
|
||||
private String dbFieldTxt;
|
||||
|
||||
/**字段英文名称描述*/
|
||||
@Excel(name = "字段英文名称描述", width = 15)
|
||||
@ApiModelProperty(value = "字段英文名称描述")
|
||||
private String dbFieldName;
|
||||
|
||||
/**表单控件类型*/
|
||||
@Excel(name = "表单控件类型", width = 15, dictTable = "onl_cgform_field", dicText = "属性类型", dicCode = "field_show_type")
|
||||
@Dict(dictTable = "onl_cgform_field", dicText = "属性类型", dicCode = "field_show_type")
|
||||
@ApiModelProperty(value = "表单控件类型")
|
||||
private String fieldShowType;
|
||||
|
||||
/**字典名称*/
|
||||
@Excel(name = "字典名称", width = 15, dictTable = "sys_dict", dicText = "选项内容", dicCode = "dict_name")
|
||||
@Dict(dictTable = "sys_dict", dicText = "选项内容", dicCode = "dict_name")
|
||||
@ApiModelProperty(value = "字典名称")
|
||||
private String dictName;
|
||||
|
||||
/**数据库字段长度*/
|
||||
@Excel(name = "数据库字段长度", width = 15)
|
||||
@ApiModelProperty(value = "数据库字段长度")
|
||||
private Integer dbLength;
|
||||
|
||||
/**排序*/
|
||||
@Excel(name = "排序", width = 15)
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer orderNum;
|
||||
|
||||
/**字段是否必填0否 1是*/
|
||||
@Excel(name = "字段是否必填0否 1是", width = 15, dicCode = "yn")
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "字段是否必填0否 1是")
|
||||
private String fieldMustInput;
|
||||
|
||||
/**表单是否显示0否 1是*/
|
||||
@Excel(name = "表单是否显示0否 1是", width = 15, dicCode = "yn")
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "表单是否显示0否 1是")
|
||||
private Integer isShowForm;
|
||||
|
||||
/**列表是否显示0否 1是*/
|
||||
@Excel(name = "列表是否显示0否 1是", width = 15, dicCode = "yn")
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "列表是否显示0否 1是")
|
||||
private Integer isShowList;
|
||||
|
||||
/**是否是只读(1是 0否)*/
|
||||
@Excel(name = "是否是只读(1是 0否)", width = 15, dicCode = "yn")
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "是否是只读(1是 0否)")
|
||||
private Integer isReadOnly;
|
||||
|
||||
/**展示区域*/
|
||||
@Excel(name = "展示区域", width = 15, dictTable = "onl_cgform_area", dicText = "展示区域", dicCode = "show_area")
|
||||
@Dict(dictTable = "onl_cgform_area", dicText = "展示区域", dicCode = "show_area")
|
||||
@ApiModelProperty(value = "展示区域")
|
||||
private String showArea;
|
||||
|
||||
/**是否查询条件0否 1是*/
|
||||
@Excel(name = "是否查询条件0否 1是", width = 15, dicCode = "yn")
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "是否查询条件0否 1是")
|
||||
private Integer isQuery;
|
||||
|
||||
/**法规清单是否展示0否 1是*/
|
||||
@Excel(name = "法规清单是否展示0否 1是", width = 15, dicCode = "yn")
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "法规清单是否展示0否 1是")
|
||||
private Integer isShowLawsList;
|
||||
|
||||
/**搜索中心是否展示0否 1是*/
|
||||
@Excel(name = "搜索中心是否展示0否 1是", width = 15, dicCode = "yn")
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "搜索中心是否展示0否 1是")
|
||||
private Integer isShowSearch;
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.tag.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 标签管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-12
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface OnlCgformTagMapper extends BaseMapper<OnlCgformTag> {
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.tag.mapper.OnlCgformTagMapper">
|
||||
<resultMap id="OnlCgformTagResultMap" type="com.jero.modules.tag.entity.OnlCgformTag">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="is_model" property="isModel" />
|
||||
<result column="db_field_txt" property="dbFieldTxt" />
|
||||
<result column="db_field_name" property="dbFieldName" />
|
||||
<result column="field_show_type" property="fieldShowType" />
|
||||
<result column="dict_name" property="dictName" />
|
||||
<result column="db_length" property="dbLength" />
|
||||
<result column="order_num" property="orderNum" />
|
||||
<result column="field_must_input" property="fieldMustInput" />
|
||||
<result column="is_show_form" property="isShowForm" />
|
||||
<result column="is_show_list" property="isShowList" />
|
||||
<result column="is_read_only" property="isReadOnly" />
|
||||
<result column="show_area" property="showArea" />
|
||||
<result column="is_query" property="isQuery" />
|
||||
<result column="is_show_laws_list" property="isShowLawsList" />
|
||||
<result column="is_show_search" property="isShowSearch" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.tag.service;
|
||||
|
||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 标签管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-12
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IOnlCgformTagService extends IService<OnlCgformTag> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param onlCgformTag
|
||||
* @return
|
||||
*/
|
||||
void add(OnlCgformTag onlCgformTag);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param onlCgformTag
|
||||
* @return
|
||||
*/
|
||||
void editById(OnlCgformTag onlCgformTag);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
OnlCgformTag queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<OnlCgformTag> queryList();
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.tag.service.impl;
|
||||
|
||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||
import com.jero.modules.tag.mapper.OnlCgformTagMapper;
|
||||
import com.jero.modules.tag.service.IOnlCgformTagService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 标签管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-12
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, OnlCgformTag> implements IOnlCgformTagService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param onlCgformTag
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(OnlCgformTag onlCgformTag) {
|
||||
Date now = new Date();
|
||||
onlCgformTag.setCreateTime(now);
|
||||
onlCgformTag.setUpdateTime(now);
|
||||
save(onlCgformTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param onlCgformTag
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(OnlCgformTag onlCgformTag) {
|
||||
Date now = new Date();
|
||||
onlCgformTag.setUpdateTime(now);
|
||||
saveOrUpdate(onlCgformTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OnlCgformTag queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OnlCgformTag> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
@@ -26,4 +26,4 @@ db_filed_convert=true
|
||||
page_search_filed_num=1
|
||||
#page_filter_fields
|
||||
page_filter_fields=create_time,create_by,update_time,update_by
|
||||
exclude_table=act_,ext_act_,design_,onl_,sys_,qrtz_
|
||||
exclude_table=act_,ext_act_,design_,qrtz_
|
||||
|
||||
Reference in New Issue
Block a user