决策信息列表调整
This commit is contained in:
parent
ba52d9a6f2
commit
9923d4bc9a
@ -14,9 +14,9 @@ import lombok.Setter;
|
||||
@NoArgsConstructor
|
||||
public class AlertTipQueryDTO extends PageDTO<AlertTip> {
|
||||
|
||||
private AlertType alertType;
|
||||
private AlertTipTimeType timeType;
|
||||
private AlertLocation locationType;
|
||||
private String alertType;
|
||||
private String timeType;
|
||||
private String locationType;
|
||||
private Long areaConfigId;
|
||||
private String areaConfigName;
|
||||
}
|
||||
|
@ -20,5 +20,5 @@ import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface AlertTipMapper extends BaseMapper<AlertTip> {
|
||||
|
||||
IPage<AlertTipInfoDto> newSelectPage2(@Param("tipQuery") AlertTipQueryDTO dto);
|
||||
IPage<AlertTipInfoDto> selectForPage(@Param("tipQuery") AlertTipQueryDTO dto);
|
||||
}
|
||||
|
@ -34,10 +34,10 @@ public class AlertTipRepository extends ServiceImpl<AlertTipMapper, AlertTip> im
|
||||
public Page<AlertTip> page(AlertTipQueryDTO queryDTO) {
|
||||
LambdaQueryWrapper<AlertTip> queryWrapper = Wrappers.lambdaQuery(AlertTip.class);
|
||||
if (queryDTO.getAlertType() != null) {
|
||||
queryWrapper.eq(AlertTip::getAlertType, queryDTO.getAlertType().name());
|
||||
queryWrapper.eq(AlertTip::getAlertType, queryDTO.getAlertType());
|
||||
}
|
||||
if (queryDTO.getTimeType() != null) {
|
||||
queryWrapper.eq(AlertTip::getTimeType, queryDTO.getTimeType().name());
|
||||
queryWrapper.eq(AlertTip::getTimeType, queryDTO.getTimeType());
|
||||
}
|
||||
queryWrapper.eq(queryDTO.getAreaConfigId() != null, AlertTip::getAreaConfigId, queryDTO.getAreaConfigId());
|
||||
|
||||
@ -66,7 +66,7 @@ public class AlertTipRepository extends ServiceImpl<AlertTipMapper, AlertTip> im
|
||||
|
||||
@Override
|
||||
public IPage<AlertTipInfoDto> leftAreaPage(AlertTipQueryDTO queryDTO) {
|
||||
return this.baseMapper.newSelectPage2(queryDTO);
|
||||
return this.baseMapper.selectForPage(queryDTO);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="club.joylink.xiannccda.mapper.AlertTipMapper">
|
||||
|
||||
<select id="newSelectPage2" resultType="club.joylink.xiannccda.dto.alertTip.AlertTipInfoDto">
|
||||
<select id="selectForPage" resultType="club.joylink.xiannccda.dto.alertTip.AlertTipInfoDto">
|
||||
select A.*, B.area_name as areaConfigName
|
||||
from alert_tip A left join device_area_config B on A.area_config_id = B.id
|
||||
where 1 = 1
|
||||
|
@ -25,7 +25,8 @@ public class AlertTipServiceTest {
|
||||
@Test
|
||||
public void page() {
|
||||
AlertTipQueryDTO dto = new AlertTipQueryDTO();
|
||||
dto.setAreaConfigName("鱼");
|
||||
|
||||
dto.setAlertType(AlertType.BLUE_DISPLAY.name());
|
||||
IPage<AlertTipInfoDto> page = this.alertTipRepository.leftAreaPage(dto);
|
||||
System.out.println(JSON.toJSONString(page, Feature.PrettyFormat));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user