package org.jeecg.modules.api.webapi;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Case;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.bean.CaseBean;
import org.jeecg.modules.api.service.WebApiService;
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;

@Api(tags="官网接口")
@RestController
@RequestMapping("/web")
@Slf4j
public class WebApiController {


    @Resource
    private WebApiService webApiService;


    //获取首页基础信息
    @ApiOperation(value="获取首页基础信息")
    @GetMapping(value = "/getIndexInfo")
    public Result<?> getIndexInfo(){
        return webApiService.getIndexInfo();
    }


    //获取首页服务类型
    @ApiOperation(value="获取首页服务类型")
    @GetMapping(value = "/getIndexMiddleInfo")
    public Result<?> getIndexMiddleInfo(){
        return webApiService.getIndexMiddleInfo();
    }


    //获取首页项目案例
    @ApiOperation(value="获取首页产品列表")
    @GetMapping(value = "/getIndexProjectInfo")
    public Result<?> getIndexProjectInfo(){
        return Result.OK(webApiService.getIndexProjectInfo());
    }


    //获取首页底部电话有限地址
    @ApiOperation(value="获取首页手机相关信息")
    @GetMapping(value = "/getIndexPhoneInfo")
    public Result<?> getIndexPhoneInfo(){
        return webApiService.getIndexPhoneInfo();
    }




    //关于我们
    @ApiOperation(value="关于我们")
    @GetMapping(value = "/getAboutUsInfo")
    public Result<?> getAboutUsInfo(){
        return webApiService.getAboutUsInfo();
    }


    //案例展示
    @ApiOperation(value="案例展示")
    @GetMapping(value = "/getCaseShowInfo")
    public Result<?> getCaseShowInfo(CaseBean caseBean){
        return webApiService.getCaseShowInfo(caseBean);
    }


    //我的团队
    @ApiOperation(value="我的团队")
    @GetMapping(value = "/getMyTeamInfo")
    public Result<?> getMyTeamInfo(){
        return webApiService.getMyTeamInfo();
    }


    //留下您的姓名电话
    @ApiOperation(value="留下您的姓名电话")
    @GetMapping(value = "/leaveYourNamePhone")
    public Result<?> leaveYourNamePhone(String name,String phone){
        return webApiService.leaveYourNamePhone(name,phone);
    }


}
