package com.playlet.web.controller.app;


import com.playlet.common.core.domain.Result;
import com.playlet.system.domain.PlayletCustomerService;
import com.playlet.web.service.app.PlayletCustomerServiceAppService;
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.*;

import java.util.List;

@Slf4j
@Api(tags = "小程序*客服接口")
@RestController
@RequestMapping(value = "/app/customer")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PlayletCustomerServiceAppController {

    private final PlayletCustomerServiceAppService playletCustomerServiceAppService;

    /**
     * 查询客服基础列表
     */
    @ResponseBody
    @PostMapping("/getCustomerList")
    @ApiOperation(value = "查询客服列表")
    public Result<List<PlayletCustomerService>> getCustomerList(@RequestBody PlayletCustomerService customerService) {
        return Result.success(playletCustomerServiceAppService.getCustomerList(customerService));
    }


}
