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