The callback in the link "https://***.com/callback" is used for callback after the on-chain data is updated, and the configured url is as shown in this link. If your APP has its own service and needs to update the status change of the on-chain data within the service, you can configure the callback. The supported callback methods are as follows, and please refer to the code for parameters.
callback
@RequestMapping(value = "/nft/transfer", method = RequestMethod.POST, consumes = {"application/json"})
@ResponseBody
public JsonResult transfer(@RequestBody TransferRequest transferRequest, HttpServletRequest request) {
return JsonResult.success();
}
@RequestMapping(value = "/order/info", method = RequestMethod.POST, consumes = {"application/json"})
@ResponseBody
public JsonResult orderInfo(@RequestBody OrderInfo orderRequest, HttpServletRequest request) {
return JsonResult.success();
}
@RequestMapping(value = "/market/listed", method = RequestMethod.POST, consumes = {"application/json"})
@ResponseBody
public JsonResult marketListed(@RequestBody AssetRequest assetRequest, HttpServletRequest request) {
return JsonResult.success();
}
@RequestMapping(value = "/market/deListed", method = RequestMethod.POST, consumes = {"application/json"})
@ResponseBody
public JsonResult marketDeListed(@RequestBody AssetRequest assetRequest, HttpServletRequest request) {
return JsonResult.success();
}
public class TransferRequest implements Serializable {
private String nftAddress;
private String nftId;
private String from;
private String to;
private Long amount;
}
public class OrderInfo implements Serializable {
private Integer level ;
private Integer oDay ;
private Integer oMonth ;
private Integer oSeason ;
private Integer oWeek ;
private Integer oYear ;
private Integer orderStatus ;
private Integer orderType ;
private Integer quantity ;
private String couponCode ;
private String couponLink ;
private String couponNftId ;
private Integer couponType ;
private String description ;
private String hash ;
private String name ;
private String nftAddress ;
private String nftId ;
private String orderNo ;
private BigDecimal orderPrice ;
private BigDecimal payPrice ;
private String payTokenAddress ;
private String payTokenType ;
private String recipient ;
private String sender ;
private String serialNo ;
private String txId ;
private String createTimeString;
private String usdPrice;
public String getCreateTimeString() {
if (this.getCreateTime() != null){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format = simpleDateFormat.format(this.getCreateTime());
return format;
}
return null;
}
}
public class AssetRequest implements Serializable {
private String nftAddress;
private String nftId;
private Long amount;
private Integer marketType;
private String marketOwner;
private String marketTokenAddress;
private BigDecimal marketPrice;
private Long marketTime;
private String marketContractAddress;
private String tokenType;
private String owner;
private String couponCode;
}
Modified at 2024-11-28 09:53:41