Browse Source

feat: 修改可选配置

master_tdsql
hxh 11 months ago
parent
commit
10037c3cc5
  1. 19
      shuili-system/src/main/java/com/kms/yxgh/df/dto/DfPlanDetailDto.java
  2. 2
      shuili-system/src/main/java/com/kms/yxgh/df/service/DfPlanService.java

19
shuili-system/src/main/java/com/kms/yxgh/df/dto/DfPlanDetailDto.java

@ -50,8 +50,8 @@ public class DfPlanDetailDto {
@ApiModelProperty("提醒时间")
private Date reminderTime;
@ApiModelProperty("附加配置")
private JSONObject otherConfig;
@ApiModelProperty("计划可选配置")
private OptionConfig otherConfig;
@ApiModelProperty("执行人")
private String status = "1";
@ -70,4 +70,19 @@ public class DfPlanDetailDto {
return cycleType;
}
@Data
@ApiModel("计划可选配置")
public static class OptionConfig {
//每月哪天提醒
@ApiModelProperty("每月哪天提醒")
private List<Integer> reminderDays;
//每周哪天提醒
@ApiModelProperty("每周哪天提醒")
private List<Integer> reminderWeeks;
@ApiModelProperty("自定义可选配置")
private JSONObject options;
}
}

2
shuili-system/src/main/java/com/kms/yxgh/df/service/DfPlanService.java

@ -62,7 +62,7 @@ public class DfPlanService extends BaseService<DfPlanMapper, DfPlan> {
DfPlan dfPlan = this.getById(id);
DfPlanDetailDto dto = BeanCopyUtils.copy(dfPlan, DfPlanDetailDto.class);
if (dto != null) {
dto.setOtherConfig(JSON.parseObject(dfPlan.getOtherConfig()));
dto.setOtherConfig(JSON.parseObject(dfPlan.getOtherConfig(), DfPlanDetailDto.OptionConfig.class));
dto.setContents(getContents(id).stream()
.map(this::toDto)
.collect(Collectors.toList()));

Loading…
Cancel
Save