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

Commit 4276b406 authored by 张国柄's avatar 张国柄

~api:藏品转赠过期退还;

parent 15f27936
package com.liquidnet.service.goblin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 藏品转赠订单记录
* </p>
*
* @author liquidnet
* @since 2022-08-26
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinNftTransferOrder implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* 转赠订单号
*/
private String orderId;
/**
* 藏品ID
*/
private String artworkId;
/**
* 拥有人UID
*/
private String ownerUid;
/**
* 受赠人UID
*/
private String receiverUid;
/**
* 订单状态[0-等待接收|1-确认接收|2-拒绝接收|3-过期关闭]
*/
private Integer state;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private String comment;
}
package com.liquidnet.service.goblin.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
......@@ -80,8 +82,21 @@ public class GoblinUserDigitalArtwork implements Serializable {
private String tradingAt;
/**
* 转赠状态[PENDING|SUCCESS]
* 受赠人UID
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String receiverUid;
/**
* 转赠订单号
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String transferOrderId;
/**
* 转赠状态[WAITING|PENDING|SUCCESS]
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String transferState;
/**
......
package com.liquidnet.service.goblin.mapper;
import com.liquidnet.service.goblin.entity.GoblinNftTransferOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 藏品转赠订单记录 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2022-08-26
*/
public interface GoblinNftTransferOrderMapper extends BaseMapper<GoblinNftTransferOrder> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.goblin.mapper.GoblinNftTransferOrderMapper">
</mapper>
package com.liquidnet.service.executor.main.handler;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DESUtils;
import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.service.feign.platform.task.FeignPlatformGoblinTaskClient;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
/**
* platform:goblin
*/
@Component
public class PlatformGoblinTaskHandler {
@Value("${liquidnet.service.platform.url}")
private String sevPlatformUrl;
@Autowired
private FeignPlatformGoblinTaskClient feignPlatformGoblinTaskClient;
......@@ -63,4 +71,21 @@ public class PlatformGoblinTaskHandler {
}
}
@XxlJob(value = "sev-platform:goblinArtworkTransferExpireHandler")
public void goblinArtworkTransferExpireHandler() {// 商城:藏品转赠过期处理
try {
String url = sevPlatformUrl.concat("/platfrom/artwork/task/transfer_expire");
LinkedMultiValueMap<String, String> paramsMap = CollectionUtil.linkedMultiValueMapStringString();
String jobParam = XxlJobHelper.getJobParam();
if (StringUtils.isNotBlank(jobParam)) {
paramsMap.add("expiredMinutes", DESUtils.DES().encrypt(jobParam));
}
XxlJobHelper.handleSuccess("结果:" + HttpUtil.put(url, paramsMap));
} catch (Exception e) {
XxlJobHelper.log(e);
XxlJobHelper.handleFail();
}
}
}
......@@ -1182,7 +1182,7 @@ create table goblin_nft_transfer_order
artwork_id varchar(64) not null comment '藏品ID',
owner_uid varchar(64) not null comment '拥有人UID',
receiver_uid varchar(64) not null comment '受赠人UID',
state tinyint default 0 comment '订单状态[0-等待接收,1-确认接收,2-拒绝接收]',
state tinyint default 0 comment '订单状态[0-等待接收|1-确认接收|2-拒绝接收|3-过期关闭]',
created_at datetime not null,
updated_at datetime null,
comment varchar(500)
......
......@@ -201,8 +201,8 @@ public class GoblinUserDigitalArtworkController {
if (userDigitalArtworkVo.getTransferAt().plusDays(1).isBefore(LocalDateTime.now())) {
return ResponseDto.failure(ErrorMapping.get("140117"));// 已过转赠领取有效期
}
if (!userDigitalArtworkVo.getTransferState().equals(GoblinStatusConst.TransferState.WAITING.name())) {
return ResponseDto.failure(ErrorMapping.get("140118"));// 藏品已领取
if (!GoblinStatusConst.TransferState.WAITING.name().equals(userDigitalArtworkVo.getTransferState())) {
return ResponseDto.failure(ErrorMapping.get("140118"));// 藏品已领取或已过期
}
if (!goblinRedisUtils.lockUserDigitalArtworkVoOperate(artworkId)) return ResponseDto.failure(ErrorMapping.get("140000"));
boolean transferReceiveRstFlg = goblinUserDigitalArtworkService.transferConfirmReceive(userDigitalArtworkVo);
......
......@@ -421,7 +421,7 @@ public class GoblinUserDigitalArtworkServiceImpl implements IGoblinUserDigitalAr
initNftTransferOrderObjs.add(new Object[]{userDigitalArtworkVo.getTransferOrderId(),
userDigitalArtworkVo.getArtworkId(), userDigitalArtworkVo.getUid(), userDigitalArtworkVo.getReceiverUid(), currentDateTime
});
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_ARTWORK_GEN.getKey(), SqlMapping.gets(toMqSqls, updateUserDigitalArtworkObjs));
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_ARTWORK_GEN.getKey(), SqlMapping.gets(toMqSqls, updateUserDigitalArtworkObjs, initNftTransferOrderObjs));
return true;
}
return false;
......@@ -462,9 +462,9 @@ public class GoblinUserDigitalArtworkServiceImpl implements IGoblinUserDigitalAr
userDigitalArtworkVo.getTransferState(), userDigitalArtworkVo.getUpdatedAt(), userDigitalArtworkVo.getArtworkId()
});
toMqSqls.add(SqlMapping.get("goblin_nft_transfer_order.up_transfer_confirm"));// 藏品订单记录更新
LinkedList<Object[]> initNftTransferOrderObjs = CollectionUtil.linkedListObjectArr();
initNftTransferOrderObjs.add(new Object[]{1, currentDateTime, userDigitalArtworkVo.getTransferOrderId()});
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_ARTWORK_GEN.getKey(), SqlMapping.gets(toMqSqls, updateUserDigitalArtworkObjs));
LinkedList<Object[]> updateNftTransferOrderObjs = CollectionUtil.linkedListObjectArr();
updateNftTransferOrderObjs.add(new Object[]{1, currentDateTime, userDigitalArtworkVo.getTransferOrderId()});
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_ARTWORK_GEN.getKey(), SqlMapping.gets(toMqSqls, updateUserDigitalArtworkObjs, updateNftTransferOrderObjs));
return true;
}
return false;
......
......@@ -83,6 +83,9 @@ public class GoblinQueBizArtworkTransQueryService {
}
GoblinUserDigitalArtworkVo receiverDigitalArtworkVo = GoblinUserDigitalArtworkVo.getNew();
{// 受赠人藏品处理
// 受赠人受赠藏品列表缓存更新
goblinRedisUtils.rmvUserDigitalArtworkIdsTransfer(userDigitalArtworkVo.getReceiverUid(), userDigitalArtworkVo.getArtworkId());
String transferTime = queryRespDto.getTransferTime(), transferHash = queryRespDto.getTransferHash();
receiverDigitalArtworkVo.setArtworkId(IDGenerator.nextSnowId());
receiverDigitalArtworkVo.setUid(receiverUid);
......
......@@ -2154,10 +2154,6 @@ public class GoblinRedisUtils {
}
}
public boolean setUserDigitalArtworkIdsTransfer(String uid, List<String> artworkIdList) {
return redisUtil.set(GoblinRedisConst.USER_DIGITAL_ARTWORK_IDS_TRANSFER, artworkIdList);
}
/* ----------------------------------- ---------- ----------------------------------- */
public List<String> getGoblinNftGoodsInfoListVo(String num) {
......
......@@ -85,7 +85,9 @@ public class CandyCouponDueTaskController {
AtomicInteger pl = new AtomicInteger();
int remainCount = totalCount;
int num = 0, pSize = 1000;
if (totalCount > 0) {
log.info("券码到期检查处理:兑换码[到期总记录数:{},AT:{}] >>> BEGIN BEGIN BEGIN", totalCount, now);
}
ArrayList<CandyCouponCode> updateCouponCodeList = ObjectUtil.getCandyCouponCodeArrayList();
couponCodeQueryWrapper.select(CandyCouponCode::getMid, CandyCouponCode::getCcode);
......@@ -134,7 +136,9 @@ public class CandyCouponDueTaskController {
remainCount -= pSize;
log.info("券码到期检查处理中:兑换码[到期总记录数:{},单次处理:{},剩余处理数:{}]", totalCount, lastLimitSql, remainCount);
}
if (totalCount > 0) {
log.info("券码到期检查处理:兑换码[到期总记录数:{},处理总数:{}] >>> END END END", totalCount, pl.get());
}
return ResponseDto.success();
}
......
......@@ -34,16 +34,18 @@ public class CandyMgtCouponTaskController {
.le(CandyMgtCoupon::getEventAt, now)
.orderByAsc(CandyMgtCoupon::getEventAt);
List<CandyMgtCoupon> list = platformCandyMgtCouponService.list(queryWrapper);
int taskSize = CollectionUtils.isEmpty(list) ? -1 : list.size(), pl = 0;
log.info("发放券任务总数:{} >>> BEGIN BEGIN BEGIN", taskSize);
int totalSize = CollectionUtils.isEmpty(list) ? -1 : list.size(), pl = 0;
if (totalSize > 0) {
log.info("发放券任务总数:{} >>> BEGIN BEGIN BEGIN", totalSize);
}
for (int i = 0; i < taskSize; i++) {
for (int i = 0; i < totalSize; i++) {
CandyMgtCoupon mgtCoupon = list.get(i);
mgtCoupon.setState(9);
mgtCoupon.setUpdatedAt(now);
}
if (platformCandyMgtCouponService.updateBatchById(list)) {
for (int i = 0; i < taskSize; i++) {
for (int i = 0; i < totalSize; i++) {
CandyMgtCoupon mgtCoupon = list.get(i);
try {
......@@ -51,7 +53,7 @@ public class CandyMgtCouponTaskController {
.eq(CandyCoupon::getState, 1).eq(CandyCoupon::getCouponId, mgtCoupon.getCouponId());
CandyCoupon coupon = platformCandyCouponService.getOne(couponLambdaQueryWrapper);
log.info("发放券任务总数:{},任务{}开始处理[mcouponId:{},couType:{},bindType:{},eventAmt:{},eventType:{}]", taskSize, i,
log.info("发放券任务总数:{},任务{}开始处理[mcouponId:{},couType:{},bindType:{},eventAmt:{},eventType:{}]", totalSize, i,
mgtCoupon.getMcouponId(), coupon.getCouType(), coupon.getBindType(), mgtCoupon.getEventAmt(), mgtCoupon.getEventType());
switch (coupon.getCouType()) {
......@@ -71,23 +73,25 @@ public class CandyMgtCouponTaskController {
platformCandyCouponService.issuePriorityCouponHandler(mgtCoupon, coupon);
break;
default:
log.warn("发放券任务总数:{},任务{}无法处理,无效的券类型[mcouponId:{},couType:{}]", taskSize, i, mgtCoupon.getMcouponId(), coupon.getCouType());
log.warn("发放券任务总数:{},任务{}无法处理,无效的券类型[mcouponId:{},couType:{}]", totalSize, i, mgtCoupon.getMcouponId(), coupon.getCouType());
break;
}
mgtCoupon.setState(1);
boolean update = platformCandyMgtCouponService.updateById(mgtCoupon);
log.info("发放券任务总数:{},任务{}处理{}[mcouponId:{},couType:{},bindType:{},eventAmt:{},eventType:{}]", taskSize, i, (update ? "成功" : "失败"),
log.info("发放券任务总数:{},任务{}处理{}[mcouponId:{},couType:{},bindType:{},eventAmt:{},eventType:{}]", totalSize, i, (update ? "成功" : "失败"),
mgtCoupon.getMcouponId(), coupon.getCouType(), coupon.getBindType(), mgtCoupon.getEventAmt(), mgtCoupon.getEventType());
pl++;
} catch (Exception e) {
log.error("发放券任务总数:{},任务{}处理异常[mcouponId:{}]", taskSize, i, mgtCoupon.getMcouponId(), e);
log.error("发放券任务总数:{},任务{}处理异常[mcouponId:{}]", totalSize, i, mgtCoupon.getMcouponId(), e);
}
}
}
if (totalSize > 0) {
log.info("发放券任务总数:{},成功处理任务数:{} >>> END END END", totalSize, pl);
}
log.info("发放券任务总数:{},成功处理任务数:{} >>> END END END", taskSize, pl);
return ResponseDto.success(String.format("发放券任务总数:%s,成功处理任务数:%s", taskSize, pl));
return ResponseDto.success(String.format("发放券任务总数:%s,成功处理任务数:%s", totalSize, pl));
}
}
package com.liquidnet.service.platform.controller.goblin;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.liquidnet.common.exception.constant.ErrorCode;
import com.liquidnet.commons.lang.util.DESUtils;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.entity.GoblinNftTransferOrder;
import com.liquidnet.service.platform.service.impl.goblin.PlatformGoblinNftTransferOrderService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.List;
@Slf4j
@RestController
@RequestMapping("artwork/task")
public class GoblinUserDigitalArtworkTaskController {
@Autowired
private PlatformGoblinNftTransferOrderService platformGoblinNftTransferOrderService;
/**
* 藏品转赠过期批处理
*
* @param expiredSeconds 过期时间,单位秒,不传默认24小时即86400秒(这里统一延后10秒处理)
* @return ResponseDto<String>
*/
@ApiOperation(value = "藏品过期处理")
@PutMapping("transfer_expire")
public ResponseDto<String> processForTransferExpire(@RequestParam(required = false) String expiredSeconds) {
int expiredSecondsIntVal = 0;
if (StringUtils.isNotBlank(expiredSeconds)) {
try {
String decrypt = DESUtils.DES().decrypt(expiredSeconds);
expiredSecondsIntVal = Integer.parseInt(decrypt) + 10;
} catch (NumberFormatException e) {
expiredSecondsIntVal = 86400 + 10;
} catch (Exception e) {
ErrorCode paramError = ErrorCode.HTTP_PARAM_ERROR;
return ResponseDto.failure(paramError.getCode(), paramError.getMessage());
}
}
LocalDateTime expiredTime = LocalDateTime.now().minusSeconds(expiredSecondsIntVal);
LambdaQueryWrapper<GoblinNftTransferOrder> queryWrapper = Wrappers.lambdaQuery(GoblinNftTransferOrder.class)
.eq(GoblinNftTransferOrder::getState, 0)
.le(GoblinNftTransferOrder::getCreatedAt, expiredTime);
int totalCount = platformGoblinNftTransferOrderService.count(queryWrapper), pl = 0, remainCount = totalCount, pSize = 200;
if (totalCount > 0) {
log.info("藏品转赠过期初始查询总数:{} >>> BEGIN BEGIN BEGIN", totalCount);
}
queryWrapper.select(GoblinNftTransferOrder::getMid, GoblinNftTransferOrder::getArtworkId);
queryWrapper.orderByAsc(GoblinNftTransferOrder::getMid);
while (remainCount > 0) {
String lastLimitSql = "LIMIT " + 0 + "," + pSize;
List<GoblinNftTransferOrder> list = platformGoblinNftTransferOrderService.list(queryWrapper.last(lastLimitSql));
if (!CollectionUtils.isEmpty(list)) {
int numSucc = platformGoblinNftTransferOrderService.processForTransferExpire(list);
log.info("藏品转赠过期处理[单次处理:{},list.size:{},list.numSucc:{}]", lastLimitSql, list.size(), numSucc);
pl += numSucc;
queryWrapper.clear();
expiredTime = LocalDateTime.now().minusSeconds(expiredSecondsIntVal);
queryWrapper.eq(GoblinNftTransferOrder::getState, 0).le(GoblinNftTransferOrder::getCreatedAt, expiredTime);
} else {
remainCount = -1;
}
}
if (totalCount > 0) {
log.info("藏品转赠过期初始查询总数:{},最终成功处理总数:{} >>> END END END", totalCount, pl);
}
return ResponseDto.success();
}
}
package com.liquidnet.service.platform.service.impl.goblin;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.common.cache.redis.util.AbstractRedisUtil;
import com.liquidnet.common.cache.redis.util.RedisDataSourceUtil;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.service.goblin.constant.GoblinRedisConst;
import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.dto.vo.GoblinUserDigitalArtworkVo;
import com.liquidnet.service.goblin.entity.GoblinNftTransferOrder;
import com.liquidnet.service.goblin.entity.GoblinUserDigitalArtwork;
import com.liquidnet.service.goblin.mapper.GoblinNftTransferOrderMapper;
import com.liquidnet.service.goblin.mapper.GoblinUserDigitalArtworkMapper;
import com.liquidnet.service.platform.utils.ObjectUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@Service
public class PlatformGoblinNftTransferOrderService extends ServiceImpl<GoblinNftTransferOrderMapper, GoblinNftTransferOrder> {
@Autowired
private GoblinUserDigitalArtworkMapper goblinUserDigitalArtworkMapper;
@Autowired
private RedisDataSourceUtil redisDataSourceUtil;
@Autowired
private MongoTemplate mongoTemplate;
public int processForTransferExpire(List<GoblinNftTransferOrder> list) {
AbstractRedisUtil redisGoblinUtil = redisDataSourceUtil.getRedisGoblinUtil();
ArrayList<String> updateUserDigitalArtworkIdList = CollectionUtil.arrayListString();
ArrayList<GoblinNftTransferOrder> updateNftTransferOrderList = ObjectUtil.getGoblinNftTransferOrderArrayList();
int numSucc = 0;
LocalDateTime currentDateTime = LocalDateTime.now();
for (int i = 0, listSize = CollectionUtils.isEmpty(list) ? -1 : list.size(); i < listSize; i++) {
GoblinNftTransferOrder nftTransferOrder = list.get(i);
String artworkId = nftTransferOrder.getArtworkId();
GoblinUserDigitalArtworkVo rdsVo = (GoblinUserDigitalArtworkVo) redisGoblinUtil.get(GoblinRedisConst.USER_DIGITAL_ARTWORK.concat(artworkId));
if (null != rdsVo && GoblinStatusConst.TransferState.WAITING.name().equals(rdsVo.getTransferState())) {
// 受赠人受赠藏品列表缓存更新
this.rmvUserDigitalArtworkIdsTransfer(rdsVo.getReceiverUid(), artworkId);
// 转赠人藏品恢复
rdsVo.setTransferOrderId(null);
rdsVo.setTransferState(null);
rdsVo.setReceiverUid(null);
rdsVo.setReceiverUser(null);//
rdsVo.setUpdatedAt(currentDateTime);
redisGoblinUtil.set(GoblinRedisConst.USER_DIGITAL_ARTWORK.concat(artworkId), rdsVo);
nftTransferOrder.setState(3);
nftTransferOrder.setUpdatedAt(currentDateTime);
updateNftTransferOrderList.add(nftTransferOrder);
updateUserDigitalArtworkIdList.add(artworkId);
numSucc++;
}
}
if (numSucc > 0) {// 更新Mysql、Mongo
this.updateBatchById(updateNftTransferOrderList, updateNftTransferOrderList.size());
GoblinUserDigitalArtwork updateUserDigitalArtwork = new GoblinUserDigitalArtwork();
updateUserDigitalArtwork.setTransferOrderId(null);
updateUserDigitalArtwork.setTransferState(null);
updateUserDigitalArtwork.setReceiverUid(null);
updateUserDigitalArtwork.setUpdatedAt(currentDateTime);
LambdaUpdateWrapper<GoblinUserDigitalArtwork> userDigitalArtworkLambdaUpdateWrapper = Wrappers.lambdaUpdate(GoblinUserDigitalArtwork.class)
.in(GoblinUserDigitalArtwork::getArtworkId, updateUserDigitalArtworkIdList)
.eq(GoblinUserDigitalArtwork::getTransferState, GoblinStatusConst.TransferState.WAITING.name());
goblinUserDigitalArtworkMapper.update(updateUserDigitalArtwork, userDigitalArtworkLambdaUpdateWrapper);
Query queryMongo = Query.query(
Criteria.where("artworkId").in(updateUserDigitalArtworkIdList).and("transferState").is(GoblinStatusConst.TransferState.WAITING.name())
);
Update updateMongo = Update.update("updatedAt", currentDateTime).unset("transferOrderId").unset("transferState").unset("receiverUid");
mongoTemplate.updateMulti(queryMongo, updateMongo, GoblinUserDigitalArtworkVo.class.getSimpleName());
}
return numSucc;
}
/* ------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------ */
/**
* 获取用户受赠藏品ID集合
*/
public List<String> getUserDigitalArtworkIdsTransfer(String uid) {
return (List<String>) redisDataSourceUtil.getRedisGoblinUtil().get(GoblinRedisConst.USER_DIGITAL_ARTWORK_IDS_TRANSFER.concat(uid));
}
private boolean rmvUserDigitalArtworkIdsTransfer(String uid, String artworkId) {
List<String> ids = this.getUserDigitalArtworkIdsTransfer(uid);
if (CollectionUtils.isEmpty(ids)) {
return false;
} else {
ids.remove(artworkId);
return redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.USER_DIGITAL_ARTWORK_IDS_TRANSFER, ids);
}
}
/* ------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------ */
}
......@@ -7,9 +7,7 @@ import com.liquidnet.service.candy.entity.CandyCouponCode;
import com.liquidnet.service.candy.entity.CandyUserCoupon;
import com.liquidnet.service.goblin.dto.GoblinStoreMarketDto;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinNftExCode;
import com.liquidnet.service.goblin.entity.GoblinNftExCodeTask;
import com.liquidnet.service.goblin.entity.GoblinNftExCodeTaskRelation;
import com.liquidnet.service.goblin.entity.*;
import com.liquidnet.service.kylin.dto.vo.KylinApiCameraDevicesVo;
import com.liquidnet.service.kylin.entity.KylinOrderCoupons;
import com.liquidnet.service.goblin.dto.vo.ActivityExcelVo;
......@@ -70,6 +68,8 @@ public class ObjectUtil {
private static final ArrayList<GoblinNftExCodeTask> goblinNftExCodeTaskArrayList = new ArrayList<>();
private static final ArrayList<GoblinStoreMarketDto> goblinStoreMarketDtoArrayList = new ArrayList<>();
private static final ArrayList<GoblinNftExCode> goblinNftExCodeArrayList = new ArrayList<>();
private static final ArrayList<GoblinNftTransferOrder> goblinNftTransferOrders = new ArrayList<>();
private static final ArrayList<GoblinUserDigitalArtwork> goblinUserDigitalArtworks = new ArrayList<>();
public static ArrayList<SellDataOneVO> getSellDataOneVOArrayList() {
return (ArrayList<SellDataOneVO>) sellDataOneVOArrayList.clone();
......@@ -179,5 +179,7 @@ public class ObjectUtil {
return (ArrayList<GoblinNftExCode>) goblinNftExCodeArrayList.clone();
}
public static ArrayList<GoblinNftTransferOrder> getGoblinNftTransferOrderArrayList(){
return (ArrayList<GoblinNftTransferOrder>) goblinNftTransferOrders.clone();
}
}
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