yujian
2020-05-06 a338d86bcaf17f2ba9296a601cdbda4d3e9baae0
队员
9个文件已修改
229 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ThreeSaleMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/ThreeSaleExtraInfo.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/UserInfoExtra.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleExtraInfoMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserInfoExtraMapper.xml 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/ThreeSaleSerivceImpl.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/UserInviteValidNumServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/invite/ThreeSaleSerivce.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
@@ -199,7 +199,7 @@
    }
    /**
     * 用户队员列表查询 1.5.3查询有效队员
     * 用户队员列表查询
     * 
     * @param acceptData
     * @param id
@@ -212,29 +212,33 @@
            return;
        }
        
        if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
            getMyTeamNew(acceptData, page, uid, type, out);
            return;
        }
        List<Long> listId = new ArrayList<Long>();
        long count = 0;
        List<ThreeSale> listTeam = null;
        if (type == 1) {
            listTeam = threeSaleSerivce.listFirstTeam((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, uid);
            listTeam = threeSaleSerivce.listFirstTeam((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, uid, listId);
            count = threeSaleSerivce.countFirstTeam(uid);
        } else if (type == 2) {
            listTeam = threeSaleSerivce.listSecondTeam((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, uid);
            listTeam = threeSaleSerivce.listSecondTeam((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, uid, listId);
            count = threeSaleSerivce.countSecondTeam(uid);
        }
        boolean needVIPInfo = false;
        if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
            needVIPInfo = true;
        // 组织数据
        JSONObject resultData = organizeTeam(count, listTeam, uid, type,needVIPInfo);
        // 第一页判断是否激活 是否有队员
        // 数据加工
        JSONArray array = null;
        if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
            array = organizeTeamNew(listTeam, uid, type, true);
        } else {
            boolean needVIPInfo = false;
            if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
                needVIPInfo = true;
            array =  organizeTeam(listTeam, uid, type,needVIPInfo);
        }
        JSONObject result = new JSONObject();
        result.put("count", count);
        result.put("list", array);
        if (type == 1 && page == 1) {
            boolean hasCode = false;
            UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
@@ -242,10 +246,10 @@
                if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode()))
                    hasCode = true;
            }
            resultData.put("hasCode", hasCode);
            resultData.put("hasTeam", count > 0 ? true : false);
            result.put("hasCode", hasCode);
            result.put("hasTeam", count > 0 ? true : false);
        }
        out.print(JsonUtil.loadTrueResult(resultData));
        out.print(JsonUtil.loadTrueResult(result));
    }
    /**
@@ -257,10 +261,8 @@
     * @param type
     * @return
     */
    private JSONObject organizeTeam(long count, List<ThreeSale> list, Long uid, int type, boolean needVipInfo) {
        JSONObject result = new JSONObject();
    private JSONArray organizeTeam(List<ThreeSale> list, Long uid, int type, boolean needVipInfo) {
        JSONArray resultArray = new JSONArray();
        Date todayTime = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("MM.dd HH:mm");
        SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd HH:mm");
@@ -343,46 +345,9 @@
            object.put("recentMsg", array);
            resultArray.add(object);
        }
        result.put("count", count);
        result.put("list", resultArray);
        return result;
        return resultArray;
    }
    
    private void getMyTeamNew(AcceptData acceptData, long page, long uid, int type, PrintWriter out) {
        if (type != 1 && type != 2) {
            out.print(JsonUtil.loadFalseResult("粉丝类型不正确"));
            return;
        }
        long count = 0;
        List<ThreeSale> listTeam = null;
        if (type == 1) {
            listTeam = threeSaleSerivce.listFirstTeam((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, uid);
            count = threeSaleSerivce.countFirstTeam(uid);
        } else if (type == 2) {
            listTeam = threeSaleSerivce.listSecondTeam((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, uid);
            count = threeSaleSerivce.countSecondTeam(uid);
        }
        JSONObject result = new JSONObject();
        result.put("count", count);
        result.put("list", organizeTeamNew(count, listTeam, uid, type, true));
        // 第一页判断是否激活 是否有队员
        if (type == 1 && page == 1) {
            boolean hasCode = false;
            UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
            if (userInfoExtra != null) {
                if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode()))
                    hasCode = true;
            }
            result.put("hasCode", hasCode);
            result.put("hasTeam", count > 0 ? true : false);
        }
        out.print(JsonUtil.loadTrueResult(result));
    }
    
    /**
     *  加工数据
@@ -393,7 +358,7 @@
     * @param wxtip 是需要微信提示
     * @return
     */
    private JSONArray organizeTeamNew(long count, List<ThreeSale> list, Long uid, int type, boolean wxtip) {
    private JSONArray organizeTeamNew(List<ThreeSale> list, Long uid, int type, boolean wxtip) {
        JSONArray resultArray = new JSONArray();
        if (list == null || list.size() == 0) {
            return resultArray;
@@ -524,7 +489,7 @@
        JSONObject result = new JSONObject();
        result.put("count", count);
        result.put("list", organizeTeamNew(count, listTeam, tid, 1, false));
        result.put("list", organizeTeamNew(listTeam, tid, 1, false));
        out.print(JsonUtil.loadTrueResult(result));
    }
    
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ThreeSaleMapper.java
@@ -115,7 +115,8 @@
     * @param uid
     * @return
     */
    List<ThreeSale> listFirstTeam(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid);
    List<ThreeSale> listFirstTeam(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid,
            @Param("listId")List<Long> listId);
    /**
     * 查询二级队员
@@ -124,7 +125,8 @@
     * @param uid
     * @return
     */
    List<ThreeSale> listSecondTeam(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid);
    List<ThreeSale> listSecondTeam(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid,
            @Param("listId")List<Long> listId);
    
    /**
     * 统计一级队员
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/ThreeSaleExtraInfo.java
@@ -23,10 +23,8 @@
    @org.yeshi.utils.mybatis.Column(name = "tf_id")
    private Long id;
    
    @org.yeshi.utils.mybatis.Column(name = "tf_boss_id")
    private UserInfo boss;//邀请者
    @org.yeshi.utils.mybatis.Column(name = "tf_worker_id")
    private UserInfo worker; //被邀请者
@@ -40,7 +38,12 @@
    @org.yeshi.utils.mybatis.Column(name = "tf_remind_worker")
    private Integer remindWorker; // 提示worker绑定微信  1 已提醒
    
    @org.yeshi.utils.mybatis.Column(name = "tf_type")
    private Integer type; // 1-一级  2二级
    @org.yeshi.utils.mybatis.Column(name = "tf_tags")
    private String tags; // 标签
    @org.yeshi.utils.mybatis.Column(name = "tf_createtime")
    private Date createTime; // 创建时间
@@ -110,6 +113,21 @@
    public void setRemindBoss(Integer remindBoss) {
        this.remindBoss = remindBoss;
    }
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public String getTags() {
        return tags;
    }
    public void setTags(String tags) {
        this.tags = tags;
    }
    
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/UserInfoExtra.java
@@ -87,6 +87,10 @@
    @Column(name = "uie_ercode")
    private String erCode;
        
    // 是淘宝授权
    @Column(name = "uie_bind_taobao")
    private Boolean bindTaoBao;
    // 创建时间
    @Column(name = "uie_create_time")
    private Date createTime;
@@ -248,4 +252,12 @@
        this.rankUpdateTime = rankUpdateTime;
    }
    public Boolean getBindTaoBao() {
        return bindTaoBao;
    }
    public void setBindTaoBao(Boolean bindTaoBao) {
        this.bindTaoBao = bindTaoBao;
    }
}
fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleExtraInfoMapper.xml
@@ -9,6 +9,8 @@
    <result column="tf_remind_worker" property="remindWorker" jdbcType="INTEGER"/>
    <result column="tf_createtime" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="tf_updatetime" property="updateTime" jdbcType="TIMESTAMP"/>
    <result column="tf_type" property="type" jdbcType="INTEGER"/>
    <result column="tf_tags" property="tags" jdbcType="VARCHAR"/>
    
    <association property="boss" column="tf_boss_id"
            javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
@@ -20,12 +22,12 @@
    </association>
    
  </resultMap>
  <sql id="Base_Column_List">tf_id,tf_boss_id,tf_worker_id,tf_nickname,tf_remind_boss,tf_remind_worker,tf_createtime,tf_updatetime</sql>
  <sql id="Base_Column_List">tf_id,tf_boss_id,tf_worker_id,tf_nickname,tf_remind_boss,tf_remind_worker,tf_type,tf_tags,tf_createtime,tf_updatetime</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_threesale_extra_info where tf_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_threesale_extra_info where tf_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_threesale_extra_info (tf_id,tf_boss_id,tf_worker_id,tf_nickname,tf_remind_boss,tf_remind_worker,tf_createtime,tf_updatetime) values (#{id,jdbcType=BIGINT},#{boss.id,jdbcType=BIGINT},#{worker.id,jdbcType=BIGINT},#{nickname,jdbcType=VARCHAR},#{remindBoss,jdbcType=INTEGER},#{remindWorker,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_threesale_extra_info (tf_id,tf_boss_id,tf_worker_id,tf_nickname,tf_remind_boss,tf_remind_worker,tf_type,tf_tags,tf_createtime,tf_updatetime) values (#{id,jdbcType=BIGINT},#{boss.id,jdbcType=BIGINT},#{worker.id,jdbcType=BIGINT},#{nickname,jdbcType=VARCHAR},#{remindBoss,jdbcType=INTEGER},#{remindWorker,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{type,jdbcType=INTEGER},#{tags,jdbcType=VARCHAR})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_threesale_extra_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">tf_id,</if>
@@ -36,6 +38,8 @@
      <if test="remindWorker != null">tf_remind_worker,</if>
      <if test="createTime != null">tf_createtime,</if>
      <if test="updateTime != null">tf_updatetime,</if>
      <if test="type != null">tf_type,</if>
      <if test="tags != null">tf_tags,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
@@ -46,9 +50,11 @@
      <if test="remindWorker != null">#{remindWorker,jdbcType=INTEGER},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
      <if test="type != null">#{type,jdbcType=INTEGER},</if>
      <if test="tags != null">#{tags,jdbcType=VARCHAR},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo">update yeshi_ec_threesale_extra_info set tf_boss_id = #{boss.id,jdbcType=BIGINT},tf_worker_id = #{worker.id,jdbcType=BIGINT},tf_nickname = #{nickname,jdbcType=VARCHAR},tf_remind_boss = #{remindBoss,jdbcType=INTEGER},tf_remind_worker = #{remindWorker,jdbcType=INTEGER},tf_createtime = #{createTime,jdbcType=TIMESTAMP},tf_updatetime = #{updateTime,jdbcType=TIMESTAMP} where tf_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo">update yeshi_ec_threesale_extra_info set tf_boss_id = #{boss.id,jdbcType=BIGINT},tf_worker_id = #{worker.id,jdbcType=BIGINT},tf_nickname = #{nickname,jdbcType=VARCHAR},tf_remind_boss = #{remindBoss,jdbcType=INTEGER},tf_remind_worker = #{remindWorker,jdbcType=INTEGER},tf_createtime = #{createTime,jdbcType=TIMESTAMP},tf_updatetime = #{updateTime,jdbcType=TIMESTAMP},tf_type = #{type,jdbcType=INTEGER},tf_tags = #{tags,jdbcType=VARCHAR} where tf_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo">update yeshi_ec_threesale_extra_info
    <set>
      <if test="boss != null">tf_boss_id=#{boss.id,jdbcType=BIGINT},</if>
@@ -56,6 +62,8 @@
      <if test="nickname != null">tf_nickname=#{nickname,jdbcType=VARCHAR},</if>
      <if test="remindBoss != null">tf_remind_boss=#{remindBoss,jdbcType=INTEGER},</if>
      <if test="remindWorker != null">tf_remind_worker=#{remindWorker,jdbcType=INTEGER},</if>
      <if test="type != null">tf_type=#{type,jdbcType=INTEGER},</if>
      <if test="tags != null">tf_tags=#{tags,jdbcType=VARCHAR},</if>
      <if test="createTime != null">tf_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">tf_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
    </set> where tf_id = #{id,jdbcType=BIGINT}
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserInfoExtraMapper.xml
@@ -29,8 +29,8 @@
        <result column="uie_active_time" property="activeTime"
            jdbcType="TIMESTAMP" />
        <result column="uie_mark" property="mark" jdbcType="VARCHAR" />
        <result column="uie_invite_code_vip" property="inviteCodeVip"
            jdbcType="VARCHAR" />
        <result column="uie_invite_code_vip" property="inviteCodeVip" jdbcType="VARCHAR" />
        <result column="uie_bind_taobao" property="bindTaoBao" jdbcType="BOOLEAN"/>
        <association property="userInfo" column="uie_uid"
            javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
            <id column="uie_uid" property="id" jdbcType="BIGINT" />
@@ -67,8 +67,8 @@
        <result column="uie_active_time" property="activeTime"
            jdbcType="TIMESTAMP" />
        <result column="uie_mark" property="mark" jdbcType="VARCHAR" />
        <result column="uie_invite_code_vip" property="inviteCodeVip"
            jdbcType="VARCHAR" />
        <result column="uie_invite_code_vip" property="inviteCodeVip" jdbcType="VARCHAR" />
        <result column="uie_bind_taobao" property="bindTaoBao" jdbcType="BOOLEAN"/>
        <association property="userInfo" column="uie_uid"
            resultMap="com.yeshi.fanli.dao.mybatis.UserInfoMapper.BaseResultMap" />
        <association property="userRank" column="uie_rank_id"
@@ -101,8 +101,8 @@
        <result column="uie_active_time" property="activeTime"
            jdbcType="TIMESTAMP" />
        <result column="uie_mark" property="mark" jdbcType="VARCHAR" />
        <result column="uie_invite_code_vip" property="inviteCodeVip"
            jdbcType="VARCHAR" />
        <result column="uie_invite_code_vip" property="inviteCodeVip" jdbcType="VARCHAR" />
        <result column="uie_bind_taobao" property="bindTaoBao" jdbcType="BOOLEAN"/>
        <association property="userInfo" column="uie_uid"
            javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
            <id column="uie_uid" property="id" jdbcType="BIGINT" />
@@ -110,7 +110,7 @@
        <association property="userRank" column="uie_rank_id"
            resultMap="com.yeshi.fanli.dao.mybatis.user.UserRankMapper.BaseResultMap" />
    </resultMap>
    <sql id="Base_Column_List">uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_coupon_news,uie_synch_navbar,uie_first_login_time,uie_sex,uie_weixin,uie_gold_coin,uie_create_time,uie_update_time,uie_active_time,uie_mark,uie_invite_code_vip,uie_ercode
    <sql id="Base_Column_List">uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_coupon_news,uie_synch_navbar,uie_first_login_time,uie_sex,uie_weixin,uie_gold_coin,uie_create_time,uie_update_time,uie_active_time,uie_mark,uie_invite_code_vip,uie_ercode,uie_bind_taobao
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
@@ -130,9 +130,9 @@
    <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_user_info_extra
        (uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_coupon_news,uie_synch_navbar,uie_first_login_time,uie_sex,uie_weixin,uie_gold_coin,uie_create_time,uie_update_time,uie_active_time,uie_mark,uie_invite_code_vip,uie_ercode)
        (uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_coupon_news,uie_synch_navbar,uie_first_login_time,uie_sex,uie_weixin,uie_gold_coin,uie_create_time,uie_update_time,uie_active_time,uie_mark,uie_invite_code_vip,uie_ercode,uie_bind_taobao)
        values
        (#{id,jdbcType=BIGINT},#{userInfo.id,jdbcType=BIGINT},#{userRank.id,jdbcType=BIGINT},#{rankSource,jdbcType=INTEGER},#{rankOrderNum,jdbcType=INTEGER},#{rankUpdateTime,jdbcType=TIMESTAMP},#{inviteCode,jdbcType=VARCHAR},#{couponNews,jdbcType=INTEGER},#{synchNavbar,jdbcType=VARCHAR},#{firstLoginTime,jdbcType=TIMESTAMP},#{sex,jdbcType=INTEGER},#{weiXin,jdbcType=VARCHAR},#{goldCoin,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{activeTime,jdbcType=TIMESTAMP},#{mark,jdbcType=VARCHAR},#{inviteCodeVip,jdbcType=VARCHAR},#{erCode,jdbcType=VARCHAR})
        (#{id,jdbcType=BIGINT},#{userInfo.id,jdbcType=BIGINT},#{userRank.id,jdbcType=BIGINT},#{rankSource,jdbcType=INTEGER},#{rankOrderNum,jdbcType=INTEGER},#{rankUpdateTime,jdbcType=TIMESTAMP},#{inviteCode,jdbcType=VARCHAR},#{couponNews,jdbcType=INTEGER},#{synchNavbar,jdbcType=VARCHAR},#{firstLoginTime,jdbcType=TIMESTAMP},#{sex,jdbcType=INTEGER},#{weiXin,jdbcType=VARCHAR},#{goldCoin,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{activeTime,jdbcType=TIMESTAMP},#{mark,jdbcType=VARCHAR},#{inviteCodeVip,jdbcType=VARCHAR},#{erCode,jdbcType=VARCHAR},#{bindTaoBao,jdbcType=BOOLEAN})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra"
        useGeneratedKeys="true" keyProperty="id">
@@ -157,6 +157,7 @@
            <if test="activeTime != null">uie_active_time,</if>
            <if test="mark != null">uie_mark,</if>
            <if test="inviteCodeVip != null">uie_invite_code_vip,</if>
            <if test="bindTaoBao != null">uie_bind_taobao,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -178,7 +179,8 @@
            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="activeTime != null">#{activeTime,jdbcType=TIMESTAMP},</if>
            <if test="mark != null">#{mark,jdbcType=VARCHAR},</if>
            <if test="inviteCodeVip != null">#{inviteCodeVip,jdbcType=VARCHAR}</if>
            <if test="inviteCodeVip != null">#{inviteCodeVip,jdbcType=VARCHAR},</if>
            <if test="bindTaoBao != null">#{bindTaoBao,jdbcType=BOOLEAN},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra">update
@@ -199,8 +201,9 @@
        #{createTime,jdbcType=TIMESTAMP},uie_update_time =
        #{updateTime,jdbcType=TIMESTAMP},uie_active_time =
        #{activeTime,jdbcType=TIMESTAMP},uie_mark = #{mark,jdbcType=VARCHAR}
        ,uie_invite_code_vip =#{inviteCodeVip,jdbcType=VARCHAR} where
        uie_id = #{id,jdbcType=BIGINT}
        ,uie_invite_code_vip =#{inviteCodeVip,jdbcType=VARCHAR},
        uie_bind_taobao = #{bindTaoBao,jdbcType=BOOLEAN}
        where uie_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra">
        update yeshi_ec_user_info_extra
@@ -209,13 +212,11 @@
            <if test="userRank != null">uie_rank_id=#{userRank.id,jdbcType=BIGINT},</if>
            <if test="rankSource != null">uie_rank_source=#{rankSource,jdbcType=INTEGER},</if>
            <if test="rankOrderNum != null">uie_rank_order_num=#{rankOrderNum,jdbcType=INTEGER},</if>
            <if test="rankUpdateTime != null">uie_rank_update_time=#{rankUpdateTime,jdbcType=TIMESTAMP},
            </if>
            <if test="rankUpdateTime != null">uie_rank_update_time=#{rankUpdateTime,jdbcType=TIMESTAMP},</if>
            <if test="inviteCode != null">uie_invite_code=#{inviteCode,jdbcType=VARCHAR},</if>
            <if test="couponNews != null">uie_coupon_news=#{couponNews,jdbcType=INTEGER},</if>
            <if test="synchNavbar != null">uie_synch_navbar=#{synchNavbar,jdbcType=VARCHAR},</if>
            <if test="firstLoginTime != null">uie_first_login_time=#{firstLoginTime,jdbcType=TIMESTAMP},
            </if>
            <if test="firstLoginTime != null">uie_first_login_time=#{firstLoginTime,jdbcType=TIMESTAMP},</if>
            <if test="sex != null">uie_sex=#{sex,jdbcType=INTEGER},</if>
            <if test="weiXin != null">uie_weixin=#{weiXin,jdbcType=VARCHAR},</if>
            <if test="erCode != null">uie_ercode=#{erCode,jdbcType=VARCHAR},</if>
@@ -226,6 +227,7 @@
            <if test="mark != null">uie_mark=#{mark,jdbcType=VARCHAR},</if>
            <if test="inviteCodeVip !=null">uie_invite_code_vip=#{inviteCodeVip,jdbcType=VARCHAR},
            </if>
             <if test="bindTaoBao != null">uie_bind_taobao=#{bindTaoBao,jdbcType=BOOLEAN},</if>
        </set>
        where uie_id = #{id,jdbcType=BIGINT}
    </update>
@@ -235,13 +237,11 @@
            <if test="userRank != null">uie_rank_id=#{userRank.id,jdbcType=BIGINT},</if>
            <if test="rankSource != null">uie_rank_source=#{rankSource,jdbcType=INTEGER},</if>
            <if test="rankOrderNum != null">uie_rank_order_num=#{rankOrderNum,jdbcType=INTEGER},</if>
            <if test="rankUpdateTime != null">uie_rank_update_time=#{rankUpdateTime,jdbcType=TIMESTAMP},
            </if>
            <if test="rankUpdateTime != null">uie_rank_update_time=#{rankUpdateTime,jdbcType=TIMESTAMP},</if>
            <if test="inviteCode != null">uie_invite_code=#{inviteCode,jdbcType=VARCHAR},</if>
            <if test="couponNews != null">uie_coupon_news=#{couponNews,jdbcType=INTEGER},</if>
            <if test="synchNavbar != null">uie_synch_navbar=#{synchNavbar,jdbcType=VARCHAR},</if>
            <if test="firstLoginTime != null">uie_first_login_time=#{firstLoginTime,jdbcType=TIMESTAMP},
            </if>
            <if test="firstLoginTime != null">uie_first_login_time=#{firstLoginTime,jdbcType=TIMESTAMP},</if>
            <if test="sex != null">uie_sex=#{sex,jdbcType=INTEGER},</if>
            <if test="weiXin != null">uie_weixin=#{weiXin,jdbcType=VARCHAR},</if>
            <if test="erCode != null">uie_ercode=#{erCode,jdbcType=VARCHAR},</if>
@@ -250,6 +250,7 @@
            <if test="updateTime != null">uie_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="activeTime != null">uie_active_time=#{activeTime,jdbcType=TIMESTAMP},</if>
            <if test="mark != null">uie_mark=#{mark,jdbcType=VARCHAR},</if>
            <if test="bindTaoBao != null">uie_bind_taobao=#{bindTaoBao,jdbcType=BOOLEAN},</if>
        </set>
        where uie_uid = #{userInfo.id,jdbcType=BIGINT}
    </update>
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/ThreeSaleSerivceImpl.java
@@ -257,7 +257,7 @@
    @Override
    public JSONObject getMyFirstTeam(long start, int count, Long uid) {
        List<ThreeSale> list = threeSaleMapper.listFirstTeam(start, count, uid);
        List<ThreeSale> list = threeSaleMapper.listFirstTeam(start, count, uid,null);
        if (list == null) {
            list = new ArrayList<ThreeSale>();
        }
@@ -267,7 +267,7 @@
    @Override
    public JSONObject getMySecondTeam(long start, int count, Long uid) {
        List<ThreeSale> list = threeSaleMapper.listSecondTeam(start, count, uid);
        List<ThreeSale> list = threeSaleMapper.listSecondTeam(start, count, uid, null);
        if (list == null) {
            list = new ArrayList<ThreeSale>();
        }
@@ -490,15 +490,26 @@
    @Override
    public List<ThreeSale> listFirstTeam(long start, int count, Long uid) {
        return threeSaleMapper.listFirstTeam(start, count, uid);
        return threeSaleMapper.listFirstTeam(start, count, uid, null);
    }
    @Override
    public List<ThreeSale> listSecondTeam(long start, int count, Long uid) {
        return threeSaleMapper.listSecondTeam(start, count, uid);
        return threeSaleMapper.listSecondTeam(start, count, uid, null);
    }
    @Override
    public List<ThreeSale> listFirstTeam(long start, int count, Long uid, List<Long> listId) {
        return threeSaleMapper.listFirstTeam(start, count, uid, listId);
    }
    @Override
    public List<ThreeSale> listSecondTeam(long start, int count, Long uid, List<Long> listId) {
        return threeSaleMapper.listSecondTeam(start, count, uid, listId);
    }
    @Override
    public long countFirstTeam(Long uid) {
        return threeSaleMapper.countFirstTeam(uid);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/UserInviteValidNumServiceImpl.java
@@ -295,7 +295,7 @@
        }
        
        int countTeam2 = 0;
        List<ThreeSale> listSecondTeam = threeSaleSerivce.listSecondTeam(0,  Integer.MAX_VALUE, superUid);
        List<ThreeSale> listSecondTeam = threeSaleSerivce.listSecondTeam(0, Integer.MAX_VALUE, superUid);
        if (listSecondTeam != null && listSecondTeam.size() > 0) {
            for (ThreeSale team: listSecondTeam) {
                if (team.getWorker() == null || team.getWorker().getId() == null) {
fanli/src/main/java/com/yeshi/fanli/service/inter/user/invite/ThreeSaleSerivce.java
@@ -187,6 +187,26 @@
     * @return
     */
    public List<ThreeSale> listSecondTeam(long start, int count, Long uid);
    /**
     * 一级队员
     * @param start
     * @param count
     * @param uid
     * @param state
     * @return
     */
    public List<ThreeSale> listFirstTeam(long start, int count, Long uid, List<Long> listId);
    /**
     * 二级队员
     * @param start
     * @param count
     * @param uid
     * @param state
     * @return
     */
    public List<ThreeSale> listSecondTeam(long start, int count, Long uid, List<Long> listId);
    /**
     * 统计直接粉丝数量