Browse Source

移除多余文件。

NorthLan 6 years ago
parent
commit
3201206fa2

+ 0 - 35
zen-job/src/main/kotlin/com/gxzc/zen/job/jobhandler/DeleteJobHandler.kt

@@ -1,35 +0,0 @@
-package com.gxzc.zen.job.jobhandler
-
-import com.gxzc.zen.api.sys.service.ISysDeptService
-import com.xxl.job.core.biz.model.ReturnT
-import com.xxl.job.core.handler.IJobHandler
-import com.xxl.job.core.handler.annotation.JobHandler
-import com.xxl.job.core.log.XxlJobLogger
-import org.slf4j.LoggerFactory
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.stereotype.Component
-
-/**
- * @Author: Create By liusen
- * @Date: Create on 16:51 2018/4/8
- * @Description:
- */
-@JobHandler("deleteJobHandler")
-@Component
-class DeleteJobHandler : IJobHandler() {
-    @Autowired
-    private lateinit var deptService: ISysDeptService
-
-    companion object {
-        private val logger = LoggerFactory.getLogger(DeleteJobHandler.javaClass)
-    }
-
-    override fun execute(param: String?): ReturnT<String> {
-        XxlJobLogger.log("测试删除开始=================")
-        logger.info("测试删除开始=================")
-        deptService.deleteById(1L)
-        XxlJobLogger.log("测试删除结束=================")
-        logger.info("测试删除结束=================")
-        return SUCCESS
-    }
-}

+ 0 - 40
zen-job/src/main/kotlin/com/gxzc/zen/job/jobhandler/InsertJobHandler.kt

@@ -1,40 +0,0 @@
-package com.gxzc.zen.job.jobhandler
-
-import com.gxzc.zen.api.sys.model.SysDept
-import com.gxzc.zen.api.sys.service.ISysDeptService
-import com.xxl.job.core.biz.model.ReturnT
-import com.xxl.job.core.handler.IJobHandler
-import com.xxl.job.core.handler.annotation.JobHandler
-import com.xxl.job.core.log.XxlJobLogger
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.stereotype.Component
-
-/**
- * @Author: Create By liusen
- * @Date: Create on 14:20 2018/4/8
- * @Description:
- * 任务Handler示例(Bean模式)
- *
- * 开发步骤:
- * 1、继承"IJobHandler":“com.xxl.job.core.handler.IJobHandler”;
- * 2、注册到Spring容器:添加“@Component”注解,被Spring容器扫描为Bean实例;
- * 3、注册到执行器工厂:添加“@JobHandler(value="自定义jobhandler名称")”注解,注解value值对应的是调度中心新建任务的JobHandler属性的值。
- * 4、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
- *
- */
-@JobHandler("insertJobHandler")
-@Component
-class InsertJobHandler : IJobHandler() {
-    @Autowired
-    private lateinit var deptService: ISysDeptService
-
-    override fun execute(param: String?): ReturnT<String> {
-        XxlJobLogger.log("测试插入开始=================")
-        deptService.insert(SysDept().apply {
-            name = "开发部"
-            principal = "ls"
-        })
-        XxlJobLogger.log("测试插入结束=================")
-        return SUCCESS
-    }
-}

+ 0 - 35
zen-job/src/main/kotlin/com/gxzc/zen/job/jobhandler/SelectJobHandler.kt

@@ -1,35 +0,0 @@
-package com.gxzc.zen.job.jobhandler
-
-import com.baomidou.mybatisplus.mapper.EntityWrapper
-import com.gxzc.zen.api.sys.model.SysDept
-import com.gxzc.zen.api.sys.service.ISysDeptService
-import com.xxl.job.core.biz.model.ReturnT
-import com.xxl.job.core.handler.IJobHandler
-import com.xxl.job.core.handler.annotation.JobHandler
-import com.xxl.job.core.log.XxlJobLogger
-import org.slf4j.LoggerFactory
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.stereotype.Component
-
-/**
- * @Author: Create By liusen
- * @Date: Create on 16:56 2018/4/8
- * @Description:
- */
-@JobHandler("selectJobHandler")
-@Component
-class SelectJobHandler:IJobHandler() {
-    @Autowired
-    private lateinit var deptService: ISysDeptService
-
-    companion object {
-        private val logger = LoggerFactory.getLogger(DeleteJobHandler.javaClass)
-    }
-    override fun execute(param: String?): ReturnT<String> {
-        XxlJobLogger.log("==============测试查询开始==============")
-        val list = deptService.selectList(EntityWrapper<SysDept>())
-        logger.info("result is :$list")
-        XxlJobLogger.log("==============测试查询结束==============")
-        return ReturnT.SUCCESS
-    }
-}

+ 0 - 35
zen-job/src/main/kotlin/com/gxzc/zen/job/jobhandler/UpdateJobHandler.kt

@@ -1,35 +0,0 @@
-package com.gxzc.zen.job.jobhandler
-
-import com.gxzc.zen.api.sys.model.SysDept
-import com.gxzc.zen.api.sys.service.ISysDeptService
-import com.xxl.job.core.biz.model.ReturnT
-import com.xxl.job.core.handler.IJobHandler
-import com.xxl.job.core.handler.annotation.JobHandler
-import org.slf4j.LoggerFactory
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.stereotype.Component
-
-/**
- * @Author: Create By liusen
- * @Date: Create on 17:04 2018/4/8
- * @Description:
- */
-@JobHandler("updateJobHandler")
-@Component
-class UpdateJobHandler:IJobHandler() {
-    @Autowired
-    private lateinit var deptService: ISysDeptService
-
-    companion object {
-        private val logger = LoggerFactory.getLogger(DeleteJobHandler.javaClass)
-    }
-    override fun execute(param: String?): ReturnT<String> {
-        logger.info("更新测试开始=========")
-        deptService.updateById(SysDept().apply {
-            id=1
-            principal="更新人:刘森"
-        })
-        logger.info("更新测试开始=========")
-        return ReturnT.SUCCESS
-    }
-}

+ 0 - 31
zen-web/src/main/kotlin/com/gxzc/zen/ApplicationRunner.kt

@@ -1,31 +0,0 @@
-package com.gxzc.zen
-
-import com.gxzc.zen.api.sys.service.ISysDictValueService
-import org.slf4j.LoggerFactory
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.ApplicationArguments
-import org.springframework.boot.ApplicationRunner
-import org.springframework.stereotype.Component
-
-/**
- * 启动加载
- * @author NorthLan
- * @date 2018/5/5
- * @url https://noahlan.com
- */
-@Component
-class ApplicationRunner : ApplicationRunner {
-    companion object {
-        private val logger = LoggerFactory.getLogger(ApplicationRunner::class.java)
-    }
-
-    @Autowired
-    private lateinit var dictValueService: ISysDictValueService
-
-    override fun run(args: ApplicationArguments?) {
-        logger.info("Started successful. Initializing...")
-
-        logger.info("Initializing DictValue...")
-        dictValueService.init()
-    }
-}