package com.yida.data.system.controller;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.system.EduApp;
import com.yida.data.system.service.EduAppService;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;

@Api(tags = "企业微信 应用管理(不鉴权)")
@RestController
@RequestMapping("/in/app")
@RequiredArgsConstructor
public class InEduAppController {
    private final EduAppService eduAppService;

    @GetMapping("/getAppBySchoolOrCorpIdAndCode")
    public ResultBean<EduApp> getAppBySchoolOrCorpIdAndCode(Long schoolId, String corpId, String code) {
        return ResultBean.buildSuccess(eduAppService.getAppBySchoolOrCorpIdAndCode(schoolId, corpId, code));
    }
}
