package com.ruoyi.web.controller.portal;

import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@Anonymous
@RestController
@RequestMapping("/portal/about")
public class PortalAboutController extends BaseController {

    @GetMapping("/info")
    public AjaxResult getAboutInfo() {
        Map<String, Object> data = new HashMap<>();
        data.put("title", "可持续发展目标大数据国际研究中心");
        data.put("description", "致力于利用大数据技术推动全球可持续发展目标的实现");
        data.put("address", "北京市海淀区邓庄南路9号");
        data.put("email", "contact@example.com");
        return AjaxResult.success(data);
    }

    @GetMapping("/organization")
    public AjaxResult getOrganization() {
        Map<String, Object> org = new HashMap<>();
        org.put("council", "理事会");
        org.put("academicCommittee", "学术委员会");
        org.put("directorOffice", "主任办公室");
        org.put("departments", new String[]{"科研部", "技术部", "国际部", "综合部"});
        return AjaxResult.success(org);
    }

    @GetMapping("/history")
    public AjaxResult getHistory() {
        Map<String, Object> history = new HashMap<>();
        history.put("2020", "中心成立");
        history.put("2021", "平台建设");
        history.put("2022", "国际合作");
        history.put("2023", "成果突破");
        return AjaxResult.success(history);
    }
}
