<?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.boco.nbd.wios.downloadfile.mapper.def.CptDataInfoMapper" > <resultMap id="BaseResultMap" type="com.boco.nbd.wios.downloadfile.model.CptDataInfo" > <id column="Id" property="id" jdbcType="VARCHAR" /> <result column="store_name" property="storeName" jdbcType="VARCHAR" /> <result column="description" property="description" jdbcType="VARCHAR" /> <result column="file_name" property="fileName" jdbcType="VARCHAR" /> <result column="file_size" property="fileSize" jdbcType="INTEGER" /> <result column="status" property="status" jdbcType="INTEGER" /> <result column="create_account" property="createAccount" jdbcType="VARCHAR" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" /> <result column="prefix" property="prefix" jdbcType="VARCHAR" /> </resultMap> <sql id="Example_Where_Clause" > <where > <foreach collection="oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause" > <where > <foreach collection="example.oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List" > Id, store_name, description, file_name, file_size, status, create_account, create_time, prefix </sql> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfoCriteria" > select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from cpt_data_info <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null" > order by ${orderByClause} </if> </select> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > select <include refid="Base_Column_List" /> from cpt_data_info where Id = #{id,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.String" > delete from cpt_data_info where Id = #{id,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfoCriteria" > delete from cpt_data_info <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfo" > insert into cpt_data_info (Id, store_name, description, file_name, file_size, status, create_account, create_time, prefix ) values (#{id,jdbcType=VARCHAR}, #{storeName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR}, #{fileSize,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{prefix,jdbcType=VARCHAR} ) </insert> <insert id="insertSelective" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfo" > insert into cpt_data_info <trim prefix="(" suffix=")" suffixOverrides="," > <if test="id != null" > Id, </if> <if test="storeName != null" > store_name, </if> <if test="description != null" > description, </if> <if test="fileName != null" > file_name, </if> <if test="fileSize != null" > file_size, </if> <if test="status != null" > status, </if> <if test="createAccount != null" > create_account, </if> <if test="createTime != null" > create_time, </if> <if test="prefix != null" > prefix, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="id != null" > #{id,jdbcType=VARCHAR}, </if> <if test="storeName != null" > #{storeName,jdbcType=VARCHAR}, </if> <if test="description != null" > #{description,jdbcType=VARCHAR}, </if> <if test="fileName != null" > #{fileName,jdbcType=VARCHAR}, </if> <if test="fileSize != null" > #{fileSize,jdbcType=INTEGER}, </if> <if test="status != null" > #{status,jdbcType=INTEGER}, </if> <if test="createAccount != null" > #{createAccount,jdbcType=VARCHAR}, </if> <if test="createTime != null" > #{createTime,jdbcType=TIMESTAMP}, </if> <if test="prefix != null" > #{prefix,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfoCriteria" resultType="java.lang.Integer" > select count(*) from cpt_data_info <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map" > update cpt_data_info <set > <if test="record.id != null" > Id = #{record.id,jdbcType=VARCHAR}, </if> <if test="record.storeName != null" > store_name = #{record.storeName,jdbcType=VARCHAR}, </if> <if test="record.description != null" > description = #{record.description,jdbcType=VARCHAR}, </if> <if test="record.fileName != null" > file_name = #{record.fileName,jdbcType=VARCHAR}, </if> <if test="record.fileSize != null" > file_size = #{record.fileSize,jdbcType=INTEGER}, </if> <if test="record.status != null" > status = #{record.status,jdbcType=INTEGER}, </if> <if test="record.createAccount != null" > create_account = #{record.createAccount,jdbcType=VARCHAR}, </if> <if test="record.createTime != null" > create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.prefix != null" > prefix = #{record.prefix,jdbcType=VARCHAR}, </if> </set> <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map" > update cpt_data_info set Id = #{record.id,jdbcType=VARCHAR}, store_name = #{record.storeName,jdbcType=VARCHAR}, description = #{record.description,jdbcType=VARCHAR}, file_name = #{record.fileName,jdbcType=VARCHAR}, file_size = #{record.fileSize,jdbcType=INTEGER}, status = #{record.status,jdbcType=INTEGER}, create_account = #{record.createAccount,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, prefix = #{record.prefix,jdbcType=VARCHAR} <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfo" > update cpt_data_info <set > <if test="storeName != null" > store_name = #{storeName,jdbcType=VARCHAR}, </if> <if test="description != null" > description = #{description,jdbcType=VARCHAR}, </if> <if test="fileName != null" > file_name = #{fileName,jdbcType=VARCHAR}, </if> <if test="fileSize != null" > file_size = #{fileSize,jdbcType=INTEGER}, </if> <if test="status != null" > status = #{status,jdbcType=INTEGER}, </if> <if test="createAccount != null" > create_account = #{createAccount,jdbcType=VARCHAR}, </if> <if test="createTime != null" > create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="prefix != null" > prefix = #{prefix,jdbcType=VARCHAR}, </if> </set> where Id = #{id,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfo" > update cpt_data_info set store_name = #{storeName,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR}, file_name = #{fileName,jdbcType=VARCHAR}, file_size = #{fileSize,jdbcType=INTEGER}, status = #{status,jdbcType=INTEGER}, create_account = #{createAccount,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, prefix = #{prefix,jdbcType=VARCHAR} where Id = #{id,jdbcType=VARCHAR} </update> </mapper>