3 changed files with 102 additions and 0 deletions
@ -0,0 +1,25 @@ |
|||||
|
package com.base.springcloud.controller; |
||||
|
|
||||
|
import com.base.springcloud.dto.NoticeReqDTO; |
||||
|
import com.base.springcloud.dto.NoticeRspDTO; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
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; |
||||
|
|
||||
|
@RestController |
||||
|
@Slf4j |
||||
|
@Api(tags = "通知接收接口") |
||||
|
@RequestMapping("/notice") |
||||
|
public class NoticeController { |
||||
|
|
||||
|
@ApiOperation(value = "支付通知", notes = "支付结果通知接口") |
||||
|
@PostMapping("/payNotice") |
||||
|
public NoticeRspDTO payNotice(@RequestBody NoticeReqDTO noticeReqDTO) { |
||||
|
|
||||
|
return new NoticeRspDTO(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
package com.base.springcloud.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
@Data |
||||
|
public class NoticeReqDTO { |
||||
|
|
||||
|
/** |
||||
|
* 微信支付证书文件 |
||||
|
*/ |
||||
|
private MultipartFile certFile; |
||||
|
|
||||
|
/** |
||||
|
* 公众号 |
||||
|
*/ |
||||
|
private String appId; |
||||
|
|
||||
|
/** |
||||
|
* 商户私钥 |
||||
|
*/ |
||||
|
private String apiKey; |
||||
|
|
||||
|
/** |
||||
|
* 证书序列号 |
||||
|
*/ |
||||
|
private String serialNo; |
||||
|
|
||||
|
/** |
||||
|
* 商户号 |
||||
|
*/ |
||||
|
private String mchId; |
||||
|
|
||||
|
/** |
||||
|
* 商户私钥 |
||||
|
*/ |
||||
|
private String mchPrivateKey; |
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
package com.base.springcloud.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.File; |
||||
|
|
||||
|
@Data |
||||
|
public class NoticeRspDTO { |
||||
|
|
||||
|
/** |
||||
|
* 微信支付证书文件 |
||||
|
*/ |
||||
|
private File certFile; |
||||
|
|
||||
|
/** |
||||
|
* 公众号 |
||||
|
*/ |
||||
|
private String appId; |
||||
|
|
||||
|
/** |
||||
|
* 商户私钥 |
||||
|
*/ |
||||
|
private String apiKey; |
||||
|
|
||||
|
/** |
||||
|
* 证书序列号 |
||||
|
*/ |
||||
|
private String serialNo; |
||||
|
|
||||
|
/** |
||||
|
* 商户号 |
||||
|
*/ |
||||
|
private String mchId; |
||||
|
|
||||
|
/** |
||||
|
* 商户私钥 |
||||
|
*/ |
||||
|
private String mchPrivateKey; |
||||
|
} |
||||
Loading…
Reference in new issue