| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.nanometer.smartlab.dao.SysWarehouseStatusDao"> |
| | | <resultMap id="BaseMap" type="com.nanometer.smartlab.entity.SysWarehouseStatus"> |
| | | <id property="id" column="id"/> |
| | | <result property="name" column="name" /> |
| | | <result property="type" column="type"/> |
| | | <result property="temperature" column="temperature"/> |
| | | <result property="humidity" column="humidity"/> |
| | | <result property="creator" column="creator"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="validFlag" column="valid_flag"/> |
| | | <result property="warehouseId" column="warehouse_id"/> |
| | | <result property="warning" column="warning"/> |
| | | <result property="selectDate" column="select_date"/> |
| | | </resultMap> |
| | | |
| | | <insert id="insertOne" parameterType="com.nanometer.smartlab.entity.SysWarehouseStatus"> |
| | |
| | | values |
| | | (#{type},#{name},#{temperature},#{humidity},#{creator},#{createTime},1,#{warehouseId},#{selectDate},#{warning}) |
| | | </insert> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(0) |
| | | from sys_warehouse_status |
| | | <where> |
| | | <if test="params.name != null and params.name != ''"> |
| | | name = #{params.name} |
| | | </if> |
| | | <if test="params.startTime != null and params.startTime != ''"> |
| | | and select_date >= #{params.startTime} |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"> |
| | | and select_date <= #{params.endTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectList" resultMap="BaseMap"> |
| | | select * |
| | | from sys_warehouse_status |
| | | <where> |
| | | <if test="params.name != null and params.name != ''"> |
| | | and name = #{params.name} |
| | | </if> |
| | | <if test="params.startTime != null and params.startTime != ''"> |
| | | and select_date >= #{params.startTime} |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"> |
| | | and select_date <= #{params.endTime} |
| | | </if> |
| | | </where> |
| | | <if test="params.first != null and params.pageSize != null"> |
| | | limit #{params.first},#{params.pageSize} |
| | | </if> |
| | | </select> |
| | | <select id="selectById" resultType="com.nanometer.smartlab.entity.SysWarehouseStatus"> |
| | | select * |
| | | from sys_warehouse_status |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | </mapper> |