package com.ycwl.basic.controller.mobile.manage;

import com.ycwl.basic.annotation.IgnoreToken;
import com.ycwl.basic.model.mobile.scenic.account.ScenicLoginReq;
import com.ycwl.basic.model.mobile.scenic.account.ScenicLoginRespVO;
import com.ycwl.basic.model.mobile.weChat.DTO.WeChatUserInfoDTO;
import com.ycwl.basic.model.pc.device.resp.DeviceRespVO;
import com.ycwl.basic.model.pc.scenic.resp.ScenicRespVO;
import com.ycwl.basic.service.mobile.AppScenicService;
import com.ycwl.basic.utils.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：longbinbin
 * @Date：2024/12/12 18:28
 */
@RestController
@RequestMapping("/api/mobile/scenicAccount/v1")
@Api(tags = "景区账号相关接口")
public class AppScenicAccountController {

    @Autowired
    private AppScenicService scenicService;

    @ApiOperation("登录")
    @PostMapping("/login")
    @IgnoreToken
    public ApiResponse<ScenicLoginRespVO> login(@RequestBody ScenicLoginReq scenicLoginReq) throws Exception {
        return scenicService.login(scenicLoginReq);
    }

    @GetMapping("/getScenic")
    public ApiResponse<ScenicRespVO> getMyScenic() {
        return scenicService.getMyScenic();
    }

    @GetMapping("/devices")
    public ApiResponse<List<DeviceRespVO>> getDeviceList() {
        return scenicService.getMyDevices();
    }
}
