package com.yonge.cooleshow.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;

import com.yonge.cooleshow.biz.dal.support.PageUtil;
import com.yonge.cooleshow.common.controller.BaseController;
import com.yonge.cooleshow.common.entity.HttpResponseResult;
import com.yonge.toolset.mybatis.page.PageInfo;
import com.yonge.toolset.utils.string.StringUtil;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

import com.yonge.cooleshow.biz.dal.vo.UserAccountVo;
import com.yonge.cooleshow.biz.dal.dto.search.UserAccountSearch;
import com.yonge.cooleshow.biz.dal.entity.UserAccount;
import com.yonge.cooleshow.biz.dal.service.UserAccountService;

@RestController
@RequestMapping("/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));
	}
}