添加实体类

master
陈思豪 2024-08-24 18:50:19 +08:00
parent 4455aa1577
commit 0b8ffdafae
9 changed files with 104 additions and 15 deletions

View File

@ -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;
}

View File

@ -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;
} }

View File

@ -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;
}

View File

@ -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 {
}

View File

@ -4,6 +4,7 @@ import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil; import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.domain.TaskInfo; import com.muyu.domain.TaskInfo;
import com.muyu.domain.req.TaskInfoReq;
import com.muyu.service.TaskService; import com.muyu.service.TaskService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@ -33,10 +34,10 @@ public class TaskController {
@RequestMapping(path = "/list", method = RequestMethod.POST) @RequestMapping(path = "/list", method = RequestMethod.POST)
@Operation(summary = "查看指定任务", description = "根据任务的名称或者状态 ,进行模糊查询") @Operation(summary = "查看指定任务", description = "根据任务的名称或者状态 ,进行模糊查询")
public Result<List<TaskInfo>> selectList( public Result<List<TaskInfo>> selectList(
@Validated @RequestBody TaskInfo taskInfo) { @Validated @RequestBody TaskInfoReq taskInfoReq) {
startPage(); startPage();
return Result.success( return Result.success(
taskService.selectList(taskInfo) taskService.selectList(taskInfoReq)
); );
} }

View File

@ -33,8 +33,9 @@ public class TaskInputController {
public Result<List<TaskInputInfo>> selectList( public Result<List<TaskInputInfo>> selectList(
@Validated @RequestBody TaskInfo taskInfo) { @Validated @RequestBody TaskInfo taskInfo) {
startPage(); startPage();
List<TaskInputInfo> taskInputInfos = taskInputService.selectList(taskInfo);
return Result.success( return Result.success(
taskInputService.selectList(taskInfo) taskInputInfos
); );
} }

View File

@ -2,6 +2,7 @@ package com.muyu.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.domain.TaskInfo; import com.muyu.domain.TaskInfo;
import com.muyu.domain.req.TaskInfoReq;
import java.util.List; import java.util.List;
@ -13,7 +14,7 @@ import java.util.List;
* @date: 2024/8/22 17:15 * @date: 2024/8/22 17:15
*/ */
public interface TaskService extends IService<TaskInfo> { public interface TaskService extends IService<TaskInfo> {
List<TaskInfo> selectList(TaskInfo taskInfo); List<TaskInfo> selectList(TaskInfoReq taskInfoReq);
String addTask(TaskInfo taskInfo); String addTask(TaskInfo taskInfo);

View File

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.common.core.domain.Result; import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.StringUtils; import com.muyu.common.core.utils.StringUtils;
import com.muyu.domain.TaskInfo; import com.muyu.domain.TaskInfo;
import com.muyu.domain.req.TaskInfoReq;
import com.muyu.mapper.TaskMapper; import com.muyu.mapper.TaskMapper;
import com.muyu.service.TaskService; import com.muyu.service.TaskService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
@ -33,20 +34,21 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskInfo> implement
@Override @Override
public List<TaskInfo> selectList(TaskInfo taskInfo) { public List<TaskInfo> selectList(TaskInfoReq taskInfoReq) {
LambdaQueryWrapper<TaskInfo> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TaskInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.like( queryWrapper.like(
StringUtils.isNotEmpty(taskInfo.getName()), StringUtils.isNotEmpty(taskInfoReq.getName()),
TaskInfo::getName, taskInfo.getName() TaskInfo::getName, taskInfoReq.getName()
); );
if(taskInfo.getStatus()!=null && taskInfo.getStatus()!=0){ if(taskInfoReq.getStatus()!=null && taskInfoReq.getStatus()!=0){
queryWrapper.eq( 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( queryWrapper.eq(
TaskInfo::getWeigh,taskInfo.getWeigh() TaskInfo::getWeigh,taskInfoReq.getWeigh()
); );
} }
return this.list(queryWrapper); return this.list(queryWrapper);

View File

@ -7,7 +7,7 @@ nacos:
addr: 47.116.184.54:8848 addr: 47.116.184.54:8848
user-name: nacos user-name: nacos
password: nacos password: nacos
namespace: cloud-2112 namespace: text
# Spring # Spring
spring: spring: