
package com.lideeyunji.module.api;

import com.lideeyunji.core.framework.service.IFormService;
import com.lideeyunji.core.framework.service.IReportService;
import com.lideeyunji.tool.framework.yunji.enums.AuthTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 低代码 API 接口
 */
@Service
public class LideeYunJiApiImpl implements LideeYunJiApi {

    @Autowired
    private IFormService formService;

    @Autowired
    private IReportService reportService;

    //获取表单设置的授权类型
    @Override
    public String getDbformAuthType(Long dbFormid) {
        AuthTypeEnum authType = formService.getAuthType(dbFormid);
        return authType.getType();

    }

    //获取表单设置的授权类型
    @Override
    public String getReportAuthType(String reportCode) {
        AuthTypeEnum authType = reportService.getAuthType(reportCode);
        return authType.getType();

    }

}
