| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | | import org.springframework.core.task.TaskExecutor;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.exception.ThreeSaleException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | |
| | | import com.yeshi.fanli.service.inter.msg.UserInviteMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinOriginService;
|
| | | import com.yeshi.fanli.service.inter.user.UserActiveLogService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserActiveLogService userActiveLogService;
|
| | | |
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | | @Resource(name = "taskExecutor")
|
| | | private TaskExecutor executor;
|
| | |
| | |
|
| | | long countTotal = threeSaleMapper.countFirstTeam(uid, state);
|
| | |
|
| | | return organizeTeam(countTotal, list);
|
| | | return organizeTeam(countTotal, list, uid);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | |
|
| | | long countTotal = threeSaleMapper.countSecondTeam(uid, state);
|
| | |
|
| | | return organizeTeam(countTotal, list);
|
| | | return organizeTeam(countTotal, list, uid);
|
| | | }
|
| | |
|
| | | public JSONObject organizeTeam(long count, List<ThreeSale> list) {
|
| | | public JSONObject organizeTeam(long count, List<ThreeSale> list, Long uid) {
|
| | |
|
| | | JSONObject result = new JSONObject();
|
| | |
|
| | |
| | | object.put("memoName", memoName);
|
| | |
|
| | | String nickName = "";
|
| | | Long workerId= null;
|
| | | String portrait = "";
|
| | | Long lastLoginTime = null;
|
| | |
|
| | | UserInfo worker = threeSale.getWorker();
|
| | | if (worker != null) {
|
| | | workerId = worker.getId();
|
| | | portrait = worker.getPortrait();
|
| | | lastLoginTime = worker.getLastLoginTime();
|
| | | nickName = worker.getNickName();
|
| | | }
|
| | | object.put("workerId", workerId);
|
| | | object.put("nickName", nickName);
|
| | | object.put("portrait", portrait);
|
| | |
|
| | |
| | | // 往年
|
| | | contentJson.put("content", "最近登录 " + format.format(lastLoginTime));
|
| | | }
|
| | |
|
| | | array.add(contentJson);
|
| | | |
| | | |
| | | if (workerId != null) {
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(workerId);
|
| | | if (userInfoExtra != null) |
| | | object.put("weiXin", userInfoExtra.getWeiXin());
|
| | | }
|
| | | |
| | |
|
| | | } else if (threeSale.getExpire() != null
|
| | | && (threeSale.getExpire() == 1 || threeSale.getExpire().equals(1))) {
|
| | |
| | | resultArray.add(object);
|
| | | }
|
| | |
|
| | | boolean bdWeiXin = false;
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
|
| | | if (userInfoExtra != null && !StringUtil.isNullOrEmpty(userInfoExtra.getWeiXin())) |
| | | bdWeiXin = true;
|
| | | |
| | | result.put("bdWeiXin", bdWeiXin);
|
| | | result.put("count", count);
|
| | | result.put("result_list", resultArray);
|
| | |
|