| | |
| | | @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未申请入司 |