package com.muzhi.dingtalk.test.controller;

import com.muzhi.dingtalk.test.service.FangDeDingAccessTokenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.RestController;

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

@Api(description = "钉钉授权AccessToken")
@RestController
@RequestMapping("/dingservice")
public class FangDeAccessTokenController {

    @Autowired
    private FangDeDingAccessTokenService fangDeDingAccessTokenService;

    //获取定制服务access_token授权的方法（房德）
    @ApiOperation(value = "获取定制服务access_token授权的方法")
    @GetMapping("getFangDeAccessToken")
    public String getFangDeAccessToken(){

        String fangDeAccessToken = fangDeDingAccessTokenService.getFangDeAccessToken();
        return fangDeAccessToken;
    }
}
