package com.yc.ship.module.miniapplet.controller.app.brand;

import com.yc.ship.framework.common.pojo.CommonResult;
import com.yc.ship.framework.common.util.object.BeanUtils;
import com.yc.ship.module.miniapplet.controller.admin.brand.vo.AppletBrandRespVO;
import com.yc.ship.module.miniapplet.dal.dataobject.brand.AppletBrandDO;
import com.yc.ship.module.miniapplet.service.brand.AppletBrandService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import static com.yc.ship.framework.common.pojo.CommonResult.success;


@Tag(name = "用户 APP - 长江行品牌故事")
@RestController
@RequestMapping("/applet/brand")
@Validated
public class AppAppletBrandController {

    @Resource
    private AppletBrandService brandService;

    @GetMapping("/get")
    @Operation(summary = "获得小程序系统配置")
    public CommonResult<AppletBrandRespVO> getBrand() {
        AppletBrandDO brand = brandService.getBrand();
        return success(BeanUtils.toBean(brand, AppletBrandRespVO.class));
    }


}