package com.tzld.piaoquan.api.controller; import com.tzld.piaoquan.api.model.vo.*; import com.tzld.piaoquan.api.mq.MessageCallbackProducer; import com.tzld.piaoquan.api.service.GhAccessTokenService; import com.tzld.piaoquan.api.service.ThirdPartyService; import com.tzld.piaoquan.growth.common.common.base.CommonResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @RequestMapping("/3rdParty") public class ThirdPartyController { @Autowired private GhAccessTokenService ghAccessTokenService; @Autowired private ThirdPartyService thirdPartyService; @Autowired private MessageCallbackProducer messageCallbackProducer; @PostMapping("/accessToken/get") public CommonResponse getAccessToken(@RequestBody AccessTokenParam param) { return ghAccessTokenService.getAccessToken(param); } @PostMapping("/pushMessage/get") public CommonResponse> getPushMessage(@RequestBody PushMessageParam param) { return thirdPartyService.getPushMessage(param); } @PostMapping("/pushMessage/callback") public CommonResponse pushMessageCallback(@RequestBody CallbackParam param) { return messageCallbackProducer.sendMessage(param); } @GetMapping("/report/uv") public CommonResponse> getReportUv(@RequestParam String date, @RequestParam String accessToken) { return thirdPartyService.getReportUv(date, accessToken); } }