29 Star 92 Fork 31

winfed / smart-alipay

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
AlipayDataDataserviceBillDownloadurlQueryController.java 2.96 KB
一键复制 编辑 原始数据 按行查看 历史
liangyuhong 提交于 2018-11-11 01:05 . 查询对账单下载地址
package com.cppba.alipay.controller;
import com.cppba.alipay.base.bizcontent.AlipayBizContent;
import com.cppba.alipay.base.exception.AlipayException;
import com.cppba.alipay.bizcontent.AlipayDataDataserviceBillDownloadurlQueryBizContent;
import com.cppba.alipay.properties.AlipayProperties;
import com.cppba.alipay.request.AlipayDataDataserviceBillDownloadurlQueryRequest;
import com.cppba.alipay.response.AlipayDataDataserviceBillDownloadurlQueryResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* 查询对账单下载地址
*
* @author winfed
* @create 2018-11-10 16:57
*/
@Slf4j
@Controller
@RequestMapping("/alipay")
public class AlipayDataDataserviceBillDownloadurlQueryController extends AlipayBizContent {
private final AlipayProperties alipayProperties;
@Autowired
public AlipayDataDataserviceBillDownloadurlQueryController(AlipayProperties alipayProperties) {
this.alipayProperties = alipayProperties;
}
/**
* 拼接app支付需要参数
*
* @return app支付参数
*/
@RequestMapping(value = "/data/dataservice/bill/downloadurl/query", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
public AlipayDataDataserviceBillDownloadurlQueryResponse alipayFundTransToaccountTransferController() {
try {
// http://127.0.0.1:8080/alipay/data/dataservice/bill/downloadurl/query
// 模拟数据
// signcustomer,trade
String billType = "signcustomer";
String billDate = "2018-11-09";
// 业务参数
AlipayDataDataserviceBillDownloadurlQueryBizContent alipayDataDataserviceBillDownloadurlQueryBizContent = new AlipayDataDataserviceBillDownloadurlQueryBizContent();
alipayDataDataserviceBillDownloadurlQueryBizContent.setBillType(billType);
alipayDataDataserviceBillDownloadurlQueryBizContent.setBillDate(billDate);
// 请求构建对象
AlipayDataDataserviceBillDownloadurlQueryRequest alipayDataDataserviceBillDownloadurlQueryRequest = new AlipayDataDataserviceBillDownloadurlQueryRequest(alipayProperties.getIsTest(), alipayProperties.getAppId(), alipayProperties.getPrivateKey(), alipayProperties.getAlipayPublicKey(),
alipayProperties.getSignType(), alipayDataDataserviceBillDownloadurlQueryBizContent);
// 发送请求,获取调用结果
AlipayDataDataserviceBillDownloadurlQueryResponse response = alipayDataDataserviceBillDownloadurlQueryRequest.createResponse();
// 打印返回结果
log.info(response.toString());
return response;
} catch (AlipayException e) {
log.error("", e);
}
return null;
}
}
Java
1
https://gitee.com/winfed/smart-alipay.git
git@gitee.com:winfed/smart-alipay.git
winfed
smart-alipay
smart-alipay
master

搜索帮助