新增新的代码生成器模板
parent
3aa31a1621
commit
2b3337970b
@ -0,0 +1,9 @@
|
|||||||
|
#当前项目的根package
|
||||||
|
api.base-package=com.docus.server.archivefile
|
||||||
|
|
||||||
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
|
spring.datasource.url=jdbc:mysql://db.docus.cn:3306/docus_archivefile?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||||
|
spring.datasource.username=docus
|
||||||
|
spring.datasource.password=docus702
|
||||||
|
|
||||||
|
mybatis-plus.type-enums-package=com.docus.server.enums
|
@ -0,0 +1,80 @@
|
|||||||
|
package com.docus.server.archivefile.controller;
|
||||||
|
|
||||||
|
import com.docus.infrastructure.web.request.SearchRequest;
|
||||||
|
import com.docus.infrastructure.web.response.PageResult;
|
||||||
|
import com.docus.server.api.auth.TaskConfigTestApi;
|
||||||
|
import com.docus.server.archivefile.service.ITaskConfigTestService;
|
||||||
|
import com.docus.server.entity.auth.TaskConfigTest;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 主动任务测试对象 TaskConfigTestController 控制器类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author AutoGenerator
|
||||||
|
* @since 2023-07-05
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
public class TaskConfigTestController implements TaskConfigTestApi {
|
||||||
|
@Resource
|
||||||
|
private ITaskConfigTestService iTaskConfigTestService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按主键查询
|
||||||
|
*
|
||||||
|
* @param id 主键Id
|
||||||
|
* @return 实体
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TaskConfigTest findById(String id) {
|
||||||
|
return iTaskConfigTestService.findById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键字搜素
|
||||||
|
*
|
||||||
|
* @param searchRequest 搜索参数
|
||||||
|
* @return 分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageResult<TaskConfigTest> search(SearchRequest searchRequest) {
|
||||||
|
return iTaskConfigTestService.search(searchRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
|
* @param taskConfigTest 编辑参数
|
||||||
|
* @return 成功或失败
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean add(TaskConfigTest taskConfigTest) {
|
||||||
|
return iTaskConfigTestService.add(taskConfigTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param taskConfigTest 编辑参数
|
||||||
|
* @return 成功或失败
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean edit(TaskConfigTest taskConfigTest) {
|
||||||
|
return iTaskConfigTestService.edit(taskConfigTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids 主键ids
|
||||||
|
* @return 成功或失败
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int delete(List<String> ids) {
|
||||||
|
return iTaskConfigTestService.delete(ids);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.docus.server.archivefile.infrastructure.dao;
|
||||||
|
import com.docus.server.entity.auth.TaskConfigTest;
|
||||||
|
import com.docus.infrastructure.core.db.dao.IBaseDao;
|
||||||
|
import com.docus.infrastructure.web.request.SearchRequest;
|
||||||
|
import com.docus.infrastructure.web.response.PageResult;
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 主动任务测试对象 ITaskConfigTestDao 数据访问接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author AutoGenerator
|
||||||
|
* @since 2023-07-05
|
||||||
|
*/
|
||||||
|
public interface ITaskConfigTestDao extends IBaseDao<TaskConfigTest> {
|
||||||
|
|
||||||
|
TaskConfigTest findById(String id);
|
||||||
|
|
||||||
|
boolean add(TaskConfigTest taskConfigTest);
|
||||||
|
|
||||||
|
boolean edit(TaskConfigTest taskConfigTest);
|
||||||
|
|
||||||
|
int delete(List<String> ids);
|
||||||
|
|
||||||
|
PageResult<TaskConfigTest> search(SearchRequest searchRequest);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.docus.server.archivefile.infrastructure.mapper;
|
||||||
|
|
||||||
|
import com.docus.server.entity.auth.TaskConfigTest;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 主动任务测试对象 TaskConfigTestMapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author AutoGenerator
|
||||||
|
* @since 2023-07-05
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface TaskConfigTestMapper extends BaseMapper<TaskConfigTest> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.docus.server.archivefile.service;
|
||||||
|
|
||||||
|
import com.docus.server.entity.auth.TaskConfigTest;
|
||||||
|
|
||||||
|
import com.docus.infrastructure.web.request.SearchRequest;
|
||||||
|
import com.docus.infrastructure.web.response.PageResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 主动任务测试对象 ITaskConfigTestService 服务接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author AutoGenerator
|
||||||
|
* @since 2023-07-05
|
||||||
|
*/
|
||||||
|
public interface ITaskConfigTestService {
|
||||||
|
|
||||||
|
TaskConfigTest findById(String id);
|
||||||
|
|
||||||
|
boolean add(TaskConfigTest taskConfigTest);
|
||||||
|
|
||||||
|
boolean edit(TaskConfigTest taskConfigTest);
|
||||||
|
|
||||||
|
int delete(List<String> ids);
|
||||||
|
|
||||||
|
PageResult<TaskConfigTest> search(SearchRequest searchRequest);
|
||||||
|
}
|
@ -0,0 +1,74 @@
|
|||||||
|
package com.docus.server.archivefile.service.impl;
|
||||||
|
|
||||||
|
import com.docus.server.entity.auth.TaskConfigTest;
|
||||||
|
import com.docus.server.archivefile.infrastructure.dao.ITaskConfigTestDao;
|
||||||
|
import com.docus.server.archivefile.service.ITaskConfigTestService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.docus.infrastructure.web.request.SearchRequest;
|
||||||
|
import com.docus.infrastructure.web.response.PageResult;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 主动任务测试对象 TaskConfigTestServiceImpl 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author AutoGenerator
|
||||||
|
* @since 2023-07-05
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TaskConfigTestServiceImpl implements ITaskConfigTestService {
|
||||||
|
@Resource
|
||||||
|
private ITaskConfigTestDao iTaskConfigTestDao;
|
||||||
|
/**
|
||||||
|
*按主键查询
|
||||||
|
* @param id 主键Id
|
||||||
|
* @return 实体
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TaskConfigTest findById(String id) {
|
||||||
|
return iTaskConfigTestDao.findById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键字搜素
|
||||||
|
* @param searchRequest 搜索参数
|
||||||
|
* @return 分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageResult<TaskConfigTest> search(SearchRequest searchRequest) {
|
||||||
|
return iTaskConfigTestDao.search(searchRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
* @param taskConfigTest 编辑参数
|
||||||
|
* @return 成功或失败
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean add(TaskConfigTest taskConfigTest) {
|
||||||
|
return iTaskConfigTestDao.add(taskConfigTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param taskConfigTest 编辑参数
|
||||||
|
* @return 成功或失败
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean edit(TaskConfigTest taskConfigTest) {
|
||||||
|
return iTaskConfigTestDao.edit(taskConfigTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
* @param ids 主键ids
|
||||||
|
* @return 成功或失败
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int delete(List<String> ids) {
|
||||||
|
return iTaskConfigTestDao.delete(ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
<?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.docus.server.archivefile.infrastructure.mapper.TaskConfigTestMapper">
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap"
|
||||||
|
type="com.docus.server.entity.auth.TaskConfigTest">
|
||||||
|
<id column="id" property="id"/>
|
||||||
|
<result column="name" property="name"/>
|
||||||
|
<result column="retry_key" property="retryKey"/>
|
||||||
|
<result column="type" property="type"/>
|
||||||
|
<result column="memo" property="memo"/>
|
||||||
|
<result column="start_time" property="startTime"/>
|
||||||
|
<result column="end_time" property="endTime"/>
|
||||||
|
<result column="all_pointer_time" property="allPointerTime"/>
|
||||||
|
<result column="page_size" property="pageSize"/>
|
||||||
|
<result column="spilt_period" property="spiltPeriod"/>
|
||||||
|
<result column="inc_pointer_time" property="incPointerTime"/>
|
||||||
|
<result column="param" property="param"/>
|
||||||
|
<result column="state" property="state"/>
|
||||||
|
<result column="last_error_msg" property="lastErrorMsg"/>
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 通用查询结果列 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, name, retry_key, type, memo, start_time, end_time, all_pointer_time, page_size, spilt_period, inc_pointer_time, param, state, last_error_msg, create_time, update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,82 @@
|
|||||||
|
package com.docus.server.api.auth;
|
||||||
|
|
||||||
|
import com.docus.infrastructure.web.request.SearchRequest;
|
||||||
|
import com.docus.infrastructure.web.response.PageResult;
|
||||||
|
import com.docus.server.entity.auth.TaskConfigTest;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 主动任务测试对象 API
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author AutoGenerator
|
||||||
|
* @since 2023-07-05
|
||||||
|
*/
|
||||||
|
@Api(value = "主动任务测试对象任务管理接口", tags = "主动任务测试对象任务管理接口")
|
||||||
|
@FeignClient(value = "common-docus/docus-archivefile", contextId = "common-docus/docus-archivefile.TaskConfigTestApi")
|
||||||
|
@RequestMapping("/taskConfigTest")
|
||||||
|
public interface TaskConfigTestApi {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按主键查询
|
||||||
|
*
|
||||||
|
* @param id 主键id
|
||||||
|
* @return 实体
|
||||||
|
*/
|
||||||
|
@ApiOperation("按主键查询")
|
||||||
|
@GetMapping("/find/{id}")
|
||||||
|
TaskConfigTest findById(@PathVariable(value = "id") String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键字搜素
|
||||||
|
*
|
||||||
|
* @param searchRequest 搜索参数
|
||||||
|
* @return 分页列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("关键字搜素")
|
||||||
|
@PostMapping("/search")
|
||||||
|
PageResult<TaskConfigTest> search(@RequestBody SearchRequest searchRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
|
* @param taskConfigTest 新增参数
|
||||||
|
* @return 成功或失败
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增")
|
||||||
|
@PostMapping("/add")
|
||||||
|
boolean add(@RequestBody TaskConfigTest taskConfigTest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param taskConfigTest 编辑参数
|
||||||
|
* @return 成功或失败
|
||||||
|
*/
|
||||||
|
@ApiOperation("编辑")
|
||||||
|
@PutMapping("/edit")
|
||||||
|
boolean edit(@RequestBody TaskConfigTest taskConfigTest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids 主键ids
|
||||||
|
* @return 成功或失败
|
||||||
|
*/
|
||||||
|
@ApiOperation("批量删除")
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
int delete(@RequestBody List<String> ids);
|
||||||
|
}
|
Loading…
Reference in New Issue