任务课包代码生成

master
chenken 4 years ago
parent 0cc653eed2
commit e21ded6c8b

@ -31,7 +31,7 @@ import java.io.Serializable;
* @website https://el-admin.vip
* @description /
* @author x
* @date 2020-09-08
* @date 2020-09-09
**/
@Entity
@Data
@ -58,18 +58,15 @@ public class TaskRecord implements Serializable {
@ApiModelProperty(value = "任务名称")
private String taskName;
@Column(name = "time_period",nullable = false)
@NotNull
@Column(name = "time_period")
@ApiModelProperty(value = "任务保存周期")
private Integer timePeriod;
@Column(name = "is_build",nullable = false)
@NotNull
@Column(name = "is_build")
@ApiModelProperty(value = "任务是否建立成功")
private Integer isBuild;
@Column(name = "is_send",nullable = false)
@NotNull
@Column(name = "is_send")
@ApiModelProperty(value = "发送状态记录")
private Integer isSend;
@ -77,11 +74,6 @@ public class TaskRecord implements Serializable {
@ApiModelProperty(value = "操作人")
private String oprationName;
@Column(name = "desc",nullable = false)
@NotBlank
@ApiModelProperty(value = "自定义内容补充")
private String desc;
@Column(name = "local_file_path")
@ApiModelProperty(value = "本地生成待发送文件路径")
private String localFilePath;
@ -90,6 +82,18 @@ public class TaskRecord implements Serializable {
@ApiModelProperty(value = "查询参数暂存")
private String params;
@Column(name = "total")
@ApiModelProperty(value = "该任务生成总记录数")
private Long total;
@Column(name = "send_total")
@ApiModelProperty(value = "上次发送总记录数")
private Long sendTotal;
@Column(name = "description")
@ApiModelProperty(value = "自定义内容补充")
private String description;
public void copy(TaskRecord source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}

@ -22,7 +22,7 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* @website https://el-admin.vip
* @author x
* @date 2020-09-08
* @date 2020-09-09
**/
public interface TaskRecordRepository extends JpaRepository<TaskRecord, Integer>, JpaSpecificationExecutor<TaskRecord> {
}

@ -16,7 +16,6 @@
package me.zhengjie.modules.taskrecord.rest;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.abmessage.rest.vo.AbMessageVO;
import me.zhengjie.modules.taskrecord.domain.TaskRecord;
import me.zhengjie.modules.taskrecord.service.TaskRecordService;
import me.zhengjie.modules.taskrecord.service.dto.TaskRecordQueryCriteria;
@ -34,7 +33,7 @@ import javax.servlet.http.HttpServletResponse;
/**
* @website https://el-admin.vip
* @author x
* @date 2020-09-08
* @date 2020-09-09
**/
@RestController
@RequiredArgsConstructor
@ -105,4 +104,4 @@ public class TaskRecordController {
return new ResponseEntity<>(HttpStatus.OK);
}
// ================ 自定义功能实现 end ================
}
}

@ -28,7 +28,7 @@ import javax.servlet.http.HttpServletResponse;
* @website https://el-admin.vip
* @description
* @author x
* @date 2020-09-08
* @date 2020-09-09
**/
public interface TaskRecordService {

@ -23,7 +23,7 @@ import java.io.Serializable;
* @website https://el-admin.vip
* @description /
* @author x
* @date 2020-09-08
* @date 2020-09-09
**/
@Data
public class TaskRecordDto implements Serializable {
@ -52,12 +52,18 @@ public class TaskRecordDto implements Serializable {
/** 操作人 */
private String oprationName;
/** 自定义内容补充 */
private String desc;
/** 本地生成待发送文件路径 */
private String localFilePath;
/** 查询参数暂存 */
private String params;
/** 该任务生成总记录数 */
private Long total;
/** 上次发送总记录数 */
private Long sendTotal;
/** 自定义内容补充 */
private String description;
}

@ -22,7 +22,7 @@ import me.zhengjie.annotation.Query;
/**
* @website https://el-admin.vip
* @author x
* @date 2020-09-08
* @date 2020-09-09
**/
@Data
public class TaskRecordQueryCriteria{

@ -41,7 +41,7 @@ import java.util.LinkedHashMap;
* @website https://el-admin.vip
* @description
* @author x
* @date 2020-09-08
* @date 2020-09-09
**/
@Service
@RequiredArgsConstructor
@ -103,9 +103,11 @@ public class TaskRecordServiceImpl implements TaskRecordService {
map.put("任务是否建立成功", taskRecord.getIsBuild());
map.put("发送状态记录", taskRecord.getIsSend());
map.put("操作人", taskRecord.getOprationName());
map.put("自定义内容补充", taskRecord.getDesc());
map.put("本地生成待发送文件路径", taskRecord.getLocalFilePath());
map.put("查询参数暂存", taskRecord.getParams());
map.put("该任务生成总记录数", taskRecord.getTotal());
map.put("上次发送总记录数", taskRecord.getSendTotal());
map.put("自定义内容补充", taskRecord.getDescription());
list.add(map);
}
FileUtil.downloadExcel(list, response);

@ -24,7 +24,7 @@ import org.mapstruct.ReportingPolicy;
/**
* @website https://el-admin.vip
* @author x
* @date 2020-09-08
* @date 2020-09-09
**/
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface TaskRecordMapper extends BaseMapper<TaskRecordDto, TaskRecord> {

Loading…
Cancel
Save