[add] 新增无人机模块后端项目
[refactor] 重构后端项目
This commit is contained in:
		
							
								
								
									
										34
									
								
								xinnengyuan/ruoyi-modules/ruoyi-job/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								xinnengyuan/ruoyi-modules/ruoyi-job/pom.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,34 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||||
|          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||||
|          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||||
|     <parent> | ||||
|         <groupId>org.dromara</groupId> | ||||
|         <artifactId>ruoyi-modules</artifactId> | ||||
|         <version>${revision}</version> | ||||
|     </parent> | ||||
|     <modelVersion>4.0.0</modelVersion> | ||||
|     <packaging>jar</packaging> | ||||
|     <artifactId>ruoyi-job</artifactId> | ||||
|  | ||||
|     <description> | ||||
|         任务调度 | ||||
|     </description> | ||||
|  | ||||
|     <dependencies> | ||||
|  | ||||
|         <!-- 通用工具--> | ||||
|         <dependency> | ||||
|             <groupId>org.dromara</groupId> | ||||
|             <artifactId>ruoyi-common-json</artifactId> | ||||
|         </dependency> | ||||
|  | ||||
|         <dependency> | ||||
|             <groupId>org.dromara</groupId> | ||||
|             <artifactId>ruoyi-common-job</artifactId> | ||||
|         </dependency> | ||||
|          | ||||
|     </dependencies> | ||||
|  | ||||
| </project> | ||||
|  | ||||
| @ -0,0 +1 @@ | ||||
| package org.dromara.job; | ||||
| @ -0,0 +1,23 @@ | ||||
| package org.dromara.job.snailjob; | ||||
|  | ||||
| import com.aizuda.snailjob.client.job.core.annotation.JobExecutor; | ||||
| import com.aizuda.snailjob.client.job.core.dto.JobArgs; | ||||
| import com.aizuda.snailjob.client.model.ExecuteResult; | ||||
| import com.aizuda.snailjob.common.core.util.JsonUtil; | ||||
| import com.aizuda.snailjob.common.log.SnailJobLog; | ||||
| import org.springframework.stereotype.Component; | ||||
|  | ||||
| /** | ||||
|  * @author opensnail | ||||
|  * @date 2024-05-17 | ||||
|  */ | ||||
| @Component | ||||
| @JobExecutor(name = "testJobExecutor") | ||||
| public class TestAnnoJobExecutor { | ||||
|  | ||||
|     public ExecuteResult jobExecute(JobArgs jobArgs) { | ||||
|         SnailJobLog.LOCAL.info("testJobExecutor. jobArgs:{}", JsonUtil.toJsonString(jobArgs)); | ||||
|         SnailJobLog.REMOTE.info("testJobExecutor. jobArgs:{}", JsonUtil.toJsonString(jobArgs)); | ||||
|         return ExecuteResult.success("测试成功"); | ||||
|     } | ||||
| } | ||||
| @ -0,0 +1,19 @@ | ||||
| package org.dromara.job.snailjob; | ||||
|  | ||||
| import com.aizuda.snailjob.client.job.core.dto.JobArgs; | ||||
| import com.aizuda.snailjob.client.job.core.executor.AbstractJobExecutor; | ||||
| import com.aizuda.snailjob.client.model.ExecuteResult; | ||||
| import org.springframework.stereotype.Component; | ||||
|  | ||||
| /** | ||||
|  * @author opensnail | ||||
|  * @date 2024-05-17 | ||||
|  */ | ||||
| @Component | ||||
| public class TestClassJobExecutor extends AbstractJobExecutor { | ||||
|  | ||||
|     @Override | ||||
|     protected ExecuteResult doJobExecute(JobArgs jobArgs) { | ||||
|         return ExecuteResult.success("TestJobExecutor测试成功"); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user