diff --git a/conflux-admin/pom.xml b/conflux-admin/pom.xml index 507d0f0..fc0499a 100644 --- a/conflux-admin/pom.xml +++ b/conflux-admin/pom.xml @@ -99,7 +99,7 @@ io.github.conflux-chain conflux.web3j - 1.1.0 + 1.2.3 com.google.code.gson diff --git a/conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java b/conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java index 5e4e25f..a8c8a39 100644 --- a/conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java +++ b/conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java @@ -2,6 +2,7 @@ package com.conflux.web.controller.nft.service.impl; import cn.hutool.core.date.DateUtil; import com.conflux.common.core.domain.AjaxResult; +import com.conflux.common.utils.DateUtils; import com.conflux.common.utils.StringUtils; import com.conflux.common.utils.sign.Md5Utils; import com.conflux.common.utils.uuid.IdUtils; @@ -179,7 +180,7 @@ public class ConfluxServiceImpl implements ConfluxService { nftLog.setNftNum(checkArgs.getIds().length); nftLogService.insertNftLog(nftLog); log.info("上链日志----->:{" + contractConfig.getUnitName() + "}{" + new Date() + "}{" + checkArgs.getIds().length + "}"); - + //使用线程铸造 executor.execute(() -> { boolean isFalg = true; while (isFalg) { @@ -247,9 +248,12 @@ public class ConfluxServiceImpl implements ConfluxService { } List nftCollections = nftCollectionService.selectNftCollectionListByIds(checkArgs.getIds(), 2); if (nftCollections.size() > 0) { - List list = new ArrayList(); + List list = new ArrayList(); for (NftCollection n : nftCollections) { - list.add(n.getInformationTableId()); + Map map=new HashMap<>(); + map.put("informationTableId",n.getInformationTableId()); + map.put("successTime", DateUtils.dateToStr(n.getUpdatedTime())); + list.add(map); } return AjaxResult.success("铸造成功的id", list); } diff --git a/conflux-common/src/main/java/com/conflux/common/utils/DateUtils.java b/conflux-common/src/main/java/com/conflux/common/utils/DateUtils.java index 58ec8ab..b6914a7 100644 --- a/conflux-common/src/main/java/com/conflux/common/utils/DateUtils.java +++ b/conflux-common/src/main/java/com/conflux/common/utils/DateUtils.java @@ -184,4 +184,13 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault()); return Date.from(zdt.toInstant()); } + public static String dateToStr(Date time){ + SimpleDateFormat simpleDateFormat=new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS); + String format = simpleDateFormat.format(time); + return format; + } + + public static void main(String[] args) { + System.out.println(dateToStr(new Date())); + } } diff --git a/conflux-system/src/main/resources/mapper/system/NftCollectionMapper.xml b/conflux-system/src/main/resources/mapper/system/NftCollectionMapper.xml index a9df7d2..9878398 100644 --- a/conflux-system/src/main/resources/mapper/system/NftCollectionMapper.xml +++ b/conflux-system/src/main/resources/mapper/system/NftCollectionMapper.xml @@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where information_table_id = #{hexTokenId}