feat 修改了一些搜索模块
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsDictionary;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
* @since 2021-06-28
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|TsDictionary|")
|
||||
@RequestMapping("/tsDictionaryType/ts-dictionary")
|
||||
public class TsDictionaryController extends BaseController<TsDictionary> {
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsDicType;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
* @since 2021-06-28
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|TsDictype|")
|
||||
@RequestMapping("/tsDictionaryType/ts-dictype")
|
||||
public class TsDictypeController extends BaseController<TsDicType> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.dao;
|
||||
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsDicType;
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsSearchMenu;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
* @since 2021-06-28
|
||||
*/
|
||||
public interface TsDicTypeDao extends BaseMapper<TsDicType> {
|
||||
public List<TsSearchMenu> getSearchMenu();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.dao;
|
||||
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsDictionary;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
* @since 2021-06-28
|
||||
*/
|
||||
public interface TsDictionaryDao extends BaseMapper<TsDictionary> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.entity;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
class MenuType{
|
||||
private String id;
|
||||
private String dicId;
|
||||
private String dicTypeName;
|
||||
private String dicTypeCode;
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
* @since 2021-06-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="TsDicType对象", description="")
|
||||
@TableName("ts_dictype")
|
||||
public class TsDicType extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "数据字典ID")
|
||||
@TableField("DIC_ID")
|
||||
private String dicId;
|
||||
|
||||
@ApiModelProperty(value = "数据内容")
|
||||
@TableField("DIC_TYPE_NAME")
|
||||
private String dicTypeName;
|
||||
|
||||
@ApiModelProperty(value = "数据编码")
|
||||
@TableField("DIC_TYPE_CODE")
|
||||
private String dicTypeCode;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
@TableField("DESCRIBES")
|
||||
private String describes;
|
||||
|
||||
@ApiModelProperty(value = "展示排序")
|
||||
@TableField("SHOW_INDEX")
|
||||
private BigDecimal showIndex;
|
||||
|
||||
@ApiModelProperty(value = "关联的父级ID")
|
||||
@TableField("PARENT_ID")
|
||||
private String parentId;
|
||||
|
||||
@ApiModelProperty(value = "树结构父级ID")
|
||||
@TableField("TREE_PID")
|
||||
private String treePid;
|
||||
|
||||
@ApiModelProperty(value = "冗余字段")
|
||||
@TableField("OTHERS")
|
||||
private String others;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private String validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
private LocalDateTime creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
* @since 2021-06-28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="TsDictionary对象", description="")
|
||||
public class TsDictionary extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "数据字典编码")
|
||||
@TableField("DICTIONARY_CODE")
|
||||
private String dictionaryCode;
|
||||
|
||||
@ApiModelProperty(value = "数据字典名称")
|
||||
@TableField("DICTIONARY_NAME")
|
||||
private String dictionaryName;
|
||||
|
||||
@ApiModelProperty(value = "数据字典排序序号")
|
||||
@TableField("ORDER_NUM")
|
||||
private BigDecimal orderNum;
|
||||
|
||||
@ApiModelProperty(value = "是否启用(0是,1否)")
|
||||
@TableField("ENABLE")
|
||||
private String enable;
|
||||
|
||||
@ApiModelProperty(value = "类型(SEL_OPTION下拉选项,TREE树形结构)")
|
||||
@TableField("DICTION_TYPE")
|
||||
private String dictionType;
|
||||
|
||||
@ApiModelProperty(value = "是否有关联类别(0是,1否)")
|
||||
@TableField("IS_RELATE")
|
||||
private String isRelate;
|
||||
|
||||
@ApiModelProperty(value = "关联类别ID")
|
||||
@TableField("RELATE_DIC_ID")
|
||||
private String relateDicId;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private String validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
private LocalDateTime creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "是否可编辑数据")
|
||||
@TableField("IS_EDIT_DATA")
|
||||
private String isEditData;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TsSearchMenu {
|
||||
|
||||
private String dicId;
|
||||
|
||||
private String dictionaryName;
|
||||
|
||||
private String dictionaryCode;
|
||||
|
||||
public List<MenuType> menuTypes;
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.service;
|
||||
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsDicType;
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsSearchMenu;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
* @since 2021-06-28
|
||||
*/
|
||||
public interface ITsDicTypeService extends IService<TsDicType> {
|
||||
|
||||
public List<TsSearchMenu> getSearchMenu();
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.service;
|
||||
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsDictionary;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
* @since 2021-06-28
|
||||
*/
|
||||
public interface ITsDictionaryService extends IService<TsDictionary> {
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.service.impl;
|
||||
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsDicType;
|
||||
import com.adc.da.slrs.tsDictionaryType.dao.TsDicTypeDao;
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsSearchMenu;
|
||||
import com.adc.da.slrs.tsDictionaryType.service.ITsDicTypeService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
* @since 2021-06-28
|
||||
*/
|
||||
@Service
|
||||
public class TsDicTypeServiceImpl extends ServiceImpl<TsDicTypeDao, TsDicType> implements ITsDicTypeService {
|
||||
|
||||
@Override
|
||||
public List<TsSearchMenu> getSearchMenu() {
|
||||
return getBaseMapper().getSearchMenu();
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.tsDictionaryType.service.impl;
|
||||
|
||||
import com.adc.da.slrs.tsDictionaryType.entity.TsDictionary;
|
||||
import com.adc.da.slrs.tsDictionaryType.dao.TsDictionaryDao;
|
||||
import com.adc.da.slrs.tsDictionaryType.service.ITsDictionaryService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
* @since 2021-06-28
|
||||
*/
|
||||
@Service
|
||||
public class TsDictionaryServiceImpl extends ServiceImpl<TsDictionaryDao, TsDictionary> implements ITsDictionaryService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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.adc.da.slrs.tsDictionaryType.dao.TsDicTypeDao">
|
||||
|
||||
<resultMap id="searchMenu" type="com.adc.da.slrs.tsDictionaryType.entity.TsSearchMenu">
|
||||
<id property="dicId" column="id"/>
|
||||
<result property="dictionaryCode" column="dictionary_code"/>
|
||||
<result property="dictionaryName" column="dictionary_name"/>
|
||||
<collection property="menuTypes" javaType="list" ofType="com.adc.da.slrs.tsDictionaryType.entity.MenuType">
|
||||
<id property="id" column="type_id"/>
|
||||
<result property="dicId" column="id"/>
|
||||
<result property="dicTypeName" column="type_name"/>
|
||||
<result property="dicTypeCode" column="type_code"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<select id="getSearchMenu" resultMap="searchMenu">
|
||||
select t_d.ID as id,
|
||||
t_d.DICTIONARY_CODE as dictionary_code,
|
||||
t_d.DICTIONARY_NAME as dictionary_name,
|
||||
t_d_t.ID as type_id,
|
||||
t_d_t.DIC_TYPE_NAME as type_name,
|
||||
t_d_t.DIC_TYPE_CODE as type_code
|
||||
from ts_dictionary as t_d left join ts_dictype as t_d_t on t_d.ID=t_d_t.DIC_ID
|
||||
where
|
||||
t_d.ENABLE=0 and
|
||||
t_d.DICTION_TYPE='SEL_OPTION' and
|
||||
t_d_t.DIC_ID is not null and
|
||||
t_d_t.DIC_TYPE_NAME is not null and
|
||||
t_d.DICTIONARY_NAME is not null
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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.adc.da.slrs.tsDictionaryType.dao.TsDictionaryDao">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user