<?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.gk.firework.Mapper.SmsLogInfoMapper" >
|
<resultMap id="BaseResultMap" type="com.gk.firework.Domain.SmsLogInfo" >
|
<!-- -->
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="mobile" property="mobile" jdbcType="VARCHAR" />
|
<result column="sendtime" property="sendtime" jdbcType="TIMESTAMP" />
|
<result column="times" property="times" jdbcType="INTEGER" />
|
<result column="type" property="type" jdbcType="TINYINT"/>
|
</resultMap>
|
<sql id="Base_Column_List" >
|
<!-- -->
|
id, mobile, sendtime, times,type
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
<!-- -->
|
select
|
<include refid="Base_Column_List" />
|
from smslog
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
<select id="selectByTel" resultType="com.gk.firework.Domain.SmsLogInfo">
|
select
|
<include refid="Base_Column_List" />
|
from smslog
|
where mobile = '${mobile}'
|
and sendtime >= '${starttime}'
|
and sendtime <= '${endtime}'
|
and type = '${type}'
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
<!-- -->
|
delete from smslog
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
<delete id="deleteByTime">
|
delete from smslog
|
where sendtime <= '${seventime}'
|
</delete>
|
<update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.SmsLogInfo" >
|
<!-- -->
|
update smslog
|
<set >
|
<if test="mobile != null" >
|
mobile = #{mobile,jdbcType=VARCHAR},
|
</if>
|
<if test="sendtime != null" >
|
sendtime = #{sendtime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="times != null" >
|
times = #{times,jdbcType=INTEGER},
|
</if>
|
<if test="type != null">
|
type = #{type,jdbcType=TINYINT},
|
</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.SmsLogInfo" >
|
<!-- -->
|
update smslog
|
set mobile = #{mobile,jdbcType=VARCHAR},
|
sendtime = #{sendtime,jdbcType=TIMESTAMP},
|
times = #{times,jdbcType=INTEGER},
|
type = #{type,jdbcType=TINYINT}
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|