package com.fs.qw.controller;

import com.fs.common.core.domain.R;
import com.fs.common.core.controller.BaseController;
import com.fs.common.core.domain.AjaxResult;
import com.fs.common.core.domain.model.LoginUser;
import com.fs.common.utils.ServletUtils;
import com.fs.qw.domain.QwExternalContactTransferCompanyAudit;
import com.fs.qw.param.QwFsUserParam;
import com.fs.qw.service.IQwExternalContactTransferCompanyAuditService;
import com.fs.qw.service.IQwUserService;
import com.fs.qw.vo.QwOptionsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 企微用户Controller
 *
 * @author fs
 * @date 2024-06-20
 */
@RestController
@RequestMapping("/qw/user")
public class QwUserController extends BaseController {
    @Autowired
    private IQwUserService qwUserService;
    @Autowired
    private IQwExternalContactTransferCompanyAuditService auditService;
    @GetMapping("/getQwUserAll")
    public AjaxResult getQwUserAll(){
        return AjaxResult.success(qwUserService.getQwUserAll());
    }

    /**
     * 获取企微信息
     * **/
    @GetMapping("/getQwUserInfo")
    public R getQwUserInfo(QwFsUserParam param){
        return R.ok().put("data",qwUserService.getQwUserInfo(param));
    }

   @GetMapping("/getMyQwCompanyList")
    public R getMyQwCompanyList()
    {
        List<QwOptionsVO> list = qwUserService.selectQwCompanyListOptionsVOBySys();
        return  R.ok().put("data",list);
    }
}
