123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <?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.kmall.admin.dao.mk.Mk2MemberBirthdayDao">
- <resultMap type="com.kmall.admin.entity.mk.Mk2MemberBirthdayEntity" id="mk2MemberBirthdayMap">
- <result property="mmbId" column="mmb_id"/>
- <result property="topicName" column="topic_name"/>
- <result property="topicType" column="topic_type"/>
- <result property="topicPrice" column="topic_price"/>
- <result property="topicProportion" column="topic_proportion"/>
- <result property="isValid" column="is_valid"/>
- <result property="createrSn" column="creater_sn"/>
- <result property="createTime" column="create_time"/>
- <result property="moderSn" column="moder_sn"/>
- <result property="modTime" column="mod_time"/>
- <result property="tstm" column="tstm"/>
- </resultMap>
- <select id="queryObject" resultType="com.kmall.admin.entity.mk.Mk2MemberBirthdayEntity">
- select
- `mmb_id`,
- `topic_name`,
- `topic_type`,
- `topic_price`,
- `topic_proportion`,
- `is_valid`,
- `creater_sn`,
- `create_time`,
- `moder_sn`,
- `mod_time`,
- `tstm`
- from mk2_member_birthday
- where mmb_id = #{id}
- </select>
- <select id="queryList" resultType="com.kmall.admin.entity.mk.Mk2MemberBirthdayEntity">
- select
- `mmb_id`,
- `topic_name`,
- `topic_type`,
- `topic_price`,
- `topic_proportion`,
- `is_valid`,
- `creater_sn`,
- `create_time`,
- `moder_sn`,
- `mod_time`,
- `tstm`
- from mk2_member_birthday
- WHERE 1=1
- <if test="topicName != null and topicName.trim() != ''">
- AND topic_name LIKE concat('%',#{topicName},'%')
- </if>
- <choose>
- <when test="sidx != null and sidx.trim() != ''">
- order by ${sidx} ${order}
- </when>
- <otherwise>
- order by mmb_id desc
- </otherwise>
- </choose>
- <if test="offset != null and limit != null">
- limit #{offset}, #{limit}
- </if>
- </select>
- <select id="queryTotal" resultType="int">
- select count(*) from mk2_member_birthday
- WHERE 1=1
- <if test="topicName != null and topicName.trim() != ''">
- AND topic_name LIKE concat('%',#{topicName},'%')
- </if>
- </select>
- <insert id="save" parameterType="com.kmall.admin.entity.mk.Mk2MemberBirthdayEntity" useGeneratedKeys="true" keyProperty="id">
- insert into mk2_member_birthday(
- `mmb_id`,
- `topic_name`,
- `topic_type`,
- `topic_price`,
- `topic_proportion`,
- `is_valid`,
- `creater_sn`,
- `create_time`,
- `moder_sn`,
- `mod_time`,
- `tstm`)
- values(
- #{mmbId},
- #{topicName},
- #{topicType},
- #{topicPrice},
- #{topicProportion},
- #{isValid},
- #{createrSn},
- #{createTime},
- #{moderSn},
- #{modTime},
- #{tstm})
- </insert>
- <update id="update" parameterType="com.kmall.admin.entity.mk.Mk2MemberBirthdayEntity">
- update mk2_member_birthday
- <set>
- <if test="topicName != null">`topic_name` = #{topicName}, </if>
- <if test="topicType != null">`topic_type` = #{topicType}, </if>
- <if test="topicPrice != null">`topic_price` = #{topicPrice}, </if>
- <if test="topicProportion != null">`topic_proportion` = #{topicProportion}, </if>
- <if test="isValid != null">`is_valid` = #{isValid}, </if>
- <if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
- <if test="createTime != null">`create_time` = #{createTime}, </if>
- <if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
- <if test="modTime != null">`mod_time` = #{modTime}, </if>
- <if test="tstm != null">`tstm` = #{tstm}</if>
- </set>
- where mmb_id = #{mmbId}
- </update>
- <delete id="delete">
- delete from mk2_member_birthday where mmb_id = #{value}
- </delete>
- <delete id="deleteBatch">
- delete from mk2_member_birthday where mmb_id in
- <foreach item="mmbId" collection="array" open="(" separator="," close=")">
- #{mmbId}
- </foreach>
- </delete>
- </mapper>
|