|
|
|
@ -85,25 +85,26 @@ public class DfProductPosterController extends BaseController {
|
|
|
|
|
queryWrapper.last("ORDER BY CASE WHEN t.serial_number IS NULL THEN 1 ELSE 0 END, t.serial_number ASC");
|
|
|
|
|
}
|
|
|
|
|
if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
|
|
|
|
|
if ("-99".equals(dfProductPoster.getStatus())) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
List<Long> productIdsByBrokerId = dfBrokerService.getProductIdsByBrokerId();
|
|
|
|
|
List<DfProductPoster> list = dfProductPosterService.list(new LambdaQueryWrapper<DfProductPoster>()
|
|
|
|
|
.eq(DfProductPoster::getPosterType, "1"));
|
|
|
|
|
List<Long> productIds = list.stream()
|
|
|
|
|
.map(DfProductPoster::getProductId)
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
if (productIdsByBrokerId.size() == 0) {
|
|
|
|
|
productIdsByBrokerId.add(0L);
|
|
|
|
|
}
|
|
|
|
|
productIdsByBrokerId.addAll(productIds);
|
|
|
|
|
queryWrapper.nested(wrapper -> wrapper.in(DfProductPoster::getProductId, productIdsByBrokerId)
|
|
|
|
|
.or()
|
|
|
|
|
.isNull(DfProductPoster::getProductId));
|
|
|
|
|
SysUser byId = userService.getById(SecurityUtils.getUserId());
|
|
|
|
|
if ("jj".equals(byId.getUserType()) || "kh".equals(byId.getUserType())) {
|
|
|
|
|
queryWrapper.eq(DfProductPoster::getStatus,"1");
|
|
|
|
|
if (!sysUser.getDeptId().equals(-1L)) {
|
|
|
|
|
if ("-99".equals(dfProductPoster.getStatus())) {
|
|
|
|
|
} else {
|
|
|
|
|
List<Long> productIdsByBrokerId = dfBrokerService.getProductIdsByBrokerId();
|
|
|
|
|
List<DfProductPoster> list = dfProductPosterService.list(new LambdaQueryWrapper<DfProductPoster>()
|
|
|
|
|
.eq(DfProductPoster::getPosterType, "1"));
|
|
|
|
|
List<Long> productIds = list.stream()
|
|
|
|
|
.map(DfProductPoster::getProductId)
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
if (productIdsByBrokerId.size() == 0) {
|
|
|
|
|
productIdsByBrokerId.add(0L);
|
|
|
|
|
}
|
|
|
|
|
productIdsByBrokerId.addAll(productIds);
|
|
|
|
|
queryWrapper.nested(wrapper -> wrapper.in(DfProductPoster::getProductId, productIdsByBrokerId)
|
|
|
|
|
.or()
|
|
|
|
|
.isNull(DfProductPoster::getProductId));
|
|
|
|
|
SysUser byId = userService.getById(SecurityUtils.getUserId());
|
|
|
|
|
if ("jj".equals(byId.getUserType()) || "kh".equals(byId.getUserType())) {
|
|
|
|
|
queryWrapper.eq(DfProductPoster::getStatus,"1");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|