package com.diagbot.web;

import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.RespDTO;
import com.diagbot.dto.VersionWrapperDTO;
import com.diagbot.facade.VersionInfoFacade;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 版本信息 前端控制器
 * </p>
 *
 * @author dsYun
 * @since 2024-07-27
 */
@RestController
@RequestMapping("/sys/versionInfo")
@Api(value = "版本信息(关于)API[by:dsYun]", tags = { "版本信息(关于)API" })
@SuppressWarnings("unchecked")
public class VersionInfoController {

    @Autowired
    VersionInfoFacade versionInfoFacade;

    @ApiOperation(value = "获取版本信息[by:dsYun]", notes = "获取版本信息")
    @PostMapping("/getVersionInfoAlls")
    @SysLogger("getVersionInfoAlls")
    public RespDTO<VersionWrapperDTO> getVersionInfoAlls() {
        VersionWrapperDTO data = versionInfoFacade.getVersionInfoAll();
        return RespDTO.onSuc(data);
    }

}
