|
|
@@ -91,17 +91,23 @@ public class PriceListController extends BaseController {
|
|
|
}).collect(Collectors.toList());
|
|
|
}
|
|
|
@GetMapping("/priceListVo")
|
|
|
- @Cacheable("priceList")
|
|
|
+ @Cacheable("priceListVo")
|
|
|
public Result<PriceListVo> priceList() {
|
|
|
ArrayList<PriceListVo> list = new ArrayList<>();
|
|
|
List<PriceList> priceLists = priceListRepo.findAll();
|
|
|
for (PriceList priceList : priceLists) {
|
|
|
- list.add(new PriceListVo().builder()
|
|
|
+ PriceListVo priceListVo = new PriceListVo().builder()
|
|
|
.name(priceList.getName())
|
|
|
.img(priceList.getPic())
|
|
|
- .price(collectionRepo.lowestPrices(priceList.getSearch()))
|
|
|
+ .price(priceList.getPrice())
|
|
|
.origin_price(collectionRepo.lowestOriginPrice(priceList.getSearch()))
|
|
|
- .build());
|
|
|
+ .build();
|
|
|
+ if (StringUtils.isNotEmpty(priceList.getColumnA())) {
|
|
|
+ if (Double.parseDouble(priceList.getColumnA()) != 0) {
|
|
|
+ priceListVo.setPrice(priceList.getColumnA());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ list.add(priceListVo);
|
|
|
}
|
|
|
return Result.OK().success(list);
|
|
|
}
|