| | |
| | | <!--@mbg.generated--> |
| | | <!--@Table md_crops--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="weather_id" jdbcType="BIGINT" property="weatherId" /> |
| | | <result column="name" jdbcType="VARCHAR" property="name" /> |
| | | <result column="start_dt" jdbcType="DATE" property="startDt" /> |
| | | <result column="end_dt" jdbcType="DATE" property="endDt" /> |
| | | <result column="start_dt" jdbcType="VARCHAR" property="startDt" /> |
| | | <result column="end_dt" jdbcType="VARCHAR" property="endDt" /> |
| | | <result column="life1_start" jdbcType="INTEGER" property="life1Start" /> |
| | | <result column="life1_end" jdbcType="INTEGER" property="life1End" /> |
| | | <result column="life1_factor" jdbcType="DOUBLE" property="life1Factor" /> |
| | | <result column="life2_start" jdbcType="INTEGER" property="life2Start" /> |
| | | <result column="life2_end" jdbcType="INTEGER" property="life2End" /> |
| | | <result column="life3_start" jdbcType="INTEGER" property="life3Start" /> |
| | | <result column="life3_end" jdbcType="INTEGER" property="life3End" /> |
| | | <result column="life4_start" jdbcType="INTEGER" property="life4Start" /> |
| | | <result column="life4_end" jdbcType="INTEGER" property="life4End" /> |
| | | <result column="lat" jdbcType="DOUBLE" property="lat" /> |
| | | <result column="stopped" jdbcType="TINYINT" property="stopped" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | | <result column="create_dt" jdbcType="TIMESTAMP" property="createDt" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, `name`, start_dt, end_dt, stopped, remarks, create_dt, deleted |
| | | id, weather_id, `name`, start_dt, end_dt, |
| | | life1_start, life1_end, life1_factor, |
| | | life2_start, life2_end, life2_factor, |
| | | life3_start, life3_end, life3_factor, |
| | | life4_start, life4_end, life4_factor, |
| | | lat, stopped, remarks, create_dt, deleted |
| | | </sql> |
| | | <sql id="Part_Column_List"> |
| | | id, weather_id, `name`, start_dt, end_dt, |
| | | life1_start, life1_end, life1_factor, |
| | | life2_start, life2_end, life2_factor, |
| | | life3_start, life3_end, life3_factor, |
| | | life4_start, life4_end, life4_factor, |
| | | lat, stopped, remarks, create_dt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoMd.MdCrops"> |
| | | <!--@mbg.generated--> |
| | | insert into md_crops (id, `name`, start_dt, |
| | | end_dt, stopped, remarks, |
| | | create_dt, deleted) |
| | | values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{startDt,jdbcType=DATE}, |
| | | #{endDt,jdbcType=DATE}, #{stopped,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}, |
| | | #{createDt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT}) |
| | | insert into md_crops (id, weather_id, `name`, start_dt, end_dt, |
| | | life1_start, life1_end, life1_factor, |
| | | life2_start, life2_end, life2_factor, |
| | | life3_start, life3_end, life3_factor, |
| | | life4_start, life4_end, life4_factor, |
| | | lat, stopped, remarks, create_dt, deleted |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{weatherId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, |
| | | #{startDt,jdbcType=VARCHAR}, #{endDt,jdbcType=VARCHAR}, |
| | | #{life1Start,jdbcType=INTEGER}, #{life1End,jdbcType=INTEGER}, #{life1Factor,jdbcType=DOUBLE}, |
| | | #{life2Start,jdbcType=INTEGER}, #{life2End,jdbcType=INTEGER}, #{life2Factor,jdbcType=DOUBLE}, |
| | | #{life3Start,jdbcType=INTEGER}, #{life3End,jdbcType=INTEGER}, #{life3Factor,jdbcType=DOUBLE}, |
| | | #{life4Start,jdbcType=INTEGER}, #{life4End,jdbcType=INTEGER}, #{life4Factor,jdbcType=DOUBLE}, |
| | | #{lat,jdbcType=DOUBLE}, #{stopped,jdbcType=TINYINT}, |
| | | #{remarks,jdbcType=VARCHAR}, #{createDt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoMd.MdCrops"> |
| | | <!--@mbg.generated--> |
| | |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="weatherId != null"> |
| | | weather_id, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name`, |
| | |
| | | </if> |
| | | <if test="endDt != null"> |
| | | end_dt, |
| | | </if> |
| | | <if test="life1Start != null"> |
| | | life1_start, |
| | | </if> |
| | | <if test="life1End != null"> |
| | | life1_end, |
| | | </if> |
| | | <if test="life1Factor != null"> |
| | | life1_factor, |
| | | </if> |
| | | <if test="life2Start != null"> |
| | | life2_start, |
| | | </if> |
| | | <if test="life2End != null"> |
| | | life2_end, |
| | | </if> |
| | | <if test="life2Factor != null"> |
| | | life2_factor, |
| | | </if> |
| | | <if test="life3Start != null"> |
| | | life3_start, |
| | | </if> |
| | | <if test="life3End != null"> |
| | | life3_end, |
| | | </if> |
| | | <if test="life3Factor != null"> |
| | | life3_factor, |
| | | </if> |
| | | <if test="life4Start != null"> |
| | | life4_start, |
| | | </if> |
| | | <if test="life4End != null"> |
| | | life4_end, |
| | | </if> |
| | | <if test="life4Factor != null"> |
| | | life4_factor, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat, |
| | | </if> |
| | | <if test="stopped != null"> |
| | | stopped, |
| | |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="weatherId != null"> |
| | | #{weatherId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="name != null"> |
| | | #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="startDt != null"> |
| | | #{startDt,jdbcType=DATE}, |
| | | #{startDt,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="endDt != null"> |
| | | #{endDt,jdbcType=DATE}, |
| | | #{endDt,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="life1Start != null"> |
| | | #{life1Start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life1End != null"> |
| | | #{life1End,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life1Factor != null"> |
| | | #{life1Factor,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="life2Start != null"> |
| | | #{life2Start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life2End != null"> |
| | | #{life2End,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life2Factor != null"> |
| | | #{life2Factor,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="life3Start != null"> |
| | | #{life3Start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life3End != null"> |
| | | #{life3End,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life3Factor != null"> |
| | | #{life3Factor,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="life4Start != null"> |
| | | #{life4Start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life4End != null"> |
| | | #{life4End,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life4Factor != null"> |
| | | #{life4Factor,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | #{lat,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="stopped != null"> |
| | | #{stopped,jdbcType=TINYINT}, |
| | |
| | | <!--@mbg.generated--> |
| | | update md_crops |
| | | <set> |
| | | <if test="weatherId != null"> |
| | | weather_id = #{weatherId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="startDt != null"> |
| | | start_dt = #{startDt,jdbcType=DATE}, |
| | | start_dt = #{startDt,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="endDt != null"> |
| | | end_dt = #{endDt,jdbcType=DATE}, |
| | | end_dt = #{endDt,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="life1Start != null"> |
| | | life1_start = #{life1Start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life1End != null"> |
| | | life1_end = #{life1End,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life1Factor != null"> |
| | | life1_factor = #{life1Factor,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="life2Start != null"> |
| | | life2_start = #{life2Start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life2End != null"> |
| | | life2_end = #{life2End,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life2Factor != null"> |
| | | life2_factor = #{life2Factor,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="life3Start != null"> |
| | | life3_start = #{life3Start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life3End != null"> |
| | | life3_end = #{life3End,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life3Factor != null"> |
| | | life3_factor = #{life3Factor,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="life4Start != null"> |
| | | life4_start = #{life4Start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life4End != null"> |
| | | life4_end = #{life4End,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life4Factor != null"> |
| | | life4_factor = #{life4Factor,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat = #{lat,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="stopped != null"> |
| | | stopped = #{stopped,jdbcType=TINYINT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoMd.MdCrops"> |
| | | <!--@mbg.generated--> |
| | | update md_crops |
| | | set `name` = #{name,jdbcType=VARCHAR}, |
| | | start_dt = #{startDt,jdbcType=DATE}, |
| | | end_dt = #{endDt,jdbcType=DATE}, |
| | | stopped = #{stopped,jdbcType=TINYINT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | create_dt = #{createDt,jdbcType=TIMESTAMP}, |
| | | deleted = #{deleted,jdbcType=TINYINT} |
| | | set weather_id = #{weatherId,jdbcType=BIGINT}, |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | start_dt = #{startDt,jdbcType=VARCHAR}, |
| | | end_dt = #{endDt,jdbcType=VARCHAR}, |
| | | life1_start = #{life1Start,jdbcType=INTEGER}, |
| | | life1_end = #{life1End,jdbcType=INTEGER}, |
| | | life1_factor = #{life1Factor,jdbcType=DOUBLE}, |
| | | life2_start = #{life2Start,jdbcType=INTEGER}, |
| | | life2_end = #{life2End,jdbcType=INTEGER}, |
| | | life2_factor = #{life2Factor,jdbcType=DOUBLE}, |
| | | life3_start = #{life3Start,jdbcType=INTEGER}, |
| | | life3_end = #{life3End,jdbcType=INTEGER}, |
| | | life3_factor = #{life3Factor,jdbcType=DOUBLE}, |
| | | life4_start = #{life4Start,jdbcType=INTEGER}, |
| | | life4_end = #{life4End,jdbcType=INTEGER}, |
| | | life4_factor = #{life4Factor,jdbcType=DOUBLE}, |
| | | lat = #{lat,jdbcType=DOUBLE}, |
| | | stopped = #{stopped,jdbcType=TINYINT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | create_dt = #{createDt,jdbcType=TIMESTAMP}, |
| | | deleted = #{deleted,jdbcType=TINYINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <select id="selectById" parameterType="java.lang.Long" resultType="com.dy.pipIrrGlobal.voMd.VoCrops"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Part_Column_List" /> |
| | | from md_crops |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectTotal" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | select |
| | | count(*) |
| | | from md_crops tb |
| | | where tb.deleted != 1 |
| | | <trim prefix="and" suffixOverrides="and"> |
| | | <if test="name != null and name != ''"> |
| | | tb.name like concat('%', #{name}, '%') and |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | <select id="selectSome" parameterType="java.util.Map" resultType="com.dy.pipIrrGlobal.voMd.VoCrops"> |
| | | select |
| | | <include refid="Part_Column_List" /> |
| | | from md_crops tb |
| | | where tb.deleted != 1 |
| | | <trim prefix="and" suffixOverrides="and"> |
| | | <if test="name != null and name != ''"> |
| | | tb.name like concat('%', #{name}, '%') and |
| | | </if> |
| | | </trim> |
| | | order by tb.id DESC |
| | | <trim prefix="limit "> |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.dy.pipIrrGlobal.voMd.VoCrops"> |
| | | select |
| | | <include refid="Part_Column_List"> |
| | | <property name="alias" value="tb" /> |
| | | </include> |
| | | from md_crops tb |
| | | where tb.deleted != 1 |
| | | order by tb.id ASC |
| | | </select> |
| | | |
| | | <update id="deleteById" parameterType="java.lang.Long"> |
| | | update md_crops |
| | | set deleted = 1 |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | </mapper> |