package com.tzld.piaoquan.api.controller.wecom;

import com.tzld.piaoquan.api.model.param.WeComPushMessageParam;
import com.tzld.piaoquan.api.model.vo.WeComPushMessageVo;
import com.tzld.piaoquan.api.service.wecom.WeComService;
import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/wecom")
public class WeComController {


    @Autowired
    private WeComService weComService;


    @PostMapping("/pushMessage/get")
    public CommonResponse<List<WeComPushMessageVo>> getPushMessage(@RequestBody WeComPushMessageParam param) {
        log.info("param={}", param);
        return weComService.getPushMessage(param);
    }
}
