forked from rongchao/epmet-cloud-rizhao
6 changed files with 157 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||
package com.epmet.dataaggre.dao.opercustomize; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dataaggre.entity.opercustomize.IcResiCategoryWarnConfigEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface IcResiCategoryWarnConfigDao extends BaseDao<IcResiCategoryWarnConfigEntity> { |
|||
} |
@ -0,0 +1,86 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.entity.opercustomize; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 居民类别预警配置表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-11-04 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_resi_category_warn_config") |
|||
public class IcResiCategoryWarnConfigEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 项标签 |
|||
*/ |
|||
private String label; |
|||
|
|||
/** |
|||
* 表名 |
|||
*/ |
|||
private String tableName; |
|||
|
|||
/** |
|||
* 列名 |
|||
*/ |
|||
private String columnName; |
|||
/** |
|||
* 是否预警 1 是 0 否 |
|||
*/ |
|||
private String warn; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 等级1阈值 |
|||
*/ |
|||
@TableField(value = "LEVEL_1") |
|||
private Integer level1; |
|||
|
|||
/** |
|||
* 等级2阈值 |
|||
*/ |
|||
@TableField(value = "LEVEL_2") |
|||
private Integer level2; |
|||
|
|||
/** |
|||
* 等级3阈值 |
|||
*/ |
|||
@TableField(value = "LEVEL_3") |
|||
private Integer level3; |
|||
|
|||
} |
@ -0,0 +1,9 @@ |
|||
package com.epmet.dataaggre.service.opercustomize; |
|||
|
|||
import com.epmet.dataaggre.entity.opercustomize.IcResiCategoryWarnConfigEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface IcResiCategoryWarnService { |
|||
List<IcResiCategoryWarnConfigEntity> listResiCategoriesNeed2Warn(String loginUserCustomerId); |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.epmet.dataaggre.service.opercustomize.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|||
import com.epmet.dataaggre.constant.DataSourceConstant; |
|||
import com.epmet.dataaggre.dao.opercustomize.IcResiCategoryWarnConfigDao; |
|||
import com.epmet.dataaggre.entity.opercustomize.IcResiCategoryWarnConfigEntity; |
|||
import com.epmet.dataaggre.service.opercustomize.IcResiCategoryWarnService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Service |
|||
@DataSource(DataSourceConstant.OPERCUSTOMIZE) |
|||
public class IcResiCategoryWarnServiceImpl implements IcResiCategoryWarnService { |
|||
|
|||
@Autowired |
|||
private IcResiCategoryWarnConfigDao icResiCategoryWarnConfigDao; |
|||
|
|||
@Override |
|||
public List<IcResiCategoryWarnConfigEntity> listResiCategoriesNeed2Warn(String customerId) { |
|||
LambdaQueryWrapper<IcResiCategoryWarnConfigEntity> query = new LambdaQueryWrapper<>(); |
|||
query.eq(IcResiCategoryWarnConfigEntity::getCustomerId, customerId); |
|||
query.eq(IcResiCategoryWarnConfigEntity::getWarn, "1"); |
|||
return icResiCategoryWarnConfigDao.selectList(query); |
|||
} |
|||
} |
@ -0,0 +1,5 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dataaggre.dao.opercustomize.IcResiCategoryWarnConfigDao"> |
|||
</mapper> |
Loading…
Reference in new issue