| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.context.annotation.Lazy;
|
| | | import org.springframework.core.task.TaskExecutor;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
| | | @Resource
|
| | | private ThreeSaleExtraInfoSerivce threeSaleExtraInfoSerivce;
|
| | |
|
| | | |
| | | @Lazy
|
| | | @Resource
|
| | | private IntegralGetService integralGetService;
|
| | | |
| | | |
| | |
|
| | | @Resource(name = "taskExecutor")
|
| | | private TaskExecutor executor;
|
| | |
|
| | | |
| | |
|
| | | public UserInfo getBoss(final long uid) {
|
| | | //TODO 有bug
|
| | | return threeSaleMapper.selectBoss(uid);
|
| | | }
|
| | |
|
| | |
| | | return threeSaleMapper.countSuperiorQuery(state, uid);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public long countFirstTeam(Long uid, Integer state) {
|
| | | return threeSaleMapper.countFirstTeam(uid, state);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public long countSecondTeam(Long uid, Integer state) {
|
| | |
| | | return result;
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public List<ThreeSale> listByWorkerId(Long workerId) {
|
| | | return threeSaleMapper.listByWorkerId(workerId);
|
| | |
| | | }
|
| | | });
|
| | |
|
| | | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | public void bindRelationshipByWX(UserInfo invitee, Long inviterId, ThreeSale threeSaleOld) throws ThreeSaleException {
|
| | | public void bindRelationshipByWX(UserInfo invitee, Long inviterId, ThreeSale threeSaleOld)
|
| | | throws ThreeSaleException {
|
| | |
|
| | | if (invitee == null || (inviterId == null && threeSaleOld == null))
|
| | | throw new ThreeSaleException(1, "用户信息为空");
|
| | |
| | | // 邀请消息
|
| | | userInviteMsgNotificationService.inviteSuccess(threeSale.getBoss().getId(), threeSale);
|
| | |
|
| | | |
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | |
| | | return threeSaleMapper.getByWorkerId(workerId);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public long countSuccessFirstTeam(Long uid) {
|
| | | return threeSaleMapper.countFirstTeam(uid, 1);
|
| | |
| | | return threeSaleMapper.selectSuccessByWorkerId(workerId);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public List<ThreeSale> getSuccessByDate(Long bossId, Long minTime, Long maxTime){
|
| | | return threeSaleMapper.getSuccessByDate(bossId, minTime, maxTime);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public List<ThreeSale> listFirstTeam(long start, int count, Long uid, Integer state) {
|