This commit is contained in:
parent
9d54e530ee
commit
35a90db49a
18
pom.xml
18
pom.xml
|
|
@ -71,6 +71,24 @@
|
||||||
<artifactId>ruoyi-common-swagger</artifactId>
|
<artifactId>ruoyi-common-swagger</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Tuoheng TASK API -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>tuoheng-api-task</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Flyway Database Migration -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.flywaydb</groupId>
|
||||||
|
<artifactId>flyway-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Flyway MySQL Support -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.flywaydb</groupId>
|
||||||
|
<artifactId>flyway-mysql</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
package com.ruoyi.task.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.security.annotation.InnerAuth;
|
||||||
|
import com.ruoyi.task.api.domain.TaskTempVO;
|
||||||
|
import com.ruoyi.task.controller.convert.TaskTempControllerConvert;
|
||||||
|
import com.ruoyi.task.service.api.ITaskTempService;
|
||||||
|
import com.ruoyi.task.service.dto.TaskTempDTO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/task/temp")
|
||||||
|
public class TaskTempController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ITaskTempService taskTempService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询任务临时表列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(TaskTempVO taskTemp)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
// API Domain → Service DTO
|
||||||
|
TaskTempDTO dto = TaskTempControllerConvert.toDTO(taskTemp);
|
||||||
|
List<TaskTempDTO> dtoList = taskTempService.selectTaskTempList(dto);
|
||||||
|
// Service DTO → API Domain
|
||||||
|
List<TaskTempVO> list = TaskTempControllerConvert.toApiDomainList(dtoList);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取任务临时表详细信息(内部调用)
|
||||||
|
*/
|
||||||
|
@InnerAuth
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public R<TaskTempVO> getTaskById(@PathVariable("id") String id)
|
||||||
|
{
|
||||||
|
TaskTempDTO dto = taskTempService.selectTaskTempById(id);
|
||||||
|
TaskTempVO taskTemp = TaskTempControllerConvert.toVO(dto);
|
||||||
|
return R.ok(taskTemp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取任务临时表详细信息(外部调用)
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/info/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||||
|
{
|
||||||
|
TaskTempDTO dto = taskTempService.selectTaskTempById(id);
|
||||||
|
TaskTempVO taskTemp = TaskTempControllerConvert.toVO(dto);
|
||||||
|
return success(taskTemp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.ruoyi.task.controller.convert;
|
||||||
|
|
||||||
|
import com.ruoyi.task.api.domain.TaskTempVO;
|
||||||
|
import com.ruoyi.task.service.dto.TaskTempDTO;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表Controller层转换器
|
||||||
|
* API Domain ↔ Service DTO
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class TaskTempControllerConvert
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* DTO 转 API Domain
|
||||||
|
*/
|
||||||
|
public static TaskTempVO toVO(TaskTempDTO dto)
|
||||||
|
{
|
||||||
|
if (dto == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
TaskTempVO apiDomain = new TaskTempVO();
|
||||||
|
BeanUtils.copyProperties(dto, apiDomain);
|
||||||
|
return apiDomain;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API Domain 转 DTO
|
||||||
|
*/
|
||||||
|
public static TaskTempDTO toDTO(TaskTempVO apiDomain)
|
||||||
|
{
|
||||||
|
if (apiDomain == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
TaskTempDTO dto = new TaskTempDTO();
|
||||||
|
BeanUtils.copyProperties(apiDomain, dto);
|
||||||
|
return dto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DTO List 转 API Domain List
|
||||||
|
*/
|
||||||
|
public static List<TaskTempVO> toApiDomainList(List<TaskTempDTO> dtoList)
|
||||||
|
{
|
||||||
|
if (dtoList == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return dtoList.stream().map(TaskTempControllerConvert::toVO).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.ruoyi.task.domain.api;
|
||||||
|
|
||||||
|
import com.ruoyi.task.domain.model.TaskTemp;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表Domain接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public interface ITaskTempDomain
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询任务临时表列表
|
||||||
|
*
|
||||||
|
* @param taskTemp 任务临时表
|
||||||
|
* @return 任务临时表集合
|
||||||
|
*/
|
||||||
|
List<TaskTemp> selectTaskTempList(TaskTemp taskTemp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询任务临时表
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return 任务临时表
|
||||||
|
*/
|
||||||
|
TaskTemp selectTaskTempById(String id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.ruoyi.task.domain.convert;
|
||||||
|
|
||||||
|
import com.ruoyi.task.domain.model.TaskTemp;
|
||||||
|
import com.ruoyi.task.mapper.entity.TaskTempEntity;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表Domain层转换器
|
||||||
|
* Domain Model ↔ Mapper Entity
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class TaskTempDomainConvert
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Entity 转 Model
|
||||||
|
*/
|
||||||
|
public static TaskTemp toModel(TaskTempEntity entity)
|
||||||
|
{
|
||||||
|
if (entity == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
TaskTemp model = new TaskTemp();
|
||||||
|
BeanUtils.copyProperties(entity, model);
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model 转 Entity
|
||||||
|
*/
|
||||||
|
public static TaskTempEntity toEntity(TaskTemp model)
|
||||||
|
{
|
||||||
|
if (model == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
TaskTempEntity entity = new TaskTempEntity();
|
||||||
|
BeanUtils.copyProperties(model, entity);
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Entity List 转 Model List
|
||||||
|
*/
|
||||||
|
public static List<TaskTemp> toModelList(List<TaskTempEntity> entityList)
|
||||||
|
{
|
||||||
|
if (entityList == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return entityList.stream().map(TaskTempDomainConvert::toModel).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.ruoyi.task.domain.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.task.domain.api.ITaskTempDomain;
|
||||||
|
import com.ruoyi.task.domain.convert.TaskTempDomainConvert;
|
||||||
|
import com.ruoyi.task.domain.model.TaskTemp;
|
||||||
|
import com.ruoyi.task.mapper.TaskTempMapper;
|
||||||
|
import com.ruoyi.task.mapper.entity.TaskTempEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表Domain实现
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class TaskTempDomainImpl implements ITaskTempDomain
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private TaskTempMapper taskTempMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TaskTemp> selectTaskTempList(TaskTemp taskTempModel)
|
||||||
|
{
|
||||||
|
TaskTempEntity entity = TaskTempDomainConvert.toEntity(taskTempModel);
|
||||||
|
List<TaskTempEntity> entityList = taskTempMapper.selectTaskTempList(entity);
|
||||||
|
return TaskTempDomainConvert.toModelList(entityList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TaskTemp selectTaskTempById(String id)
|
||||||
|
{
|
||||||
|
TaskTempEntity entity = taskTempMapper.selectTaskTempById(id);
|
||||||
|
return TaskTempDomainConvert.toModel(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.ruoyi.task.domain.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表领域模型
|
||||||
|
* Domain 层对外暴露的对象
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class TaskTemp implements Serializable
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime()
|
||||||
|
{
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime)
|
||||||
|
{
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime()
|
||||||
|
{
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime)
|
||||||
|
{
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.ruoyi.task.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.task.mapper.entity.TaskTempEntity;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public interface TaskTempMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询任务临时表列表
|
||||||
|
*
|
||||||
|
* @param taskTempEntity 任务临时表
|
||||||
|
* @return 任务临时表集合
|
||||||
|
*/
|
||||||
|
public List<TaskTempEntity> selectTaskTempList(TaskTempEntity taskTempEntity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询任务临时表
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return 任务临时表
|
||||||
|
*/
|
||||||
|
public TaskTempEntity selectTaskTempById(String id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.ruoyi.task.mapper.entity;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表实体对象 tuoheng_task_temp
|
||||||
|
* Mapper 层实体,对应数据库表
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class TaskTempEntity extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "TaskTempEntity{" +
|
||||||
|
"id='" + id + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.ruoyi.task.service.api;
|
||||||
|
|
||||||
|
import com.ruoyi.task.service.dto.TaskTempDTO;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public interface ITaskTempService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询任务临时表列表
|
||||||
|
*
|
||||||
|
* @param taskTempDTO 任务临时表
|
||||||
|
* @return 任务临时表集合
|
||||||
|
*/
|
||||||
|
List<TaskTempDTO> selectTaskTempList(TaskTempDTO taskTempDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询任务临时表
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return 任务临时表
|
||||||
|
*/
|
||||||
|
TaskTempDTO selectTaskTempById(String id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.ruoyi.task.service.convert;
|
||||||
|
|
||||||
|
import com.ruoyi.task.domain.model.TaskTemp;
|
||||||
|
import com.ruoyi.task.service.dto.TaskTempDTO;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表Service层转换器
|
||||||
|
* Service DTO ↔ Domain Model
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class TaskTempServiceConvert
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Model 转 DTO
|
||||||
|
*/
|
||||||
|
public static TaskTempDTO toDTO(TaskTemp model)
|
||||||
|
{
|
||||||
|
if (model == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
TaskTempDTO dto = new TaskTempDTO();
|
||||||
|
BeanUtils.copyProperties(model, dto);
|
||||||
|
return dto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DTO 转 Model
|
||||||
|
*/
|
||||||
|
public static TaskTemp toModel(TaskTempDTO dto)
|
||||||
|
{
|
||||||
|
if (dto == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
TaskTemp model = new TaskTemp();
|
||||||
|
BeanUtils.copyProperties(dto, model);
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model List 转 DTO List
|
||||||
|
*/
|
||||||
|
public static List<TaskTempDTO> toDTOList(List<TaskTemp> modelList)
|
||||||
|
{
|
||||||
|
if (modelList == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return modelList.stream().map(TaskTempServiceConvert::toDTO).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.ruoyi.task.service.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表服务层DTO
|
||||||
|
* Service 层对外暴露的对象
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
public class TaskTempDTO implements Serializable
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime()
|
||||||
|
{
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime)
|
||||||
|
{
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime()
|
||||||
|
{
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime)
|
||||||
|
{
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.ruoyi.task.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.task.domain.api.ITaskTempDomain;
|
||||||
|
import com.ruoyi.task.domain.model.TaskTemp;
|
||||||
|
import com.ruoyi.task.service.api.ITaskTempService;
|
||||||
|
import com.ruoyi.task.service.convert.TaskTempServiceConvert;
|
||||||
|
import com.ruoyi.task.service.dto.TaskTempDTO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务临时表Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-01-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TaskTempServiceImpl implements ITaskTempService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ITaskTempDomain taskTempDomain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询任务临时表列表
|
||||||
|
*
|
||||||
|
* @param taskTempDTO 任务临时表
|
||||||
|
* @return 任务临时表集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TaskTempDTO> selectTaskTempList(TaskTempDTO taskTempDTO)
|
||||||
|
{
|
||||||
|
TaskTemp model = TaskTempServiceConvert.toModel(taskTempDTO);
|
||||||
|
List<TaskTemp> modelList = taskTempDomain.selectTaskTempList(model);
|
||||||
|
return TaskTempServiceConvert.toDTOList(modelList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询任务临时表
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
* @return 任务临时表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TaskTempDTO selectTaskTempById(String id)
|
||||||
|
{
|
||||||
|
TaskTemp model = taskTempDomain.selectTaskTempById(id);
|
||||||
|
return TaskTempServiceConvert.toDTO(model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,15 +1,19 @@
|
||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 9201
|
port: 9206
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: tuoheng-task
|
name: tuoheng-task
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
||||||
active: prod
|
active: prod
|
||||||
|
flyway:
|
||||||
|
table: flyway_task_schema_history # 自定义历史表名
|
||||||
|
baseline-on-migrate: true # 在nocos中也有配置
|
||||||
|
baseline-version: 0 # 在nocos中也有配置
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
-- ============================================================
|
||||||
|
-- Flyway Migration Script
|
||||||
|
-- ============================================================
|
||||||
|
-- Version: V1
|
||||||
|
-- Description: Create tuoheng_task_temp table
|
||||||
|
-- Author: ruoyi
|
||||||
|
-- Date: 2026-01-17
|
||||||
|
-- ============================================================
|
||||||
|
|
||||||
|
-- 创建任务临时表
|
||||||
|
CREATE TABLE IF NOT EXISTS tuoheng_task_temp (
|
||||||
|
id VARCHAR(64) NOT NULL COMMENT '主键ID',
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='任务临时表';
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?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.ruoyi.task.mapper.TaskTempMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.task.mapper.entity.TaskTempEntity" id="TaskTempResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectTaskTempVo">
|
||||||
|
select id from tuoheng_task_temp
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectTaskTempList" parameterType="com.ruoyi.task.mapper.entity.TaskTempEntity" resultMap="TaskTempResult">
|
||||||
|
<include refid="selectTaskTempVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="id != null and id != ''"> and id = #{id}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTaskTempById" parameterType="String" resultMap="TaskTempResult">
|
||||||
|
<include refid="selectTaskTempVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue