package com.muzhi.mt.controller;

import com.muzhi.mt.service.MiandengService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author ZhangKan
 * @Data 15:03
 */

@Api(description = "通过免登码获取用户信息（牧之测试架构4）")
@RestController
@RequestMapping("/miandeng")
public class MiandengController {

    @Autowired
    private MiandengService miandengService;

    //获取钉钉中的access_token（牧之测试架构4）
    @ApiOperation(value = "获取钉钉中的access_token")
    @PostMapping("getuserinfo")
    public String getuserinfo(String code){

        String getuserinfo = miandengService.getuserinfo(code);
        return getuserinfo;
    }
}
