--8--24
parent
d93674a8a6
commit
9e7a2ef147
|
@ -0,0 +1,20 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.domain
|
||||
* @Project:cloud-etl-engine
|
||||
* @name:Type
|
||||
* @Date:2024/8/23 22:34
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Type {
|
||||
private Integer id;
|
||||
private String name;
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.muyu.domain.constants;
|
||||
|
||||
/**
|
||||
* 配置编码常量
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/7 星期二
|
||||
*/
|
||||
public class ConfigCodeConstants {
|
||||
/**
|
||||
* 文件基础路径
|
||||
*/
|
||||
public final static String BASE_FILE_PATH = "D:\\work\\cloud-server\\muyu-modules\\muyu-rule-engine\\muyu-rule-engine-common\\src\\main\\java\\com\\muyu\\ruleEngine\\context\\";
|
||||
|
||||
/**
|
||||
* 配置文件名
|
||||
*/
|
||||
public final static String[] CONFIG_FILE_NAME_ARRAY = new String[]{"TestClass.txt", "TaskContextHolder.java", "DataSetContextHolder.java", "RecordContextHolder.java", "DataModelContextHolder.java"};
|
||||
|
||||
/**
|
||||
* 配置文件类型
|
||||
*/
|
||||
public final static String[] CONFIG_FILE_TYPE_ARRAY = new String[]{"测试模版", "任务", "数据集", "资产记录", "资产模型"};
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.muyu.domain.constants;
|
||||
|
||||
/**
|
||||
* 引擎版本常量
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/8 星期三
|
||||
*/
|
||||
public class EngineVersionConstants {
|
||||
|
||||
/**
|
||||
* 作用域引擎
|
||||
*/
|
||||
public final static String[] ENGINE = new String[]{"TaskEngine", "DataSetEngine", "RecordEngine", "DataModelEngine"};
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.muyu.domain.constants;
|
||||
|
||||
/**
|
||||
* 规则运行常量
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/7 星期二
|
||||
*/
|
||||
public class RuleOperationConstants {
|
||||
/**
|
||||
* 运行类型
|
||||
*/
|
||||
public final static String CLASS_NAME = "TestClass";
|
||||
|
||||
/**
|
||||
* 文件后缀
|
||||
*/
|
||||
public final static String FILE_SUFFIX = ".java";
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.muyu.domain.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试数据
|
||||
* @ClassName TestData
|
||||
* @author CHX
|
||||
* @Date 2024/5/3 16:13
|
||||
*/
|
||||
@Data
|
||||
public class TestData {
|
||||
/**
|
||||
* 引擎配置编号
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 测试数据集合
|
||||
*/
|
||||
private List<String> list;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.muyu.resp;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 规则引擎
|
||||
* @ClassName RuleEngineScopeResp
|
||||
* @author CHX
|
||||
* @Date 2024/5/2 15:05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
public class EngineConfigScopeResp implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 类型 */
|
||||
private String type;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 代码 */
|
||||
private String code;
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package com.muyu.resp;
|
||||
import com.muyu.domain.EngineVersion;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 引擎版本列表
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/7 星期二
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EngineVersionListResp {
|
||||
/** 编号 */
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 类型 */
|
||||
private Integer type;
|
||||
|
||||
/** 作用域 */
|
||||
private Integer scope;
|
||||
|
||||
/** 引擎编码 */
|
||||
private String engineCode;
|
||||
|
||||
/** 是否激活 */
|
||||
private String isActivate;
|
||||
|
||||
/** 状态 */
|
||||
private String status;
|
||||
|
||||
/** 描述 */
|
||||
private String description;
|
||||
|
||||
/** 规则引擎版本列表 */
|
||||
private List<EngineVersion> engineVersionList;
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package com.muyu.resp;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 引擎版本类创建
|
||||
*
|
||||
* @author CHX
|
||||
* on 2024/5/7 星期二
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class VersionClassCreateResp {
|
||||
/**
|
||||
* 版本类名
|
||||
*/
|
||||
private String versionClass;
|
||||
|
||||
/**
|
||||
* 规则内容
|
||||
*/
|
||||
private String ruleContent;
|
||||
}
|
|
@ -101,6 +101,10 @@
|
|||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
|
||||
|
||||
|
||||
</plugin>
|
||||
<!-- 加入maven deploy插件,当在deploy时,忽略些model-->
|
||||
<plugin>
|
||||
|
@ -110,6 +114,19 @@
|
|||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version> <!-- 确保使用支持该特性的版本 -->
|
||||
<configuration>
|
||||
<source>16</source>
|
||||
<target>16</target>
|
||||
<compilerArgs>
|
||||
<arg>-parameters</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class EngIneController extends BaseController {
|
|||
|
||||
|
||||
@PostMapping("/delete/{id}")
|
||||
public Integer remove(@PathVariable Integer id) {
|
||||
public Integer remove(@PathVariable Long id) {
|
||||
return engIneService.deletes(id);
|
||||
}
|
||||
|
||||
|
@ -52,11 +52,6 @@ public class EngIneController extends BaseController {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询规则引擎版本列表
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,11 @@ package com.muyu.controller;
|
|||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.domain.EngineVersion;
|
||||
import com.muyu.domain.model.TestData;
|
||||
import com.muyu.req.EngineVersionQueryReq;
|
||||
import com.muyu.resp.EngineConfigScopeResp;
|
||||
import com.muyu.service.EngineVersionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -40,9 +43,8 @@ public class EngineVersionController {
|
|||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
public Result<EngineVersion> update(EngineVersion engineVersion) {
|
||||
EngineVersion update = engineVersionService.updateMsg(engineVersion);
|
||||
return Result.success(update);
|
||||
public EngineVersion update(@RequestBody EngineVersion engineVersion) {
|
||||
return engineVersionService.updateMsg(engineVersion);
|
||||
}
|
||||
|
||||
@PostMapping("/delete/{id}")
|
||||
|
@ -50,4 +52,73 @@ public class EngineVersionController {
|
|||
boolean b = engineVersionService.removeById(id);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
@GetMapping("/getVersion/{id}")
|
||||
public Result<EngineVersion> getVersion(@PathVariable("id") Long id) {
|
||||
EngineVersion engineVersion = engineVersionService.getById(id);
|
||||
return Result.success(engineVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取引擎配置作用域列表
|
||||
*/
|
||||
@RequiresPermissions("rule-engine:version:list")
|
||||
@GetMapping("/getScopeList")
|
||||
public Result<List<EngineConfigScopeResp>> getScopeList() {
|
||||
return Result.success(engineVersionService.getScopeList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过引擎作用域编号获取引擎配置作用域信息
|
||||
*/
|
||||
@RequiresPermissions("rule-engine:version:list")
|
||||
@GetMapping("/getScopeInfo/{id}")
|
||||
public Result<EngineConfigScopeResp> getScopeInfoById(@PathVariable Integer id) {
|
||||
return Result.success(engineVersionService.getScopeInfoById(id));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 测试引擎规则配置
|
||||
// */
|
||||
// @RequiresPermissions("rule-engine:version:add")
|
||||
// @PostMapping(value = "/test")
|
||||
// public Result<Object> ruleTest(@RequestBody TestData testData) {
|
||||
// return Result.success(engineVersionService.ruleTest(testData));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增引擎规则配置
|
||||
// */
|
||||
// @RequiresPermissions("rule-engine:version:add")
|
||||
// @PostMapping
|
||||
// public Result<String> add(@RequestBody EngineVersionSaveReq engineConfigSaveReq) {
|
||||
// return toAjax(engineVersionService.save(EngineVersion.saveBuild(engineConfigSaveReq, SecurityUtils::getUsername)));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改引擎规则配置
|
||||
// */
|
||||
// @RequiresPermissions("rule-engine:version:edit")
|
||||
// @PutMapping("/{id}")
|
||||
// public Result<String> edit(@PathVariable Long id, @RequestBody EngineVersionEditReq engineConfigEditReq) {
|
||||
// return toAjax(engineVersionService.updateById(EngineVersion.editBuild(id,engineConfigEditReq, SecurityUtils::getUsername)));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除引擎规则配置
|
||||
// */
|
||||
// @RequiresPermissions("rule-engine:version:remove")
|
||||
// @DeleteMapping("/{ids}")
|
||||
// public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
// return toAjax(engineVersionService.removeBatchByIds(ids));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 创建代码版本类名和代码模板
|
||||
// */
|
||||
// @PostMapping("/createVersionClass")
|
||||
// public Result<VersionClassCreateResp> createVersionClass(@RequestBody VersionClassCreateReq req) {
|
||||
// VersionClassCreateResp versionClassCreateResp = engineVersionService.createVersionClass(req);
|
||||
// return Result.success(versionClassCreateResp);
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
package com.muyu.controller;
|
||||
|
||||
import com.muyu.domain.Result;
|
||||
import com.muyu.domain.Type;
|
||||
import com.muyu.service.TypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.controller
|
||||
* @Project:cloud-etl-engine
|
||||
* @name:TypeController
|
||||
* @Date:2024/8/23 22:35
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/type")
|
||||
public class TypeController {
|
||||
@Autowired
|
||||
TypeService typeService;
|
||||
|
||||
/**
|
||||
* 类型列表
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public List<Type> list(){
|
||||
return typeService.list();
|
||||
}
|
||||
|
||||
/**
|
||||
* 类型添加
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public Result add(@RequestBody Type type){
|
||||
return typeService.add(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改类型
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
public Result upadte(@RequestBody Type type){
|
||||
return typeService.update(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除类型
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/delete/{id}")
|
||||
public Result delete(@PathVariable Integer id){
|
||||
return typeService.delete(id);
|
||||
}
|
||||
}
|
|
@ -29,5 +29,5 @@ public interface EngineMapper extends BaseMapper<EngineMaintenance> {
|
|||
|
||||
List<EngineMaintenance> getMaintenanceList(EngineMaintenanceQueryReq engineMaintenanceQueryReq);
|
||||
|
||||
Integer deletes(@Param("id") Integer id);
|
||||
Integer deletes(@Param("id") Long id);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package com.muyu.mapper;
|
||||
|
||||
import com.muyu.domain.Type;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.mapper
|
||||
* @Project:cloud-etl-engine
|
||||
* @name:TypeMapper
|
||||
* @Date:2024/8/23 22:36
|
||||
*/
|
||||
@Mapper
|
||||
public interface TypseMapper {
|
||||
|
||||
List<Type> list();
|
||||
|
||||
Integer add(Type type);
|
||||
|
||||
Integer update(Type type);
|
||||
|
||||
Integer delete(@Param("id") Integer id);
|
||||
}
|
|
@ -42,5 +42,5 @@ public interface EngIneService extends IService<EngineMaintenance> {
|
|||
|
||||
Result<PageResult<EngineMaintenance>> getMaintenanceList(EngineMaintenanceQueryReq engineMaintenanceQueryReq);
|
||||
|
||||
Integer deletes(Integer id);
|
||||
Integer deletes(Long id);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package com.muyu.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.EngineVersion;
|
||||
import com.muyu.resp.EngineConfigScopeResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -25,4 +27,10 @@ public interface EngineVersionService extends IService<EngineVersion> {
|
|||
EngineVersion add(EngineVersion engineVersion);
|
||||
|
||||
EngineVersion updateMsg(EngineVersion engineVersion);
|
||||
|
||||
Result<EngineVersion> updateVersion(EngineVersion engineVersion);
|
||||
|
||||
List<EngineConfigScopeResp> getScopeList();
|
||||
|
||||
EngineConfigScopeResp getScopeInfoById(Integer id);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
package com.muyu.service;
|
||||
|
||||
import com.muyu.domain.Result;
|
||||
import com.muyu.domain.Type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.service
|
||||
* @Project:cloud-etl-engine
|
||||
* @name:TypeService
|
||||
* @Date:2024/8/23 22:35
|
||||
*/
|
||||
public interface TypeService {
|
||||
List<Type> list();
|
||||
|
||||
Result add(Type type);
|
||||
|
||||
Result update(Type type);
|
||||
|
||||
Result delete(Integer id);
|
||||
}
|
|
@ -98,7 +98,7 @@ public class EngIneServiceImpl extends ServiceImpl<EngineMapper, EngineMaintenan
|
|||
|
||||
@Override
|
||||
public EngineVersionListResp getRuleEngineInfo(Long id) {
|
||||
EngineMaintenance engineMaintenance = this.getOne(new LambdaQueryWrapper<>() {{
|
||||
EngineMaintenance engineMaintenance = this.getOne(new LambdaQueryWrapper<EngineMaintenance>() {{
|
||||
eq(EngineMaintenance::getId, id);
|
||||
}});
|
||||
List<EngineVersion> engineConfigs = engineConfigService.list();
|
||||
|
@ -193,8 +193,9 @@ public class EngIneServiceImpl extends ServiceImpl<EngineMapper, EngineMaintenan
|
|||
return Result.success(PageResult.toPageResult(engineMaintenancePageInfo.getTotal(), engineMaintenances));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer deletes(Integer id) {
|
||||
public Integer deletes(Long id) {
|
||||
Integer res = engineMapper.deletes(id);
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.domain.EngineVersion;
|
||||
import com.muyu.domain.constants.ConfigCodeConstants;
|
||||
import com.muyu.mapper.EngineVersionMapper;
|
||||
import com.muyu.resp.EngineConfigScopeResp;
|
||||
import com.muyu.service.EngineVersionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -51,10 +57,58 @@ public class EngineVersionServiceImpl extends ServiceImpl<EngineVersionMapper, E
|
|||
|
||||
@Override
|
||||
public EngineVersion updateMsg(EngineVersion engineVersion) {
|
||||
if (updateById(engineVersion)) {
|
||||
return engineVersion;
|
||||
boolean b = updateById(engineVersion);
|
||||
if (b) {
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<EngineVersion> updateVersion(EngineVersion engineVersion) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
@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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
package com.muyu.service.serviceImpl;
|
||||
|
||||
import com.muyu.domain.Result;
|
||||
import com.muyu.domain.Type;
|
||||
import com.muyu.mapper.TypseMapper;
|
||||
import com.muyu.service.TypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:qdm
|
||||
* @Package:com.muyu.service.serviceImpl
|
||||
* @Project:cloud-etl-engine
|
||||
* @name:TypeServiceImpl
|
||||
* @Date:2024/8/23 22:35
|
||||
*/
|
||||
@Service
|
||||
public class TypeServiceImpl implements TypeService {
|
||||
@Autowired
|
||||
TypseMapper typseMapper;
|
||||
|
||||
@Override
|
||||
public List<Type> list() {
|
||||
List<Type> list = typseMapper.list();
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result add(Type type) {
|
||||
Integer res = typseMapper.add(type);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result update(Type type) {
|
||||
Integer res = typseMapper.update(type);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result delete(Integer id) {
|
||||
Integer res = typseMapper.delete(id);
|
||||
return Result.success(res);
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9702
|
||||
port: 9703
|
||||
|
||||
# nacos线上地址
|
||||
nacos:
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.mapper.TypseMapper">
|
||||
<insert id="add">
|
||||
insert t_type values(0,#{name})
|
||||
</insert>
|
||||
<update id="update">
|
||||
update t_type set name = #{name}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="delete">
|
||||
delete from t_type where id = #{id}
|
||||
</delete>
|
||||
<select id="list" resultType="com.muyu.domain.Type">
|
||||
select *
|
||||
from t_type
|
||||
</select>
|
||||
</mapper>
|
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
6
pom.xml
6
pom.xml
|
@ -21,5 +21,9 @@
|
|||
<module>cloud-etl-remote</module>
|
||||
<module>cloud-etl-server</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.compiler.parameters>true</maven.compiler.parameters>
|
||||
</properties>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue