完善CRUD

master
Qin Dong Ming 2024-08-23 22:03:47 +08:00
parent 02d0579201
commit d93674a8a6
6 changed files with 91 additions and 5 deletions

View File

@ -35,9 +35,9 @@ public class EngIneController extends BaseController {
}
@DeleteMapping("/{ids}")
public Integer remove(@PathVariable(name = "ids") String ids) {
return engIneService.deleteByIds(ids);
@PostMapping("/delete/{id}")
public Integer remove(@PathVariable Integer id) {
return engIneService.deletes(id);
}
@PostMapping("/update")

View File

@ -28,4 +28,6 @@ public interface EngineMapper extends BaseMapper<EngineMaintenance> {
Integer activateEngine(@Param("id") Integer id);
List<EngineMaintenance> getMaintenanceList(EngineMaintenanceQueryReq engineMaintenanceQueryReq);
Integer deletes(@Param("id") Integer id);
}

View File

@ -41,4 +41,6 @@ public interface EngIneService extends IService<EngineMaintenance> {
Result<PageResult<EngineMaintenance>> getMaintenanceList(EngineMaintenanceQueryReq engineMaintenanceQueryReq);
Integer deletes(Integer id);
}

View File

@ -192,4 +192,10 @@ public class EngIneServiceImpl extends ServiceImpl<EngineMapper, EngineMaintenan
PageInfo<EngineMaintenance> engineMaintenancePageInfo = new PageInfo<>(engineMaintenances);
return Result.success(PageResult.toPageResult(engineMaintenancePageInfo.getTotal(), engineMaintenances));
}
@Override
public Integer deletes(Integer id) {
Integer res = engineMapper.deletes(id);
return res;
}
}

View File

