| | |
| | | @ApiImplicitParam(value = "位置(1=首页,2=首页底部,3=线上课得积分,4=看视频得奖励,5=常见问题)", name = "position", dataType = "int", required = true), |
| | | }) |
| | | public ResultUtil<List<BannerVo>> queryBannerList(Integer position) { |
| | | // try { |
| | | // List<Banner> list = bannerService.list(new QueryWrapper<Banner>().eq("position", position).eq("state", 1).orderByAsc("sort")); |
| | | |
| | | // if (position == 4) { |
| | | List<BannerVo> list2 = bannerService.list1(position); |
| | | return ResultUtil.success(list2); |
| | | // } |
| | | |
| | | // List<BannerVo> list1 = new ArrayList<>(); |
| | | // for (Banner banner : list) { |
| | | // BannerVo bannerVo = new BannerVo(); |
| | | // BeanUtils.copyProperties(banner, bannerVo); |
| | | // list1.add(bannerVo); |
| | | // } |
| | | // return ResultUtil.success(list1); |
| | | // }catch (Exception e){ |
| | | // e.printStackTrace(); |
| | | // return ResultUtil.runErr(); |
| | | // } |
| | | } |
| | | |
| | | |