123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?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.zglc.vm.dao.DeviceDao">
- <!-- 可根据自己的需求,是否要使用 -->
- <resultMap type="com.zglc.vm.entity.DeviceEntity" id="deviceMap">
- <result property="id" column="id"/>
- <result property="device_name" column="device_name"/>
- <result property="device_type" column="device_type"/>
- <result property="software_version" column="software_version"/>
- <result property="s_update_reason" column="s_update_reason"/>
- <result property="s_update_time" column="s_update_time"/>
- <result property="s_file_num" column="s_file_num"/>
- <result property="hardware_version" column="hardware_version"/>
- <result property="h_update_reason" column="h_update_reason"/>
- <result property="h_update_time" column="h_update_time"/>
- <result property="h_file_num" column="h_file_num"/>
- <result property="update_test" column="update_test"/>
- <result property="update_user" column="update_user"/>
- <result property="equipment_id" column="equipment_id"/>
- <result property="syst_id" column="syst_id"/>
- <result property="subsys_id" column="subsys_id"/>
- </resultMap>
- <!-- <select id="listAll" resultMap="userMap">-->
- <!-- select *-->
- <!-- from t_device-->
- <!-- where id > 1-->
- <!-- </select>-->
- <select id="getCount" resultType="java.lang.Integer">
- select count(1)
- from t_device
- </select>
- <select id="getLastInsert" resultMap="deviceMap">
- SELECT * FROM t_device ORDER BY id DESC LIMIT 1
- </select>
- <select id="findByName" parameterType="String" resultMap="deviceMap">
- select * FROM t_device where device_name like #{name}
- </select>
- <!-- <select id="findByName1" parameterType="com.zglc.vm.entity.DeviceFind" resultMap="deviceMap">-->
- <!-- select * FROM t_device where device_name like #{name} and device_type = #{deviceType}-->
- <!-- </select>-->
- <select id="findByAir" parameterType="Integer" resultMap="deviceMap">
- select * FROM t_device where equipment_id = #{airId}
- </select>
- <select id="findByAir1" parameterType="Integer" resultMap="deviceMap">
- select * FROM t_device where equipment_id = #{airId} and device_type = #{deviceType}
- </select>
- <select id="findBySys" parameterType="Integer" resultMap="deviceMap">
- select * FROM t_device where syst_id = #{sysId}
- </select>
- <select id="findBySys1" parameterType="Integer" resultMap="deviceMap">
- select * FROM t_device where syst_id = #{sysId} and device_type = #{deviceType}
- </select>
- <select id="findBySubSys" parameterType="Integer" resultMap="deviceMap">
- select * FROM t_device where subsys_id = #{subSysId}
- </select>
- </mapper>
|