记得上下班打卡 | git大法好,push需谨慎

Commit 52dff232 authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/dev_nft_411' into dev_nft_411

parents 180280fe 2d40daad
package com.liquidnet.service.galaxy.dto;
import lombok.Data;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: NftInfo
* @Package com.liquidnet.common.third.zxlnft.dto.nft
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/2/23 13:16
*/
@Data
public class NftInfoDto {
/**
* nftId
*/
private String nftId;
/**
* 所有者地址
*/
private String ownerAddr;
/**
* 作者名,中文+英文(数字或符号为非法输入) 不超过30个字符
*/
private String author;
/**
* 作品名字,中英文数字均可,不超过256个字符
*/
private String name;
/**
* 作品url,不超过2048个字符 疑问:应该是发行的1024吧?
*/
private String url;
/**
* 预览图url
*/
private String displayUrl;
/**
* 作品hash
*/
private String hash;
/**
* 此owner获得此nft的时间戳
*/
private Long ownerGainedTime;
/**
* 作品简介,500个字符以内
*/
private String desc;
/**
* 作品标签,【文创】,游戏,动漫,30个字符以内
*/
private String flag;
/**
* 作品系列
*/
private String seriesName;
/**
* 系列ID
*/
private String seriesId;
/**
* 系列NFT总数
*/
private Long seriesTotalNum;
/**
* 扩展字段,用户自定义,长度不超过1024个字符
*/
private String metaData;
/**
* 发行者地址
*/
private String publisherAddr;
/**
* 发行平台地址
*/
private String publishPlatformAddr;
/**
* 系列偏移id
*/
private Integer seriesIndexId;
/**
* 发行时交易hash
*/
private String publishTxHash;
/**
* 1:可售 2:不可售
*/
private Integer sellStatus;
/**
* 卖多少积分,可售状态下才有意义
*/
private Long sellCount;
}
......@@ -20,13 +20,8 @@ import java.util.List;
@ApiModel(value = "GalaxyNftPublishAndBuyResultBatchQueryRespDto", description = "NFT发行结果查询")
@Data
public class GalaxyNftPublishAndBuyResultBatchQueryRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
private String userId;
@ApiModelProperty(position = 1, required = true, value = "用户购买信息List")
private List<GalaxyNftPublishAndBuyRouterBatchQueryRespDto> routerBuyInfoList;
private List<GalaxyNftPublishAndBuyResultQueryRespDto> routerBuyInfoList;
@Override
public String toString() {
......
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyQuerySeriesReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/4/7 16:27
*/
@ApiModel(value = "GalaxyQueryNftListReqDto", description = "NFT列表查询")
@Data
public class GalaxyQueryNftListReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable{
/**
* 以下为发行参数***********************************
*/
@ApiModelProperty(position = 1, required = true, value = "用户ID[30]")
@NotBlank(message = "用户ID不能为空!")
@Size(min = 1, max = 30, message = "用户ID限制2-30位且不能包含特殊字符")
private String userId;
@ApiModelProperty(position = 2, required = true, value = "系列ID")
private String seriesId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyQueryNftListReqDto obj = new GalaxyQueryNftListReqDto();
public static GalaxyQueryNftListReqDto getNew() {
try {
return (GalaxyQueryNftListReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyQueryNftListReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.galaxy.dto.NftInfoDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyQuerySeriesReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/4/7 16:27
*/
@ApiModel(value = "GalaxyQueryNftListRespDto", description = "NFT列表查询")
@Data
public class GalaxyQueryNftListRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "userId")
private String userId;
@ApiModelProperty(position = 1, required = true, value = "seriesId")
private String seriesId;
/**
* 藏品总数
*/
private Long total;
/**
* nft元信息列表
*/
private List<NftInfoDto> nftList;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyQueryNftListRespDto obj = new GalaxyQueryNftListRespDto();
public static GalaxyQueryNftListRespDto getNew() {
try {
return (GalaxyQueryNftListRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyQueryNftListRespDto();
}
}
}
\ No newline at end of file
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyQuerySeriesReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/4/7 16:27
*/
@ApiModel(value = "GalaxyQuerySeriesReqDto", description = "系列查询")
@Data
public class GalaxyQuerySeriesReqDto extends GalaxyBaseReqDto implements Serializable,Cloneable{
@ApiModelProperty(position = 1, required = true, value = "skuId")
private String skuId;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyQuerySeriesReqDto obj = new GalaxyQuerySeriesReqDto();
public static GalaxyQuerySeriesReqDto getNew() {
try {
return (GalaxyQuerySeriesReqDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyQuerySeriesReqDto();
}
}
}
package com.liquidnet.service.galaxy.dto.param;
import com.liquidnet.commons.lang.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyQuerySeriesReqDto
* @Package com.liquidnet.service.galaxy.dto.param
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/4/7 16:27
*/
@ApiModel(value = "GalaxyQuerySeriesRespDto", description = "系列查询")
@Data
public class GalaxyQuerySeriesRespDto implements Serializable,Cloneable {
@ApiModelProperty(position = 1, required = true, value = "skuId")
private String skuId;
@ApiModelProperty(position = 1, required = true, value = "seriesId")
private String seriesId;
@ApiModelProperty(position = 1, required = true, value = "name")
private String name;
@ApiModelProperty(position = 1, required = true, value = "creatorAddr")
private String creatorAddr;
@ApiModelProperty(position = 2, required = true, value = "totalCount")
private Long totalCount;
@ApiModelProperty(position = 3, required = true, value = "seriesBeginFromZero")
private Boolean seriesBeginFromZero;
@ApiModelProperty(position = 3, required = true, value = "crtCount")
private Long crtCount;
@ApiModelProperty(position = 3, required = true, value = "coverUrl")
private String coverUrl;
@ApiModelProperty(position = 3, required = true, value = "desc")
private String desc;
@ApiModelProperty(position = 3, required = true, value = "createTimeStamp")
private String createTimeStamp;
@Override
public String toString(){
return JsonUtils.toJson(this);
}
private static final GalaxyQuerySeriesRespDto obj = new GalaxyQuerySeriesRespDto();
public static GalaxyQuerySeriesRespDto getNew() {
try {
return (GalaxyQuerySeriesRespDto) obj.clone();
} catch (CloneNotSupportedException e) {
return new GalaxyQuerySeriesRespDto();
}
}
}
\ No newline at end of file
package com.liquidnet.service.galaxy.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyQueryNftListReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyQueryNftListRespDto;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 区块链发行相关
* @class: IGalaxyPublishService
* @Package com.liquidnet.service.galaxy.service
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/4/7 11:45
*/
public interface IGalaxyTradeQueryService {
ResponseDto<GalaxyQueryNftListRespDto> nftList(GalaxyQueryNftListReqDto reqDto);
}
......@@ -26,8 +26,8 @@ public class GoblinUserDigitalArtworkInfoVo implements Serializable, Cloneable {
private Integer edition;
@ApiModelProperty(position = 17, value = "藏品NFT ID")
private String nftId;
// @ApiModelProperty(position = 18, value = "NFT系列声明时间")
// private String declareAt;
@ApiModelProperty(position = 18, value = "藏品生成时间[yyyy-MM-dd HH:mm:ss]")
private String generateTime;
@ApiModelProperty(position = 19, value = "获得方式[1-购买|2-兑换|3-赠送|5-受赠]")
private Integer source;
......
......@@ -76,7 +76,7 @@ public class GalaxyTradeController {
@PostMapping(value = {"nftPublishAndBuyResultBatchQuery"})
public ResponseDto<GalaxyNftPublishAndBuyResultBatchQueryRespDto> nftPublishAndBuyResultBatchQuery(@Valid @RequestBody GalaxyNftPublishAndBuyResultBatchQueryReqDto reqDto){
//定义返回结果
List<GalaxyNftPublishAndBuyRouterBatchQueryRespDto> batchQueryRespDtosList = new ArrayList<>();
List<GalaxyNftPublishAndBuyResultQueryRespDto> routerBuyInfoList = new ArrayList<>();
//获取请求信息
List<GalaxyNftPublishAndBuyResultBatchQueryReqDto.RouterOrderInfo> routerOrderInfoList = reqDto.getRouterOrderInfoList();
routerOrderInfoList.forEach(routerOrderInfo -> {
......@@ -84,14 +84,14 @@ public class GalaxyTradeController {
batchQueryReqDto.setUserId(routerOrderInfo.getUserId());
batchQueryReqDto.setRouterType(routerOrderInfo.getRouterType());
batchQueryReqDto.setNftOrderPayIdList(routerOrderInfo.getNftOrderPayIdList());
//进行批量查询
ResponseDto<GalaxyNftPublishAndBuyRouterBatchQueryRespDto> responseDtoTemp = galaxyTradeService.nftPublishAndBuyResultBatchQuery(batchQueryReqDto);
if(StringUtil.isNotNull(responseDtoTemp)&&responseDtoTemp.isSuccess()){
batchQueryRespDtosList.add(responseDtoTemp.getData());
routerBuyInfoList.addAll(responseDtoTemp.getData().getBuyInfoList());
}
});
GalaxyNftPublishAndBuyResultBatchQueryRespDto respDto = GalaxyNftPublishAndBuyResultBatchQueryRespDto.getNew();
respDto.setUserId(reqDto.getUserId());
respDto.setRouterBuyInfoList(batchQueryRespDtosList);
respDto.setRouterBuyInfoList(routerBuyInfoList);
return ResponseDto.success(respDto);
}
......
package com.liquidnet.service.galaxy.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.aop.annotation.ControllerLog;
import com.liquidnet.service.galaxy.dto.param.GalaxyQueryNftListReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyQueryNftListRespDto;
import com.liquidnet.service.galaxy.service.IGalaxyTradeQueryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyTradeQueryController
* @Package com.liquidnet.service.galaxy.controller
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/4/7 16:12
*/
@Api(tags = "NFT交易查询相关")
@RestController
@RequestMapping("nftTradeQuery")
@Validated
@Slf4j
public class GalaxyTradeQueryController {
@Resource(name = "galaxyTradeQueryService")
private IGalaxyTradeQueryService galaxyTradeQueryService;
@ControllerLog(description = "NFT列表查询")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "NFT列表查询")
@PostMapping(value = {"nftList"})
public ResponseDto<GalaxyQueryNftListRespDto> nftList(@Valid @RequestBody GalaxyQueryNftListReqDto reqDto){
return galaxyTradeQueryService.nftList(reqDto);
}
}
......@@ -29,6 +29,7 @@ public class GalaxyRouterStrategyContext {
private final Map<String, IGalaxyRouterStrategyUser> userHandlerMap = new HashMap<>();
private final Map<String, IGalaxyRouterStrategyPublish> publishHandlerMap = new HashMap<>();
private final Map<String, IGalaxyRouterStrategyTrade> tradeHandlerMap = new HashMap<>();
private final Map<String, IGalaxyRouterStrategyTradeQuery> tradeQueryHandlerMap = new HashMap<>();
public IGalaxyRouterStrategyArtwork getArtworkStrategy(String type) {
if(!this.isActived(type)){
......@@ -78,6 +79,19 @@ public class GalaxyRouterStrategyContext {
return obj;
}
public IGalaxyRouterStrategyTradeQuery getTradeQueryStrategy(String type) {
if(!this.isActived(type)){
throw new LiquidnetServiceException(GalaxyErrorEnum.ROUTER_NOT_EXIST.getCode(), GalaxyErrorEnum.ROUTER_NOT_EXIST.getMessage());
}
IGalaxyRouterStrategyTradeQuery obj = tradeQueryHandlerMap.get(type);
if(StringUtil.isNull(obj)) throw new LiquidnetServiceException(GalaxyErrorEnum.ROUTER_NOT_EXIST.getCode(), GalaxyErrorEnum.ROUTER_NOT_EXIST.getMessage());
return obj;
}
public void putTradeQueryStrategy(String code, IGalaxyRouterStrategyTradeQuery strategy) {
tradeQueryHandlerMap.put(code, strategy);
}
public void putTradeStrategy(String code, IGalaxyRouterStrategyTrade strategy) {
tradeHandlerMap.put(code, strategy);
}
......
package com.liquidnet.service.galaxy.router.strategy;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterArtworkHandler;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterPublishHandler;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterTradeHandler;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterUserHandler;
import com.liquidnet.service.galaxy.router.strategy.annotation.*;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
......@@ -51,5 +48,12 @@ public class GalaxyRouterStrategyListener implements ApplicationListener<Contex
StrategyGalaxyRouterTradeHandler typeHandler = bean.getClass().getAnnotation(StrategyGalaxyRouterTradeHandler.class);
strategyContext.putTradeStrategy(typeHandler.value().getCode(),(IGalaxyRouterStrategyTrade)bean);
});
//tradeQuery
Map<String, Object> tradeQueryBeans = event.getApplicationContext().getBeansWithAnnotation(StrategyGalaxyRouterTradeQueryHandler.class);
tradeQueryBeans.forEach((name, bean) -> {
StrategyGalaxyRouterTradeQueryHandler typeHandler = bean.getClass().getAnnotation(StrategyGalaxyRouterTradeQueryHandler.class);
strategyContext.putTradeQueryStrategy(typeHandler.value().getCode(),(IGalaxyRouterStrategyTradeQuery)bean);
});
}
}
package com.liquidnet.service.galaxy.router.strategy;
import com.liquidnet.service.galaxy.service.IGalaxyTradeQueryService;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: 用户路由策略
* @class: IGalaxyRouterUserStrategy
* @Package com.liquidnet.service.galaxy.router.strategy
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/4/7 12:27
*/
public interface IGalaxyRouterStrategyTradeQuery extends IGalaxyTradeQueryService {
}
package com.liquidnet.service.galaxy.router.strategy.annotation;
import com.liquidnet.service.galaxy.constant.GalaxyEnum;
import java.lang.annotation.*;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: StrategyGalaxyRouterUserHandler
* @Package com.liquidnet.service.galaxy.router.strategy.annotation
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/3/8 11:31
*/
@Documented
@Inherited
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface StrategyGalaxyRouterTradeQueryHandler {
GalaxyEnum.RouterTypeEnum value();
}
package com.liquidnet.service.galaxy.router.zxin.biz;
import com.liquidnet.common.third.zxlnft.biz.ZxlnftBiz;
import com.liquidnet.common.third.zxlnft.dto.Nft037AddressListReqDto;
import com.liquidnet.common.third.zxlnft.dto.Nft037AddressListRespDto;
import com.liquidnet.common.third.zxlnft.dto.ZxlnftResponseDto;
import com.liquidnet.common.third.zxlnft.util.ZxlWalletSdkUtil;
import com.liquidnet.common.third.zxlnft.util.ZxlnftSdkUtil;
import com.liquidnet.commons.lang.util.BeanUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.bo.GalaxyUserInfoBo;
import com.liquidnet.service.galaxy.dto.param.GalaxyQueryNftListReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyQueryNftListRespDto;
import com.liquidnet.service.galaxy.utils.GalaxyDataUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: ZxinTradeQueryBiz
* @Package com.liquidnet.service.galaxy.router.zxin.biz
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/4/7 17:38
*/
@Slf4j
@Component
public class ZxinTradeQueryBiz {
@Autowired
private ZxlnftSdkUtil zxlnftSdkUtil;
@Autowired
private ZxlWalletSdkUtil zxlWalletSdkUtil;
@Autowired
private ZxlnftBiz zxlnftBiz;
@Autowired
private GalaxyDataUtils dataUtils;
public ResponseDto<GalaxyQueryNftListRespDto> nftList(GalaxyQueryNftListReqDto reqDto) {
//获取用户信息
GalaxyUserInfoBo userInfoBo = dataUtils.getGalaxyUserInfo(reqDto.getRouterType(),reqDto.getUserId());
Nft037AddressListReqDto nft037ReqDto = Nft037AddressListReqDto.getNew();
nft037ReqDto.setAddr(userInfoBo.getBlockChainAddress());
nft037ReqDto.setSeriesId(reqDto.getSeriesId());
nft037ReqDto.setLimit(1000l);
ZxlnftResponseDto<Nft037AddressListRespDto> zxlnftResponseDto = zxlnftSdkUtil.nft037AddressList(nft037ReqDto);
GalaxyQueryNftListRespDto queryNftListRespDto = GalaxyQueryNftListRespDto.getNew();
if(zxlnftResponseDto.isSuccess()){
BeanUtil.copy(zxlnftResponseDto.getData(),queryNftListRespDto);
queryNftListRespDto.setUserId(reqDto.getUserId());
queryNftListRespDto.setSeriesId(reqDto.getSeriesId());
}else{
return ResponseDto.failure();
}
return ResponseDto.success(queryNftListRespDto);
}
}
package com.liquidnet.service.galaxy.router.zxin.service;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.constant.GalaxyEnum;
import com.liquidnet.service.galaxy.dto.param.GalaxyQueryNftListReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyQueryNftListRespDto;
import com.liquidnet.service.galaxy.router.strategy.IGalaxyRouterStrategyTradeQuery;
import com.liquidnet.service.galaxy.router.strategy.annotation.StrategyGalaxyRouterTradeQueryHandler;
import com.liquidnet.service.galaxy.router.zxin.biz.ZxinTradeQueryBiz;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: PayChannelStrategyAlipayImpl
* @Package com.liquidnet.service.dragon.channel.strategy.impl
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/4/7 13:06
*/
@Slf4j
@Component
@StrategyGalaxyRouterTradeQueryHandler(GalaxyEnum.RouterTypeEnum.ZXINCHAIN)
public class GalaxyRouterStrategyZxlTradeQueryImpl implements IGalaxyRouterStrategyTradeQuery {
@Autowired
private ZxinTradeQueryBiz zxinTradeQueryBiz;
@Override
public ResponseDto<GalaxyQueryNftListRespDto> nftList(GalaxyQueryNftListReqDto reqDto) {
return zxinTradeQueryBiz.nftList(reqDto);
}
}
package com.liquidnet.service.galaxy.service.impl;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyQueryNftListReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyQueryNftListRespDto;
import com.liquidnet.service.galaxy.router.strategy.GalaxyRouterStrategyContext;
import com.liquidnet.service.galaxy.service.IGalaxyTradeQueryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyUserServiceImpl
* @Package com.liquidnet.service.galaxy.service.impl
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2022/4/7 12:09
*/
@Slf4j
@Service("galaxyTradeQueryService")
public class GalaxyTradeQueryServiceImpl implements IGalaxyTradeQueryService {
@Autowired
private GalaxyRouterStrategyContext galaxyRouterStrategyContext;
@Override
public ResponseDto<GalaxyQueryNftListRespDto> nftList(GalaxyQueryNftListReqDto reqDto) {
return galaxyRouterStrategyContext.getTradeQueryStrategy(reqDto.getRouterType()).nftList(reqDto);
}
}
......@@ -6,7 +6,9 @@ liquidnet:
username: user
password: user123
eureka:
host: 39.107.71.112:7001
# host: 39.107.71.112:7001
host: 127.0.0.1:7001
# end-dev-这里是配置信息基本值
spring:
......
......@@ -369,14 +369,16 @@ public class TestZxlnftSdkUtil {
System.out.println("=============执行第"+(i+1)+"个===================================");
Nft022UploadSecretReqDto reqDto = Nft022UploadSecretReqDto.getNew();
reqDto.setSeriesName("NOW_ZXL_NFT_PIC001_test_skuId001");
reqDto.setTimestamp(DateUtil.getNowSeconds().toString());
reqDto.setSeriesName("NOW_ZXL_NFT_PIC001_test_skuId001"+i);
System.out.println("timestamp=="+DateUtil.getNowSeconds().toString());
reqDto.setTimestamp(DateUtil.getNowSeconds().toString()+"123456"+i);
System.out.println("timestamp=="+reqDto.getTimestamp());
reqDto.setUserPubKey(zxlnftConfig.getNftPlatformPubKey());
try {
Thread.sleep(2000l);
} catch (InterruptedException e) {
e.printStackTrace();
}
// try {
// Thread.sleep(2000l);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
//系列为空
String userData = reqDto.getTimestamp();
//系列不为空
......@@ -550,6 +552,7 @@ public class TestZxlnftSdkUtil {
public void nft033SeriesList(){
Nft033SeriesListReqDto reqDto = Nft033SeriesListReqDto.getNew();
reqDto.setAddr("zxa66c8a684727d0f9aaa434044362aa8a18b61bb4");
// reqDto.setAddr(zhouhuanAddress1);
ZxlnftResponseDto<Nft033SeriesListRespDto> resp = zxlnftSdkUtil.nft033SeriesList(reqDto);
System.out.println(resp.toJson());
}
......@@ -728,9 +731,9 @@ public class TestZxlnftSdkUtil {
@Test
public void nft042TradeAllList(){
Nft042TradeAllListReqDto reqDto = Nft042TradeAllListReqDto.getNew();
// reqDto.setAddr(zxlnftConfig.getNftPlatformAddress());
reqDto.setAddr(zxlnftConfig.getNftPlatformAddress());
// reqDto.setAddr(zhouhuanAddress1);
// reqDto.setAddr(zhouhuanAddress1);
reqDto.setAddr(zhouhuanAddress2);
// reqDto.setOffset(0l);
reqDto.setLimit(1000l);
ZxlnftResponseDto<Nft042TradeAllListRespDto> resp = zxlnftSdkUtil.nft042TradeAllList(reqDto);
......
......@@ -55,8 +55,7 @@ public class GoblinUserDigitalArtworkServiceImpl implements IGoblinUserDigitalAr
List<String> subList = userDigitalArtworkIds.subList(fromIndex, Math.min(fromIndex + pageSize, cacheSize));
LocalDateTime now = LocalDateTime.now(), toCheckTime = now.minusSeconds(15);
int subSize = subList.size();
for (int i = 0; i < subSize; i++) {
for (int i = 0, subSize = subList.size(); i < subSize; i++) {
GoblinUserDigitalArtworkVo userDigitalArtworkVo = goblinRedisUtils.getUserDigitalArtworkVo(subList.get(i));
if (null != userDigitalArtworkVo) {
GoblinGoodsSkuInfoVo goodsSkuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(userDigitalArtworkVo.getSkuId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment