添加实体类
parent
801e609c50
commit
b3d3d76d48
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue