admin
2019-03-15 a8e45a802600ca1cde28fe8522a26635328bbd99
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/RecommendSectionServiceImpl.java
@@ -21,8 +21,8 @@
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;
@@ -46,7 +46,7 @@
   private RecommendSectionGoodsService recommendSectionGoodsService;
   @Resource
   private SystemService systemService;
   private BusinessSystemService businessSystemService;
   
   @Resource
   private RecommendSectionDetailService recommendSectionDetailService;
@@ -76,7 +76,7 @@
         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>();
@@ -110,14 +110,14 @@
            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);
@@ -129,7 +129,7 @@
            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));
            }
@@ -215,7 +215,7 @@
   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)