| | |
| | | import com.yeshi.fanli.entity.bus.recommend.RecommendSection;
|
| | | import com.yeshi.fanli.entity.bus.recommend.RecommendSectionDetail;
|
| | | import com.yeshi.fanli.entity.bus.su.recommend.SuperRecommendSection;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | 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.RecommendSectionDetailService;
|
| | | import com.yeshi.fanli.service.inter.goods.RecommendSectionGoodsService;
|
| | | import com.yeshi.fanli.service.inter.goods.RecommendSectionService;
|
| | |
| | | private RecommendSectionGoodsService recommendSectionGoodsService;
|
| | |
|
| | | @Resource
|
| | | private SystemService systemService;
|
| | | private BusinessSystemService businessSystemService;
|
| | |
|
| | | @Resource
|
| | | private RecommendSectionDetailService recommendSectionDetailService;
|
| | |
| | | String platform,String packages, String key) {
|
| | | final int strat = index * Constant.PAGE_SIZE;
|
| | | platform = Utils.getMap().get(platform);
|
| | | com.yeshi.fanli.entity.system.System system = systemService.getSystem(platform, packages);
|
| | | com.yeshi.fanli.entity.system.BusinessSystem system = businessSystemService.getBusinessSystem(platform, packages);
|
| | | List<RecommendSection> recommendSectionList=null;
|
| | | List<SuperRecommendSection> superRecommendSectionList=null;
|
| | | Map<Long,RecommendSectionAdmin> recommendSectionAdminMap=new HashMap<Long, RecommendSectionAdmin>();
|
| | |
| | | rsIdList.add(rs.getId());
|
| | | }
|
| | | superRecommendSectionList = superRecommendSectionService.getSuperRecommendSectionsBySections(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 (SuperRecommendSection srs : superRecommendSectionList) {
|
| | | rsId = srs.getRecommendSection().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 RecommendSectionAdmin();
|
| | | }
|
| | | 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) recommendSectionDao.excute(new HibernateCallback<Integer>() {
|
| | |
|
| | | public Integer doInHibernate(Session session)
|