package com.yd.csf.api.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yd.common.result.Result;
import com.yd.csf.api.service.ApiCsfClientUserService;
import com.yd.csf.feign.client.csfclientuser.ApiCsfClientUserFeignClient;
import com.yd.csf.feign.request.csfclientuser.ApiCsfClientUserAddRequest;
import com.yd.csf.feign.request.csfclientuser.ApiCsfClientUserEditRequest;
import com.yd.csf.feign.request.csfclientuser.ApiCsfClientUserPageRequest;
import com.yd.csf.feign.request.csfclientuser.ApiCsfClientUserTreeListRequest;
import com.yd.csf.feign.response.csfclientuser.ApiCsfClientUserDetailResponse;
import com.yd.csf.feign.response.csfclientuser.ApiCsfClientUserPageResponse;
import com.yd.csf.feign.response.csfclientuser.ApiCsfClientUserTreeListResponse;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.constraints.NotBlank;

/**
 * CSF客户端用户信息接口
 *
 * @author zxm
 * @since 2026-06-11
 */
@RestController
@RequestMapping("/csfClientUser")
@Validated
public class ApiCsfClientUserController implements ApiCsfClientUserFeignClient {

    @Resource
    private ApiCsfClientUserService apiCsfClientUserService;

    /**
     * 查询-左边人员信息树列表（组织架构管理树形列表）
     * @param request
     * @return
     */
    @Override
    public Result<ApiCsfClientUserTreeListResponse> treeList(ApiCsfClientUserTreeListRequest request) {
        return apiCsfClientUserService.treeList(request);
    }

    /**
     * 分页查询-人员信息
     * @param request
     * @return
     */
    @Override
    public Result<IPage<ApiCsfClientUserPageResponse>> page(ApiCsfClientUserPageRequest request) {
        return apiCsfClientUserService.page(request);
    }

    /**
     * 详情-人员信息
     * @param csfClientUserBizId
     * @return
     */
    @Override
    public Result<ApiCsfClientUserDetailResponse> detail(String csfClientUserBizId) {
        return apiCsfClientUserService.detail(csfClientUserBizId);
    }

    /**
     * 新增-人员信息
     * @param request
     * @return
     */
    @Override
    public Result add(ApiCsfClientUserAddRequest request) {
        return apiCsfClientUserService.add(request);
    }

    /**
     * 编辑-人员信息
     * @param request
     * @return
     */
    @Override
    public Result edit(ApiCsfClientUserEditRequest request) {
        return apiCsfClientUserService.edit(request);
    }


}
