| | |
| | | wrapper.lambda().eq(Brand::getType,Constants.ONE); |
| | | }else { |
| | | wrapper.lambda().and(i->i.eq(Brand::getCompanyId,user.getCompanyId()) |
| | | .or().eq(Brand::getType,Constants.ZERO) |
| | | .or().eq(Brand::getType,Constants.ONE) |
| | | ); |
| | | } |
| | | List<Brand> list = brandMapper.selectList(wrapper); |
| | |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.lambda().eq(Brand::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | if (pageWrap.getModel().getType() != null) { |
| | | queryWrapper.lambda().eq(Brand::getType, pageWrap.getModel().getType()); |
| | | } |
| | | // 类型 0企业 1平台 |
| | | if (Objects.isNull(user.getCompanyId())) { |
| | | queryWrapper.lambda().eq(Brand::getType,Constants.ONE); |
| | | }else { |
| | | queryWrapper.lambda().and(i->i.eq(Brand::getCompanyId,user.getCompanyId()) |
| | | .or().eq(Brand::getType,Constants.ZERO) |
| | | .or().eq(Brand::getType,Constants.ONE) |
| | | ); |
| | | } |
| | | queryWrapper.lambda().orderByAsc(Brand::getType); |
| | | queryWrapper.lambda().orderByAsc(Brand::getSortnum); |
| | | IPage<Brand> brandIPage = brandMapper.selectPage(page, queryWrapper); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() |