123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?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.mofangchuxing.aska.dao.mapper.AskaChannelnosMapper">
- <resultMap id="BaseResultMap" type="com.mofangchuxing.aska.dao.domain.AskaChannelnos">
- <id property="id" column="id" jdbcType="INTEGER"/>
- <result property="channelId" column="channelId" jdbcType="INTEGER"/>
- <result property="channelNo" column="channelNo" jdbcType="CHAR"/>
- <result property="channelName" column="channelName" jdbcType="CHAR"/>
- <result property="status" column="status" jdbcType="CHAR"/>
- <result property="note" column="note" jdbcType="VARCHAR"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,channelId,channelNo,
- channelName,status,note
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from aska_channelnos
- where id = #{id,jdbcType=INTEGER}
- </select>
- <select id="searchAll" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from aska_channelnos
- where 1=1
- <if test="channelId != null and channelId != ''">
- and channelId = #{channelId}
- </if>
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from aska_channelnos
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannelnos" useGeneratedKeys="true">
- insert into aska_channelnos
- ( id,channelId,channelNo
- ,channelName,status,note
- )
- values (#{id,jdbcType=INTEGER},#{channelId,jdbcType=INTEGER},#{channelNo,jdbcType=CHAR}
- ,#{channelName,jdbcType=CHAR},#{status,jdbcType=CHAR},#{note,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannelnos" useGeneratedKeys="true">
- insert into aska_channelnos
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="channelId != null">channelId,</if>
- <if test="channelNo != null">channelNo,</if>
- <if test="channelName != null">channelName,</if>
- <if test="status != null">status,</if>
- <if test="note != null">note,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id,jdbcType=INTEGER},</if>
- <if test="channelId != null">#{channelId,jdbcType=INTEGER},</if>
- <if test="channelNo != null">#{channelNo,jdbcType=CHAR},</if>
- <if test="channelName != null">#{channelName,jdbcType=CHAR},</if>
- <if test="status != null">#{status,jdbcType=CHAR},</if>
- <if test="note != null">#{note,jdbcType=VARCHAR},</if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannelnos">
- update aska_channelnos
- <set>
- <if test="channelId != null">
- channelId = #{channelId,jdbcType=INTEGER},
- </if>
- <if test="channelNo != null">
- channelNo = #{channelNo,jdbcType=CHAR},
- </if>
- <if test="channelName != null">
- channelName = #{channelName,jdbcType=CHAR},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=CHAR},
- </if>
- <if test="note != null">
- note = #{note,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannelnos">
- update aska_channelnos
- set
- channelId = #{channelId,jdbcType=INTEGER},
- channelNo = #{channelNo,jdbcType=CHAR},
- channelName = #{channelName,jdbcType=CHAR},
- status = #{status,jdbcType=CHAR},
- note = #{note,jdbcType=VARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|