规则通过id查询
parent
39715b910a
commit
9e0f6ca576
|
@ -8,12 +8,13 @@ import lombok.NoArgsConstructor;
|
||||||
* @Author:qdm
|
* @Author:qdm
|
||||||
* @Package:com.muyu.domain
|
* @Package:com.muyu.domain
|
||||||
* @Project:cloud-etl-engine
|
* @Project:cloud-etl-engine
|
||||||
* @name:Type
|
* @name:AA
|
||||||
|
* @Date:2024/8/27 9:46
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class Type {
|
public class EngineType {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private String name;
|
private String name;
|
||||||
}
|
}
|
|
@ -88,12 +88,16 @@
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
||||||
|
|
||||||
<finalName>cloud-engine</finalName>
|
<finalName>cloud-engine</finalName>
|
||||||
|
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<version>3.2.6</version>
|
<version>2.5.6</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
|
|
@ -76,13 +76,13 @@ public class EngineLevelController {
|
||||||
return engineLevelService.selectById(id);
|
return engineLevelService.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 导出
|
// * 导出
|
||||||
*/
|
// */
|
||||||
@PostMapping("/export")
|
// @PostMapping("/export")
|
||||||
public void export(HttpServletResponse httpServletResponse, EngineLevelEntity engineLevelEntity) {
|
// public void export(HttpServletResponse httpServletResponse, EngineLevelEntity engineLevelEntity) {
|
||||||
List<EngineLevelEntity> list = engineLevelService.list();
|
// List<EngineLevelEntity> list = engineLevelService.list();
|
||||||
ExcelUtil<EngineLevelEntity> engineMaintenanceExcelUtil = new ExcelUtil<>(EngineLevelEntity.class);
|
// ExcelUtil<EngineLevelEntity> engineMaintenanceExcelUtil = new ExcelUtil<>(EngineLevelEntity.class);
|
||||||
engineMaintenanceExcelUtil.exportExcel(httpServletResponse, list, "规则引擎版本");
|
// engineMaintenanceExcelUtil.exportExcel(httpServletResponse, list, "规则引擎版本");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||||
import com.muyu.domain.EngineVersion;
|
import com.muyu.domain.EngineVersion;
|
||||||
import com.muyu.domain.Type;
|
|
||||||
import com.muyu.domain.model.TestData;
|
import com.muyu.domain.model.TestData;
|
||||||
import com.muyu.req.EngineVersionQueryReq;
|
import com.muyu.req.EngineVersionQueryReq;
|
||||||
import com.muyu.req.VersionClassCreateReq;
|
import com.muyu.req.VersionClassCreateReq;
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
package com.muyu.controller;
|
package com.muyu.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||||
import com.muyu.domain.EngineLevelEntity;
|
import com.muyu.domain.EngineType;
|
||||||
import com.muyu.domain.constants.Result;
|
import com.muyu.domain.constants.Result;
|
||||||
import com.muyu.domain.Type;
|
|
||||||
import com.muyu.service.TypeService;
|
import com.muyu.service.TypeService;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -11,6 +10,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author:qdm
|
* @Author:qdm
|
||||||
* @Package:com.muyu.controller
|
* @Package:com.muyu.controller
|
||||||
|
@ -30,7 +30,7 @@ public class TypeController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public List<Type> list() {
|
public List<EngineType> list() {
|
||||||
return typeService.list();
|
return typeService.list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public class TypeController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public Result add(@RequestBody Type type) {
|
public Result add(@RequestBody EngineType type) {
|
||||||
return typeService.add(type);
|
return typeService.add(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public class TypeController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public Result upadte(@RequestBody Type type) {
|
public Result upadte(@RequestBody EngineType type) {
|
||||||
return typeService.update(type);
|
return typeService.update(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,9 +71,9 @@ public class TypeController {
|
||||||
* 导出
|
* 导出
|
||||||
*/
|
*/
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse httpServletResponse, Type type) {
|
public void export(HttpServletResponse httpServletResponse, EngineType type) {
|
||||||
List<Type> list = typeService.list();
|
List<EngineType> list = typeService.list();
|
||||||
ExcelUtil<Type> engineMaintenanceExcelUtil = new ExcelUtil<>(Type.class);
|
ExcelUtil<EngineType> engineMaintenanceExcelUtil = new ExcelUtil<>(EngineType.class);
|
||||||
engineMaintenanceExcelUtil.exportExcel(httpServletResponse, list, "规则引擎版本");
|
engineMaintenanceExcelUtil.exportExcel(httpServletResponse, list, "规则引擎版本");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.muyu.mapper;
|
package com.muyu.mapper;
|
||||||
|
|
||||||
import com.muyu.domain.Type;
|
import com.muyu.domain.EngineType;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
@ -16,11 +16,11 @@ import java.util.List;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface TypseMapper {
|
public interface TypseMapper {
|
||||||
|
|
||||||
List<Type> list();
|
List<EngineType> list();
|
||||||
|
|
||||||
Integer add(Type type);
|
Integer add(EngineType type);
|
||||||
|
|
||||||
Integer update(Type type);
|
Integer update(EngineType type);
|
||||||
|
|
||||||
Integer delete(@Param("id") Integer id);
|
Integer delete(@Param("id") Integer id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package com.muyu.service;
|
package com.muyu.service;
|
||||||
|
|
||||||
|
import com.muyu.domain.EngineType;
|
||||||
import com.muyu.domain.constants.Result;
|
import com.muyu.domain.constants.Result;
|
||||||
import com.muyu.domain.Type;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author:qdm
|
* @Author:qdm
|
||||||
* @Package:com.muyu.service
|
* @Package:com.muyu.service
|
||||||
|
@ -13,11 +14,11 @@ import java.util.List;
|
||||||
* @Date:2024/8/23 22:35
|
* @Date:2024/8/23 22:35
|
||||||
*/
|
*/
|
||||||
public interface TypeService {
|
public interface TypeService {
|
||||||
List<Type> list();
|
List<EngineType> list();
|
||||||
|
|
||||||
Result add(Type type);
|
Result add(EngineType type);
|
||||||
|
|
||||||
Result update(Type type);
|
Result update(EngineType type);
|
||||||
|
|
||||||
Result delete(Integer id);
|
Result delete(Integer id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.muyu.service.serviceImpl;
|
package com.muyu.service.serviceImpl;
|
||||||
|
|
||||||
|
import com.muyu.domain.EngineType;
|
||||||
import com.muyu.domain.constants.Result;
|
import com.muyu.domain.constants.Result;
|
||||||
import com.muyu.domain.Type;
|
|
||||||
import com.muyu.mapper.TypseMapper;
|
import com.muyu.mapper.TypseMapper;
|
||||||
import com.muyu.service.TypeService;
|
import com.muyu.service.TypeService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -22,19 +22,19 @@ public class TypeServiceImpl implements TypeService {
|
||||||
TypseMapper typseMapper;
|
TypseMapper typseMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Type> list() {
|
public List<EngineType> list() {
|
||||||
List<Type> list = typseMapper.list();
|
List<EngineType> list = typseMapper.list();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result add(Type type) {
|
public Result add(EngineType type) {
|
||||||
Integer res = typseMapper.add(type);
|
Integer res = typseMapper.add(type);
|
||||||
return Result.success(res);
|
return Result.success(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result update(Type type) {
|
public Result update(EngineType type) {
|
||||||
Integer res = typseMapper.update(type);
|
Integer res = typseMapper.update(type);
|
||||||
return Result.success(res);
|
return Result.success(res);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
from t_type
|
from t_type
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
<select id="list" resultType="com.muyu.domain.Type">
|
<select id="list" resultType="com.muyu.domain.EngineType">
|
||||||
select *
|
select *
|
||||||
from t_type
|
from t_type
|
||||||
</select>
|
</select>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue