12345678910111213141516171819202122232425262728293031323334 |
- <?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.huimv.admin.mapper.EnergyEnvDeviceMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.huimv.admin.entity.EnergyEnvDevice">
- <id column="id" property="id" />
- <result column="device_code" property="deviceCode" />
- <result column="device_name" property="deviceName" />
- <result column="build_location" property="buildLocation" />
- <result column="unit_name" property="unitName" />
- <result column="unit_id" property="unitId" />
- <result column="device_brand" property="deviceBrand" />
- <result column="device_status" property="deviceStatus" />
- <result column="farm_id" property="farmId" />
- <result column="ohter1" property="ohter1" />
- <result column="ohter2" property="ohter2" />
- <result column="ohter3" property="ohter3" />
- <result column="remark" property="remark" />
- </resultMap>
- <select id="listElePigpen" resultType="com.huimv.admin.entity.vo.UnitEnergyVo">
- SELECT d.unit_id AS 'id',d.unit_name AS 'buildName'
- FROM `energy_env_device` d
- WHERE d.farm_id = #{farmId} AND d.remark = 0
- ORDER BY buildName
- </select>
- <select id="listWaterPigpen" resultType="com.huimv.admin.entity.vo.UnitEnergyVo">
- SELECT d.unit_id AS 'id',d.unit_name AS 'buildName'
- FROM `energy_env_device` d
- WHERE d.farm_id = #{farmId} AND d.remark = 1
- ORDER BY buildName
- </select>
- </mapper>
|