| | |
| | | import com.sinata.rest.modular.system.model.SystemNotice; |
| | | import com.sinata.rest.modular.system.service.ISmsRecordService; |
| | | import com.sinata.rest.modular.system.service.ISystemSetService; |
| | | import java.util.List; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Override |
| | | @Transactional |
| | | public ApiUtils applySaleUser(BodyApplySaleUser body) { |
| | | log.info("推荐他人入司,入参:{}", body); |
| | | MallOrder mallOrder = mallOrderService.getById(body.getOrderNo()); |
| | | log.info("推荐他人入司,订单:{}", mallOrder); |
| | | if (mallOrder == null || mallOrder.getOrderType() == EnumMallGoodsGroupType.GOODS.index || mallOrder.getUseUserId() != 0) { |
| | |
| | | // .build().insert(); |
| | | // } |
| | | // } else { |
| | | // 添加邀请关系 |
| | | MemUserRelation.builder() |
| | | .id(user.getId()) |
| | | .parentId(shareUserRelation.getId()) |
| | | .relationPath(shareUserRelation.getRelationPath() + "/" + user.getId()) |
| | | .build().insert(); |
| | | // 添加更新用户关系 |
| | | memUserRelationService.saveOrUpdate( |
| | | MemUserRelation.builder() |
| | | .id(user.getId()) |
| | | .parentId(shareUserRelation.getId()) |
| | | .relationPath(shareUserRelation.getRelationPath() + "/" + user.getId()) |
| | | .build() |
| | | ); |
| | | // } |
| | | |
| | | // 订单材料受赠人,0未申请入司 |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<MemUser> queryLevelUpUserList() { |
| | | return baseMapper.queryLevelUpUserList(); |
| | | } |
| | | } |