| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <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" /> |
| | | <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"> |
| | |
| | | <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 test="query.salesmanUser!=null and query.salesmanUser!= ''"> |
| | | and t1.salesmanUserId = #{query.salesmanUser} |
| | | </if> |
| | | <if test="query.isVip!=null and query.isVip!= ''"> |
| | | and t1.isVip = #{query.isVip} |
| | | <if test="query.insertType!=null and query.insertType!= ''"> |
| | | and t1.insertType = #{query.insertType} |
| | | </if> |
| | | <if test="query.typeId!=null and query.typeId!= ''"> |
| | | and t1.addUserId = #{query.typeId} |
| | | </if> |
| | | and t1.state != 3 |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | <select id="getSelects" resultType="com.dsh.account.dto.SelectDto"> |
| | | SELECT ts.id ,ts.`name` as value |
| | |
| | | |
| | | |
| | | <select id="getYearUserCount" resultType="com.dsh.account.vo.entity.YearData"> |
| | | select IFNULL(count(*),0) AS yearCount,DATE_FORMAT(insertTime,'%Y') AS `year` from t_app_user |
| | | select IFNULL(count(*),0) AS yearCount,DATE_FORMAT(insertTime,'%Y') AS `year` from t_app_user |
| | | <where> |
| | | <if test="dto.cityCode != null and dto.cityCode != ''"> |
| | | AND cityCode = #{dto.cityCode} |
| | |
| | | GROUP BY DATE_FORMAT(insertTime,'%Y') |
| | | </select> |
| | | <select id="getMonthUserCount" resultType="com.dsh.account.vo.entity.MonthData"> |
| | | select IFNULL(count(*),0) AS monthCount,DATE_FORMAT(insertTime,'%Y%m') AS `month` from t_app_user |
| | | select IFNULL(count(*),0) AS monthCount,DATE_FORMAT(insertTime,'%Y%m') AS `month` from t_app_user |
| | | <where> |
| | | <if test="dto.cityCode != null and dto.cityCode != ''"> |
| | | AND cityCode = #{dto.cityCode} |
| | |
| | | GROUP BY DATE_FORMAT(insertTime,'%Y%m') |
| | | </select> |
| | | <select id="getWeekUserCount4" resultType="com.dsh.account.vo.entity.WeekData"> |
| | | select IFNULL(count(*),0) AS weekCount,4 AS `week` from t_app_user |
| | | select IFNULL(count(*),0) AS weekCount,4 AS `week` from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | |
| | | </select> |
| | | |
| | | <select id="getWeekUserCount3" resultType="com.dsh.account.vo.entity.WeekData"> |
| | | select IFNULL(count(*),0) AS weekCount,3 AS `week` from t_app_user |
| | | select IFNULL(count(*),0) AS weekCount,3 AS `week` from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | |
| | | </select> |
| | | |
| | | <select id="getWeekUserCount2" resultType="com.dsh.account.vo.entity.WeekData"> |
| | | select IFNULL(count(*),0) AS weekCount,2 AS `week` from t_app_user |
| | | select IFNULL(count(*),0) AS weekCount,2 AS `week` from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | |
| | | </select> |
| | | |
| | | <select id="getWeekUserCount1" resultType="com.dsh.account.vo.entity.WeekData"> |
| | | select IFNULL(count(*),0) AS weekCount,1 AS `week` from t_app_user |
| | | select IFNULL(count(*),0) AS weekCount,1 AS `week` from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | |
| | | </select> |
| | | |
| | | <select id="getDayUserCount" resultType="com.dsh.account.vo.entity.DayData"> |
| | | select IFNULL(count(*),0) AS dayCount,DATE_FORMAT(insertTime,'%Y-%m-%d') AS `day` from t_app_user |
| | | select IFNULL(count(*),0) AS dayCount,DATE_FORMAT(insertTime,'%Y-%m-%d') AS `day` from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | |
| | | GROUP BY DATE_FORMAT(insertTime,'%Y-%m-%d') |
| | | </select> |
| | | <select id="groupCityInfo" resultType="com.dsh.account.vo.GroupCityInfoVO"> |
| | | select IFNULL(count(*),0) AS userCount,cityCode,city from t_app_user |
| | | select IFNULL(count(*),0) AS userCount,cityCode,city from t_app_user |
| | | <where> |
| | | <if test="dto.startTime != null and dto.startTime != '' and dto.endTime != null and dto.endTime != ''"> |
| | | AND insertTime between #{dto.startTime} and #{dto.endTime} |
| | |
| | | </where> |
| | | GROUP BY cityCode |
| | | </select> |
| | | <select id="listAll1" resultType="com.dsh.account.model.vo.QueryAppUserVO"> |
| | | select t2.* from t_app_user t2 |
| | | <where> |
| | | <if test="query.userIds != null and query.userIds.size()>0"> |
| | | AND t2.id IN |
| | | <foreach collection="query.userIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.city!=null and query.city!= ''"> |
| | | and t2.city = #{query.city} |
| | | </if> |
| | | <if test="query.province!=null and query.province!= ''"> |
| | | and t2.province = #{query.province} |
| | | </if> |
| | | <if test="query.name!=null and query.name!= ''"> |
| | | AND t2.name LIKE concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.phone!=null and query.phone!= ''"> |
| | | and t2.phone LIKE concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.isVip!=null and query.isVip!= ''"> |
| | | and t2.isVip = #{query.isVip} |
| | | </if> |
| | | <if test="query.salesmanUser!=null and query.salesmanUser!= ''"> |
| | | and t2.salesmanUserId = #{query.salesmanUser} |
| | | </if> |
| | | and t2.state != 3 |
| | | </where> |
| | | </select> |
| | | </mapper> |