记得上下班打卡 | git大法好,push需谨慎

Commit c877b74e authored by 张国柄's avatar 张国柄

调整list遍历方式;

parent 8d29d834
......@@ -158,7 +158,7 @@ public class CandyCouponCodeAdminController extends BaseController {
List<CandyUserCouponBasicDto> vos = (List<CandyUserCouponBasicDto>) redisUtil.get(uckey);
if (!CollectionUtils.isEmpty(vos)) {
CandyUserCouponBasicDto userCouponBasicDto = vos.parallelStream().filter(v -> v.getCouponId().equals(couponId)).findAny().orElse(null);
CandyUserCouponBasicDto userCouponBasicDto = vos.stream().filter(v -> v.getCouponId().equals(couponId)).findAny().orElse(null);
if (null != userCouponBasicDto && userCouponBasicDto.getState() == 1) {
String cckey = CandyRedisConst.BASIC_COUPON_CODE.concat(r.getCcode());
......
......@@ -103,7 +103,7 @@ public class AdamRscController {
}
try {
List<String> uidList = req.getUidList();
uidList.parallelStream().forEach(r -> {
uidList.forEach(r -> {
AdamUserInfoVo userInfoVo = adamRdmService.getUserInfoVoByUid(r);
if (null != userInfoVo) {
list.add(AdamChimeUinfoDto.getNew().copy(userInfoVo));
......
......@@ -612,7 +612,7 @@ public class AdamMemberOrderServiceImpl implements IAdamMemberOrderService {
if (!CollectionUtils.isEmpty(memberRightsCouponVoList)) {
// 该权益下关联券统计
Map<String, Long> rightsCouponCtMap = memberRightsCouponVoList.parallelStream()
Map<String, Long> rightsCouponCtMap = memberRightsCouponVoList.stream()
.collect(Collectors.groupingBy(AdamMemberRightsCouponVo::getCouponId, Collectors.counting()));
rightsCouponCtMap.forEach((couponId, num) -> {
......
......@@ -95,7 +95,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
}
List<CandyUserCouponBasicDto> dtoList = redisDataUtils.getCouponByUid(uid, userCreateTime);
if (!CollectionUtil.isEmpty(dtoList)) {
Map<String, Long> mCouponCountMap = dtoList.parallelStream()
Map<String, Long> mCouponCountMap = dtoList.stream()
.filter(r -> (r.getExclusive() == 1 && r.getState() == 1))
.collect(Collectors.groupingBy(CandyUserCouponBasicDto::getMcouponId, Collectors.counting()));
......
......@@ -82,7 +82,7 @@ public class ChimeUserBiz {
}
List<ChimeUserTagsMappingVo> userTagList = new ArrayList<>();
//设置用户id
userTagVoList.parallelStream().forEach(vo -> {
userTagVoList.forEach(vo -> {
ChimeUserTagsMappingVo userTagsMappingVo = ChimeUserTagsMappingVo.getNew();
userTagsMappingVo.setTagCode(vo.getVal());
userTagsMappingVo.setTagDesc(vo.getDesc());
......@@ -111,7 +111,7 @@ public class ChimeUserBiz {
// }
// }
// //设置用户id
// userTagVoList.parallelStream().forEach(vo -> {
// userTagVoList.forEach(vo -> {
// ChimeUserTagDto userTagDto = ChimeUserTagDto.getNew();
// userTagDto.setTagCode(vo.getVal());
// userTagDto.setTagDesc(vo.getDesc());
......
......@@ -242,7 +242,7 @@ public class TestDataUtils {
// reqDto.setTags("tags40,tags80");
NewPageResult<ChimeUserInfoDto> pageInfo = chimePerformanceService.getUserListByCon(reqDto);
log.info("总共获取总数pagecount:{}",pageInfo.getList().size());
pageInfo.getList().parallelStream().forEach(dto -> {
pageInfo.getList().forEach(dto -> {
// System.out.println(dto.getUserId());
// System.out.println(JsonUtils.toJson(dto.getUserTags()));
});
......
......@@ -74,15 +74,15 @@ public class PlatformCandyUserCouponService extends ServiceImpl<CandyUserCouponM
List<CandyUserCouponBasicDto> basicDtoList = candyUserCouponMapper.selectMultiForUserCouponBasicDto(uid);
if (!CollectionUtils.isEmpty(basicDtoList)) {
List<String> couponIdList = basicDtoList.parallelStream().map(CandyUserCouponBasicDto::getCouponId).collect(Collectors.toList());
List<String> couponIdList = basicDtoList.stream().map(CandyUserCouponBasicDto::getCouponId).collect(Collectors.toList());
List<CandyCouponRuleDto> couponRuleDtoList = candyCouponRuleMapper.selectListForCouponRuleDto(couponIdList);
Map<String, List<CandyCouponRuleDto>> couponRuleDtoListMap = couponRuleDtoList.parallelStream().collect(Collectors.groupingBy(CandyCouponRuleDto::getCouponId));
Map<String, List<CandyCouponRuleDto>> couponRuleDtoListMap = couponRuleDtoList.stream().collect(Collectors.groupingBy(CandyCouponRuleDto::getCouponId));
// Map<String, List<CandyUserCouponBasicDto>> basicDtoListMap = basicDtoList.parallelStream().collect(Collectors.groupingBy(CandyUserCouponBasicDto::getCouponId));
// Map<String, List<CandyUserCouponBasicDto>> basicDtoListMap = basicDtoList.stream().collect(Collectors.groupingBy(CandyUserCouponBasicDto::getCouponId));
basicDtoList.parallelStream().forEach(dto -> {
basicDtoList.forEach(dto -> {
dto.setUseRules(couponRuleDtoListMap.get(dto.getCouponId()));
});
......@@ -94,13 +94,13 @@ public class PlatformCandyUserCouponService extends ServiceImpl<CandyUserCouponM
public List<CandyCommonCouponBasicDto> ccouponBasicDtoByUidProcessing(LocalDateTime ucreatedAt) {
List<CandyCommonCouponBasicDto> basicDtoList = candyCommonCouponMapper.selectMultiForCommonCouponBasicDto(ucreatedAt);
if (!CollectionUtils.isEmpty(basicDtoList)) {
List<String> couponIdList = basicDtoList.parallelStream().map(CandyCommonCouponBasicDto::getCouponId).collect(Collectors.toList());
List<String> couponIdList = basicDtoList.stream().map(CandyCommonCouponBasicDto::getCouponId).collect(Collectors.toList());
List<CandyCouponRuleDto> couponRuleDtoList = candyCouponRuleMapper.selectListForCouponRuleDto(couponIdList);
Map<String, List<CandyCouponRuleDto>> couponRuleDtoListMap = couponRuleDtoList.parallelStream().collect(Collectors.groupingBy(CandyCouponRuleDto::getCouponId));
Map<String, List<CandyCouponRuleDto>> couponRuleDtoListMap = couponRuleDtoList.stream().collect(Collectors.groupingBy(CandyCouponRuleDto::getCouponId));
basicDtoList.parallelStream().forEach(dto -> {
basicDtoList.forEach(dto -> {
dto.setUseRules(couponRuleDtoListMap.get(dto.getCouponId()));
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment