<?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.dsh.course.mapper.TbUserExitMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.dsh.guns.modular.system.model.TbUserExit">
|
<id column="id" property="id"/>
|
<result column="insertTime" property="insertTime"/>
|
<result column="userId" property="userId"/>
|
<result column="balance" property="balance"/>
|
<result column="remark" property="remark"/>
|
<result column="state" property="state"/>
|
<result column="userName" property="userName"/>
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id,
|
insertTime,
|
userId,
|
balance,
|
remark,
|
state
|
|
|
</sql>
|
<update id="updatestate">
|
update t_user_exit set state =2 where id=#{id}
|
</update>
|
<select id="getList" resultType="com.dsh.guns.modular.system.model.TbUserExit">
|
select * from t_user_exit where 1=1
|
<if test="sTime !=null and sTime !=''">
|
and insertTime between #{sTime} and #{eTime}
|
</if>
|
<if test="state !=null and state !=''">
|
and state =#{state}
|
</if>
|
<if test="name !=null and name !=''">
|
and userName like concat("%",#{name},"%")
|
</if>
|
</select>
|
<select id="getList1" resultType="com.dsh.guns.modular.system.model.TbUserExit">
|
select * from t_user_exit where 1=1
|
<if test="sTime !=null and sTime !=''">
|
and insertTime between #{sTime} and #{eTime}
|
</if>
|
<if test="state !=null and state !=''">
|
and state =#{state}
|
</if>
|
</select>
|
<select id="getSevenDay" resultType="com.dsh.guns.modular.system.model.TbUserExit">
|
select * from t_user_exit where TIMESTAMPDIFF(DAY,insertTime,now()) >=7
|
</select>
|
|
|
</mapper>
|