feat(REQ-2106): 临时调试
This commit is contained in:
parent
8d3c11c613
commit
33c7d71225
@ -189,26 +189,26 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialDao, Material> impl
|
||||
* @return {@link LambdaQueryChainWrapper}
|
||||
*/
|
||||
private LambdaQueryChainWrapper<Material> buildListByBannerCodeQueryWrapper(ListMaterialByBannerCodeReq req) {
|
||||
// jobCodes必须搭配workspaceId是和ouId使用
|
||||
if (CollectionUtils.isEmpty(req.getWorkspaceIds()) && CollectionUtils.isEmpty(req.getOuIds())
|
||||
&& !CollectionUtils.isEmpty(req.getJobCodes())) {
|
||||
throw new ServiceException("请指定需要查询的项目部或单位");
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(req.getWorkspaceIds()) && !req.getWorkspaceIds().contains(0L)) {
|
||||
req.getWorkspaceIds().add(0L);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(req.getOuIds()) && !req.getOuIds().contains(0L)) {
|
||||
req.getOuIds().add(0L);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(req.getJobCodes()) && !req.getJobCodes().contains("0")) {
|
||||
req.getJobCodes().add("0");
|
||||
}
|
||||
// // jobCodes必须搭配workspaceId是和ouId使用
|
||||
// if (CollectionUtils.isEmpty(req.getWorkspaceIds()) && CollectionUtils.isEmpty(req.getOuIds())
|
||||
// && !CollectionUtils.isEmpty(req.getJobCodes())) {
|
||||
// throw new ServiceException("请指定需要查询的项目部或单位");
|
||||
// }
|
||||
// if (!CollectionUtils.isEmpty(req.getWorkspaceIds()) && !req.getWorkspaceIds().contains(0L)) {
|
||||
// req.getWorkspaceIds().add(0L);
|
||||
// }
|
||||
// if (!CollectionUtils.isEmpty(req.getOuIds()) && !req.getOuIds().contains(0L)) {
|
||||
// req.getOuIds().add(0L);
|
||||
// }
|
||||
// if (!CollectionUtils.isEmpty(req.getJobCodes()) && !req.getJobCodes().contains("0")) {
|
||||
// req.getJobCodes().add("0");
|
||||
// }
|
||||
LambdaQueryChainWrapper<Material> chainWrapper = lambdaQuery()
|
||||
.eq(Material::getBannerCode, req.getBannerCode())
|
||||
.in(Material::getWorkspaceIds, req.getWorkspaceIds())
|
||||
.in(Material::getOuIds, req.getOuIds())
|
||||
.in(Material::getJobCodes, req.getJobCodes())
|
||||
.eq(Objects.nonNull(req.getStatus()), Material::getStatus, req.getStatus())
|
||||
// .in(Material::getWorkspaceIds, req.getWorkspaceIds())
|
||||
// .in(Material::getOuIds, req.getOuIds())
|
||||
// .in(Material::getJobCodes, req.getJobCodes())
|
||||
// .eq(Objects.nonNull(req.getStatus()), Material::getStatus, req.getStatus())
|
||||
.orderByAsc(Material::getPriority)
|
||||
.orderByDesc(Material::getCreateAt);
|
||||
// 查询有效期内的素材
|
||||
|
||||
Loading…
Reference in New Issue
Block a user