package com.gyee.frame.controller.gen;

import com.gyee.frame.common.base.BaseController;
import com.gyee.frame.common.dataSources.DataSource;
import com.gyee.frame.common.dataSources.DataSourceType;
import com.gyee.frame.common.domain.AjaxResult;
import com.gyee.frame.model.auto.GyeeBraceletuser;
import com.gyee.frame.service.GyeeBraceletuserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("gyeeBraceletuser")
@Api(value = "")

public class GyeeBraceletuserController extends BaseController {


    @Autowired
    private GyeeBraceletuserService gyeeBraceletuserService;


    @DataSource(value = DataSourceType.TICKET)
    @GetMapping("/getBraceletuser")
    @ResponseBody
    public AjaxResult getBraceletuser(String userid) {
        GyeeBraceletuser vo = gyeeBraceletuserService.queryBraceletuserByUserId(userid);
        if (null == vo) {
            return AjaxResult.error(500, "无法获取手环用户信息");

        } else {
            return AjaxResult.successData(200, vo);
        }
    }

}
