package com.playlet.web.controller.app;

import com.playlet.common.core.domain.Result;
import com.playlet.system.domain.PlayletPublicAccount;
import com.playlet.web.service.app.PlayletPublicAccountAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@Api(tags = "公众号*公众号接口")
@RestController
@RequestMapping(value = "/app/public")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PlayletPublicAccountAppController {

    private final PlayletPublicAccountAppService playletPublicAccountAppService;

    @ResponseBody
    @PostMapping("/getById")
    @ApiOperation(value = "通过id查询详情")
    public Result<PlayletPublicAccount> getById(@RequestParam(value = "id") Long id) {
        return Result.success(playletPublicAccountAppService.getById(id));
    }

}
