|
@@ -8,6 +8,7 @@ import com.seamew.lottery.domain.strategy.model.res.DrawResult;
|
|
|
import com.seamew.lottery.domain.strategy.model.vo.*;
|
|
|
import com.seamew.lottery.domain.strategy.service.algorithm.IDrawAlgorithm;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
@@ -94,7 +95,7 @@ public abstract class AbstractDrawBase extends DrawStrategySupport implements ID
|
|
|
* @return 中奖结果
|
|
|
*/
|
|
|
private DrawResult buildDrawResult(String uId, Long strategyId, DrawAlgorithmResult drawAlgorithmResult, StrategyBriefVO strategy) {
|
|
|
- if ("-1".equals(drawAlgorithmResult.getAwardId())) {
|
|
|
+ if (ObjectUtils.isEmpty(drawAlgorithmResult) || "-1".equals(drawAlgorithmResult.getAwardId())) {
|
|
|
log.info("执行策略抽奖完成【未中奖】,用户:{} 策略ID:{}", uId, strategyId);
|
|
|
return new DrawResult(uId, strategyId, Constants.DrawState.FAIL.getCode());
|
|
|
}
|