| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 用户队员列表查询 1.5.3查询有效队员
|
| | | * 用户队员列表查询 |
| | | *
|
| | | * @param acceptData
|
| | | * @param id
|
| | |
| | | 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);
|
| | |
| | | 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));
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | * @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");
|
| | |
| | | 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));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 加工数据
|
| | |
| | | * @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;
|
| | |
| | |
|
| | | 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));
|
| | | }
|
| | |
|
| | |
| | | * @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);
|
| | |
|
| | | /**
|
| | | * 查询二级队员
|
| | |
| | | * @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);
|
| | |
|
| | | /**
|
| | | * 统计一级队员
|
| | |
| | | @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; //被邀请者
|
| | |
| | | @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; // 创建时间
|
| | |
|
| | |
| | | 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;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | @Column(name = "uie_ercode")
|
| | | private String erCode;
|
| | |
|
| | | // 是淘宝授权
|
| | | @Column(name = "uie_bind_taobao")
|
| | | private Boolean bindTaoBao;
|
| | | |
| | | // 创建时间
|
| | | @Column(name = "uie_create_time")
|
| | | private Date createTime;
|
| | |
| | | this.rankUpdateTime = rankUpdateTime;
|
| | | }
|
| | |
|
| | | public Boolean getBindTaoBao() {
|
| | | return bindTaoBao;
|
| | | }
|
| | |
|
| | | public void setBindTaoBao(Boolean bindTaoBao) {
|
| | | this.bindTaoBao = bindTaoBao;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | <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">
|
| | |
| | | </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>
|
| | |
| | | <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>
|
| | |
| | | <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>
|
| | |
| | | <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}
|
| | |
| | | <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" /> |
| | |
| | | <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" |
| | |
| | | <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" /> |
| | |
| | | <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"> |
| | |
| | | <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"> |
| | |
| | | <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=","> |
| | |
| | | <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 |
| | |
| | | #{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 |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | |
|
| | | @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>();
|
| | | }
|
| | |
| | |
|
| | | @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>();
|
| | | }
|
| | |
| | |
|
| | | @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);
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | 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) {
|
| | |
| | | * @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);
|
| | |
|
| | | /**
|
| | | * 统计直接粉丝数量
|