package com.laoxie.auto.api.demo;

import com.zhuchi.zcii.framework.common.pojo.CommonResult;
import com.zhuchi.zcii.framework.common.util.object.BeanUtils;
import com.laoxie.auto.api.demo.dto.DemoRespDTO;
import com.laoxie.auto.dal.dataobject.demo.DemoDO;
import com.laoxie.auto.service.demo.DemoService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static com.zhuchi.zcii.framework.common.pojo.CommonResult.success;

/**
 * @description: TODO
 * @author: bony
 * @create: 2024/3/27 10:12
 * @Version 1.0
 **/
@RestController // 提供 RESTful API 接口，给 Feign 调用
@Validated
public class DemoApiImpl implements DemoApi{

    @Resource
    private DemoService demoService;

    @Override
    public CommonResult<DemoRespDTO> getDemo(String demo) {
        DemoDO demoDo=new DemoDO();
        return success(BeanUtils.toBean(demoDo,DemoRespDTO.class));
    }
}
