修复判断条件是否完成

This commit is contained in:
liaozetao
2023-10-25 16:56:06 +08:00
parent 065e8b5c8a
commit 9592a01d5a
4 changed files with 4 additions and 4 deletions

View File

@@ -232,7 +232,7 @@ public class RedEnvelopeService extends ServiceImpl<RedEnvelopeMapper, RedEnvelo
InRoomRedEnvelopeStrategy redEnvelopeStrategy = (InRoomRedEnvelopeStrategy) RedEnvelopeFactory.INSTANCE.getInstance(kind);
RedEnvelopeContext context = new RedEnvelopeContext();
context.setRoomUid(v.getRoomUid());
context.setUid(v.getUserId());
context.setUid(uid);
context.setRedEnvelopeId(v.getId());
assert redEnvelopeStrategy != null;
response.setFinish(redEnvelopeStrategy.isFinish(context));

View File

@@ -37,7 +37,7 @@ class BarrageRedEnvelopeStrategy : InRoomRedEnvelopeStrategy() {
override fun beforeOpen(context: RedEnvelopeContext) {
if (!isFinish(context)) {
throw ApiException("未滿足彈幕條件,不允許開紅包!")
throw ApiException("未滿足彈幕條件,無法開紅包!")
}
}

View File

@@ -19,7 +19,7 @@ class FollowRedEnvelopeStrategy : InRoomRedEnvelopeStrategy() {
override fun beforeOpen(context: RedEnvelopeContext) {
if (!isFinish(context)) {
throw ApiException("未滿足關注條件,不允許開紅包!")
throw ApiException("未滿足關注條件,無法開紅包!")
}
}

View File

@@ -33,7 +33,7 @@ class ShareRedEnvelopeStrategy : InRoomRedEnvelopeStrategy() {
override fun beforeOpen(context: RedEnvelopeContext) {
if (!isFinish(context)) {
throw ApiException("未滿足分享條件,不允許開紅包!")
throw ApiException("未滿足分享條件,無法開紅包!")
}
}