| | |
| | | import com.doumee.dao.business.BannerMapper; |
| | | import com.doumee.dao.business.LabelsMapper; |
| | | import com.doumee.dao.business.join.BannerJoinMapper; |
| | | import com.doumee.dao.business.model.Areas; |
| | | import com.doumee.dao.business.model.Banner; |
| | | import com.doumee.dao.business.model.Goods; |
| | | import com.doumee.dao.business.model.Labels; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.web.dto.ArticleDTO; |
| | | import com.doumee.dao.web.dto.BannerDTO; |
| | | import com.doumee.dao.web.dto.LabelsBannerDTO; |
| | |
| | | QueryWrapper<Banner> wrapper = new QueryWrapper<>(banner); |
| | | wrapper.lambda().orderByDesc(Banner::getSortnum); |
| | | List<Banner> banners = bannerMapper.selectList(wrapper); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(Constants.OSS, Constants.BANNER_FILE).getCode(); |
| | | List<BannerDTO> collect = banners.stream().map(s -> { |
| | | BannerDTO dto = new BannerDTO(); |
| | | BeanUtils.copyProperties(s, dto); |
| | | dto.setImgurl(path + s.getImgurl()); |
| | | if (Constants.equalsInteger(dto.getType(),Constants.ZERO)){ |
| | | dto.setContent(null); |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public void updateStatus(Banner coupon) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(coupon.getId()==null||coupon.getStatus()==null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), ResponseStatus.BAD_REQUEST.getMessage()); |
| | | } |
| | | coupon.setEditor(user.getId()); |
| | | coupon.setEditDate(new Date()); |
| | | bannerMapper.updateById(coupon); |
| | | } |
| | | @Override |
| | | public PageData<ShopSimpleDTO> findRecommendShopPage(PageWrap<Banner> pageWrap) { |
| | | IPage<Banner> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<Banner> queryWrapper = new QueryWrapper<>(); |