| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | // 根据型号名称 查询型号列表ids |
| | | List<Integer> collect = modelService.lambdaQuery() |
| | | .eq(StringUtils.hasLength(getCurrentByParam.getModel()),TModel::getName, getCurrentByParam.getModel()) |
| | | .eq(getCurrentByParam.getMaterialId()!=null,TModel::getMaterialId,getCurrentByParam.getMaterialId()) |
| | | .eq(Objects.nonNull(getCurrentByParam.getMaterialId()),TModel::getMaterialId,getCurrentByParam.getMaterialId()) |
| | | .eq(StringUtils.hasLength(getCurrentByParam.getColor()),TModel::getColor,getCurrentByParam.getColor()) |
| | | .eq(getCurrentByParam.getBrandId()!=null,TModel::getBrandId,getCurrentByParam.getBrandId()) |
| | | .eq(Objects.nonNull(getCurrentByParam.getBrandId()),TModel::getBrandId,getCurrentByParam.getBrandId()) |
| | | .list().stream().map(TModel::getId).collect(Collectors.toList()); |
| | | TFrameGoods one = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect) |
| | | .eq(TFrameGoods::getColor, getCurrentByParam.getColor()).one(); |
| | | .eq(TFrameGoods::getColor, getCurrentByParam.getColor()) |
| | | .eq(TFrameGoods::getStoreId, getCurrentByParam.getStoreId()).one(); |
| | | if (one!=null){ |
| | | return ApiResult.success(one.getTotal()); |
| | | } |
| | |
| | | .eq(dto.getRefractiveIndex()!=null,TLensGoods::getRefractiveIndex, dto.getRefractiveIndex()) |
| | | .eq(dto.getBallMirror()!=null,TLensGoods::getBallMirror, dto.getBallMirror()) |
| | | .eq(dto.getColumnMirror()!=null,TLensGoods::getColumnMirror, dto.getColumnMirror()) |
| | | .eq(dto.getStoreId()!=null,TLensGoods::getStoreId, dto.getStoreId()) |
| | | .one(); |
| | | if (one!=null){ |
| | | return ApiResult.success(one.getTotal()); |