修改字段类型
parent
ee584a1a6f
commit
61a2320a4e
|
@ -43,9 +43,6 @@ public class EngIneController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/getMaintenanceList")
|
||||
public Result<PageResult<EngineMaintenance>> getMaintenanceList(@RequestBody EngineMaintenanceQueryReq engineMaintenanceQueryReq) {
|
||||
//使用mabits-plus-plus的查询方法
|
||||
// engineMaintenanceQueryReq.setPageNum(engineMaintenanceQueryReq.getPageNum());
|
||||
// engineMaintenanceQueryReq.setPageSize(engineMaintenanceQueryReq.getPageSize());
|
||||
return engIneService.getMaintenanceList(engineMaintenanceQueryReq);
|
||||
}
|
||||
|
||||
|
@ -57,8 +54,6 @@ public class EngIneController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/delete/{id}")
|
||||
public Integer remove(@PathVariable Long id) {
|
||||
//使用mabits-plusplus的删除方法
|
||||
// engIneService.delete(id);
|
||||
return engIneService.deletes(id);
|
||||
}
|
||||
|
||||
|
@ -83,10 +78,8 @@ public class EngIneController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/insert")
|
||||
public Boolean insert(@RequestBody EngineMaintenance engineMaintenance) {
|
||||
//使用mabits-plus-plus的添加方法
|
||||
Boolean b = engIneService.save(engineMaintenance);
|
||||
return b;
|
||||
// return engIneService.add(engineMaintenance);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -94,8 +87,6 @@ public class EngIneController extends BaseController {
|
|||
*/
|
||||
@PutMapping("/getRuleEngineInfo/{id}")
|
||||
public Result getRuleEngineInfo(@PathVariable(name = "id") Long id) {
|
||||
//使用mabits-plus-plus的查询方法
|
||||
// engIneService.getRuleEngineInfo(id);
|
||||
EngineVersionListResp engineConfigListResp = engIneService.getRuleEngineInfo(id);
|
||||
return Result.success(engineConfigListResp);
|
||||
}
|
||||
|
@ -115,8 +106,6 @@ public class EngIneController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/closeEngine/{id}")
|
||||
public Result closeEngine(@PathVariable Integer id) {
|
||||
//使用mybatis-plus的关闭方法
|
||||
// engIneService.closeEngine(id);
|
||||
engIneService.closeEngine(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
@ -126,8 +115,6 @@ public class EngIneController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/activateEngine/{id}")
|
||||
public Result activateEngine(@PathVariable Integer id) {
|
||||
//使用mybatis-plus的激活方法
|
||||
// engIneService.activateEngine(id);
|
||||
engIneService.activateEngine(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
@ -140,11 +127,6 @@ public class EngIneController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/findById/{id}")
|
||||
public Result findById(@PathVariable Long id) {
|
||||
//使用mybatis-plus的查询方法
|
||||
//List<EngineMaintenance> list = engIneService.list();
|
||||
//List<EngineMaintenance> list = engIneService.list(new LambdaQueryWrapper<>() {{
|
||||
// eq(EngineMaintenance::getId, id);
|
||||
//}});
|
||||
List<EngineMaintenance> list = engIneService.list(new LambdaQueryWrapper<>() {{
|
||||
eq(EngineMaintenance::getId, id);
|
||||
}});
|
||||
|
@ -159,8 +141,6 @@ public class EngIneController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/findByIdsfindByIds/{id}")
|
||||
public Result findVersionByIds(@PathVariable("id") Long id) {
|
||||
//使用mybatis-plus的查询方法
|
||||
// return Result.success(engineVersionService.getByIds(id));
|
||||
return Result.success(engineVersionService.list(new LambdaQueryWrapper<>() {{
|
||||
eq(EngineVersion::getEngineMaintenanceId, id);
|
||||
}}));
|
||||
|
@ -171,10 +151,6 @@ public class EngIneController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/selectEngineById/{versionId}")
|
||||
public List<EngineMaintenance> selectEngineById(@PathVariable Integer versionId) {
|
||||
//使用mybatis-plus的查询方法
|
||||
// List<EngineMaintenance> engineMaintenances = engIneService.list(new LambdaQueryWrapper<>() {{
|
||||
// eq(EngineMaintenance::getVersionId, versionId);
|
||||
// }});
|
||||
List<EngineMaintenance> engineMaintenances = engineVersionService.getByIds(versionId);
|
||||
return engineMaintenances;
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@ public class EngineLevelController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/selectLevelList")
|
||||
public List<EngineLevelEntity> selectLevelList() {
|
||||
//使用mybatis-plus查询
|
||||
// List<EngineLevelEntity> lists = engineLevelService.selectLevelList();
|
||||
return engineLevelService.selectLevelLists();
|
||||
}
|
||||
|
||||
|
@ -31,8 +29,6 @@ public class EngineLevelController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/insert")
|
||||
public Result<EngineLevelEntity> insert(EngineLevelEntity engineLevelEntity) {
|
||||
//使用mybatis-plus新增
|
||||
// engineLevelService.insert(engineLevelEntity);
|
||||
return engineLevelService.insert(engineLevelEntity);
|
||||
}
|
||||
|
||||
|
@ -41,8 +37,6 @@ public class EngineLevelController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/update")
|
||||
public Result<EngineLevelEntity> update(EngineLevelEntity engineLevelEntity) {
|
||||
//使用mybatis-plus修改
|
||||
// engineLevelService.update(engineLevelEntity);
|
||||
return engineLevelService.update(engineLevelEntity);
|
||||
}
|
||||
|
||||
|
@ -51,8 +45,6 @@ public class EngineLevelController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/delete/{id}")
|
||||
public Result delete(@PathVariable Integer id) {
|
||||
//使用mybatis-plus删除
|
||||
// return engineLevelService.delete(id);
|
||||
return engineLevelService.delete(id);
|
||||
}
|
||||
|
||||
|
@ -61,8 +53,6 @@ public class EngineLevelController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/deleteBatch")
|
||||
public Result deleteBatch(@RequestParam("id") Integer[] ids) {
|
||||
//使用mybatis-plus批量删除
|
||||
// return engineLevelService.deleteBatch(ids);
|
||||
return engineLevelService.deleteBatch(ids);
|
||||
}
|
||||
|
||||
|
@ -71,8 +61,6 @@ public class EngineLevelController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/selectById/{id}")
|
||||
public Result selectById(@PathVariable Integer id) {
|
||||
//使用mybatis-plus回显
|
||||
// return engineLevelService.selectById(id);
|
||||
return engineLevelService.selectById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,8 +47,6 @@ public class EngineVersionController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/selectVersionList")
|
||||
public Result<List<EngineVersion>> selectVersionList() {
|
||||
//使用mybatis-plus 查询所有
|
||||
// return Result.success(engineVersionService.list());
|
||||
return Result.success(engineVersionService.list());
|
||||
}
|
||||
|
||||
|
@ -60,8 +58,6 @@ public class EngineVersionController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/insert")
|
||||
public Result<EngineVersion> insert(@RequestBody EngineVersion engineVersion) {
|
||||
//使用mybatis-plus 添加
|
||||
// engineVersionService.save(engineVersion);
|
||||
return engineVersionService.add(engineVersion);
|
||||
}
|
||||
|
||||
|
@ -73,8 +69,6 @@ public class EngineVersionController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/update")
|
||||
public EngineVersion update(@RequestBody EngineVersion engineVersion) {
|
||||
//使用mybatis-plus 修改
|
||||
// engineVersionService.updateById(engineVersion);
|
||||
return engineVersionService.updateMsg(engineVersion);
|
||||
}
|
||||
|
||||
|
@ -86,8 +80,6 @@ public class EngineVersionController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/delete/{id}")
|
||||
public Result delete(@PathVariable Long id) {
|
||||
//使用mybatis-plus 删除
|
||||
// engineVersionService.removeById(id);
|
||||
boolean b = engineVersionService.removeById(id);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
@ -109,8 +101,6 @@ public class EngineVersionController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/getScopeList")
|
||||
public Result<List<EngineConfigScopeResp>> getScopeList() {
|
||||
//使用mybatis-plus 查询
|
||||
//return Result.success(engineVersionService.getScopeList());
|
||||
return Result.success(engineVersionService.getScopeList());
|
||||
}
|
||||
|
||||
|
@ -120,8 +110,6 @@ public class EngineVersionController extends BaseController {
|
|||
@RequiresPermissions("rule-engine:version:list")
|
||||
@GetMapping("/getScopeInfo/{id}")
|
||||
public Result<EngineConfigScopeResp> getScopeInfoById(@PathVariable Integer id) {
|
||||
//使用mybatis-plus 查询
|
||||
//return Result.success(engineVersionService.getScopeInfoById(id));
|
||||
return Result.success(engineVersionService.getScopeInfoById(id));
|
||||
}
|
||||
|
||||
|
@ -130,8 +118,6 @@ public class EngineVersionController extends BaseController {
|
|||
*/
|
||||
@PostMapping(value = "/test")
|
||||
public Result<Object> ruleTest(@RequestBody TestData testData) {
|
||||
//使用mybatis-plus 测试
|
||||
// testData.setId(1L);
|
||||
return Result.success(engineVersionService.ruleTest(testData));
|
||||
}
|
||||
|
||||
|
@ -162,8 +148,6 @@ public class EngineVersionController extends BaseController {
|
|||
*/
|
||||
@PostMapping("/selectListById/{id}")
|
||||
public Result selectListById(@PathVariable Long id) {
|
||||
//使用mybatis-plus 查询
|
||||
// return Result.success(engineVersionService.getByIds(id));
|
||||
return Result.success(engineVersionService.getById(id));
|
||||
}
|
||||
|
||||
|
@ -211,7 +195,6 @@ public class EngineVersionController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/getVersionById/{id}")
|
||||
public Result getVersionById(@PathVariable("id") Long id) {
|
||||
//使用mybatis-plus查询
|
||||
return Result.success(engineVersionService.getById(id));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,13 +29,8 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.service.serviceImpl
|
||||
* @Project:cloud-etl-engine
|
||||
* @name:EngineVersionServiceImpl
|
||||
* @Date:2024/8/22 22:17
|
||||
*/
|
||||
import static java.nio.file.Paths.*;
|
||||
|
||||
@Service
|
||||
public class EngineVersionServiceImpl extends ServiceImpl<EngineVersionMapper, EngineVersion> implements EngineVersionService {
|
||||
|
||||
|
@ -44,21 +39,29 @@ public class EngineVersionServiceImpl extends ServiceImpl<EngineVersionMapper, E
|
|||
|
||||
@Override
|
||||
public List<EngineVersion> list(EngineVersion engineConfig) {
|
||||
|
||||
LambdaQueryWrapper<EngineVersion> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
if (StringUtils.isNotNull(engineConfig.getVersionCode())) {
|
||||
|
||||
queryWrapper.eq(EngineVersion::getVersionCode, engineConfig.getVersionCode());
|
||||
|
||||
}
|
||||
|
||||
if (StringUtils.isNotNull(engineConfig.getRuleContent())) {
|
||||
|
||||
queryWrapper.eq(EngineVersion::getRuleContent, engineConfig.getRuleContent());
|
||||
|
||||
}
|
||||
|
||||
if (StringUtils.isNotNull(engineConfig.getEngineMaintenanceId())) {
|
||||
|
||||
queryWrapper.eq(EngineVersion::getEngineMaintenanceId, engineConfig.getEngineMaintenanceId());
|
||||
|
||||
}
|
||||
|
||||
return list(queryWrapper);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -78,45 +81,46 @@ public class EngineVersionServiceImpl extends ServiceImpl<EngineVersionMapper, E
|
|||
|
||||
@Override
|
||||
public List<EngineConfigScopeResp> getScopeList() {
|
||||
List<EngineConfigScopeResp> list = new ArrayList<>();
|
||||
try {
|
||||
int i = 0;
|
||||
for (String scope : ConfigCodeConstants.CONFIG_FILE_NAME_ARRAY) {
|
||||
if (i == 0) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
String path = ConfigCodeConstants.BASE_FILE_PATH + scope;
|
||||
String code = Files.readString(Paths.get(path));
|
||||
String type = ConfigCodeConstants.CONFIG_FILE_TYPE_ARRAY[i++];
|
||||
list.add(EngineConfigScopeResp.builder()
|
||||
.type(type)
|
||||
.name(scope)
|
||||
.code(code)
|
||||
.build());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return list;
|
||||
// List<EngineConfigScopeResp> list = new ArrayList<>();
|
||||
// try {
|
||||
// int i = 0;
|
||||
// for (String scope : ConfigCodeConstants.CONFIG_FILE_NAME_ARRAY) {
|
||||
// if (i == 0) {
|
||||
// i++;
|
||||
// continue;
|
||||
// }
|
||||
// String path = ConfigCodeConstants.BASE_FILE_PATH + scope;
|
||||
// String code = Files.readAttributes(Paths.get(path));
|
||||
// String type = ConfigCodeConstants.CONFIG_FILE_TYPE_ARRAY[i++];
|
||||
// list.add(EngineConfigScopeResp.builder()
|
||||
// .type(type)
|
||||
// .name(scope)
|
||||
// .code(code)
|
||||
// .build());
|
||||
// }
|
||||
// } catch (IOException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EngineConfigScopeResp getScopeInfoById(Integer id) {
|
||||
String scope = ConfigCodeConstants.CONFIG_FILE_NAME_ARRAY[id];
|
||||
String type = ConfigCodeConstants.CONFIG_FILE_TYPE_ARRAY[id];
|
||||
String path = ConfigCodeConstants.BASE_FILE_PATH + scope;
|
||||
String code = null;
|
||||
try {
|
||||
code = Files.readString(Paths.get(path));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return EngineConfigScopeResp.builder()
|
||||
.type(type)
|
||||
.name(scope)
|
||||
.code(code)
|
||||
.build();
|
||||
// String scope = ConfigCodeConstants.CONFIG_FILE_NAME_ARRAY[id];
|
||||
// String type = ConfigCodeConstants.CONFIG_FILE_TYPE_ARRAY[id];
|
||||
// String path = ConfigCodeConstants.BASE_FILE_PATH + scope;
|
||||
// String code = null;
|
||||
// try {
|
||||
// code = Files.readString(get(path));
|
||||
// } catch (IOException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// return EngineConfigScopeResp.builder()
|
||||
// .type(type)
|
||||
// .name(scope)
|
||||
// .code(code)
|
||||
// .build();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[.ShellClassInfo]
|
||||
IconResource=C:\WINDOWS\System32\SHELL32.dll,77
|
||||
[ViewState]
|
||||
Mode=
|
||||
Vid=
|
||||
FolderType=Generic
|
Loading…
Reference in New Issue