添加实体类

master
陈思豪 2024-08-23 10:03:17 +08:00
parent 801e609c50
commit b3d3d76d48
2 changed files with 20 additions and 8 deletions

View File

@ -1,5 +1,8 @@
package com.muyu.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.*;
import lombok.experimental.SuperBuilder;
@ -16,8 +19,14 @@ import lombok.experimental.SuperBuilder;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@TableName(value = "task_info",autoResultMap = true)
public class TaskInfo extends BaseEntity {
/**
*
*/
@TableId(value = "id",type = IdType.AUTO)
private Integer id;
/**

View File

@ -39,14 +39,16 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskInfo> implement
StringUtils.isNotEmpty(taskInfo.getName()),
TaskInfo::getName, taskInfo.getName()
);
// queryWrapper.ne(TaskInfo::getStatus, 0);
// queryWrapper.eq(
// TaskInfo::getStatus,taskInfo.getStatus()
// );
// queryWrapper.ne(TaskInfo::getWeigh, 0);
// queryWrapper.eq(
// TaskInfo::getStatus,taskInfo.getWeigh()
// );
if(taskInfo.getStatus()!=0){
queryWrapper.eq(
TaskInfo::getStatus,taskInfo.getStatus()
);
}
if(taskInfo.getWeigh()!=0){
queryWrapper.eq(
TaskInfo::getWeigh,taskInfo.getWeigh()
);
}
return this.list(queryWrapper);
}
@ -56,6 +58,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskInfo> implement
return "success";
}
@Override
public String updById(TaskInfo taskInfo) {
this.updateById(taskInfo);