no message
This commit is contained in:
@ -72,6 +72,11 @@ public class ItemController {
|
||||
return itemService.createRentItem(request);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/rent/test/create")
|
||||
public OpenResponse<String> rentTestCreate(@RequestBody String request) {
|
||||
return itemService.createStringRentItem(request);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -29,7 +29,7 @@ public interface ItemService {
|
||||
* 创建租赁类(实物)商品
|
||||
*/
|
||||
OpenResponse<String> createRentItem(RentRuleItem param);
|
||||
|
||||
OpenResponse<String> createStringRentItem(String param);
|
||||
/**
|
||||
* 根据业务属性写死自提履约信息
|
||||
*/
|
||||
|
||||
@ -165,6 +165,38 @@ public class ItemServiceImpl implements ItemService {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public OpenResponse<String> createStringRentItem(String param) {
|
||||
return AlipayApiTemplate.execute(new AlipayApiCallback<String, AlipayOpenAppItemCreateResponse>() {
|
||||
|
||||
@Override
|
||||
public AlipayOpenAppItemCreateResponse process() throws AlipayApiException {
|
||||
|
||||
// 构造请求参数以调用接口
|
||||
AlipayOpenAppItemCreateRequest request = new AlipayOpenAppItemCreateRequest();
|
||||
AlipayOpenAppItemCreateModel model = JSON.parseObject(param, AlipayOpenAppItemCreateModel.class);
|
||||
|
||||
logger.info("属性列表:" + param);
|
||||
request.setBizModel(model);
|
||||
return alipaySdkUtil.execute(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getData(AlipayOpenAppItemCreateResponse response) {
|
||||
rentRuleItemMapper.updateItemIdByOutItemId(response.getOutItemId(), response.getItemId());
|
||||
return response.getItemId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getApiName() {
|
||||
return "alipay.open.app.item.create";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public OpenResponse<String> syncDeliveryInfo() {
|
||||
return AlipayApiTemplate.execute(new AlipayApiCallback<String, AlipayOpenAppDeliveryInfoSyncResponse>() {
|
||||
|
||||
Reference in New Issue
Block a user