From 352c7227fc3c3be1a4465bb57cefd5462240aea9 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期三, 21 八月 2019 10:45:21 +0800 Subject: [PATCH] 金币任务签到 --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java index 57dbc70..3d49615 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java @@ -106,6 +106,10 @@ if (rokenRecord == null) throw new TokenRecordException(1, "鍙d护涓嶅瓨鍦�"); + Long uidToken = rokenRecord.getUid(); + if (uid != null && uidToken != null && uid.longValue() == uidToken.longValue()) + throw new TokenRecordException(1, "涓嶈兘鑷繁璧犻�佺粰鑷繁"); + Date now = new Date(); Date endTimeToken = rokenRecord.getEndTime(); Integer stateTtoken = rokenRecord.getState(); @@ -274,7 +278,11 @@ TokenRecord rokenRecord = tokenRecordMapper.getByToken(token); if (rokenRecord == null) throw new TokenRecordException(1, "鍙d护宸插け鏁�"); - + + Long uidToken = rokenRecord.getUid(); + if (uidToken != null && uid.longValue() == uidToken.longValue()) + throw new TokenRecordException(1, "涓嶈兘鑷繁璧犻�佺粰鑷繁"); + Date now = new Date(); Date endTimeToken = rokenRecord.getEndTime(); if (endTimeToken != null && endTimeToken.getTime() < now.getTime()) -- Gitblit v1.8.0