package cn.iocoder.yudao.module.system.controller.app.carteen;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.system.controller.app.carteen.vo.CarteenRespVO;
import cn.iocoder.yudao.module.system.service.carteen.CarteenService;
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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

/**
 * @Author:qjq
 * @Date:2024/4/23 下午1:44
 */
@Tag(name = "门店")
@RestController
@RequestMapping("/t/carteen")
@Validated
public class AppCarteenController {
    @Resource
    private CarteenService carteenService;

    @GetMapping("/list")
    @Operation(summary = "门店列表")
    public CommonResult<List<CarteenRespVO>> listCarteen() {
        return success(BeanUtils.toBean(carteenService.getCarteenList(), CarteenRespVO.class));
    }
}
