| | |
| | | import com.yeshi.fanli.entity.admin.HotSearchAdmin;
|
| | | import com.yeshi.fanli.entity.bus.search.HotSearch;
|
| | | import com.yeshi.fanli.entity.bus.su.search.SuperHotSearch;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.service.inter.config.HotSearchService;
|
| | | import com.yeshi.fanli.service.inter.config.SuperHotSearchService;
|
| | | import com.yeshi.fanli.service.inter.config.SystemService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.Utils;
|
| | |
| | | private HotSearchDao hotSearchDao;
|
| | |
|
| | | @Resource
|
| | | private SystemService systemService;
|
| | | private BusinessSystemService businessSystemService;
|
| | |
|
| | | @Resource
|
| | | private SuperHotSearchService superHotSearchService;
|
| | |
| | | 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);
|
| | | BusinessSystem system = businessSystemService.getBusinessSystem(platform, packages);
|
| | | List<HotSearch> hotSearchList=null;
|
| | | List<SuperHotSearch> superHotSearchList=null;
|
| | | Map<Long,HotSearchAdmin> hotSearchAdminMap=new HashMap<Long, HotSearchAdmin>();
|
| | |
| | | hsIdList.add(rs.getId());
|
| | | }
|
| | | superHotSearchList = superHotSearchService.getSuperHotSearchsByHotSearchs(hsIdList);
|
| | | 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 (SuperHotSearch srs : superHotSearchList) {
|
| | | rsId = srs.getHotSearch().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 HotSearchAdmin();
|
| | | }
|
| | | 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) hotSearchDao.excute(new HibernateCallback<Integer>() {
|
| | |
|
| | | public Integer doInHibernate(Session session)
|
| | |
| | | }
|
| | |
|
| | |
|
| | | List<System> systemList = systemService.getSystems();
|
| | | List<BusinessSystem> systemList = businessSystemService.getBusinessSystems();
|
| | |
|
| | | List<SuperHotSearch> listSuper = superHotSearchService.listSuperHotSearch(listId);
|
| | |
|
| | |
| | | } else {
|
| | | for (HotSearch hotSearch : listObj) {
|
| | | Long id = hotSearch.getId();
|
| | | List<System> newList = new ArrayList<System>();
|
| | | List<BusinessSystem> newList = new ArrayList<BusinessSystem>();
|
| | |
|
| | | // 是否有关联系统选项
|
| | | for (System dsystem : systemList) {
|
| | | System newsystem = new System();
|
| | | for (BusinessSystem dsystem : systemList) {
|
| | | BusinessSystem newsystem = new BusinessSystem();
|
| | |
|
| | | try {
|
| | | PropertyUtils.copyProperties(newsystem, dsystem);
|
| | |
| | |
|
| | | for (SuperHotSearch superHotSearch : listSuper) {
|
| | | HotSearch search = superHotSearch.getHotSearch();
|
| | | System system = superHotSearch.getSystem();
|
| | | BusinessSystem system = superHotSearch.getSystem();
|
| | |
|
| | | // 当前专题 、当前系统
|
| | | if (search != null && system != null && id == search.getId() && superSystemId == system.getId()) {
|