|
@@ -0,0 +1,45 @@
|
|
|
|
+<?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.miaxis.birthday.mapper.BirthdayLogMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="BirthdayLog" id="BirthdayLogResult">
|
|
|
|
+ <result property="id" column="id"/>
|
|
|
|
+ <result property="name" column="name"/>
|
|
|
|
+ <result property="sex" column="sex"/>
|
|
|
|
+ <result property="birthday" column="birthday"/>
|
|
|
|
+ <result property="userId" column="user_id"/>
|
|
|
|
+ <result property="isPay" column="is_pay"/>
|
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectBirthdayLogVo">
|
|
|
|
+ select * from birthday_log
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectBirthdayLogList" parameterType="BirthdayLog" resultMap="BirthdayLogResult">
|
|
|
|
+ <include refid="selectBirthdayLogVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
|
|
|
+ <if test="sex != null and sex != ''">and sex = #{sex}</if>
|
|
|
|
+ <if test="birthday != null ">and birthday = #{birthday}</if>
|
|
|
|
+ <if test="userId != null ">and user_id = #{userId}</if>
|
|
|
|
+ <if test="isPay != null ">and is_pay = #{isPay}</if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <select id="selectBirthdayLogCount" parameterType="BirthdayLog" resultType="int">
|
|
|
|
+ select count(1) from birthday_log
|
|
|
|
+ <where>
|
|
|
|
+ <if test="name != null and name != ''">and name = #{name}</if>
|
|
|
|
+ <if test="sex != null and sex != ''">and sex = #{sex}</if>
|
|
|
|
+ <if test="birthday != null ">and birthday = #{birthday}</if>
|
|
|
|
+ <if test="userId != null ">and user_id = #{userId}</if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+</mapper>
|