@ -34,6 +34,9 @@
<update id="activateEngine">
update engine_maintenance set status = 4 where id = #{id}
</update>
<delete id="deletes">
delete from engine_maintenance where id = #{id}
</delete>
<select id="getMaintenanceList" resultType="com.muyu.domain.EngineMaintenance">
select * from engine_maintenance
<where>
@ -41,10 +44,13 @@
and name like concat('%',#{name},'%')
</if>
<if test="engineCode != null and engineCode != ''">
and engine_code like concat('%',#{engineCode},'%')
and engine_code = #{engineCode}
</if>
<if test="description != null and description != ''">
and description like concat('%',#{description},'%')
and description = #{description}
</if>
<if test="isActivate != null and isActivate != ''">
and is_activate = #{isActivate}
</if>
<if test="type !=null and type != ''">
and type = #{type}

View File

@ -1430,3 +1430,73 @@
21:45:14.272 [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
21:45:14.272 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-engine-dev.yml, group=DEFAULT_GROUP
21:45:14.814 [RMI TCP Connection(4)-172.16.0.5] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
22:01:06.118 [main] INFO c.m.EngineApplication - [logStartupProfileInfo,660] - The following 1 profile is active: "dev"
22:01:08.659 [main] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
22:01:08.659 [main] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.24]
22:01:08.761 [main] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
22:01:10.847 [main] INFO c.a.d.p.DruidDataSource - [init,1002] - {dataSource-1,master} inited
22:01:10.848 [main] INFO c.b.d.d.DynamicRoutingDataSource - [addDataSource,158] - dynamic-datasource - add a datasource named [master] success
22:01:10.848 [main] INFO c.b.d.d.DynamicRoutingDataSource - [afterPropertiesSet,241] - dynamic-datasource initial loaded [1] datasource,primary datasource named [master]
22:01:11.989 [main] INFO c.a.c.s.SentinelWebMvcConfigurer - [addInterceptors,52] - [Sentinel Starter] register SentinelWebInterceptor with urlPatterns: [/**].
22:01:19.284 [main] INFO c.a.n.client.naming - [initNamespaceForNaming,62] - initializer namespace from ans.namespace attribute : null
22:01:19.285 [main] INFO c.a.n.client.naming - [lambda$initNamespaceForNaming$0,66] - initializer namespace from ALIBABA_ALIWARE_NAMESPACE attribute :null
22:01:19.285 [main] INFO c.a.n.client.naming - [lambda$initNamespaceForNaming$1,73] - initializer namespace from namespace attribute :null
22:01:19.291 [main] INFO c.a.n.client.naming - [<init>,74] - FailoverDataSource type is class com.alibaba.nacos.client.naming.backups.datasource.DiskFailoverDataSource
22:01:19.295 [main] INFO c.a.n.p.a.s.c.ClientAuthPluginManager - [init,56] - [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl success.
22:01:19.295 [main] INFO c.a.n.p.a.s.c.ClientAuthPluginManager - [init,56] - [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.ram.RamClientAuthServiceImpl success.
22:01:19.399 [main] INFO c.a.n.c.r.client - [lambda$createClient$0,118] - [RpcClientFactory] create a new rpc client of ab6e7c4d-8186-45b5-9107-e96fdacefff9
22:01:19.401 [main] INFO c.a.n.client.naming - [<init>,109] - Create naming rpc client for uuid->ab6e7c4d-8186-45b5-9107-e96fdacefff9
22:01:19.401 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ab6e7c4d-8186-45b5-9107-e96fdacefff9] RpcClient init, ServerListFactory = com.alibaba.nacos.client.naming.core.ServerListManager
22:01:19.401 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ab6e7c4d-8186-45b5-9107-e96fdacefff9] Registry connection listener to current client:com.alibaba.nacos.client.naming.remote.gprc.redo.NamingGrpcRedoService
22:01:19.402 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ab6e7c4d-8186-45b5-9107-e96fdacefff9] Register server push request handler:com.alibaba.nacos.client.naming.remote.gprc.NamingPushRequestHandler
22:01:19.402 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ab6e7c4d-8186-45b5-9107-e96fdacefff9] Try to connect to server on start up, server: {serverIp = '47.116.184.54', server main port = 8848}
22:01:19.402 [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}
22:01:19.447 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ab6e7c4d-8186-45b5-9107-e96fdacefff9] Success to connect to server [47.116.184.54:8848] on start up, connectionId = 1724421684210_139.224.212.27_63094
22:01:19.447 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ab6e7c4d-8186-45b5-9107-e96fdacefff9] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$ConnectResetRequestHandler
22:01:19.447 [com.alibaba.nacos.client.remote.worker.0] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ab6e7c4d-8186-45b5-9107-e96fdacefff9] Notify connected event to listeners.
22:01:19.447 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [ab6e7c4d-8186-45b5-9107-e96fdacefff9] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$$Lambda$575/0x000002603c4e0678
22:01:19.447 [com.alibaba.nacos.client.remote.worker.0] INFO c.a.n.client.naming - [onConnected,90] - Grpc connection connect
22:01:19.449 [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=9702, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='DEFAULT', serviceName='null', metadata={IPv6=null, preserved.register.source=SPRING_CLOUD}}
22:01:19.464 [main] INFO c.a.c.n.r.NacosServiceRegistry - [register,76] - nacos registry, DEFAULT_GROUP cloud-engine 192.168.52.1:9702 register finished
22:01:20.681 [main] INFO c.m.EngineApplication - [logStarted,56] - Started EngineApplication in 19.718 seconds (process running for 20.626)
22:01:20.691 [main] INFO c.a.n.c.c.i.CacheData - [initNotifyWarnTimeout,72] - config listener notify warn timeout millis use default 60000 millis
22:01:20.691 [main] INFO c.a.n.c.c.i.CacheData - [<clinit>,99] - nacos.cache.data.init.snapshot = true
22:01:20.692 [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
22:01:20.702 [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
22:01:20.703 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-engine.yml, group=DEFAULT_GROUP
22:01:20.703 [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
22:01:20.703 [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
22:01:20.704 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-engine, group=DEFAULT_GROUP
22:01:20.706 [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
22:01:20.706 [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
22:01:20.706 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-engine-dev.yml, group=DEFAULT_GROUP
22:01:20.910 [RMI TCP Connection(5)-172.16.0.5] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
22:03:38.886 [SpringApplicationShutdownHook] INFO c.a.c.n.r.NacosServiceRegistry - [deregister,95] - De-registering from Nacos Server now...
22:03:38.886 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [deregisterService,272] - [DEREGISTER-SERVICE] cloud-2112 deregistering service cloud-engine with instance: Instance{instanceId='null', ip='192.168.52.1', port=9702, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='DEFAULT', serviceName='null', metadata={}}
22:03:38.904 [SpringApplicationShutdownHook] INFO c.a.c.n.r.NacosServiceRegistry - [deregister,115] - De-registration finished.
22:03:38.905 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,254] - com.alibaba.nacos.client.naming.cache.ServiceInfoHolder do shutdown begin
22:03:38.905 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,180] - com.alibaba.nacos.client.naming.backups.FailoverReactor do shutdown begin
22:03:38.905 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,182] - com.alibaba.nacos.client.naming.backups.FailoverReactor do shutdown stop
22:03:38.905 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,256] - com.alibaba.nacos.client.naming.cache.ServiceInfoHolder do shutdown stop
22:03:38.905 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,204] - com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate do shutdown begin
22:03:38.905 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,147] - com.alibaba.nacos.client.naming.core.ServiceInfoUpdateService do shutdown begin
22:03:38.905 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,149] - com.alibaba.nacos.client.naming.core.ServiceInfoUpdateService do shutdown stop
22:03:38.905 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,218] - com.alibaba.nacos.client.naming.core.ServerListManager do shutdown begin
22:03:38.906 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,223] - com.alibaba.nacos.client.naming.core.ServerListManager do shutdown stop
22:03:38.906 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,468] - com.alibaba.nacos.client.naming.remote.http.NamingHttpClientProxy do shutdown begin
22:03:38.906 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,470] - com.alibaba.nacos.client.naming.remote.http.NamingHttpClientProxy do shutdown stop
22:03:38.906 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,487] - Shutdown naming grpc client proxy for uuid->ab6e7c4d-8186-45b5-9107-e96fdacefff9
22:03:38.906 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,331] - Shutdown grpc redo service executor java.util.concurrent.ScheduledThreadPoolExecutor@3d0e3919[Running, pool size = 1, active threads = 0, queued tasks = 1, completed tasks = 46]
22:03:38.906 [SpringApplicationShutdownHook] INFO c.a.n.c.r.client - [shutdown,425] - Shutdown rpc client, set status to shutdown
22:03:38.906 [SpringApplicationShutdownHook] INFO c.a.n.c.r.client - [shutdown,427] - Shutdown client event executor java.util.concurrent.ScheduledThreadPoolExecutor@10f1aa42[Running, pool size = 2, active threads = 2, queued tasks = 0, completed tasks = 0]
22:03:38.906 [SpringApplicationShutdownHook] INFO c.a.n.c.r.client - [closeConnection,584] - Close current connection 1724421684210_139.224.212.27_63094
22:03:38.911 [SpringApplicationShutdownHook] INFO c.a.n.c.r.c.g.GrpcClient - [shutdown,187] - Shutdown grpc executor java.util.concurrent.ThreadPoolExecutor@9afcc27[Running, pool size = 3, active threads = 0, queued tasks = 0, completed tasks = 35]
22:03:38.911 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutDownAndRemove,497] - shutdown and remove naming rpc client for uuid ->ab6e7c4d-8186-45b5-9107-e96fdacefff9
22:03:38.912 [SpringApplicationShutdownHook] INFO c.a.n.c.a.r.i.CredentialWatcher - [stop,107] - [null] CredentialWatcher is stopped
22:03:38.912 [SpringApplicationShutdownHook] INFO c.a.n.c.a.r.i.CredentialService - [free,91] - [null] CredentialService is freed
22:03:38.912 [SpringApplicationShutdownHook] INFO c.a.n.client.naming - [shutdown,211] - com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate do shutdown stop
22:03:38.917 [SpringApplicationShutdownHook] INFO c.b.d.d.DynamicRoutingDataSource - [destroy,215] - dynamic-datasource start closing ....
22:03:38.921 [SpringApplicationShutdownHook] INFO c.a.d.p.DruidDataSource - [close,2204] - {dataSource-1} closing ...
22:03:38.925 [SpringApplicationShutdownHook] INFO c.a.d.p.DruidDataSource - [close,2277] - {dataSource-1} closed
22:03:38.925 [SpringApplicationShutdownHook] INFO c.b.d.d.d.DefaultDataSourceDestroyer - [destroy,98] - dynamic-datasource close the datasource named [master] success,
22:03:38.925 [SpringApplicationShutdownHook] INFO c.b.d.d.DynamicRoutingDataSource - [destroy,219] - dynamic-datasource all closed success,bye