|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | BaseCategory baseCategory1 = baseCategoryMapper.selectOne(wrapper); | 
|---|
|  |  |  | if (Objects.nonNull(baseCategory1)){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"品类信息表"); | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(),"品类信息已存在"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | BaseCategory baseCategory2 = new BaseCategory(); | 
|---|
|  |  |  | baseCategory2.setCreator(loginUserInfo.getId()); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<BaseCategory> findList(BaseCategory baseCategory) { | 
|---|
|  |  |  | baseCategory.setIsdeleted(Constants.ZERO); | 
|---|
|  |  |  | QueryWrapper<BaseCategory> wrapper = new QueryWrapper<>(baseCategory); | 
|---|
|  |  |  | wrapper.eq("ISDELETED",Constants.ZERO); | 
|---|
|  |  |  | wrapper.eq("STATUS",Constants.ZERO); | 
|---|
|  |  |  | List<BaseCategory> list = baseCategoryMapper.selectList(wrapper); | 
|---|
|  |  |  | list.forEach(i->{ | 
|---|
|  |  |  | if(StringUtils.isNotBlank(i.getImgurl())){ | 
|---|
|  |  |  | 
|---|
|  |  |  | queryWrapper.lambda().orderByAsc(BaseCategory::getSortnum); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | IPage<BaseCategory> baseCategoryIPage = baseCategoryMapper.selectPage(page, queryWrapper); | 
|---|
|  |  |  | String preUrl = getPreUrl(); | 
|---|
|  |  |  | if (!CollectionUtils.isEmpty(baseCategoryIPage.getRecords())){ | 
|---|
|  |  |  | baseCategoryIPage.getRecords().forEach(s->s.setImgfullurl(getPreUrl()+s.getImgurl())); | 
|---|
|  |  |  | baseCategoryIPage.getRecords().forEach(s->s.setImgfullurl(preUrl+s.getImgurl())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return PageData.from(baseCategoryIPage); | 
|---|