| | |
| | | <!--@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="life1Start" jdbcType="INTEGER" property="life1start" /> |
| | | <result column="life1End" jdbcType="INTEGER" property="life1end" /> |
| | | <result column="life2Start" jdbcType="INTEGER" property="life2start" /> |
| | | <result column="life2End" jdbcType="INTEGER" property="life2end" /> |
| | | <result column="life3Start" jdbcType="INTEGER" property="life3start" /> |
| | | <result column="life3End" jdbcType="INTEGER" property="life3end" /> |
| | | <result column="life4Start" jdbcType="INTEGER" property="life4start" /> |
| | | <result column="life4End" 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, life1Start, life1End, life2Start, life2End, |
| | | life3Start, life3End, life4Start, life4End, lat, stopped, remarks, create_dt, deleted |
| | | </sql> |
| | | <sql id="Part_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, `name`, start_dt, end_dt, stopped, remarks, create_dt |
| | | id, weather_id, `name`, start_dt, end_dt, life1Start, life1End, life2Start, life2End, |
| | | life3Start, life3End, life4Start, life4End, lat, stopped, remarks, create_dt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | from md_crops |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectById" parameterType="java.lang.Long" resultType="com.dy.pipIrrGlobal.voMd.VoCrops"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from md_crops |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from md_crops |
| | |
| | | </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, life1Start, |
| | | life1End, life2Start, life2End, |
| | | life3Start, life3End, life4Start, |
| | | life4End, 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}, #{life2start,jdbcType=INTEGER}, #{life2end,jdbcType=INTEGER}, |
| | | #{life3start,jdbcType=INTEGER}, #{life3end,jdbcType=INTEGER}, #{life4start,jdbcType=INTEGER}, |
| | | #{life4end,jdbcType=INTEGER}, #{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"> |
| | | life1Start, |
| | | </if> |
| | | <if test="life1end != null"> |
| | | life1End, |
| | | </if> |
| | | <if test="life2start != null"> |
| | | life2Start, |
| | | </if> |
| | | <if test="life2end != null"> |
| | | life2End, |
| | | </if> |
| | | <if test="life3start != null"> |
| | | life3Start, |
| | | </if> |
| | | <if test="life3end != null"> |
| | | life3End, |
| | | </if> |
| | | <if test="life4start != null"> |
| | | life4Start, |
| | | </if> |
| | | <if test="life4end != null"> |
| | | life4End, |
| | | </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="life2start != null"> |
| | | #{life2start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life2end != null"> |
| | | #{life2end,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life3start != null"> |
| | | #{life3start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life3end != null"> |
| | | #{life3end,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life4start != null"> |
| | | #{life4start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life4end != null"> |
| | | #{life4end,jdbcType=INTEGER}, |
| | | </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"> |
| | | life1Start = #{life1start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life1end != null"> |
| | | life1End = #{life1end,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life2start != null"> |
| | | life2Start = #{life2start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life2end != null"> |
| | | life2End = #{life2end,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life3start != null"> |
| | | life3Start = #{life3start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life3end != null"> |
| | | life3End = #{life3end,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life4start != null"> |
| | | life4Start = #{life4start,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="life4end != null"> |
| | | life4End = #{life4end,jdbcType=INTEGER}, |
| | | </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}, |
| | | set weather_id = #{weatherId,jdbcType=BIGINT}, |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | start_dt = #{startDt,jdbcType=VARCHAR}, |
| | | end_dt = #{endDt,jdbcType=VARCHAR}, |
| | | life1Start = #{life1start,jdbcType=INTEGER}, |
| | | life1End = #{life1end,jdbcType=INTEGER}, |
| | | life2Start = #{life2start,jdbcType=INTEGER}, |
| | | life2End = #{life2end,jdbcType=INTEGER}, |
| | | life3Start = #{life3start,jdbcType=INTEGER}, |
| | | life3End = #{life3end,jdbcType=INTEGER}, |
| | | life4Start = #{life4start,jdbcType=INTEGER}, |
| | | life4End = #{life4end,jdbcType=INTEGER}, |
| | | lat = #{lat,jdbcType=DOUBLE}, |
| | | stopped = #{stopped,jdbcType=TINYINT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | create_dt = #{createDt,jdbcType=TIMESTAMP}, |
| | |
| | | </select> |
| | | <select id="selectSome" parameterType="java.util.Map" resultType="com.dy.pipIrrGlobal.voMd.VoCrops"> |
| | | select |
| | | <include refid="Part_Column_List" > |
| | | <property name="alias" value="bd"/> |
| | | </include> |
| | | <include refid="Part_Column_List" /> |
| | | from md_crops tb |
| | | where tb.deleted != 1 |
| | | <trim prefix="and" suffixOverrides="and"> |
| | |
| | | </if> |
| | | </trim> |
| | | order by tb.id DESC |
| | | <trim prefix="limit " > |
| | | <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 |