<?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.account.mapper.TAppUserMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.dsh.account.entity.TAppUser">
|
<id column="id" property="id" />
|
<result column="code" property="code" />
|
<result column="name" property="name" />
|
<result column="phone" property="phone" />
|
<result column="password" property="password" />
|
<result column="birthday" property="birthday" />
|
<result column="gender" property="gender" />
|
<result column="height" property="height" />
|
<result column="weight" property="weight" />
|
<result column="bmi" property="bmi" />
|
<result column="idCard" property="idCard" />
|
<result column="openid" property="openid" />
|
<result column="province" property="province" />
|
<result column="provinceCode" property="provinceCode" />
|
<result column="city" property="city" />
|
<result column="cityCode" property="cityCode" />
|
<result column="isVip" property="isVip" />
|
<result column="vipEndTime" property="vipEndTime" />
|
<result column="viplevelId" property="viplevelId" />
|
<result column="referralUserId" property="referralUserId" />
|
<result column="salesmanUserId" property="salesmanUserId" />
|
<result column="state" property="state" />
|
<result column="integral" property="integral" />
|
<result column="playPaiCoins" property="playPaiCoins" />
|
<result column="headImg" property="headImg" />
|
</resultMap>
|
|
|
|
<update id="membershipEnd">
|
update t_app_user set isVip = 0 where isVip = 1 and now() >= vipEndTime
|
</update>
|
<select id="listAll" resultType="com.dsh.account.model.vo.QueryAppUserVO">
|
select t1.* from t_app_user t1
|
<where>
|
<if test="query.city!=null and query.city!= ''">
|
and t1.city = #{query.city}
|
</if>
|
<if test="query.province!=null and query.province!= ''">
|
and t1.province = #{query.province}
|
</if>
|
<if test="query.name!=null and query.name!= ''">
|
AND t1.name LIKE concat('%',#{query.name},'%')
|
</if>
|
<if test="query.phone!=null and query.phone!= ''">
|
and t1.phone LIKE concat('%',#{query.phone},'%')
|
</if>
|
<if test="query.isVip!=null and query.isVip!= ''">
|
and t1.isVip = #{query.isVip}
|
</if>
|
and t1.state != 3
|
</where>
|
</select>
|
<select id="getSelects" resultType="com.dsh.account.dto.SelectDto">
|
SELECT ts.id ,ts.`name` as value
|
FROM t_student ts
|
<where>
|
ts.id in
|
<foreach collection="studentIds" item="id" index="index" open="(" close=")" separator=",">
|
#{id}
|
</foreach>
|
</where>
|
</select>
|
</mapper>
|