Compare commits
2 Commits
a769d89d99
...
0b33ac48e8
Author | SHA1 | Date |
---|---|---|
|
0b33ac48e8 | |
|
455878f7ea |
|
@ -44,6 +44,8 @@ public class GenerateConstant {
|
|||
"public class " + getClassName(ruleVersion.getVersionCode()) + " extends " + level + " {\n" +
|
||||
" @Override\n" +
|
||||
" public void run () {\n" +
|
||||
"if(DataValue.getValue==null){" +
|
||||
"数据不能为空}"+
|
||||
" }\n" +
|
||||
"}";
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- //创建测试工程,引入依赖-->
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
|
@ -53,6 +55,7 @@
|
|||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
|
@ -110,8 +113,6 @@
|
|||
<artifactId>junit</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- <!– XllJob定时任务 –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.muyu</groupId>-->
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.muyu.req.EngineMaintenanceQueryReq;
|
|||
import com.muyu.req.EngineVersionListResp;
|
||||
import com.muyu.service.EngIneService;
|
||||
import com.muyu.service.EngineVersionService;
|
||||
import io.swagger.v3.core.util.Json;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
package com.muyu.controller;
|
||||
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.domain.EngineType;
|
||||
import com.muyu.domain.constants.Result;
|
||||
import com.muyu.service.TypeService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
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 extends BaseController {
|
||||
@Autowired
|
||||
TypeService typeService;
|
||||
|
||||
/**
|
||||
* 类型列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public List<EngineType> list() {
|
||||
//使用mybatis-plus 查询所有
|
||||
//return Result.success(typeService.list());
|
||||
return typeService.list();
|
||||
}
|
||||
|
||||
/**
|
||||
* 类型添加
|
||||
*
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public Result add(@RequestBody EngineType type) {
|
||||
//使用mybatis-plus 添加
|
||||
// typeService.add(type);
|
||||
return typeService.add(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改类型
|
||||
*
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
public Result upadte(@RequestBody EngineType type) {
|
||||
//使用mybatis-plus 修改
|
||||
// return typeService.update(type);
|
||||
return typeService.update(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除类型
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/delete/{id}")
|
||||
public Result delete(@PathVariable Integer id) {
|
||||
//使用mybatis-plus 删除
|
||||
// boolean b = typeService.removeById(id);
|
||||
return typeService.delete(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*/
|
||||
@PostMapping("/export")
|
||||
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,7 @@
|
|||
package com.muyu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.controller.Student;
|
||||
import com.muyu.domain.EngineType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
@ -26,4 +27,12 @@ public interface TypseMapper extends BaseMapper<EngineType> {
|
|||
Integer delete(@Param("id") Integer id);
|
||||
|
||||
String selectByName(@Param("name") String name);
|
||||
|
||||
List<Student> select();
|
||||
|
||||
Student inserts(Student student);
|
||||
|
||||
Student updates(Student student);
|
||||
|
||||
Integer deletes(@Param("id") String id);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.muyu.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.controller.Student;
|
||||
import com.muyu.domain.EngineType;
|
||||
import com.muyu.domain.constants.Result;
|
||||
|
||||
|
@ -22,4 +23,12 @@ public interface TypeService extends IService<EngineType> {
|
|||
Result update(EngineType type);
|
||||
|
||||
Result delete(Integer id);
|
||||
|
||||
List<Student> select();
|
||||
|
||||
Result<Student> insert(Student student);
|
||||
|
||||
Result<Student> updates(Student student);
|
||||
|
||||
Result deletes(String id);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.muyu.service.serviceImpl;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.controller.Student;
|
||||
import com.muyu.domain.EngineType;
|
||||
import com.muyu.domain.constants.Result;
|
||||
import com.muyu.mapper.TypseMapper;
|
||||
|
@ -55,4 +56,27 @@ public class TypeServiceImpl extends ServiceImpl<TypseMapper, EngineType> implem
|
|||
Integer res = typseMapper.delete(id);
|
||||
return Result.success(res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Student> select() {
|
||||
return typseMapper.select();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Student> insert(Student student) {
|
||||
Student res = typseMapper.inserts(student);
|
||||
return Result.success(res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Student> updates(Student student) {
|
||||
Student student1 = typseMapper.updates(student);
|
||||
return Result.success(student1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result deletes(String id) {
|
||||
Integer res = typseMapper.deletes(id);
|
||||
return Result.success(res);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,16 +9,29 @@
|
|||
#{name}
|
||||
)
|
||||
</insert>
|
||||
<insert id="inserts">
|
||||
insert t_student values(0,#{name},#{age},#{sex})
|
||||
</insert>
|
||||
<update id="update">
|
||||
update t_type
|
||||
set name = #{name}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updates">
|
||||
update t_student
|
||||
set name = #{name},age = #{age},sex = #{sex}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="delete">
|
||||
delete
|
||||
from t_type
|
||||
where id = #{id}
|
||||
</delete>
|
||||
<delete id="deletes">
|
||||
delete
|
||||
from t_student
|
||||
where id = #{id}
|
||||
</delete>
|
||||
<select id="list" resultType="com.muyu.domain.EngineType">
|
||||
select *
|
||||
from t_type
|
||||
|
@ -28,4 +41,8 @@
|
|||
from t_type
|
||||
where name = #{name}
|
||||
</select>
|
||||
<select id="select" resultType="com.muyu.controller.Student">
|
||||
select *
|
||||
from t_student
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -285,45 +285,3 @@ java.net.SocketException: Connection reset
|
|||
21:16:09.176 [http-nio-9706-exec-3] INFO c.m.c.EngineVersionController - [insertVersion,181] - 数据是:{}1
|
||||
21:16:28.848 [http-nio-9706-exec-8] INFO o.s.a.AbstractOpenApiResource - [getOpenApi,369] - Init duration for springdoc-openapi is: 409 ms
|
||||
21:16:31.265 [http-nio-9706-exec-9] INFO c.m.c.EngineVersionController - [insertVersion,181] - 数据是:{}1
|
||||
11:26:58.751 [main] INFO c.m.EngineApplication - [logStartupProfileInfo,660] - The following 1 profile is active: "dev"
|
||||
11:27:01.510 [main] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
11:27:01.510 [main] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.24]
|
||||
11:27:01.593 [main] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
11:27:06.794 [main] INFO c.a.d.p.DruidDataSource - [init,1002] - {dataSource-1,master} inited
|
||||
11:27:06.795 [main] INFO c.b.d.d.DynamicRoutingDataSource - [addDataSource,158] - dynamic-datasource - add a datasource named [master] success
|
||||
11:27:06.796 [main] INFO c.b.d.d.DynamicRoutingDataSource - [afterPropertiesSet,241] - dynamic-datasource initial loaded [1] datasource,primary datasource named [master]
|
||||
11:27:08.167 [main] INFO c.a.c.s.SentinelWebMvcConfigurer - [addInterceptors,52] - [Sentinel Starter] register SentinelWebInterceptor with urlPatterns: [/**].
|
||||
11:27:16.715 [main] INFO c.a.n.client.naming - [initNamespaceForNaming,62] - initializer namespace from ans.namespace attribute : null
|
||||
11:27:16.716 [main] INFO c.a.n.client.naming - [lambda$initNamespaceForNaming$0,66] - initializer namespace from ALIBABA_ALIWARE_NAMESPACE attribute :null
|
||||
11:27:16.716 [main] INFO c.a.n.client.naming - [lambda$initNamespaceForNaming$1,73] - initializer namespace from namespace attribute :null
|
||||
11:27:16.721 [main] INFO c.a.n.client.naming - [<init>,74] - FailoverDataSource type is class com.alibaba.nacos.client.naming.backups.datasource.DiskFailoverDataSource
|
||||
11:27:16.726 [main] INFO c.a.n.p.a.s.c.ClientAuthPluginManager - [init,56] - [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl success.
|
||||
11:27:16.726 [main] INFO c.a.n.p.a.s.c.ClientAuthPluginManager - [init,56] - [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.ram.RamClientAuthServiceImpl success.
|
||||
11:27:16.850 [main] INFO c.a.n.c.r.client - [lambda$createClient$0,118] - [RpcClientFactory] create a new rpc client of b29c7ee5-0bf0-4f1c-8aca-1f27ba7bb898
|
||||
11:27:16.853 [main] INFO c.a.n.client.naming - [<init>,109] - Create naming rpc client for uuid->b29c7ee5-0bf0-4f1c-8aca-1f27ba7bb898
|
||||
11:27:16.853 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [b29c7ee5-0bf0-4f1c-8aca-1f27ba7bb898] RpcClient init, ServerListFactory = com.alibaba.nacos.client.naming.core.ServerListManager
|
||||
11:27:16.853 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [b29c7ee5-0bf0-4f1c-8aca-1f27ba7bb898] Registry connection listener to current client:com.alibaba.nacos.client.naming.remote.gprc.redo.NamingGrpcRedoService
|
||||
11:27:16.853 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [b29c7ee5-0bf0-4f1c-8aca-1f27ba7bb898] Register server push request handler:com.alibaba.nacos.client.naming.remote.gprc.NamingPushRequestHandler
|
||||
11:27:16.854 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [b29c7ee5-0bf0-4f1c-8aca-1f27ba7bb898] Try to connect to server on start up, server: {serverIp = '47.116.184.54', server main port = 8848}
|
||||
11:27:16.854 [main] INFO c.a.n.c.r.c.g.GrpcClient - [createNewManagedChannel,210] - grpc client connection server:47.116.184.54 ip,serverPort:9848,grpcTslConfig:{"sslProvider":"","enableTls":false,"mutualAuthEnable":false,"trustAll":false}
|
||||
11:27:17.221 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [b29c7ee5-0bf0-4f1c-8aca-1f27ba7bb898] Success to connect to server [47.116.184.54:8848] on start up, connectionId = 1725420457560_139.224.212.27_62010
|
||||
11:27:17.221 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [b29c7ee5-0bf0-4f1c-8aca-1f27ba7bb898] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$ConnectResetRequestHandler
|
||||
11:27:17.221 [com.alibaba.nacos.client.remote.worker.0] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [b29c7ee5-0bf0-4f1c-8aca-1f27ba7bb898] Notify connected event to listeners.
|
||||
11:27:17.221 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [b29c7ee5-0bf0-4f1c-8aca-1f27ba7bb898] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$$Lambda$575/0x00000292014d2b60
|
||||
11:27:17.221 [com.alibaba.nacos.client.remote.worker.0] INFO c.a.n.client.naming - [onConnected,90] - Grpc connection connect
|
||||
11:27:17.224 [main] INFO c.a.n.client.naming - [registerService,133] - [REGISTER-SERVICE] cloud-2112 registering service cloud-engine with instance Instance{instanceId='null', ip='192.168.52.1', port=9706, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='DEFAULT', serviceName='null', metadata={IPv6=[2409:891f:8f45:476:2757:da74:cc8d:2026], preserved.register.source=SPRING_CLOUD}}
|
||||
11:27:17.267 [main] INFO c.a.c.n.r.NacosServiceRegistry - [register,76] - nacos registry, DEFAULT_GROUP cloud-engine 192.168.52.1:9706 register finished
|
||||
11:27:18.471 [main] INFO c.m.EngineApplication - [logStarted,56] - Started EngineApplication in 25.612 seconds (process running for 26.656)
|
||||
11:27:18.480 [main] INFO c.a.n.c.c.i.CacheData - [initNotifyWarnTimeout,72] - config listener notify warn timeout millis use default 60000 millis
|
||||
11:27:18.481 [main] INFO c.a.n.c.c.i.CacheData - [<clinit>,99] - nacos.cache.data.init.snapshot = true
|
||||
11:27:18.481 [main] INFO c.a.n.c.c.i.ClientWorker - [addCacheDataIfAbsent,416] - [fixed-cloud-2112-47.116.184.54_8848] [subscribe] cloud-engine.yml+DEFAULT_GROUP+cloud-2112
|
||||
11:27:18.493 [main] INFO c.a.n.c.c.i.CacheData - [addListener,236] - [fixed-cloud-2112-47.116.184.54_8848] [add-listener] ok, tenant=cloud-2112, dataId=cloud-engine.yml, group=DEFAULT_GROUP, cnt=1
|
||||
11:27:18.494 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-engine.yml, group=DEFAULT_GROUP
|
||||
11:27:18.494 [main] INFO c.a.n.c.c.i.ClientWorker - [addCacheDataIfAbsent,416] - [fixed-cloud-2112-47.116.184.54_8848] [subscribe] cloud-engine+DEFAULT_GROUP+cloud-2112
|
||||
11:27:18.495 [main] INFO c.a.n.c.c.i.CacheData - [addListener,236] - [fixed-cloud-2112-47.116.184.54_8848] [add-listener] ok, tenant=cloud-2112, dataId=cloud-engine, group=DEFAULT_GROUP, cnt=1
|
||||
11:27:18.495 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-engine, group=DEFAULT_GROUP
|
||||
11:27:18.497 [main] INFO c.a.n.c.c.i.ClientWorker - [addCacheDataIfAbsent,416] - [fixed-cloud-2112-47.116.184.54_8848] [subscribe] cloud-engine-dev.yml+DEFAULT_GROUP+cloud-2112
|
||||
11:27:18.497 [main] INFO c.a.n.c.c.i.CacheData - [addListener,236] - [fixed-cloud-2112-47.116.184.54_8848] [add-listener] ok, tenant=cloud-2112, dataId=cloud-engine-dev.yml, group=DEFAULT_GROUP, cnt=1
|
||||
11:27:18.497 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-engine-dev.yml, group=DEFAULT_GROUP
|
||||
11:27:18.846 [RMI TCP Connection(3)-10.100.28.5] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
11:27:34.900 [http-nio-9706-exec-5] INFO o.s.a.AbstractOpenApiResource - [getOpenApi,369] - Init duration for springdoc-openapi is: 445 ms
|
||||
|
|
Loading…
Reference in New Issue