|
@@ -9,6 +9,7 @@ import com.seamew.lottery.domain.activity.service.partake.BaseActivityPartake;
|
|
|
import com.seamew.lottery.domain.support.ids.IIdGenerator;
|
|
|
import com.seamew.middleware.db.router.strategy.IDBRouterStrategy;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.springframework.dao.DuplicateKeyException;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.support.TransactionTemplate;
|
|
@@ -59,7 +60,7 @@ public class ActivityPartakeImpl extends BaseActivityPartake {
|
|
|
}
|
|
|
|
|
|
// 校验:个人库存 - 个人活动剩余可领取次数
|
|
|
- if (bill.getUserTakeLeftCount() <= 0) {
|
|
|
+ if (ObjectUtils.isNotEmpty(bill.getUserTakeLeftCount()) && bill.getUserTakeLeftCount() <= 0) {
|
|
|
log.warn("个人领取次数非可用 userTakeLeftCount:{}", bill.getUserTakeLeftCount());
|
|
|
return Result.buildResult(Constants.ResponseCode.UN_ERROR, "个人领取次数非可用");
|
|
|
}
|