|
|
|
@ -209,4 +209,11 @@ public class DiscussServiceImpl implements DiscussService {
|
|
|
|
|
return R.success(returnList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public R<Integer> cumulativeQuantity(Long taskId){ |
|
|
|
|
List<DiscussDO> discussDOList = discussMapper.selectList(DiscussDO::getTaskId, taskId); |
|
|
|
|
if (ObjectUtil.isEmpty(discussDOList)){ |
|
|
|
|
return R.success(0); |
|
|
|
|
} |
|
|
|
|
return R.success(discussDOList.stream().mapToInt(DiscussDO::getCropNum).sum()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|