| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?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.ruoyi.system.mapper.WatershedTyphoonMapper">
- <resultMap type="com.ruoyi.system.domain.WatershedTyphoon" id="WatershedTyphoonResult">
- <id property="typhoonId" column="typhoon_id" />
- <result property="typhoonName" column="typhoon_name" />
- <result property="typhoonCode" column="typhoon_code" />
- <result property="startTime" column="start_time" />
- <result property="endTime" column="end_time" />
- <result property="filePath" column="file_path" />
- <result property="fileSize" column="file_size" />
- <result property="uploadUnit" column="upload_unit" />
- <result property="status" column="status" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="remark" column="remark" />
- </resultMap>
- <sql id="selectWatershedTyphoonVo">
- select typhoon_id, typhoon_name, typhoon_code, start_time, end_time, file_path, file_size, upload_unit, status, create_by, create_time, update_by, update_time, remark from watershed_typhoon
- </sql>
- <select id="selectWatershedTyphoonByTyphoonId" parameterType="Long" resultMap="WatershedTyphoonResult">
- <include refid="selectWatershedTyphoonVo"/>
- where typhoon_id = #{typhoonId}
- </select>
- <select id="selectWatershedTyphoonList" parameterType="com.ruoyi.system.domain.WatershedTyphoon" resultMap="WatershedTyphoonResult">
- <include refid="selectWatershedTyphoonVo"/>
- <where>
- <if test="typhoonName != null and typhoonName != ''"> and typhoon_name like concat('%', #{typhoonName}, '%')</if>
- <if test="typhoonCode != null and typhoonCode != ''"> and typhoon_code = #{typhoonCode}</if>
- <if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
- <if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if>
- <if test="uploadUnit != null and uploadUnit != ''"> and upload_unit = #{uploadUnit}</if>
- <if test="status != null and status != ''"> and status = #{status}</if>
- </where>
- </select>
- <insert id="insertWatershedTyphoon" parameterType="com.ruoyi.system.domain.WatershedTyphoon" useGeneratedKeys="true" keyProperty="typhoonId">
- insert into watershed_typhoon
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="typhoonName != null and typhoonName != ''">typhoon_name,</if>
- <if test="typhoonCode != null and typhoonCode != ''">typhoon_code,</if>
- <if test="startTime != null and startTime != ''">start_time,</if>
- <if test="endTime != null and endTime != ''">end_time,</if>
- <if test="filePath != null and filePath != ''">file_path,</if>
- <if test="fileSize != null">file_size,</if>
- <if test="uploadUnit != null and uploadUnit != ''">upload_unit,</if>
- <if test="status != null and status != ''">status,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null and updateBy != ''">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null and remark != ''">remark,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="typhoonName != null and typhoonName != ''">#{typhoonName},</if>
- <if test="typhoonCode != null and typhoonCode != ''">#{typhoonCode},</if>
- <if test="startTime != null and startTime != ''">#{startTime},</if>
- <if test="endTime != null and endTime != ''">#{endTime},</if>
- <if test="filePath != null and filePath != ''">#{filePath},</if>
- <if test="fileSize != null">#{fileSize},</if>
- <if test="uploadUnit != null and uploadUnit != ''">#{uploadUnit},</if>
- <if test="status != null and status != ''">#{status},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null and remark != ''">#{remark},</if>
- </trim>
- </insert>
- <update id="updateWatershedTyphoon" parameterType="com.ruoyi.system.domain.WatershedTyphoon">
- update watershed_typhoon
- <trim prefix="SET" suffixOverrides=",">
- <if test="typhoonName != null and typhoonName != ''">typhoon_name = #{typhoonName},</if>
- <if test="typhoonCode != null and typhoonCode != ''">typhoon_code = #{typhoonCode},</if>
- <if test="startTime != null and startTime != ''">start_time = #{startTime},</if>
- <if test="endTime != null and endTime != ''">end_time = #{endTime},</if>
- <if test="filePath != null and filePath != ''">file_path = #{filePath},</if>
- <if test="fileSize != null">file_size = #{fileSize},</if>
- <if test="uploadUnit != null and uploadUnit != ''">upload_unit = #{uploadUnit},</if>
- <if test="status != null and status != ''">status = #{status},</if>
- <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null and remark != ''">remark = #{remark},</if>
- </trim>
- where typhoon_id = #{typhoonId}
- </update>
- <delete id="deleteWatershedTyphoonByTyphoonId" parameterType="Long">
- delete from watershed_typhoon where typhoon_id = #{typhoonId}
- </delete>
- <delete id="deleteWatershedTyphoonByTyphoonIds" parameterType="String">
- delete from watershed_typhoon where typhoon_id in
- <foreach item="typhoonId" collection="array" open="(" separator="," close=")">
- #{typhoonId}
- </foreach>
- </delete>
- </mapper>
|