package cn.newfeifan.mall.module.distri.controller.app.duser;

import cn.newfeifan.mall.module.distri.controller.admin.duser.vo.DuserInfoVO;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;

import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;

import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;

import cn.newfeifan.mall.framework.common.pojo.PageParam;
import cn.newfeifan.mall.framework.common.pojo.PageResult;
import cn.newfeifan.mall.framework.common.pojo.CommonResult;
import cn.newfeifan.mall.framework.common.util.object.BeanUtils;
import static cn.newfeifan.mall.framework.common.pojo.CommonResult.success;

import cn.newfeifan.mall.framework.excel.core.util.ExcelUtils;

import cn.newfeifan.mall.framework.operatelog.core.annotations.OperateLog;
import static cn.newfeifan.mall.framework.operatelog.core.enums.OperateTypeEnum.*;

import cn.newfeifan.mall.module.distri.controller.app.duser.vo.*;
import cn.newfeifan.mall.module.distri.dal.dataobject.duser.DuserDO;
import cn.newfeifan.mall.module.distri.service.duser.DuserService;

@Tag(name = "用户 APP - 推荐用户")
@RestController
@RequestMapping("/distri/duser")
@Validated
public class AppDuserController {

    @Resource
    private DuserService duserService;

    @GetMapping("/getDuserInfo")
    @Operation(summary = "获取分销人员信息")
    public CommonResult<DuserInfoVO> getDuserInfo(@RequestParam("userId") Long userId) {
        DuserInfoVO duserInfo = duserService.getDuserInfo(userId);
        return success(duserInfo);
    }


}