feat(预警计划发布内容的模版名称替换):
This commit is contained in:
parent
a120716c7e
commit
79997243f5
|
@ -50,6 +50,6 @@ public class AlertPlan extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 显示内容
|
* 显示内容
|
||||||
*/
|
*/
|
||||||
@TableField(value = "display_content")
|
@TableField(value = "preset_content_id")
|
||||||
private String displayContent;
|
private Long presetContentId;
|
||||||
}
|
}
|
|
@ -35,7 +35,12 @@ public class AlertPlanAndPlanTypeDTO {
|
||||||
private BigDecimal minValue;
|
private BigDecimal minValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示内容
|
* 显示内容 ID
|
||||||
*/
|
*/
|
||||||
private String displayContent;
|
private Long presetContentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示内容名称
|
||||||
|
*/
|
||||||
|
private String presetContentName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
import com.ruoyi.board.domain.AlertPlan;
|
import com.ruoyi.board.domain.AlertPlan;
|
||||||
import com.ruoyi.board.domain.PlanType;
|
import com.ruoyi.board.domain.PlanType;
|
||||||
|
import com.ruoyi.board.domain.PresetContent;
|
||||||
import com.ruoyi.board.domain.dto.AlertPlanAndPlanTypeDTO;
|
import com.ruoyi.board.domain.dto.AlertPlanAndPlanTypeDTO;
|
||||||
import com.ruoyi.board.mapper.AlertPlanMapper;
|
import com.ruoyi.board.mapper.AlertPlanMapper;
|
||||||
import com.ruoyi.board.service.IAlertPlanService;
|
import com.ruoyi.board.service.IAlertPlanService;
|
||||||
|
@ -25,7 +26,9 @@ public class AlertPlanServiceImpl extends MPJBaseServiceImpl<AlertPlanMapper, Al
|
||||||
MPJLambdaWrapper<AlertPlan> eq = new MPJLambdaWrapper<AlertPlan>()
|
MPJLambdaWrapper<AlertPlan> eq = new MPJLambdaWrapper<AlertPlan>()
|
||||||
.selectAll(AlertPlan.class)
|
.selectAll(AlertPlan.class)
|
||||||
.select(PlanType::getTypeName)
|
.select(PlanType::getTypeName)
|
||||||
|
.selectAs(PresetContent::getName, "preset_content_name")
|
||||||
.leftJoin(PlanType.class, PlanType::getId, AlertPlan::getType)
|
.leftJoin(PlanType.class, PlanType::getId, AlertPlan::getType)
|
||||||
|
.leftJoin(PresetContent.class, PresetContent::getId, AlertPlan::getPresetContentId)
|
||||||
.eq(ObjectUtils.isNotEmpty(alertPlan.getType()), AlertPlan::getType, alertPlan.getType());
|
.eq(ObjectUtils.isNotEmpty(alertPlan.getType()), AlertPlan::getType, alertPlan.getType());
|
||||||
return selectJoinList(AlertPlanAndPlanTypeDTO.class, eq);
|
return selectJoinList(AlertPlanAndPlanTypeDTO.class, eq);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue