| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <?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.WatershedModelMapper">
- <resultMap type="com.ruoyi.system.domain.WatershedModel" id="WatershedModelResult">
- <id property="modelId" column="model_id" />
- <result property="modelName" column="model_name" />
- <result property="description" column="description" />
- <result property="category" column="category" />
- <result property="subcategory" column="subcategory" />
- <result property="modelType" column="model_type" />
- <result property="modelFormat" column="model_format" />
- <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="modelCoordinates" column="model_coordinates" />
- <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="selectWatershedModelVo">
- select model_id, model_name, description, category, subcategory, model_type, model_format, file_path, file_size, upload_unit, status, model_coordinates, create_by, create_time, update_by, update_time, remark from watershed_model
- </sql>
- <select id="selectWatershedModelByModelId" parameterType="Long" resultMap="WatershedModelResult">
- <include refid="selectWatershedModelVo"/>
- where model_id = #{modelId}
- </select>
- <select id="selectWatershedModelList" parameterType="com.ruoyi.system.domain.WatershedModel" resultMap="WatershedModelResult">
- <include refid="selectWatershedModelVo"/>
- <where>
- <if test="modelName != null and modelName != ''"> and model_name like concat('%', #{modelName}, '%')</if>
- <if test="description != null and description != ''"> and description like concat('%', #{description}, '%')</if>
- <if test="category != null and category != ''"> and category = #{category}</if>
- <if test="subcategory != null and subcategory != ''"> and subcategory = #{subcategory}</if>
- <if test="modelType != null and modelType != ''"> and model_type = #{modelType}</if>
- <if test="modelFormat != null and modelFormat != ''"> and model_format = #{modelFormat}</if>
- <if test="uploadUnit != null and uploadUnit != ''"> and upload_unit = #{uploadUnit}</if>
- <if test="status != null and status != ''"> and status = #{status}</if>
- <if test="modelCoordinates != null and modelCoordinates != ''"> and model_coordinates like concat('%', #{modelCoordinates}, '%')</if>
- </where>
- </select>
- <insert id="insertWatershedModel" parameterType="com.ruoyi.system.domain.WatershedModel" useGeneratedKeys="true" keyProperty="modelId">
- insert into watershed_model
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="modelName != null and modelName != ''">model_name,</if>
- <if test="description != null and description != ''">description,</if>
- <if test="category != null and category != ''">category,</if>
- <if test="subcategory != null and subcategory != ''">subcategory,</if>
- <if test="modelType != null and modelType != ''">model_type,</if>
- <if test="modelFormat != null and modelFormat != ''">model_format,</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="modelCoordinates != null and modelCoordinates != ''">model_coordinates,</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="modelName != null and modelName != ''">#{modelName},</if>
- <if test="description != null and description != ''">#{description},</if>
- <if test="category != null and category != ''">#{category},</if>
- <if test="subcategory != null and subcategory != ''">#{subcategory},</if>
- <if test="modelType != null and modelType != ''">#{modelType},</if>
- <if test="modelFormat != null and modelFormat != ''">#{modelFormat},</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="modelCoordinates != null and modelCoordinates != ''">#{modelCoordinates},</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="updateWatershedModel" parameterType="com.ruoyi.system.domain.WatershedModel">
- update watershed_model
- <trim prefix="SET" suffixOverrides=",">
- <if test="modelName != null and modelName != ''">model_name = #{modelName},</if>
- <if test="description != null and description != ''">description = #{description},</if>
- <if test="category != null and category != ''">category = #{category},</if>
- <if test="subcategory != null and subcategory != ''">subcategory = #{subcategory},</if>
- <if test="modelType != null and modelType != ''">model_type = #{modelType},</if>
- <if test="modelFormat != null and modelFormat != ''">model_format = #{modelFormat},</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="modelCoordinates != null and modelCoordinates != ''">model_coordinates = #{modelCoordinates},</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 model_id = #{modelId}
- </update>
- <delete id="deleteWatershedModelByModelId" parameterType="Long">
- delete from watershed_model where model_id = #{modelId}
- </delete>
- <delete id="deleteWatershedModelByModelIds" parameterType="String">
- delete from watershed_model where model_id in
- <foreach item="modelId" collection="array" open="(" separator="," close=")">
- #{modelId}
- </foreach>
- </delete>
- </mapper>
|