接收道具使用原道具佩戴状态
This commit is contained in:
parent
dc47209d4a
commit
6128d3c607
@ -196,7 +196,7 @@ public class LotteryPrizeGrantServiceImpl implements LotteryPrizeGrantService {
|
|||||||
propsBackpackClient.giveProps(cmd);
|
propsBackpackClient.giveProps(cmd);
|
||||||
|
|
||||||
// 发送通知
|
// 发送通知
|
||||||
// propsBackpackClient.givePropsNotify(userId, "PROPS", days, prize.getPropsId());
|
propsBackpackClient.givePropsNotify(userId, "PROPS", days, prize.getPropsId());
|
||||||
|
|
||||||
log.info("Props granted, userId: {}, propsId: {}, days: {}, recordNo: {}",
|
log.info("Props granted, userId: {}, propsId: {}, days: {}, recordNo: {}",
|
||||||
userId, prize.getPropsId(), days, recordNo);
|
userId, prize.getPropsId(), days, recordNo);
|
||||||
@ -227,7 +227,7 @@ public class LotteryPrizeGrantServiceImpl implements LotteryPrizeGrantService {
|
|||||||
propsBackpackClient.giveProps(cmd);
|
propsBackpackClient.giveProps(cmd);
|
||||||
|
|
||||||
// 发送通知
|
// 发送通知
|
||||||
// propsBackpackClient.givePropsNotify(userId, type, days, prize.getPropsId());
|
propsBackpackClient.givePropsNotify(userId, type, days, prize.getPropsId());
|
||||||
|
|
||||||
log.info("Backpack props granted, userId: {}, type: {}, propsId: {}, days: {}, recordNo: {}",
|
log.info("Backpack props granted, userId: {}, type: {}, propsId: {}, days: {}, recordNo: {}",
|
||||||
userId, type, prize.getPropsId(), days, recordNo);
|
userId, type, prize.getPropsId(), days, recordNo);
|
||||||
@ -256,6 +256,8 @@ public class LotteryPrizeGrantServiceImpl implements LotteryPrizeGrantService {
|
|||||||
.setDays(days)
|
.setDays(days)
|
||||||
.setBadgeType(SysBadgeConfigTypeEnum.ACTIVITY)
|
.setBadgeType(SysBadgeConfigTypeEnum.ACTIVITY)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
propsBackpackClient.givePropsNotify(userId, prize.getPrizeType(), days, prize.getPropsId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -102,13 +102,15 @@ public class PropsBackpackClientServiceImpl implements PropsBackpackClientServic
|
|||||||
|
|
||||||
Timestamp timestamp = getTimestamp(cmd, oldpropsBackpack);
|
Timestamp timestamp = getTimestamp(cmd, oldpropsBackpack);
|
||||||
|
|
||||||
|
boolean useProps = getUseProps(cmd, oldpropsBackpack);
|
||||||
|
|
||||||
propsBackpackService.addPropsBackpack(
|
propsBackpackService.addPropsBackpack(
|
||||||
new PropsBackpack()
|
new PropsBackpack()
|
||||||
.setUserId(cmd.getAcceptUserId())
|
.setUserId(cmd.getAcceptUserId())
|
||||||
.setPropsId(cmd.getPropsId())
|
.setPropsId(cmd.getPropsId())
|
||||||
.setType(cmd.getType())
|
.setType(cmd.getType())
|
||||||
.setExpireTime(timestamp)
|
.setExpireTime(timestamp)
|
||||||
.setUseProps(cmd.getUseProps())
|
.setUseProps(useProps)
|
||||||
.setAllowGive(cmd.getAllowGive())
|
.setAllowGive(cmd.getAllowGive())
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -125,6 +127,13 @@ public class PropsBackpackClientServiceImpl implements PropsBackpackClientServic
|
|||||||
userProfileGateway.removeCacheAll(cmd.getAcceptUserId());
|
userProfileGateway.removeCacheAll(cmd.getAcceptUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Boolean getUseProps(GivePropsBackpackCmd cmd, PropsBackpack oldpropsBackpack) {
|
||||||
|
if (oldpropsBackpack == null) {
|
||||||
|
return cmd.getUseProps();
|
||||||
|
}
|
||||||
|
return oldpropsBackpack.getPropsId().equals(cmd.getPropsId()) ? oldpropsBackpack.getUseProps() : cmd.getUseProps();
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static Timestamp getTimestamp(GivePropsBackpackCmd cmd, PropsBackpack oldpropsBackpack) {
|
private static Timestamp getTimestamp(GivePropsBackpackCmd cmd, PropsBackpack oldpropsBackpack) {
|
||||||
Timestamp timestamp = null;
|
Timestamp timestamp = null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user