| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | public List<ProductModel> selectModelList(ProductDto productDto) { |
| | | LambdaQueryWrapper<ProductModel> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(ProductModel::getProductId, productDto.getId()); |
| | | queryWrapper.eq(productDto.getCreateUser() != null, ProductModel::getCreateUser, productDto.getCreateUser()); |
| | | queryWrapper.eq(productDto.getDeptId() != null, ProductModel::getDeptId, productDto.getDeptId()); |
| | | queryWrapper.in(productDto.getDeptIds() != null && productDto.getDeptIds().length > 0, ProductModel::getDeptId, Arrays.asList(productDto.getDeptIds())); |
| | | return productModelMapper.selectList(queryWrapper); |
| | | } |
| | | |