| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | // 去除最后一个字符 |
| | | stringBuilder.deleteCharAt(stringBuilder.length()-1); |
| | | } |
| | | if (list.isEmpty()) { |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | String string = stringBuilder.toString(); |
| | | List<Integer> data = orderClient.getSalesCountByGoodsId(string).getData(); |
| | | String res = string+"-"+dto.getType(); |
| | | |
| | | // goodsClient |
| | | // 远程调用cha'xun |
| | | List<Integer> data = orderClient.getSalesCountByGoodsId(res).getData(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | list.get(i).setSalesCount(data.get(i)); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |