no message
This commit is contained in:
11
pom.xml
11
pom.xml
@ -85,6 +85,11 @@
|
|||||||
<artifactId>spring-cloud-commons</artifactId>
|
<artifactId>spring-cloud-commons</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Lombok (Optional) -->
|
<!-- Lombok (Optional) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
@ -143,6 +148,12 @@
|
|||||||
<version>8.0.33</version>
|
<version>8.0.33</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-pool2</artifactId>
|
||||||
|
<version>2.9.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- swagger2 -->
|
<!-- swagger2 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
|
|||||||
@ -1,131 +1,131 @@
|
|||||||
package com.sczx.pay.alipay.controller;
|
//package com.sczx.pay.alipay.controller;
|
||||||
|
//
|
||||||
import com.alipay.api.domain.AppxCategoryVO;
|
//import com.alipay.api.domain.AppxCategoryVO;
|
||||||
import com.alipay.api.internal.util.StringUtils;
|
//import com.alipay.api.internal.util.StringUtils;
|
||||||
import com.alipay.api.response.AlipayOpenAppItemListQueryResponse;
|
//import com.alipay.api.response.AlipayOpenAppItemListQueryResponse;
|
||||||
import com.alipay.api.response.AlipayOpenAppItemQueryResponse;
|
//import com.alipay.api.response.AlipayOpenAppItemQueryResponse;
|
||||||
import com.alipay.api.response.AlipayOpenAppItemTemplateQueryResponse;
|
//import com.alipay.api.response.AlipayOpenAppItemTemplateQueryResponse;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
//import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
import com.sczx.pay.alipay.po.RentRuleItem;
|
//import com.sczx.pay.alipay.po.RentRuleItem;
|
||||||
import com.sczx.pay.alipay.service.ItemService;
|
//import com.sczx.pay.alipay.service.ItemService;
|
||||||
import com.sczx.pay.alipay.service.RentRuleItemService;
|
//import com.sczx.pay.alipay.service.RentRuleItemService;
|
||||||
import com.sczx.pay.alipay.vo.ItemCreateRequest;
|
//import com.sczx.pay.alipay.vo.ItemCreateRequest;
|
||||||
import com.sczx.pay.alipay.vo.OpenResponse;
|
//import com.sczx.pay.alipay.vo.OpenResponse;
|
||||||
import io.swagger.annotations.Api;
|
//import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
//import io.swagger.annotations.ApiParam;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
//import org.springframework.web.bind.annotation.*;
|
||||||
|
//
|
||||||
|
//
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
import java.util.Map;
|
//import java.util.Map;
|
||||||
|
//
|
||||||
|
//
|
||||||
@Api(tags = "普通商品模块")
|
//@Api(tags = "普通商品模块")
|
||||||
@RestController
|
//@RestController
|
||||||
@RequestMapping(value = "/item")
|
//@RequestMapping(value = "/item")
|
||||||
public class ItemController {
|
//public class ItemController {
|
||||||
|
//
|
||||||
@Autowired
|
// @Autowired
|
||||||
private ItemService itemService;
|
// private ItemService itemService;
|
||||||
|
//
|
||||||
@Autowired
|
// @Autowired
|
||||||
private RentRuleItemService rentRuleItemService;
|
// private RentRuleItemService rentRuleItemService;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 类目查询
|
// * 类目查询
|
||||||
* 获取叶子节点商品类目列表
|
// * 获取叶子节点商品类目列表
|
||||||
*/
|
// */
|
||||||
@ApiOperationSupport(order = 1)
|
// @ApiOperationSupport(order = 1)
|
||||||
@ApiOperation(value = "类目查询", notes = "获取叶子节点商品类目列表")
|
// @ApiOperation(value = "类目查询", notes = "获取叶子节点商品类目列表")
|
||||||
@GetMapping(value = "/category/list")
|
// @GetMapping(value = "/category/list")
|
||||||
public OpenResponse<List<AppxCategoryVO>> categoryList(
|
// public OpenResponse<List<AppxCategoryVO>> categoryList(
|
||||||
@ApiParam(value = "商品类型:1-售卖类(实物),2-租赁类(实物),3-付费充值/兑换类(虚拟)") @RequestParam String itemType,
|
// @ApiParam(value = "商品类型:1-售卖类(实物),2-租赁类(实物),3-付费充值/兑换类(虚拟)") @RequestParam String itemType,
|
||||||
@ApiParam(value = "类目状态,默认AUDIT_PASSED", example = "AUDIT_PASSED") @RequestParam(required = false) String catStatus) {
|
// @ApiParam(value = "类目状态,默认AUDIT_PASSED", example = "AUDIT_PASSED") @RequestParam(required = false) String catStatus) {
|
||||||
return itemService.getCategories(itemType, catStatus);
|
// return itemService.getCategories(itemType, catStatus);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 普通商品模板信息查询
|
// * 普通商品模板信息查询
|
||||||
*/
|
// */
|
||||||
@ApiOperationSupport(order = 2)
|
// @ApiOperationSupport(order = 2)
|
||||||
@ApiOperation(value = "普通商品模板信息查询")
|
// @ApiOperation(value = "普通商品模板信息查询")
|
||||||
@GetMapping(value = "/template/query")
|
// @GetMapping(value = "/template/query")
|
||||||
public OpenResponse<AlipayOpenAppItemTemplateQueryResponse> queryTemplate(
|
// public OpenResponse<AlipayOpenAppItemTemplateQueryResponse> queryTemplate(
|
||||||
@ApiParam(value = "类目ID", required = true) @RequestParam String categoryId,
|
// @ApiParam(value = "类目ID", required = true) @RequestParam String categoryId,
|
||||||
@ApiParam(value = "商品类型:1-售卖类(实物),2-租赁类(实物),3-付费充值/兑换类(虚拟)") @RequestParam(required = false) String itemType) {
|
// @ApiParam(value = "商品类型:1-售卖类(实物),2-租赁类(实物),3-付费充值/兑换类(虚拟)") @RequestParam(required = false) String itemType) {
|
||||||
return itemService.queryTemplate(categoryId, itemType);
|
// return itemService.queryTemplate(categoryId, itemType);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 租赁类(实物)商品创建
|
// * 租赁类(实物)商品创建
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "租赁类(实物)商品创建")
|
// @ApiOperation(value = "租赁类(实物)商品创建")
|
||||||
@ApiOperationSupport(order = 4)
|
// @ApiOperationSupport(order = 4)
|
||||||
@PostMapping(value = "/rent/create")
|
// @PostMapping(value = "/rent/create")
|
||||||
public OpenResponse<String> rentCreate(@RequestBody RentRuleItem request) {
|
// public OpenResponse<String> rentCreate(@RequestBody RentRuleItem request) {
|
||||||
return itemService.createRentItem(request);
|
// return itemService.createRentItem(request);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
@PostMapping(value = "/rent/modify")
|
// @PostMapping(value = "/rent/modify")
|
||||||
public OpenResponse<String> modifyCreate(@RequestBody RentRuleItem request) {
|
// public OpenResponse<String> modifyCreate(@RequestBody RentRuleItem request) {
|
||||||
return itemService.modifyItem(request);
|
// return itemService.modifyItem(request);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@ApiOperation(value = "商品详情查询")
|
// @ApiOperation(value = "商品详情查询")
|
||||||
@ApiOperationSupport(order = 7)
|
// @ApiOperationSupport(order = 7)
|
||||||
@GetMapping(value = "/query")
|
// @GetMapping(value = "/query")
|
||||||
public OpenResponse<AlipayOpenAppItemQueryResponse> query(@ApiParam(value = "支付平台侧商品ID") @RequestParam(required = false) String itemId,
|
// public OpenResponse<AlipayOpenAppItemQueryResponse> query(@ApiParam(value = "支付平台侧商品ID") @RequestParam(required = false) String itemId,
|
||||||
@ApiParam(value = "商家侧商品ID") @RequestParam(required = false) String outItemId,
|
// @ApiParam(value = "商家侧商品ID") @RequestParam(required = false) String outItemId,
|
||||||
@ApiParam(value = "是否查询编辑版本,默认为0", defaultValue = "0") @RequestParam(required = false) String needEditSpu) {
|
// @ApiParam(value = "是否查询编辑版本,默认为0", defaultValue = "0") @RequestParam(required = false) String needEditSpu) {
|
||||||
return itemService.queryItemDetail(itemId, outItemId,
|
// return itemService.queryItemDetail(itemId, outItemId,
|
||||||
StringUtils.isNumeric(needEditSpu) ? Long.parseLong(needEditSpu) : 0);
|
// StringUtils.isNumeric(needEditSpu) ? Long.parseLong(needEditSpu) : 0);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 租赁类(实物)履约模板创建
|
// * 租赁类(实物)履约模板创建
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "租赁类(实物)履约模板创建")
|
// @ApiOperation(value = "租赁类(实物)履约模板创建")
|
||||||
@ApiOperationSupport(order = 4)
|
// @ApiOperationSupport(order = 4)
|
||||||
@PostMapping(value = "/template/create")
|
// @PostMapping(value = "/template/create")
|
||||||
public OpenResponse<String> templateCreate() {
|
// public OpenResponse<String> templateCreate() {
|
||||||
return itemService.syncDeliveryInfo();
|
// return itemService.syncDeliveryInfo();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 租赁类(实物)履约模板创建
|
// * 租赁类(实物)履约模板创建
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "租赁类(实物)履约模板创建")
|
// @ApiOperation(value = "租赁类(实物)履约模板创建")
|
||||||
@ApiOperationSupport(order = 4)
|
// @ApiOperationSupport(order = 4)
|
||||||
@PostMapping(value = "/delivery/query")
|
// @PostMapping(value = "/delivery/query")
|
||||||
public OpenResponse<String> deliveryQuery() {
|
// public OpenResponse<String> deliveryQuery() {
|
||||||
return itemService.deliveryInfoQuery();
|
// return itemService.deliveryInfoQuery();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@ApiOperation(value = "租赁类(实物)履约模板创建")
|
// @ApiOperation(value = "租赁类(实物)履约模板创建")
|
||||||
@ApiOperationSupport(order = 4)
|
// @ApiOperationSupport(order = 4)
|
||||||
@PostMapping(value = "/deliverytemplate/query")
|
// @PostMapping(value = "/deliverytemplate/query")
|
||||||
public OpenResponse<String> deliveryTemplateQuery() {
|
// public OpenResponse<String> deliveryTemplateQuery() {
|
||||||
return itemService.deliveryTemplateQuery();
|
// return itemService.deliveryTemplateQuery();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@ApiOperation(value = "租赁类(实物)履约模板创建")
|
// @ApiOperation(value = "租赁类(实物)履约模板创建")
|
||||||
@ApiOperationSupport(order = 4)
|
// @ApiOperationSupport(order = 4)
|
||||||
@PostMapping(value = "/shop/query")
|
// @PostMapping(value = "/shop/query")
|
||||||
public OpenResponse<String> shopQuery() {
|
// public OpenResponse<String> shopQuery() {
|
||||||
return itemService.shopQuery();
|
// return itemService.shopQuery();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
@ApiOperation(value = "接收套餐数据并记录商品")
|
// @ApiOperation(value = "接收套餐数据并记录商品")
|
||||||
@GetMapping(value = "/sync/item")
|
// @GetMapping(value = "/sync/item")
|
||||||
public Map<String,String> syncItem(@RequestParam(required = false) String brandId,@RequestParam(required = false) String carModelId,
|
// public Map<String,String> syncItem(@RequestParam(required = false) String brandId,@RequestParam(required = false) String carModelId,
|
||||||
@RequestParam(required = false) String carRuleId,@RequestParam(required = false) String batteryRuleId) {
|
// @RequestParam(required = false) String carRuleId,@RequestParam(required = false) String batteryRuleId) {
|
||||||
return rentRuleItemService.syncItem(brandId, carModelId,carRuleId,batteryRuleId);
|
// return rentRuleItemService.syncItem(brandId, carModelId,carRuleId,batteryRuleId);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
@ -1,32 +1,32 @@
|
|||||||
package com.sczx.pay.alipay.controller;
|
//package com.sczx.pay.alipay.controller;
|
||||||
|
//
|
||||||
|
//
|
||||||
import com.alipay.api.AlipayApiException;
|
//import com.alipay.api.AlipayApiException;
|
||||||
import com.sczx.pay.alipay.service.RentOrderService;
|
//import com.sczx.pay.alipay.service.RentOrderService;
|
||||||
import com.sczx.pay.alipay.vo.RentOrderCreateRequest;
|
//import com.sczx.pay.alipay.vo.RentOrderCreateRequest;
|
||||||
import io.swagger.annotations.Api;
|
//import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
//import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
//import org.springframework.web.bind.annotation.RestController;
|
||||||
|
//
|
||||||
import javax.servlet.http.HttpServletRequest;
|
//import javax.servlet.http.HttpServletRequest;
|
||||||
|
//
|
||||||
@Api(value = "租赁订单接口", tags = "租赁订单接口")
|
//@Api(value = "租赁订单接口", tags = "租赁订单接口")
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
@RestController
|
//@RestController
|
||||||
@RequestMapping("/rentorder")
|
//@RequestMapping("/rentorder")
|
||||||
public class ItemOrderController {
|
//public class ItemOrderController {
|
||||||
|
//
|
||||||
@Autowired
|
// @Autowired
|
||||||
private RentOrderService rentOrderService;
|
// private RentOrderService rentOrderService;
|
||||||
|
//
|
||||||
@ApiOperation(value = "创建租赁订单")
|
// @ApiOperation(value = "创建租赁订单")
|
||||||
@PostMapping("/create")
|
// @PostMapping("/create")
|
||||||
public String rentOrderCreate(RentOrderCreateRequest request) throws AlipayApiException {
|
// public String rentOrderCreate(RentOrderCreateRequest request) throws AlipayApiException {
|
||||||
return rentOrderService.rentOrderCreate(request).getBody();
|
// return rentOrderService.rentOrderCreate(request).getBody();
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@ -1,38 +1,38 @@
|
|||||||
package com.sczx.pay.controller;
|
//package com.sczx.pay.controller;
|
||||||
|
//
|
||||||
import com.alipay.api.domain.AlipayCommerceRentOrderCloseModel;
|
//import com.alipay.api.domain.AlipayCommerceRentOrderCloseModel;
|
||||||
import com.alipay.api.response.AlipayCommerceRentOrderCloseResponse;
|
//import com.alipay.api.response.AlipayCommerceRentOrderCloseResponse;
|
||||||
import com.sczx.pay.service.AliPayOrderCloseService;
|
//import com.sczx.pay.service.AliPayOrderCloseService;
|
||||||
import io.swagger.annotations.Api;
|
//import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
//import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
//import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
//import org.springframework.web.bind.annotation.RestController;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
@Api(value = "支付宝租赁订单关闭接口", tags = "支付宝租赁订单关闭接口")
|
//@Api(value = "支付宝租赁订单关闭接口", tags = "支付宝租赁订单关闭接口")
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
@RestController
|
//@RestController
|
||||||
@RequestMapping("/alipay/orderClose")
|
//@RequestMapping("/alipay/orderClose")
|
||||||
public class AliPayOrderCloseController {
|
//public class AliPayOrderCloseController {
|
||||||
|
//
|
||||||
@Autowired
|
// @Autowired
|
||||||
private AliPayOrderCloseService aliPayOrderCloseService;
|
// private AliPayOrderCloseService aliPayOrderCloseService;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 支付宝订单关闭接口
|
// * 支付宝订单关闭接口
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "支付宝订单关闭接口")
|
// @ApiOperation(value = "支付宝订单关闭接口")
|
||||||
@PostMapping("/orderClose")
|
// @PostMapping("/orderClose")
|
||||||
public AlipayCommerceRentOrderCloseResponse aliPayOrderClose(@RequestBody AlipayCommerceRentOrderCloseModel model) {
|
// public AlipayCommerceRentOrderCloseResponse aliPayOrderClose(@RequestBody AlipayCommerceRentOrderCloseModel model) {
|
||||||
log.info("支付宝订单关闭接口请求: {}", model);
|
// log.info("支付宝订单关闭接口请求: {}", model);
|
||||||
return aliPayOrderCloseService.aliPayOrderClose(model);
|
// return aliPayOrderCloseService.aliPayOrderClose(model);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
@ -1,49 +1,49 @@
|
|||||||
package com.sczx.pay.controller;
|
//package com.sczx.pay.controller;
|
||||||
|
//
|
||||||
|
//
|
||||||
import com.alipay.api.domain.AlipayCommerceRentOrderFulfillmentFinishModel;
|
//import com.alipay.api.domain.AlipayCommerceRentOrderFulfillmentFinishModel;
|
||||||
import com.alipay.api.response.AlipayCommerceRentOrderFulfillmentApproveResponse;
|
//import com.alipay.api.response.AlipayCommerceRentOrderFulfillmentApproveResponse;
|
||||||
import com.alipay.api.domain.AlipayCommerceRentOrderFulfillmentApproveModel;
|
//import com.alipay.api.domain.AlipayCommerceRentOrderFulfillmentApproveModel;
|
||||||
import com.alipay.api.response.AlipayCommerceRentOrderFulfillmentFinishResponse;
|
//import com.alipay.api.response.AlipayCommerceRentOrderFulfillmentFinishResponse;
|
||||||
import com.sczx.pay.service.AliPayOrderFulfillmentService;
|
//import com.sczx.pay.service.AliPayOrderFulfillmentService;
|
||||||
import io.swagger.annotations.Api;
|
//import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
//import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
//import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
//import org.springframework.web.bind.annotation.RestController;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
@Api(value = "支付宝订单履约接口", tags = "支付宝租赁履约接口")
|
//@Api(value = "支付宝订单履约接口", tags = "支付宝租赁履约接口")
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
@RestController
|
//@RestController
|
||||||
@RequestMapping("/alipay/orderFulfillment")
|
//@RequestMapping("/alipay/orderFulfillment")
|
||||||
public class AliPayOrderFulfillmentController {
|
//public class AliPayOrderFulfillmentController {
|
||||||
|
//
|
||||||
@Autowired
|
// @Autowired
|
||||||
private AliPayOrderFulfillmentService aliPayOrderFulfillmentService;
|
// private AliPayOrderFulfillmentService aliPayOrderFulfillmentService;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 支付宝订单履约审核接口
|
// * 支付宝订单履约审核接口
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "支付宝订单履约审核接口")
|
// @ApiOperation(value = "支付宝订单履约审核接口")
|
||||||
@PostMapping("/approve")
|
// @PostMapping("/approve")
|
||||||
public AlipayCommerceRentOrderFulfillmentApproveResponse aliPayOrderFulfillmentApprove(@RequestBody AlipayCommerceRentOrderFulfillmentApproveModel model) {
|
// public AlipayCommerceRentOrderFulfillmentApproveResponse aliPayOrderFulfillmentApprove(@RequestBody AlipayCommerceRentOrderFulfillmentApproveModel model) {
|
||||||
log.info("支付宝订单履约审核接口请求: {}", model);
|
// log.info("支付宝订单履约审核接口请求: {}", model);
|
||||||
return aliPayOrderFulfillmentService.aliPayOrderFulfillmentApprove(model);
|
// return aliPayOrderFulfillmentService.aliPayOrderFulfillmentApprove(model);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 支付宝订单履约完成接口
|
// * 支付宝订单履约完成接口
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "支付宝订单履约完成接口")
|
// @ApiOperation(value = "支付宝订单履约完成接口")
|
||||||
@PostMapping("/finish")
|
// @PostMapping("/finish")
|
||||||
public AlipayCommerceRentOrderFulfillmentFinishResponse aliPayOrderFulfillmentFinish(@RequestBody AlipayCommerceRentOrderFulfillmentFinishModel model) {
|
// public AlipayCommerceRentOrderFulfillmentFinishResponse aliPayOrderFulfillmentFinish(@RequestBody AlipayCommerceRentOrderFulfillmentFinishModel model) {
|
||||||
log.info("支付宝订单履约审核接口请求: {}", model);
|
// log.info("支付宝订单履约审核接口请求: {}", model);
|
||||||
return aliPayOrderFulfillmentService.aliPayOrderFulfillmentFinish(model);
|
// return aliPayOrderFulfillmentService.aliPayOrderFulfillmentFinish(model);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@ -1,70 +1,70 @@
|
|||||||
package com.sczx.pay.controller;
|
//package com.sczx.pay.controller;
|
||||||
|
//
|
||||||
import com.sczx.pay.dto.*;
|
//import com.sczx.pay.dto.*;
|
||||||
import com.sczx.pay.service.AlipayService;
|
//import com.sczx.pay.service.AlipayService;
|
||||||
import io.swagger.annotations.Api;
|
//import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
//import org.springframework.web.bind.annotation.*;
|
||||||
|
//
|
||||||
@Api(value = "支付宝支付接口", tags = "支付宝支付接口")
|
//@Api(value = "支付宝支付接口", tags = "支付宝支付接口")
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
@RestController
|
//@RestController
|
||||||
@RequestMapping("/api/alipay")
|
//@RequestMapping("/api/alipay")
|
||||||
public class AliPaymentController {
|
//public class AliPaymentController {
|
||||||
|
//
|
||||||
@Autowired
|
// @Autowired
|
||||||
private AlipayService alipayService;
|
// private AlipayService alipayService;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 支付宝统一下单接口
|
// * 支付宝统一下单接口
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "支付宝统一下单接口")
|
// @ApiOperation(value = "支付宝统一下单接口")
|
||||||
@PostMapping("/unifiedOrder")
|
// @PostMapping("/unifiedOrder")
|
||||||
public AlipayCreateResponse aliPayUnifiedOrder(@RequestBody AlipayCreateRequest request) {
|
// public AlipayCreateResponse aliPayUnifiedOrder(@RequestBody AlipayCreateRequest request) {
|
||||||
log.info("收到支付宝支付请求: {}", request);
|
// log.info("收到支付宝支付请求: {}", request);
|
||||||
return alipayService.unifiedOrder(request);
|
// return alipayService.unifiedOrder(request);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询订单接口
|
// * 查询订单接口
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "查询订单接口")
|
// @ApiOperation(value = "查询订单接口")
|
||||||
@GetMapping("/query/{outTradeNo}")
|
// @GetMapping("/query/{outTradeNo}")
|
||||||
public AlipayQueryResponse alipayOrderQuery(@PathVariable String outTradeNo) {
|
// public AlipayQueryResponse alipayOrderQuery(@PathVariable String outTradeNo) {
|
||||||
log.info("收到支付宝订单查询请求, 订单号: {}", outTradeNo);
|
// log.info("收到支付宝订单查询请求, 订单号: {}", outTradeNo);
|
||||||
return alipayService.orderQuery(outTradeNo);
|
// return alipayService.orderQuery(outTradeNo);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 关闭订单接口
|
// * 关闭订单接口
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "关闭订单接口")
|
// @ApiOperation(value = "关闭订单接口")
|
||||||
@PostMapping("/close")
|
// @PostMapping("/close")
|
||||||
public AlipayResponse alipayCloseOrder(@RequestBody AlipayCloseRequest request) {
|
// public AlipayResponse alipayCloseOrder(@RequestBody AlipayCloseRequest request) {
|
||||||
log.info("收到支付宝关闭订单请求: {}", request);
|
// log.info("收到支付宝关闭订单请求: {}", request);
|
||||||
return alipayService.closeOrder(request);
|
// return alipayService.closeOrder(request);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 申请退款接口
|
// * 申请退款接口
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "申请退款接口")
|
// @ApiOperation(value = "申请退款接口")
|
||||||
@PostMapping("/refund")
|
// @PostMapping("/refund")
|
||||||
public AlipayResponse alipayRefund(@RequestBody AlipayRefundRequest request) {
|
// public AlipayResponse alipayRefund(@RequestBody AlipayRefundRequest request) {
|
||||||
log.info("收到支付宝退款请求: {}", request);
|
// log.info("收到支付宝退款请求: {}", request);
|
||||||
return alipayService.refund(request);
|
// return alipayService.refund(request);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询退款接口
|
// * 查询退款接口
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "查询退款接口")
|
// @ApiOperation(value = "查询退款接口")
|
||||||
@PostMapping("/refundQuery")
|
// @PostMapping("/refundQuery")
|
||||||
public AlipayResponse alipayRefundQuery(@RequestBody AlipayRefundRequest request) {
|
// public AlipayResponse alipayRefundQuery(@RequestBody AlipayRefundRequest request) {
|
||||||
log.info("收到支付宝退款查询请求: {}", request);
|
// log.info("收到支付宝退款查询请求: {}", request);
|
||||||
return alipayService.refundQuery(request);
|
// return alipayService.refundQuery(request);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
@ -1,29 +1,29 @@
|
|||||||
package com.sczx.pay.controller;
|
//package com.sczx.pay.controller;
|
||||||
|
//
|
||||||
import com.sczx.pay.dto.ali.rent.AlipayRentPayReq;
|
//import com.sczx.pay.dto.ali.rent.AlipayRentPayReq;
|
||||||
import com.sczx.pay.dto.ali.rent.AlipayRentPayResponse;
|
//import com.sczx.pay.dto.ali.rent.AlipayRentPayResponse;
|
||||||
import com.sczx.pay.service.AlipayRentService;
|
//import com.sczx.pay.service.AlipayRentService;
|
||||||
import io.swagger.annotations.Api;
|
//import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
//import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
//import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
//import org.springframework.web.bind.annotation.RestController;
|
||||||
|
//
|
||||||
@Api(value = "支付宝租赁订单支付接口", tags = "支付宝租赁订单支付接口")
|
//@Api(value = "支付宝租赁订单支付接口", tags = "支付宝租赁订单支付接口")
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
@RestController
|
//@RestController
|
||||||
@RequestMapping("/alipay/rent")
|
//@RequestMapping("/alipay/rent")
|
||||||
public class AlipayRentController {
|
//public class AlipayRentController {
|
||||||
|
//
|
||||||
@Autowired
|
// @Autowired
|
||||||
private AlipayRentService alipayRentService;
|
// private AlipayRentService alipayRentService;
|
||||||
|
//
|
||||||
@ApiOperation(value = "创建支付单")
|
// @ApiOperation(value = "创建支付单")
|
||||||
@PostMapping("/pay")
|
// @PostMapping("/pay")
|
||||||
public AlipayRentPayResponse pay(@RequestBody AlipayRentPayReq request) {
|
// public AlipayRentPayResponse pay(@RequestBody AlipayRentPayReq request) {
|
||||||
return alipayRentService.rentPay(request);
|
// return alipayRentService.rentPay(request);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@ -31,83 +31,83 @@ public class PaymentController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CompanyWechatConfigMapper companyWechatConfigMapper;
|
private CompanyWechatConfigMapper companyWechatConfigMapper;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 小程序统一下单接口
|
// * 小程序统一下单接口
|
||||||
*/
|
// */
|
||||||
@PostMapping("/unifiedOrder")
|
// @PostMapping("/unifiedOrder")
|
||||||
public PaymentResponse unifiedOrder(@RequestBody PaymentRequest request) {
|
// public PaymentResponse unifiedOrder(@RequestBody PaymentRequest request) {
|
||||||
logger.info("收到支付请求: {}", request);
|
// logger.info("收到支付请求: {}", request);
|
||||||
return wechatPayService.unifiedOrder(request);
|
// return wechatPayService.unifiedOrder(request);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询订单接口
|
// * 查询订单接口
|
||||||
*/
|
// */
|
||||||
@GetMapping("/query/{companyId}/{outTradeNo}")
|
// @GetMapping("/query/{companyId}/{outTradeNo}")
|
||||||
public Map<String, String> orderQuery(@PathVariable Long companyId, @PathVariable String outTradeNo) {
|
// public Map<String, String> orderQuery(@PathVariable Long companyId, @PathVariable String outTradeNo) {
|
||||||
logger.info("收到订单查询请求,公司ID: {}, 订单号: {}", companyId, outTradeNo);
|
// logger.info("收到订单查询请求,公司ID: {}, 订单号: {}", companyId, outTradeNo);
|
||||||
try {
|
// try {
|
||||||
return wechatPayService.orderQuery(companyId, outTradeNo);
|
// return wechatPayService.orderQuery(companyId, outTradeNo);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
logger.error("订单查询异常,公司ID: {}, 订单号: {}", companyId, outTradeNo, e);
|
// logger.error("订单查询异常,公司ID: {}, 订单号: {}", companyId, outTradeNo, e);
|
||||||
Map<String, String> errorResult = new HashMap<>();
|
// Map<String, String> errorResult = new HashMap<>();
|
||||||
errorResult.put("return_code", "FAIL");
|
// errorResult.put("return_code", "FAIL");
|
||||||
errorResult.put("return_msg", "查询异常: " + e.getMessage());
|
// errorResult.put("return_msg", "查询异常: " + e.getMessage());
|
||||||
return errorResult;
|
// return errorResult;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 关闭订单接口
|
// * 关闭订单接口
|
||||||
*/
|
// */
|
||||||
@PostMapping("/close/{companyId}/{outTradeNo}")
|
// @PostMapping("/close/{companyId}/{outTradeNo}")
|
||||||
public Map<String, String> closeOrder(@PathVariable Long companyId, @PathVariable String outTradeNo) {
|
// public Map<String, String> closeOrder(@PathVariable Long companyId, @PathVariable String outTradeNo) {
|
||||||
logger.info("收到关闭订单请求,公司ID: {}, 订单号: {}", companyId, outTradeNo);
|
// logger.info("收到关闭订单请求,公司ID: {}, 订单号: {}", companyId, outTradeNo);
|
||||||
try {
|
// try {
|
||||||
return wechatPayService.closeOrder(companyId, outTradeNo);
|
// return wechatPayService.closeOrder(companyId, outTradeNo);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
logger.error("关闭订单异常,公司ID: {}, 订单号: {}", companyId, outTradeNo, e);
|
// logger.error("关闭订单异常,公司ID: {}, 订单号: {}", companyId, outTradeNo, e);
|
||||||
Map<String, String> errorResult = new HashMap<>();
|
// Map<String, String> errorResult = new HashMap<>();
|
||||||
errorResult.put("return_code", "FAIL");
|
// errorResult.put("return_code", "FAIL");
|
||||||
errorResult.put("return_msg", "关闭异常: " + e.getMessage());
|
// errorResult.put("return_msg", "关闭异常: " + e.getMessage());
|
||||||
return errorResult;
|
// return errorResult;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 申请退款接口
|
// * 申请退款接口
|
||||||
*/
|
// */
|
||||||
@PostMapping("/refund")
|
// @PostMapping("/refund")
|
||||||
public Map<String, String> refund(@RequestBody RefundRequest request) {
|
// public Map<String, String> refund(@RequestBody RefundRequest request) {
|
||||||
logger.info("收到退款请求: {}", request);
|
// logger.info("收到退款请求: {}", request);
|
||||||
try {
|
// try {
|
||||||
return wechatPayService.refund(request);
|
// return wechatPayService.refund(request);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
logger.error("退款异常,公司ID: {}, 订单号: {}", request.getCompanyId(), request.getOutTradeNo(), e);
|
// logger.error("退款异常,公司ID: {}, 订单号: {}", request.getCompanyId(), request.getOutTradeNo(), e);
|
||||||
Map<String, String> errorResult = new HashMap<>();
|
// Map<String, String> errorResult = new HashMap<>();
|
||||||
errorResult.put("return_code", "FAIL");
|
// errorResult.put("return_code", "FAIL");
|
||||||
errorResult.put("return_msg", "退款异常: " + e.getMessage());
|
// errorResult.put("return_msg", "退款异常: " + e.getMessage());
|
||||||
return errorResult;
|
// return errorResult;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询退款接口
|
// * 查询退款接口
|
||||||
*/
|
// */
|
||||||
@GetMapping("/refundQuery/{companyId}")
|
// @GetMapping("/refundQuery/{companyId}")
|
||||||
public Map<String, String> refundQuery(@PathVariable Long companyId, @RequestParam String outTradeNo) {
|
// public Map<String, String> refundQuery(@PathVariable Long companyId, @RequestParam String outTradeNo) {
|
||||||
logger.info("收到退款查询请求,公司ID: {}, 订单号: {}", companyId, outTradeNo);
|
// logger.info("收到退款查询请求,公司ID: {}, 订单号: {}", companyId, outTradeNo);
|
||||||
try {
|
// try {
|
||||||
return wechatPayService.refundQuery(companyId, outTradeNo);
|
// return wechatPayService.refundQuery(companyId, outTradeNo);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
logger.error("退款查询异常,公司ID: {}, 订单号: {}", companyId, outTradeNo, e);
|
// logger.error("退款查询异常,公司ID: {}, 订单号: {}", companyId, outTradeNo, e);
|
||||||
Map<String, String> errorResult = new HashMap<>();
|
// Map<String, String> errorResult = new HashMap<>();
|
||||||
errorResult.put("return_code", "FAIL");
|
// errorResult.put("return_code", "FAIL");
|
||||||
errorResult.put("return_msg", "退款查询异常: " + e.getMessage());
|
// errorResult.put("return_msg", "退款查询异常: " + e.getMessage());
|
||||||
return errorResult;
|
// return errorResult;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信支付结果通知
|
* 微信支付结果通知
|
||||||
|
|||||||
15
src/main/resources/bootstrap.yml
Normal file
15
src/main/resources/bootstrap.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: sczx-order # 应用名称,对应 Nacos 配置的 dataId
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
server-addr: 115.190.8.52:8848 # Nacos 服务器地址
|
||||||
|
config:
|
||||||
|
group: DEFAULT_GROUP # 配置分组
|
||||||
|
file-extension: yaml # 配置文件格式
|
||||||
|
timeout: 5000 # 配置读取超时时间
|
||||||
|
# 添加共享配置
|
||||||
|
shared-configs:
|
||||||
|
- data-id: shared-config.yaml
|
||||||
|
group: DEFAULT_GROUP
|
||||||
|
refresh: true # 是否支持动态刷新
|
||||||
Reference in New Issue
Block a user