| | |
| | | import cn.lili.common.utils.StringUtils; |
| | | import cn.lili.modules.lmk.domain.entity.KitchenTag; |
| | | import cn.lili.modules.lmk.domain.vo.AdImgVO; |
| | | import cn.lili.modules.lmk.domain.vo.KitchenGoodsQuery; |
| | | import cn.lili.modules.lmk.enums.general.StoreCouponStausEnum; |
| | | import cn.lili.utils.COSUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Result getKitchenGoods(String id) { |
| | | if (StringUtils.isBlank(id)) { |
| | | return Result.ok().data(new ArrayList<>()); |
| | | public Result getKitchenGoods(KitchenGoodsQuery query) { |
| | | IPage<KitchenCustomizeVO> page = PageUtil.getPage(query, KitchenCustomizeVO.class); |
| | | baseMapper.getPageByGoodsQuery(page, query); |
| | | for (KitchenCustomizeVO record : page.getRecords()) { |
| | | if (StringUtils.isNotBlank(record.getThumbnail())&&!record.getThumbnail().contains("http")) { |
| | | record.setThumbnail(cosUtil.getPreviewUrl(record.getThumbnail())); |
| | | } |
| | | if (StringUtils.isNotBlank(record.getCoverImg())&&!record.getCoverImg().contains("http")) { |
| | | record.setCoverImg(cosUtil.getPreviewUrl(record.getCoverImg())); |
| | | } |
| | | } |
| | | // kitchenCustomizeMapper.getKitchenGoods(); |
| | | return null; |
| | | return Result.ok().total(page.getTotal()).data(page.getRecords()); |
| | | } |
| | | } |