| | |
| | | import com.yeshi.fanli.entity.admin.RecommendBannerV2Admin;
|
| | | import com.yeshi.fanli.entity.bus.recommend.RecommendBannerV2;
|
| | | import com.yeshi.fanli.entity.bus.su.recommend.SuperRecommendBannerV2;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.SystemService;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.service.inter.goods.RecommendBannerV2Service;
|
| | | import com.yeshi.fanli.service.inter.goods.SuperRecommendBannerV2Service;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | private SuperRecommendBannerV2Service superRecommendBannerV2Service;
|
| | |
|
| | | @Resource
|
| | | private SystemService systemService;
|
| | | private BusinessSystemService businessSystemService;
|
| | |
|
| | |
|
| | |
|
| | |
| | | public List<RecommendBannerV2Admin> getRecommendBanners(int pageIndex, String platform, String packages, String key) {
|
| | | final int strat = pageIndex * Constant.PAGE_SIZE;
|
| | | platform = Utils.getMap().get(platform);
|
| | | com.yeshi.fanli.entity.system.System system = systemService.getSystem(platform, packages);
|
| | | BusinessSystem system = businessSystemService.getBusinessSystem(platform, packages);
|
| | |
|
| | | List<RecommendBannerV2> recommendBannerList = null;
|
| | | List<SuperRecommendBannerV2> superRecommendBannerList = null;
|
| | |
| | | }
|
| | |
|
| | | superRecommendBannerList = superRecommendBannerV2Service.getSuperRecommendBannersByBanners(rsIdList);
|
| | | Map<Long, List<System>> superMap = new HashMap<Long, List<System>>();
|
| | | Map<Long, List<BusinessSystem>> superMap = new HashMap<Long, List<BusinessSystem>>();
|
| | | Long rsId = null;
|
| | | List<System> systemList = null;
|
| | | List<BusinessSystem> systemList = null;
|
| | |
|
| | | for (SuperRecommendBannerV2 srs : superRecommendBannerList) {
|
| | | rsId = srs.getRecommendBanner().getId();
|
| | | systemList = superMap.get(rsId);
|
| | | if (systemList == null) {
|
| | | systemList = new ArrayList<System>();
|
| | | systemList = new ArrayList<BusinessSystem>();
|
| | | }
|
| | | systemList.add(srs.getSystem());
|
| | | superMap.put(rsId, systemList);
|
| | |
| | | if (rsa == null) {
|
| | | rsa = new RecommendBannerV2Admin();
|
| | | }
|
| | | List<System> list = superMap.get(id);
|
| | | List<BusinessSystem> list = superMap.get(id);
|
| | | if (list != null) {
|
| | | rsa.getSystemList().addAll(superMap.get(id));
|
| | | }
|
| | |
| | |
|
| | | public int getCount(String platform, String packages, final String key) {
|
| | | platform = Utils.getMap().get(platform);
|
| | | final System system = systemService.getSystem(platform, packages);
|
| | | final BusinessSystem system = businessSystemService.getBusinessSystem(platform, packages);
|
| | | return (Integer) recommendBannerV2Dao.excute(new HibernateCallback<Integer>() {
|
| | |
|
| | | public Integer doInHibernate(Session session) throws HibernateException {
|