| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.taoke.autopay.dao.WxUserSettingsMapper"> |
| | | <resultMap id="BaseResultMap" type="com.taoke.autopay.entity.WxUserSettings"> |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="dy_order_count_day" property="dyOrderCountPerDay" jdbcType="INTEGER"/> |
| | | <result column="ks_order_count_day" property="ksOrderCountPerDay" jdbcType="INTEGER"/> |
| | | <result column="total_order_count_day" property="totalOrderCountPerDay" jdbcType="INTEGER"/> |
| | | <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">id,dy_order_count_day,ks_order_count_day,total_order_count_day,create_time,update_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/> from table_wx_user_settings where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/> from table_wx_user_settings where id = #{id,jdbcType=BIGINT} for update |
| | | </select> |
| | | <sql id="listWhereSQL"> |
| | | <if test="query.id!=null">AND id = #{query.id}</if> |
| | | <if test="query.dyOrderCountPerDay!=null">AND dy_order_count_day = #{query.dyOrderCountPerDay}</if> |
| | | <if test="query.ksOrderCountPerDay!=null">AND ks_order_count_day = #{query.ksOrderCountPerDay}</if> |
| | | <if test="query.totalOrderCountPerDay!=null">AND total_order_count_day = #{query.totalOrderCountPerDay}</if> |
| | | <if test="query.minCreateTime!=null">AND create_time >= #{query.minCreateTime}</if> |
| | | <if test="query.maxCreateTime!=null">AND #{query.maxCreateTime} > create_time</if> |
| | | <if test="query.minUpdateTime!=null">AND update_time >= #{query.minUpdateTime}</if> |
| | | <if test="query.maxUpdateTime!=null">AND #{query.maxUpdateTime} > update_time</if> |
| | | </sql> |
| | | <select id="list" resultMap="BaseResultMap">select |
| | | <include refid="Base_Column_List"/> from table_wx_user_settings where 1=1 |
| | | <include refid="listWhereSQL"/> |
| | | <if test="query.sortList!=null"> |
| | | <foreach collection="query.sortList" item="item" open=" order by " separator=",">#{item}</foreach> |
| | | </if>limit #{query.start},#{query.count} |
| | | </select> |
| | | <select id="count" resultType="java.lang.Long">select count(*) from table_wx_user_settings where 1=1 |
| | | <include refid="listWhereSQL"/> |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from table_wx_user_settings where id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.taoke.autopay.entity.WxUserSettings" useGeneratedKeys="true" keyProperty="id">insert into table_wx_user_settings (id,dy_order_count_day,ks_order_count_day,total_order_count_day,create_time,update_time) values (#{id,jdbcType=BIGINT},#{dyOrderCountPerDay,jdbcType=INTEGER},#{ksOrderCountPerDay,jdbcType=INTEGER},#{totalOrderCountPerDay,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.taoke.autopay.entity.WxUserSettings" useGeneratedKeys="true" keyProperty="id">insert into table_wx_user_settings |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="dyOrderCountPerDay != null">dy_order_count_day,</if> |
| | | <if test="ksOrderCountPerDay != null">ks_order_count_day,</if> |
| | | <if test="totalOrderCountPerDay != null">total_order_count_day,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim>values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="dyOrderCountPerDay != null">#{dyOrderCountPerDay,jdbcType=INTEGER},</if> |
| | | <if test="ksOrderCountPerDay != null">#{ksOrderCountPerDay,jdbcType=INTEGER},</if> |
| | | <if test="totalOrderCountPerDay != null">#{totalOrderCountPerDay,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.taoke.autopay.entity.WxUserSettings">update table_wx_user_settings set dy_order_count_day = #{dyOrderCountPerDay,jdbcType=INTEGER},ks_order_count_day = #{ksOrderCountPerDay,jdbcType=INTEGER},total_order_count_day = #{totalOrderCountPerDay,jdbcType=INTEGER},create_time = #{createTime,jdbcType=TIMESTAMP},update_time = #{updateTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.taoke.autopay.entity.WxUserSettings">update table_wx_user_settings |
| | | <set> |
| | | <if test="dyOrderCountPerDay != null">dy_order_count_day=#{dyOrderCountPerDay,jdbcType=INTEGER},</if> |
| | | <if test="ksOrderCountPerDay != null">ks_order_count_day=#{ksOrderCountPerDay,jdbcType=INTEGER},</if> |
| | | <if test="totalOrderCountPerDay != null">total_order_count_day=#{totalOrderCountPerDay,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <resultMap id="BaseResultMap" type="com.taoke.autopay.entity.WxUserSettings"> |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="dy_order_count_day" property="dyOrderCountPerDay" jdbcType="INTEGER"/> |
| | | <result column="ks_order_count_day" property="ksOrderCountPerDay" jdbcType="INTEGER"/> |
| | | <result column="total_order_count_day" property="totalOrderCountPerDay" jdbcType="INTEGER"/> |
| | | <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">id,dy_order_count_day,ks_order_count_day,total_order_count_day,create_time,update_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/> |
| | | from table_wx_user_settings where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/> |
| | | from table_wx_user_settings where id = #{id,jdbcType=BIGINT} for update |
| | | </select> |
| | | <sql id="listWhereSQL"> |
| | | <if test="query.id!=null">AND id = #{query.id}</if> |
| | | <if test="query.dyOrderCountPerDay!=null">AND dy_order_count_day = #{query.dyOrderCountPerDay}</if> |
| | | <if test="query.ksOrderCountPerDay!=null">AND ks_order_count_day = #{query.ksOrderCountPerDay}</if> |
| | | <if test="query.totalOrderCountPerDay!=null">AND total_order_count_day = #{query.totalOrderCountPerDay}</if> |
| | | <if test="query.minCreateTime!=null">AND create_time >= #{query.minCreateTime}</if> |
| | | <if test="query.maxCreateTime!=null">AND #{query.maxCreateTime} > create_time</if> |
| | | <if test="query.minUpdateTime!=null">AND update_time >= #{query.minUpdateTime}</if> |
| | | <if test="query.maxUpdateTime!=null">AND #{query.maxUpdateTime} > update_time</if> |
| | | </sql> |
| | | <select id="list" resultMap="BaseResultMap">select |
| | | <include refid="Base_Column_List"/> |
| | | from table_wx_user_settings where 1=1 |
| | | <include refid="listWhereSQL"/> |
| | | <if test="query.sortList!=null"> |
| | | <foreach collection="query.sortList" item="item" open=" order by " separator=",">#{item}</foreach> |
| | | </if> |
| | | limit #{query.start},#{query.count} |
| | | </select> |
| | | <select id="count" resultType="java.lang.Long">select count(*) from table_wx_user_settings where 1=1 |
| | | <include refid="listWhereSQL"/> |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" |
| | | parameterType="java.lang.Long">delete from table_wx_user_settings where id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.taoke.autopay.entity.WxUserSettings" useGeneratedKeys="true" |
| | | keyProperty="id">insert into table_wx_user_settings (id,dy_order_count_day,ks_order_count_day,total_order_count_day,create_time,update_time) values (#{id,jdbcType=BIGINT},#{dyOrderCountPerDay,jdbcType=INTEGER},#{ksOrderCountPerDay,jdbcType=INTEGER},#{totalOrderCountPerDay,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.taoke.autopay.entity.WxUserSettings" useGeneratedKeys="true" |
| | | keyProperty="id">insert into table_wx_user_settings |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="dyOrderCountPerDay != null">dy_order_count_day,</if> |
| | | <if test="ksOrderCountPerDay != null">ks_order_count_day,</if> |
| | | <if test="totalOrderCountPerDay != null">total_order_count_day,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="dyOrderCountPerDay != null">#{dyOrderCountPerDay,jdbcType=INTEGER},</if> |
| | | <if test="ksOrderCountPerDay != null">#{ksOrderCountPerDay,jdbcType=INTEGER},</if> |
| | | <if test="totalOrderCountPerDay != null">#{totalOrderCountPerDay,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" |
| | | parameterType="com.taoke.autopay.entity.WxUserSettings">update table_wx_user_settings set dy_order_count_day = #{dyOrderCountPerDay,jdbcType=INTEGER},ks_order_count_day = #{ksOrderCountPerDay,jdbcType=INTEGER},total_order_count_day = #{totalOrderCountPerDay,jdbcType=INTEGER},create_time = #{createTime,jdbcType=TIMESTAMP},update_time = #{updateTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.taoke.autopay.entity.WxUserSettings">update |
| | | table_wx_user_settings |
| | | <set> |
| | | <if test="dyOrderCountPerDay != null">dy_order_count_day=#{dyOrderCountPerDay,jdbcType=INTEGER},</if> |
| | | <if test="ksOrderCountPerDay != null">ks_order_count_day=#{ksOrderCountPerDay,jdbcType=INTEGER},</if> |
| | | <if test="totalOrderCountPerDay != null">total_order_count_day=#{totalOrderCountPerDay,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="createTime != null">create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | |
| | | <select id="listByUids" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/> |
| | | from table_wx_user_settings where 1=1 |
| | | <if test="uids!=null"> |
| | | <foreach collection="uids" item="item" open="and (" separator=" or " close=")">id = #{item}</foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |