| | |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | |
| | | shopId = sysUser.getObjectId(); |
| | | } |
| | | List<Long> appUserIds = new ArrayList<>(); |
| | | //搜索条件,用户姓名 |
| | | if(StringUtils.isNotEmpty(refundPassListVo.getUserName())){ |
| | | //搜索条件,用户姓名和电话 |
| | | if(StringUtils.isNotEmpty(refundPassListVo.getUserName()) || StringUtils.isNotEmpty(refundPassListVo.getPhone())){ |
| | | List<AppUser> data = appUserClient.getAppUserByName(refundPassListVo.getUserName()).getData(); |
| | | List<Long> collect = data.stream().map(AppUser::getId).collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | appUserIds.add(-1L); |
| | | } |
| | | appUserIds.addAll(collect); |
| | | } |
| | | //搜索条件,用户电话 |
| | | if(StringUtils.isNotEmpty(refundPassListVo.getPhone())){ |
| | | List<AppUser> data = appUserClient.getAppUserByPhone(refundPassListVo.getPhone()).getData(); |
| | | List<Long> collect = data.stream().map(AppUser::getId).collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | |
| | | List<AppUser> data2 = appUserClient.getAppUserByPhone(refundPassListVo.getPhone()).getData(); |
| | | List<Long> collect2 = data2.stream().map(AppUser::getId).collect(Collectors.toList()); |
| | | if (!CollectionUtils.isEmpty(data)){ |
| | | for (AppUser datum : data) { |
| | | for (AppUser appUser : data2) { |
| | | if (!datum.getId().equals(appUser.getId())){ |
| | | collect2.remove(appUser.getId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (collect2.isEmpty()){ |
| | | appUserIds.add(-1L); |
| | | } |
| | | appUserIds.addAll(collect); |
| | | appUserIds.addAll(collect2); |
| | | } |
| | | |
| | | PageInfo<OrderRefundPassList> pageInfo = new PageInfo(refundPassListVo.getPageCurr(), refundPassListVo.getPageSize()); |