123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <?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.AskaStatMapper">
- <resultMap id="BaseResultMap" type="com.mofangchuxing.aska.dao.domain.AskaStat">
- <id property="id" column="id" jdbcType="INTEGER"/>
- <result property="aType" column="aType" jdbcType="CHAR"/>
- <result property="aId" column="aId" jdbcType="INTEGER"/>
- <result property="cType" column="cType" jdbcType="CHAR"/>
- <result property="statDay" column="statDay" jdbcType="DATE"/>
- <result property="orders" column="orders" jdbcType="INTEGER"/>
- <result property="amount" column="amount" jdbcType="INTEGER"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,aType,aId,
- cType,statDay,orders,
- amount
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from aska_stat
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from aska_stat
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaStat" useGeneratedKeys="true">
- insert into aska_stat
- ( id,aType,aId
- ,cType,statDay,orders
- ,amount)
- values (#{id,jdbcType=INTEGER},#{aType,jdbcType=CHAR},#{aId,jdbcType=INTEGER}
- ,#{cType,jdbcType=CHAR},#{statDay,jdbcType=DATE},#{orders,jdbcType=INTEGER}
- ,#{amount,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaStat" useGeneratedKeys="true">
- insert into aska_stat
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="aType != null">aType,</if>
- <if test="aId != null">aId,</if>
- <if test="cType != null">cType,</if>
- <if test="statDay != null">statDay,</if>
- <if test="orders != null">orders,</if>
- <if test="amount != null">amount,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id,jdbcType=INTEGER},</if>
- <if test="aType != null">#{aType,jdbcType=CHAR},</if>
- <if test="aId != null">#{aId,jdbcType=INTEGER},</if>
- <if test="cType != null">#{cType,jdbcType=CHAR},</if>
- <if test="statDay != null">#{statDay,jdbcType=DATE},</if>
- <if test="orders != null">#{orders,jdbcType=INTEGER},</if>
- <if test="amount != null">#{amount,jdbcType=INTEGER},</if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.AskaStat">
- update aska_stat
- <set>
- <if test="aType != null">
- aType = #{aType,jdbcType=CHAR},
- </if>
- <if test="aId != null">
- aId = #{aId,jdbcType=INTEGER},
- </if>
- <if test="cType != null">
- cType = #{cType,jdbcType=CHAR},
- </if>
- <if test="statDay != null">
- statDay = #{statDay,jdbcType=DATE},
- </if>
- <if test="orders != null">
- orders = #{orders,jdbcType=INTEGER},
- </if>
- <if test="amount != null">
- amount = #{amount,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.mofangchuxing.aska.dao.domain.AskaStat">
- update aska_stat
- set
- aType = #{aType,jdbcType=CHAR},
- aId = #{aId,jdbcType=INTEGER},
- cType = #{cType,jdbcType=CHAR},
- statDay = #{statDay,jdbcType=DATE},
- orders = #{orders,jdbcType=INTEGER},
- amount = #{amount,jdbcType=INTEGER}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|