PayController.java
1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.infoloop.tianting.controller;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.infoloop.tianting.model.dto.MenuDbDTO;
import com.infoloop.tianting.model.dto.MenuDbDTO.BatchCreateMenuRefsResponseDto;
import com.infoloop.tianting.model.dto.PayDTO;
import com.infoloop.tianting.model.dto.PayDTO.PayResponseDto;
import com.infoloop.tianting.service.client.PayServiceClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javax.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "微信小程序发送付款通知接口")
@ApiSupport(order = 0)
@Slf4j
@Validated
@RestController
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PayController {
private final PayServiceClient payServiceClient;
@ApiOperation(value = "支付通知")
@PostMapping("/pay/inform")
@ResponseStatus(HttpStatus.OK)
public PayResponseDto batchCreateMenuRefsByCustomerId(
@Valid @RequestBody PayDTO.PayInformRequestDto payInformRequestDto
){
return payServiceClient.payInform(payInformRequestDto);
}
}