123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <?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.AskaChannelcouponnosMapper">
- <resultMap id="BaseResultMap" type="com.mofangchuxing.aska.dao.domain.AskaChannelcouponnos">
- <id property="id" column="id" jdbcType="INTEGER"/>
- <result property="channelId" column="channelId" jdbcType="INTEGER"/>
- <result property="channelNo" column="channelNo" jdbcType="CHAR"/>
- <result property="couponNo" column="couponNo" jdbcType="CHAR"/>
- <result property="status" column="status" jdbcType="CHAR"/>
- <result property="outDate" column="outDate" jdbcType="DATE"/>
- <result property="value" column="value" jdbcType="INTEGER"/>
- <result property="price" column="price" jdbcType="INTEGER"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,channelId,channelNo,
- couponNo,status,outDate,
- value,price
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from aska_channelcouponnos
- where id = #{id,jdbcType=INTEGER}
- </select>
- <select id="searchAllByCouponNo" resultType="com.mofangchuxing.aska.dao.domain.AskaChannelcouponnos">
- select
- <include refid="Base_Column_List" />
- from aska_channelcouponnos
- where couponNo = #{couponNo} limit 1
- </select>
- <select id="searchAll" resultType="com.mofangchuxing.aska.dao.domain.AskaChannelcouponnos">
- select
- <include refid="Base_Column_List" />
- from aska_channelcouponnos
- where 1=1
- <if test="channelId != null and channelId != ''">
- and channelId = #{channelId}
- </if>
- <if test="couponNo != null and couponNo != ''">
- and couponNo = #{couponNo}
- </if>
- <if test="status != null and status != '' and status != '全部'">
- and status = #{status}
- </if>
- order by id desc
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from aska_channelcouponnos
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannelcouponnos" useGeneratedKeys="true">
- insert into aska_channelcouponnos
- ( id,channelId,channelNo
- ,couponNo,status,outDate
- ,value,price)
- values (#{id,jdbcType=INTEGER},#{channelId,jdbcType=INTEGER},#{channelNo,jdbcType=CHAR}
- ,#{couponNo,jdbcType=CHAR},#{status,jdbcType=CHAR},#{outDate,jdbcType=DATE}
- ,#{value,jdbcType=INTEGER},#{price,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannelcouponnos" useGeneratedKeys="true">
- insert into aska_channelcouponnos
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="channelId != null">channelId,</if>
- <if test="channelNo != null">channelNo,</if>
- <if test="couponNo != null">couponNo,</if>
- <if test="status != null">status,</if>
- <if test="outDate != null">outDate,</if>
- <if test="value != null">value,</if>
- <if test="price != null">price,</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="couponNo != null">#{couponNo,jdbcType=CHAR},</if>
- <if test="status != null">#{status,jdbcType=CHAR},</if>
- <if test="outDate != null">#{outDate,jdbcType=DATE},</if>
- <if test="value != null">#{value,jdbcType=INTEGER},</if>
- <if test="price != null">#{price,jdbcType=INTEGER},</if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannelcouponnos">
- update aska_channelcouponnos
- <set>
- <if test="channelId != null">
- channelId = #{channelId,jdbcType=INTEGER},
- </if>
- <if test="channelNo != null">
- channelNo = #{channelNo,jdbcType=CHAR},
- </if>
- <if test="couponNo != null">
- couponNo = #{couponNo,jdbcType=CHAR},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=CHAR},
- </if>
- <if test="outDate != null">
- outDate = #{outDate,jdbcType=DATE},
- </if>
- <if test="value != null">
- value = #{value,jdbcType=INTEGER},
- </if>
- <if test="price != null">
- price = #{price,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannelcouponnos">
- update aska_channelcouponnos
- set
- channelId = #{channelId,jdbcType=INTEGER},
- channelNo = #{channelNo,jdbcType=CHAR},
- couponNo = #{couponNo,jdbcType=CHAR},
- status = #{status,jdbcType=CHAR},
- outDate = #{outDate,jdbcType=DATE},
- value = #{value,jdbcType=INTEGER},
- price = #{price,jdbcType=INTEGER}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|