|
|
@ -1,35 +1,30 @@ |
|
|
|
package com.epmet.controller; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.annotation.LoginUser; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
|
import com.epmet.dto.form.ThirdPlatformEventFormDTO; |
|
|
|
import com.epmet.dto.form.WeChatPlatformAuthCodeFormDTO; |
|
|
|
import com.epmet.dto.result.ResultBean; |
|
|
|
import com.epmet.service.ComponentVerifyTicketService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Author zxc |
|
|
|
* @CreateTime 2020/7/6 9:07 |
|
|
|
*/ |
|
|
|
@Slf4j |
|
|
|
@RestController |
|
|
|
@RestController("third") |
|
|
|
public class ComponentVerifyTicketController { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ComponentVerifyTicketService componentVerifyTicketService; |
|
|
|
|
|
|
|
@PostMapping(value = "/event") |
|
|
|
public Result weChatPlatformEvent(@RequestBody ThirdPlatformEventFormDTO formDTO) { |
|
|
|
ValidatorUtils.validateEntity(formDTO, ThirdPlatformEventFormDTO.ThirdPlatForm.class); |
|
|
|
componentVerifyTicketService.parseRequest(formDTO); |
|
|
|
@PostMapping(value = "/ticket") |
|
|
|
public Result weChatPlatformEvent(@RequestParam("timestamp") String timestamp, |
|
|
|
@RequestParam("nonce") String nonce, |
|
|
|
@RequestParam("msg_signature") String msgSignature, |
|
|
|
@RequestBody String postData) { |
|
|
|
componentVerifyTicketService.parseRequest(timestamp,nonce,msgSignature,postData); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|