编写了数据字典的增删改查
parent
d771ab6505
commit
d5c5d390ed
|
@ -5,12 +5,15 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import com.muyu.source.domain.resp.DictDataResp;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
|
@ -47,4 +50,14 @@ public class DictType extends BaseEntity {
|
|||
*/
|
||||
@Excel(name = "数据源ID")
|
||||
private Integer assetId;
|
||||
|
||||
public DictDataResp toDataDictResp(List<DictData> list) {
|
||||
return DictDataResp.builder()
|
||||
.id(this.getId())
|
||||
.dictName(this.getDictName())
|
||||
.dictType(this.getDictType())
|
||||
.assetId(this.getAssetId())
|
||||
.dictData(list)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package com.muyu.source.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-22-17:28
|
||||
* @ Version:1.0
|
||||
* @ Description:字典类型
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DictTypeReq {
|
||||
/**
|
||||
* 数据源id
|
||||
*/
|
||||
@Schema(type = "Integer",defaultValue = "1",description = "数据源id")
|
||||
private Integer assetId;
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@Schema(type = "String",defaultValue = "字典类型",description = "字典类型")
|
||||
private String dictType;
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.muyu.source.domain.resp;
|
||||
|
||||
import com.muyu.source.domain.DictData;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-22-17:28
|
||||
* @ Version:1.0
|
||||
* @ Description:数据字典
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DictDataResp {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Schema(type = "Long",defaultValue = "主键",description = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
@Schema(type = "String",defaultValue = "字典名称",description = "字典名称")
|
||||
private String dictName;
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@Schema(type = "String",defaultValue = "字典类型",description = "字典类型")
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 数据源编号
|
||||
*/
|
||||
@Schema(type = "String",defaultValue = "数据源编号",description = "数据源编号")
|
||||
private Integer assetId;
|
||||
|
||||
/**
|
||||
* 字典数据集合
|
||||
*/
|
||||
@Schema(type = "List",defaultValue = "字典数据集合",description = "字典数据集合")
|
||||
private List<DictData> dictData;
|
||||
}
|
|
@ -14,12 +14,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-21-19:05
|
||||
* @ Version:1.0
|
||||
* @ Description:数据库结构控制层
|
||||
* @author Lenovo
|
||||
*/
|
||||
@Log4j2
|
||||
@RestController
|
||||
|
@ -32,8 +32,10 @@ public class ChildrenController {
|
|||
|
||||
@Autowired
|
||||
private ChildrenService childrenService;
|
||||
|
||||
/**
|
||||
* 查询数据库结构
|
||||
*
|
||||
* @param id 数据库id
|
||||
* @return 数据库结构
|
||||
*/
|
||||
|
@ -46,6 +48,7 @@ public class ChildrenController {
|
|||
|
||||
/**
|
||||
* 查询单个数据库中表的数量
|
||||
*
|
||||
* @param id 数据库结构ID
|
||||
* @return 资产数据模型数量
|
||||
*/
|
||||
|
|
|
@ -18,12 +18,12 @@ import org.springframework.web.bind.annotation.*;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-20-18:34
|
||||
* @ Version:1.0
|
||||
* @ Description:数据源控制层
|
||||
* @author Lenovo
|
||||
*/
|
||||
@Log4j2
|
||||
@RestController
|
||||
|
@ -43,6 +43,7 @@ public class DataSourceController extends BaseController {
|
|||
|
||||
/**
|
||||
* 根据ID获取数据
|
||||
*
|
||||
* @param id 数据源ID
|
||||
* @return 数据源
|
||||
*/
|
||||
|
@ -55,6 +56,7 @@ public class DataSourceController extends BaseController {
|
|||
|
||||
/**
|
||||
* 查询数据源列表的全部数据
|
||||
*
|
||||
* @param dataSourceQueryReq 数据源
|
||||
* @return 数据源
|
||||
*/
|
||||
|
@ -67,6 +69,7 @@ public class DataSourceController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出数据源
|
||||
*
|
||||
* @param dataSource 数据源
|
||||
* @param response response
|
||||
*/
|
||||
|
@ -80,6 +83,7 @@ public class DataSourceController extends BaseController {
|
|||
|
||||
/**
|
||||
* 获取数据源详细信息
|
||||
*
|
||||
* @param id 数据源ID
|
||||
* @return 数据源详细信息
|
||||
*/
|
||||
|
@ -88,6 +92,7 @@ public class DataSourceController extends BaseController {
|
|||
public Result<DataSource> getById(@PathVariable("id") Long id) {
|
||||
return Result.success(dataSourceService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询表数据总数
|
||||
*
|
||||
|
@ -103,6 +108,7 @@ public class DataSourceController extends BaseController {
|
|||
|
||||
/**
|
||||
* 添加数据源
|
||||
*
|
||||
* @param dataSource 数据源
|
||||
* @return 数据源
|
||||
*/
|
||||
|
@ -115,6 +121,7 @@ public class DataSourceController extends BaseController {
|
|||
|
||||
/**
|
||||
* 修改数据源
|
||||
*
|
||||
* @param dataSource 数据源
|
||||
* @return 数据源
|
||||
*/
|
||||
|
@ -127,6 +134,7 @@ public class DataSourceController extends BaseController {
|
|||
|
||||
/**
|
||||
* 删除数据源
|
||||
*
|
||||
* @param id 数据源
|
||||
* @return 数据源
|
||||
*/
|
||||
|
@ -138,6 +146,4 @@ public class DataSourceController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -26,11 +26,13 @@ public class DictDataController {
|
|||
public DictDataController() {
|
||||
log.info("forest扫描路径:{}", ForestScannerRegister.getBasePackages());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private DictDataService dictDataService;
|
||||
|
||||
/**
|
||||
* 添加字典数据
|
||||
*
|
||||
* @param dictData 数据字典
|
||||
* @return 添加结果
|
||||
*/
|
||||
|
@ -43,6 +45,7 @@ public class DictDataController {
|
|||
|
||||
/**
|
||||
* 修改字典数据
|
||||
*
|
||||
* @param dictData 数据字典
|
||||
* @return 修改结果
|
||||
*/
|
||||
|
@ -55,6 +58,7 @@ public class DictDataController {
|
|||
|
||||
/**
|
||||
* 删除字典数据
|
||||
*
|
||||
* @param id 数据字典ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
package com.muyu.source.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.dtflys.forest.springboot.annotation.ForestScannerRegister;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.source.domain.DictData;
|
||||
import com.muyu.source.domain.DictType;
|
||||
import com.muyu.source.domain.req.DictTypeReq;
|
||||
import com.muyu.source.domain.resp.DictDataResp;
|
||||
import com.muyu.source.service.DictDataService;
|
||||
import com.muyu.source.service.DictTypeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-22-17:21
|
||||
* @ Version:1.0
|
||||
* @ Description:字典类型控制层
|
||||
*/
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/dict_type")
|
||||
public class DictTypeController {
|
||||
public DictTypeController() {
|
||||
log.info("forest扫描路径:{}", ForestScannerRegister.getBasePackages());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private DictDataService dictDataService;
|
||||
@Autowired
|
||||
private DictTypeService dictTypeService;
|
||||
|
||||
/**
|
||||
* 根据字典类型id查询字典数据
|
||||
*
|
||||
* @param id 字典类型id
|
||||
* @return 字典数据
|
||||
*/
|
||||
@GetMapping("/getDictDataList/{id}")
|
||||
@Operation(summary = "查询字典数据", description = "根据字典类型id查询字典数据")
|
||||
public Result<List<DictDataResp>> getDictDataList(@PathVariable("id") Integer id) {
|
||||
List<DictDataResp> dictDataRespList = dictTypeService.getDictDataList(id);
|
||||
return Result.success(dictDataRespList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据对象查询字典数据列表
|
||||
*
|
||||
* @param dictTypeReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getDictData")
|
||||
@Operation(summary = "查询字典数据列表", description = "根据对象查询字典数据列表")
|
||||
public Result getDictData(@RequestBody DictTypeReq dictTypeReq) {
|
||||
List<DictData> dictData = dictTypeService.getDictData(dictTypeReq);
|
||||
return Result.success(dictData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加字典类型
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 添加结果
|
||||
*/
|
||||
@PostMapping("/addDictType")
|
||||
@Operation(summary = "添加字典类型", description = "添加字典类型")
|
||||
public Result addDictType(@RequestBody DictType dictType) {
|
||||
dictTypeService.save(dictType);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典类型
|
||||
*
|
||||
* @param id 字典类型id
|
||||
* @return 删除结果
|
||||
*/
|
||||
@GetMapping("/delDictType/{id}")
|
||||
@Operation(summary = "删除字典类型", description = "根据ID删除字典类型")
|
||||
public Result delDictType(@PathVariable("id") Long id) {
|
||||
// 删除字典类型
|
||||
dictTypeService.removeById(id);
|
||||
// 删除相对应的字典数据
|
||||
dictDataService.remove(new LambdaQueryWrapper<>() {{
|
||||
eq(DictData::getDictTypeId, id);
|
||||
}});
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
|
@ -14,12 +14,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-21-19:51
|
||||
* @ Version:1.0
|
||||
* @ Description:表结构控制层
|
||||
* @author Lenovo
|
||||
*/
|
||||
@Log4j2
|
||||
@RestController
|
||||
|
@ -35,6 +35,7 @@ public class TableDataController {
|
|||
|
||||
/**
|
||||
* 根据id查询表结构
|
||||
*
|
||||
* @param id id
|
||||
* @return 表结构
|
||||
*/
|
||||
|
@ -46,6 +47,7 @@ public class TableDataController {
|
|||
|
||||
/**
|
||||
* 统计出一个表中字段的数量
|
||||
*
|
||||
* @param id 表ID
|
||||
* @return 数量
|
||||
*/
|
||||
|
@ -57,5 +59,4 @@ public class TableDataController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,12 +5,12 @@ import com.muyu.source.domain.Children;
|
|||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-21-19:06
|
||||
* @ Version:1.0
|
||||
* @ Description:数据库结构持久层
|
||||
* @author Lenovo
|
||||
*/
|
||||
@Mapper
|
||||
public interface ChildrenMapper extends BaseMapper<Children> {
|
||||
|
|
|
@ -5,12 +5,12 @@ import com.muyu.source.domain.DataSource;
|
|||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-20-20:03
|
||||
* @ Version:1.0
|
||||
* @ Description:数据源持久层
|
||||
* @author Lenovo
|
||||
*/
|
||||
@Mapper
|
||||
public interface DataSourceMapper extends BaseMapper<DataSource> {
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package com.muyu.source.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.source.domain.DictType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-22-17:23
|
||||
* @ Version:1.0
|
||||
* @ Description:字典类型持久层
|
||||
*/
|
||||
@Mapper
|
||||
public interface DictTypeMapper extends BaseMapper<DictType> {
|
||||
}
|
|
@ -5,12 +5,12 @@ import com.muyu.source.domain.TableData;
|
|||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-21-19:52
|
||||
* @ Version:1.0
|
||||
* @ Description:表结构持久层
|
||||
* @author Lenovo
|
||||
*/
|
||||
@Mapper
|
||||
public interface TableDataMapper extends BaseMapper<TableData> {
|
||||
|
|
|
@ -6,12 +6,12 @@ import com.muyu.source.domain.Children;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-21-19:07
|
||||
* @ Version:1.0
|
||||
* @ Description:数据库结构业务层
|
||||
* @author Lenovo
|
||||
*/
|
||||
public interface ChildrenService extends IService<Children> {
|
||||
|
||||
|
|
|
@ -6,17 +6,18 @@ import com.muyu.source.domain.DataSource;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-20-20:06
|
||||
* @ Version:1.0
|
||||
* @ Description:数据源业务层
|
||||
* @author Lenovo
|
||||
*/
|
||||
public interface DataSourceService extends IService<DataSource> {
|
||||
|
||||
/**
|
||||
* 查询数据源的列表
|
||||
*
|
||||
* @param dataSource 数据源
|
||||
* @return 数据源
|
||||
*/
|
||||
|
|
|
@ -4,12 +4,12 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
import com.muyu.source.domain.DictData;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-22-17:14
|
||||
* @ Version:1.0
|
||||
* @ Description:数据字典业务层
|
||||
* @author Lenovo
|
||||
*/
|
||||
public interface DictDataService extends IService<DictData> {
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package com.muyu.source.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.source.domain.DictData;
|
||||
import com.muyu.source.domain.DictType;
|
||||
import com.muyu.source.domain.req.DictTypeReq;
|
||||
import com.muyu.source.domain.resp.DictDataResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-22-17:24
|
||||
* @ Version:1.0
|
||||
* @ Description:字典类型业务层
|
||||
*/
|
||||
public interface DictTypeService extends IService<DictType> {
|
||||
/**
|
||||
* 根据字典类型id查询字典数据
|
||||
*
|
||||
* @param id 字典类型id
|
||||
* @return 字典数据
|
||||
*/
|
||||
List<DictDataResp> getDictDataList(Integer id);
|
||||
/**
|
||||
* 根据对象查询字典数据列表
|
||||
*
|
||||
* @param dictTypeReq
|
||||
* @return
|
||||
*/
|
||||
|
||||
List<DictData> getDictData(DictTypeReq dictTypeReq);
|
||||
}
|
|
@ -12,12 +12,12 @@ import java.util.stream.IntStream;
|
|||
import java.util.stream.LongStream;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-21-19:08
|
||||
* @ Version:1.0
|
||||
* @ Description:数据库结构业务实现层
|
||||
* @author Lenovo
|
||||
*/
|
||||
@Service
|
||||
public class ChildrenServiceImpl extends ServiceImpl<ChildrenMapper, Children> implements ChildrenService {
|
||||
|
|
|
@ -12,12 +12,12 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-20-20:06
|
||||
* @ Version:1.0
|
||||
* @ Description:数据源业务层
|
||||
* @author Lenovo
|
||||
*/
|
||||
@Service
|
||||
public class DataSourceServiceImpl extends ServiceImpl<DataSourceMapper, DataSource> implements DataSourceService {
|
||||
|
@ -25,6 +25,7 @@ public class DataSourceServiceImpl extends ServiceImpl<DataSourceMapper, DataSou
|
|||
|
||||
/**
|
||||
* 查询数据源的列表
|
||||
*
|
||||
* @param dataSource 数据源
|
||||
* @return 数据源
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
package com.muyu.source.service.Impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.source.domain.DictData;
|
||||
import com.muyu.source.domain.DictType;
|
||||
import com.muyu.source.domain.req.DictTypeReq;
|
||||
import com.muyu.source.domain.resp.DictDataResp;
|
||||
import com.muyu.source.mapper.DictTypeMapper;
|
||||
import com.muyu.source.service.DictDataService;
|
||||
import com.muyu.source.service.DictTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-22-17:24
|
||||
* @ Version:1.0
|
||||
* @ Description:字典类型业务实现层
|
||||
*/
|
||||
@Service
|
||||
public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, DictType> implements DictTypeService {
|
||||
@Autowired
|
||||
private DictDataService dictDataService;
|
||||
/**
|
||||
* 根据字典类型id查询字典数据
|
||||
*
|
||||
* @param id 字典类型id
|
||||
* @return 字典数据
|
||||
*/
|
||||
@Override
|
||||
public List<DictDataResp> getDictDataList(Integer id) {
|
||||
List<DictType> dictTypeList = list(new LambdaQueryWrapper<>() {{
|
||||
eq(DictType::getAssetId, id);
|
||||
}});
|
||||
|
||||
List<DictDataResp> dictDataRespList = dictTypeList.stream().map(dictType -> {
|
||||
List<DictData> dictDataList = dictDataService.list(new LambdaQueryWrapper<>() {{
|
||||
eq(DictData::getDictTypeId, dictType.getId());
|
||||
}});
|
||||
return dictType.toDataDictResp(dictDataList);
|
||||
}).toList();
|
||||
|
||||
return dictDataRespList;
|
||||
}
|
||||
/**
|
||||
* 根据对象查询字典数据列表
|
||||
*
|
||||
* @param dictTypeReq
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DictData> getDictData(DictTypeReq dictTypeReq) {
|
||||
DictType dictType = this.getOne(new LambdaQueryWrapper<>() {{
|
||||
eq(DictType::getAssetId, dictTypeReq.getAssetId());
|
||||
eq(DictType::getDictType, dictTypeReq.getDictType());
|
||||
}});
|
||||
List<DictData> dictData = dictDataService.list(new LambdaQueryWrapper<>() {{
|
||||
eq(DictData::getDictTypeId, dictType.getId());
|
||||
}});
|
||||
return dictData;
|
||||
}
|
||||
}
|
|
@ -7,12 +7,12 @@ import com.muyu.source.service.TableDataService;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-21-19:53
|
||||
* @ Version:1.0
|
||||
* @ Description:表结构业务实现层
|
||||
* @author Lenovo
|
||||
*/
|
||||
@Service
|
||||
public class TableDataServiceImpl extends ServiceImpl<TableDataMapper, TableData> implements TableDataService {
|
||||
|
|
|
@ -4,12 +4,12 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
import com.muyu.source.domain.TableData;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
* @ Author:CHX
|
||||
* @ Date:2024-08-21-19:53
|
||||
* @ Version:1.0
|
||||
* @ Description:表结构业务层
|
||||
* @author Lenovo
|
||||
*/
|
||||
public interface TableDataService extends IService<TableData> {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue