添加实体类
parent
4455aa1577
commit
0b8ffdafae
|
@ -0,0 +1,20 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
/**
|
||||
* @PackageName:com.muyu.domain
|
||||
* @ClassName:aaA
|
||||
* @Description:
|
||||
* @author: ¥陈思豪¥
|
||||
* @date: 2024/8/23 18:53
|
||||
*/
|
||||
public class Structure {
|
||||
private Integer id;
|
||||
private String fieldName;
|
||||
private String fieldType;
|
||||
private String fieldLength;
|
||||
private String fieldDecimals;
|
||||
private String isNull;
|
||||
private String isDictionary;
|
||||
private String defaultValue;
|
||||
|
||||
}
|
|
@ -56,16 +56,16 @@ public class TaskInputInfo extends BaseEntity {
|
|||
/**
|
||||
* 表字段
|
||||
*/
|
||||
private Integer tableField;
|
||||
private String[] tableField;
|
||||
|
||||
/**
|
||||
* 表字段别名
|
||||
*/
|
||||
private String ableAsField;
|
||||
private String[] ableAsField;
|
||||
|
||||
/**
|
||||
* 字段规则
|
||||
*/
|
||||
private String fieldAsEngineId;
|
||||
private String[] fieldAsEngineId;
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
package com.muyu.domain.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @PackageName:com.muyu.domain.req
|
||||
* @ClassName:TaskInforeq
|
||||
* @Description:
|
||||
* @author: ¥陈思豪¥
|
||||
* @date: 2024/8/23 10:49
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class TaskInfoReq {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 任务优先级
|
||||
*/
|
||||
private Integer weigh;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
private Integer pageNum=1;
|
||||
|
||||
private Integer pageSize=5;
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.muyu.domain.resp;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @PackageName:com.muyu.domain.resp
|
||||
* @ClassName:TaskInfoResp
|
||||
* @Description:
|
||||
* @author: ¥陈思豪¥
|
||||
* @date: 2024/8/23 10:48
|
||||
*/
|
||||
public class TaskInfoResp {
|
||||
|
||||
|
||||
}
|
|
@ -4,6 +4,7 @@ import com.muyu.common.core.domain.Result;
|
|||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.domain.TaskInfo;
|
||||
import com.muyu.domain.req.TaskInfoReq;
|
||||
import com.muyu.service.TaskService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
@ -33,10 +34,10 @@ public class TaskController {
|
|||
@RequestMapping(path = "/list", method = RequestMethod.POST)
|
||||
@Operation(summary = "查看指定任务", description = "根据任务的名称或者状态 ,进行模糊查询")
|
||||
public Result<List<TaskInfo>> selectList(
|
||||
@Validated @RequestBody TaskInfo taskInfo) {
|
||||
@Validated @RequestBody TaskInfoReq taskInfoReq) {
|
||||
startPage();
|
||||
return Result.success(
|
||||
taskService.selectList(taskInfo)
|
||||
taskService.selectList(taskInfoReq)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,9 @@ public class TaskInputController {
|
|||
public Result<List<TaskInputInfo>> selectList(
|
||||
@Validated @RequestBody TaskInfo taskInfo) {
|
||||
startPage();
|
||||
List<TaskInputInfo> taskInputInfos = taskInputService.selectList(taskInfo);
|
||||
return Result.success(
|
||||
taskInputService.selectList(taskInfo)
|
||||
taskInputInfos
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.muyu.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.TaskInfo;
|
||||
import com.muyu.domain.req.TaskInfoReq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -13,7 +14,7 @@ import java.util.List;
|
|||
* @date: 2024/8/22 17:15
|
||||
*/
|
||||
public interface TaskService extends IService<TaskInfo> {
|
||||
List<TaskInfo> selectList(TaskInfo taskInfo);
|
||||
List<TaskInfo> selectList(TaskInfoReq taskInfoReq);
|
||||
|
||||
String addTask(TaskInfo taskInfo);
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.domain.TaskInfo;
|
||||
import com.muyu.domain.req.TaskInfoReq;
|
||||
import com.muyu.mapper.TaskMapper;
|
||||
import com.muyu.service.TaskService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
@ -33,20 +34,21 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskInfo> implement
|
|||
|
||||
|
||||
@Override
|
||||
public List<TaskInfo> selectList(TaskInfo taskInfo) {
|
||||
public List<TaskInfo> selectList(TaskInfoReq taskInfoReq) {
|
||||
|
||||
LambdaQueryWrapper<TaskInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.like(
|
||||
StringUtils.isNotEmpty(taskInfo.getName()),
|
||||
TaskInfo::getName, taskInfo.getName()
|
||||
StringUtils.isNotEmpty(taskInfoReq.getName()),
|
||||
TaskInfo::getName, taskInfoReq.getName()
|
||||
);
|
||||
if(taskInfo.getStatus()!=null && taskInfo.getStatus()!=0){
|
||||
if(taskInfoReq.getStatus()!=null && taskInfoReq.getStatus()!=0){
|
||||
queryWrapper.eq(
|
||||
TaskInfo::getStatus,taskInfo.getStatus()
|
||||
TaskInfo::getStatus,taskInfoReq.getStatus()
|
||||
);
|
||||
}
|
||||
if(taskInfo.getWeigh()!=null && taskInfo.getWeigh()!=0 ){
|
||||
if(taskInfoReq.getWeigh()!=null && taskInfoReq.getWeigh()!=0 ){
|
||||
queryWrapper.eq(
|
||||
TaskInfo::getWeigh,taskInfo.getWeigh()
|
||||
TaskInfo::getWeigh,taskInfoReq.getWeigh()
|
||||
);
|
||||
}
|
||||
return this.list(queryWrapper);
|
||||
|
|
|
@ -7,7 +7,7 @@ nacos:
|
|||
addr: 47.116.184.54:8848
|
||||
user-name: nacos
|
||||
password: nacos
|
||||
namespace: cloud-2112
|
||||
namespace: text
|
||||
# Spring
|
||||
spring:
|
||||
|
||||
|
|
Loading…
Reference in New Issue