package com.yonge.cooleshow.admin.controller;

import com.yonge.cooleshow.biz.dal.service.UserAccountService;
import com.yonge.cooleshow.biz.dal.vo.UserAccountVo;
import com.yonge.cooleshow.common.controller.BaseController;
import com.yonge.cooleshow.common.entity.HttpResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("${app-config.url.admin:}/userAccount")
@Api(value = "用户账户表", tags = "用户账户表")
public class UserAccountController extends BaseController {

    @Autowired
    private UserAccountService userAccountService;

	/**
     * 查询单条
     */
    @GetMapping("/detail/{id}")
    @ApiOperation(value = "详情", notes = "传入id")
    @PreAuthorize("@pcs.hasPermissions('userAccount/detail')")
    public HttpResponseResult<UserAccountVo> detail(@PathVariable("id") Long id) {
    	return succeed(userAccountService.detail(id));
	}



}