Service Callback method
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;
}