
package com.lideeyunji.module.biz.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.lideeyunji.module.biz.service.IDemoService;
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
import com.lideeyunji.tool.framework.yunji.model.global.BaseWebResult;
import com.lideeyunji.tool.framework.tenant.core.aop.TenantIgnore;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author JX
 * @create 2024-02-26 14:59
 * @dedescription:
 */
@TenantIgnore
@Tag(name = "低代码框架 - demo接口")
@RestController
@AllArgsConstructor
@RequestMapping(lideeYunJiBaseConstant.REQUEST_URL_START +"/demo")
public class DemoController {

    private final IDemoService demoService;



    @GetMapping({"/getData"})
    @ApiOperationSupport(order = 2)
    @Operation(summary = "获取demo数据")
    public BaseWebResult getData() {
        List<Map<String, Object>> dataMapList = demoService.getDemoData();
        return BaseWebResult.success(dataMapList);
    }

}
