fix: 修复DesignerService编译错误,添加@Slf4j注解和BigDecimal比较
This commit is contained in:
parent
8367786f34
commit
16726b06c4
@ -11,6 +11,7 @@ import com.designhub.mapper.TaskItemMapper;
|
||||
import com.designhub.mapper.UserMapper;
|
||||
import com.designhub.vo.DesignerStatsVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -21,6 +22,7 @@ import java.util.stream.Collectors;
|
||||
* 设计师统计Service
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class DesignerService {
|
||||
|
||||
@ -250,8 +252,8 @@ public class DesignerService {
|
||||
// 优先使用 scoreReward(实际获得积分),如果没有则使用 score(任务积分)
|
||||
Integer mainTaskScore = completedTasks.stream()
|
||||
.mapToInt(task -> {
|
||||
if (task.getScoreReward() != null && task.getScoreReward() > 0) {
|
||||
return task.getScoreReward();
|
||||
if (task.getScoreReward() != null && task.getScoreReward().compareTo(java.math.BigDecimal.ZERO) > 0) {
|
||||
return task.getScoreReward().intValue();
|
||||
}
|
||||
return task.getScore() != null ? task.getScore() : 0;
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user