package com.yida.data.system.controller;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.agent.EduAgentWxPublicReceiver;
import com.yida.data.system.service.EduAgentWxPublicReceiverService;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;

@Api(tags = "区域后台接收公众号（不鉴权）")
@RestController
@RequiredArgsConstructor
@RequestMapping("/in/agentReceiver")
public class InEduAgentWxPublicReceiverController {
    private final EduAgentWxPublicReceiverService eduAgentWxPublicReceiverService;


    @ApiOperation("根据学校查询接收人员")
    @GetMapping("/listReceiverBySchool")
    ResultBean<List<EduAgentWxPublicReceiver>> listReceiverBySchool(@RequestParam("schoolId") Long schoolId) {
        return ResultBean.buildSuccess(eduAgentWxPublicReceiverService.listReceiverBySchool(schoolId));
    }
}
