| New file | 
|  |  |  | 
|---|
|  |  |  | <?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.dy.pipIrrGlobal.daoRm.RmIrrigateProfileMapper"> | 
|---|
|  |  |  | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | <!--@Table rm_irrigate_profile--> | 
|---|
|  |  |  | <id column="id" jdbcType="BIGINT" property="id"/> | 
|---|
|  |  |  | <result column="default_value" jdbcType="INTEGER" property="defaultValue"/> | 
|---|
|  |  |  | <result column="unit" jdbcType="TINYINT" property="unit"/> | 
|---|
|  |  |  | <result column="sort" jdbcType="INTEGER" property="sort"/> | 
|---|
|  |  |  | <result column="type" jdbcType="TINYINT" property="type"/> | 
|---|
|  |  |  | <result column="remarks" jdbcType="VARCHAR" property="remarks"/> | 
|---|
|  |  |  | <result column="deleted" jdbcType="BIGINT" property="deleted"/> | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  | <sql id="Base_Column_List"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | default_value, | 
|---|
|  |  |  | unit, | 
|---|
|  |  |  | sort, | 
|---|
|  |  |  | `type`, | 
|---|
|  |  |  | remarks, | 
|---|
|  |  |  | deleted | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | <include refid="Base_Column_List"/> | 
|---|
|  |  |  | from rm_irrigate_profile | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | delete | 
|---|
|  |  |  | from rm_irrigate_profile | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </delete> | 
|---|
|  |  |  | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | insert into rm_irrigate_profile (id, default_value, unit, | 
|---|
|  |  |  | sort, `type`, remarks, | 
|---|
|  |  |  | deleted) | 
|---|
|  |  |  | values (#{id,jdbcType=BIGINT}, #{defaultValue,jdbcType=INTEGER}, #{unit,jdbcType=TINYINT}, | 
|---|
|  |  |  | #{sort,jdbcType=INTEGER}, #{type,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}, | 
|---|
|  |  |  | #{deleted,jdbcType=BIGINT}) | 
|---|
|  |  |  | </insert> | 
|---|
|  |  |  | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | insert into rm_irrigate_profile | 
|---|
|  |  |  | <trim prefix="(" suffix=")" suffixOverrides=","> | 
|---|
|  |  |  | <if test="id != null"> | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="defaultValue != null"> | 
|---|
|  |  |  | default_value, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="unit != null"> | 
|---|
|  |  |  | unit, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="sort != null"> | 
|---|
|  |  |  | sort, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="type != null"> | 
|---|
|  |  |  | `type`, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="remarks != null"> | 
|---|
|  |  |  | remarks, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="deleted != null"> | 
|---|
|  |  |  | deleted, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | <trim prefix="values (" suffix=")" suffixOverrides=","> | 
|---|
|  |  |  | <if test="id != null"> | 
|---|
|  |  |  | #{id,jdbcType=BIGINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="defaultValue != null"> | 
|---|
|  |  |  | #{defaultValue,jdbcType=INTEGER}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="unit != null"> | 
|---|
|  |  |  | #{unit,jdbcType=TINYINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="sort != null"> | 
|---|
|  |  |  | #{sort,jdbcType=INTEGER}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="type != null"> | 
|---|
|  |  |  | #{type,jdbcType=TINYINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="remarks != null"> | 
|---|
|  |  |  | #{remarks,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="deleted != null"> | 
|---|
|  |  |  | #{deleted,jdbcType=BIGINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </insert> | 
|---|
|  |  |  | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | update rm_irrigate_profile | 
|---|
|  |  |  | <set> | 
|---|
|  |  |  | <if test="defaultValue != null"> | 
|---|
|  |  |  | default_value = #{defaultValue,jdbcType=INTEGER}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="unit != null"> | 
|---|
|  |  |  | unit = #{unit,jdbcType=TINYINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="sort != null"> | 
|---|
|  |  |  | sort = #{sort,jdbcType=INTEGER}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="type != null"> | 
|---|
|  |  |  | `type` = #{type,jdbcType=TINYINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="remarks != null"> | 
|---|
|  |  |  | remarks = #{remarks,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="deleted != null"> | 
|---|
|  |  |  | deleted = #{deleted,jdbcType=BIGINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </set> | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIrrigateProfile"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | update rm_irrigate_profile | 
|---|
|  |  |  | set default_value = #{defaultValue,jdbcType=INTEGER}, | 
|---|
|  |  |  | unit          = #{unit,jdbcType=TINYINT}, | 
|---|
|  |  |  | sort          = #{sort,jdbcType=INTEGER}, | 
|---|
|  |  |  | `type`        = #{type,jdbcType=TINYINT}, | 
|---|
|  |  |  | remarks       = #{remarks,jdbcType=VARCHAR}, | 
|---|
|  |  |  | deleted       = #{deleted,jdbcType=BIGINT} | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据配置类型获取配置值--> | 
|---|
|  |  |  | <select id="getIrrPro" resultType="com.dy.pipIrrGlobal.voRm.VoIrrigaterProfile"> | 
|---|
|  |  |  | SELECT id            AS irrProId, | 
|---|
|  |  |  | default_value AS defaultValue, | 
|---|
|  |  |  | unit | 
|---|
|  |  |  | FROM rm_irrigate_profile | 
|---|
|  |  |  | WHERE type = #{type} | 
|---|
|  |  |  | ORDER BY sort | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|