规则通过id查询

master
Qin Dong Ming 2024-08-27 09:59:37 +08:00
parent 39715b910a
commit 9e0f6ca576
13 changed files with 15010 additions and 13919 deletions

View File

@ -8,12 +8,13 @@ import lombok.NoArgsConstructor;
* @Authorqdm
* @Packagecom.muyu.domain
* @Projectcloud-etl-engine
* @nameType
* @nameAA
* @Date2024/8/27 9:46
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Type {
public class EngineType {
private Integer id;
private String name;
}

View File

@ -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>

View File

@ -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, "规则引擎版本");
// }
}

View File

@ -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;

View File

@ -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;
/**
* @Authorqdm
* @Packagecom.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, "规则引擎版本");
}
}

View File

@ -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);
}

View File

@ -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;
/**
* @Authorqdm
* @Packagecom.muyu.service
@ -13,11 +14,11 @@ import java.util.List;
* @Date2024/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);
}

View File

@ -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);
}

View File

@ -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