yujian
2020-04-21 5af10f175689549ca44b74e9fc1c7ee0ec92c2d7
fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml
@@ -79,6 +79,8 @@
      <result column="uie_gold_coin" property="goldCoin" jdbcType="INTEGER" />
      <result column="uie_mark" property="mark" jdbcType="VARCHAR" />
      <result column="userLevel" property="userLevel" jdbcType="VARCHAR" />
      <result column="inviteCode" property="inviteCode" jdbcType="VARCHAR" />
   </resultMap>
   <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
@@ -309,7 +311,8 @@
      AND DATE_FORMAT(hb.`hb_create_time`,'%Y%m') =
      DATE_FORMAT(CURDATE(),'%Y%m'))AS monthOrder <!-- 累计本月订单 -->
      ,(SELECT COUNT(tr.`id`) FROM `yeshi_ec_threesale` tr  <!-- 队员 -->
      WHERE tr.`boss_id`=u.id AND tr.state = 1) AS totalPlayers
      WHERE tr.`boss_id`=u.id AND tr.state = 1) AS totalPlayers,
      tuls_level As userLevel, ext.uie_invite_code AS inviteCode
      FROM
      yeshi_ec_user u
      LEFT JOIN yeshi_ec_binding_account b ON u.`id` =
@@ -318,7 +321,7 @@
      LEFT JOIN yeshi_ec_user_rank rak ON rak.ur_id = ext.uie_rank_id
      LEFT
      JOIN yeshi_ec_user_info_extra_taobao tb ON tb.`uiet_uid` = u.id
      LEFT JOIN  yeshi_ec_team_user_level_statistic lc ON lc.`tuls_uid` = u.id
      <if test="userState == 2">
         LEFT JOIN
         (SELECT A.uid AS buid,MAX(A.f_wxUnionId) AS
@@ -351,10 +354,10 @@
         )A GROUP BY A.uid) B ON u.id= B.buid
      </if>
      where 1=1
      <if test="userState == 1">
         AND u.`state` <![CDATA[<>]]>
         2 <!-- 正常用户 -->
         AND u.`state` <![CDATA[<>]]>2 <!-- 未被封禁用户 -->
      </if>
      <if test="userState == 2">
         AND u.`state` =2   <!-- 封禁用户 -->
@@ -363,7 +366,6 @@
      <if test="userType!=null">
         AND u.type=#{userType}
      </if>
      <if test="startTime != null and startTime !='' ">
         AND DATE_FORMAT(FROM_UNIXTIME(u.createtime/1000),'%Y%m%d')<![CDATA[>=]]>
         DATE_FORMAT(#{startTime},'%Y%m%d')
@@ -375,6 +377,18 @@
      <if test="userRank != null">
         AND rak.ur_name = #{userRank}
      </if>
      <if test = "level != null and level != ''">
         AND lc.tuls_level = #{level}
      </if>
      <if test="activeCode == 0">
         AND (ext.`uie_invite_code` is null OR ext.`uie_invite_code`='')
      </if>
      <if test="activeCode == 1">
         AND (ext.`uie_invite_code` is not null OR ext.`uie_invite_code`<![CDATA[<>]]>'')
      </if>
      <if test="days != null">
         <!-- 注册时间 -->
         AND <![CDATA[DATE_SUB(CURDATE(), INTERVAL ${days} DAY) <= FROM_UNIXTIME(u.createtime/1000)]]>
@@ -426,6 +440,8 @@
      yeshi_ec_user_info_extra ext ON u.`id` = ext.uie_uid
      LEFT JOIN
      yeshi_ec_user_rank rak ON rak.ur_id = ext.uie_rank_id
      LEFT JOIN  yeshi_ec_team_user_level_statistic lc ON lc.`tuls_uid` = u.id
      where 1=1
      <if test="userState == 1">
@@ -449,6 +465,17 @@
      <if test="userRank != null">
         AND rak.ur_name = #{userRank}
      </if>
      <if test = "level != null and level != ''">
         AND lc.tuls_level = #{level}
      </if>
      <if test="activeCode == 0">
         AND (ext.`uie_invite_code` is null OR ext.`uie_invite_code`='')
      </if>
      <if test="activeCode == 1">
         AND (ext.`uie_invite_code` is not null OR ext.`uie_invite_code`<![CDATA[<>]]>'')
      </if>
      <if test="days != null">  <!-- 注册时间 -->
         AND <![CDATA[DATE_SUB(CURDATE(), INTERVAL ${days} DAY) <= FROM_UNIXTIME(u.createtime/1000)]]>
      </if>