package com.jeesharp.business.setting.controller;

import com.jeesharp.business.modules.setting.application.AboutUsApplicationService;
import com.jeesharp.business.modules.setting.vo.AboutUsInfoVO;
import com.jeesharp.framework.pojo.AjaxResult;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 移动端关于我们接口。
 */
@RestController
@RequestMapping("${jeesharp.web.mobilePath}/setting/aboutUs")
@Tag(name = "移动端-关于我们")
@AllArgsConstructor
public class AboutUsMobileController {

    private final AboutUsApplicationService aboutUsApplicationService;

    @Operation(summary = "获取关于我们")
    @GetMapping("/info")
    public AjaxResult<AboutUsInfoVO> info(
        @RequestParam(value = "app", defaultValue = "WECHAT_MINI") String app
    ) {
        return AjaxResult.okData(aboutUsApplicationService.getByApp(app));
    }
}
