| | |
| | | import com.yeshi.fanli.entity.admin.HongBaoActivityAdmin;
|
| | | import com.yeshi.fanli.entity.bus.su.hongbao.SuperHongBaoActivity;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoActivity;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.exception.NotExistObjectException;
|
| | | import com.yeshi.fanli.service.inter.config.SystemService;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoActivityService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.SuperHongBaoActivityService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | private HongBaoActivityDao hongBaoActivityDao;
|
| | |
|
| | | @Resource
|
| | | private SystemService systemService;
|
| | | private BusinessSystemService businessSystemService;
|
| | |
|
| | | @Resource
|
| | | private SuperHongBaoActivityService superHongBaoActivityService;
|
| | |
| | | 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<HongBaoActivity> hongBaoActivityList=null;
|
| | | List<SuperHongBaoActivity> superHongBaoActivityList=null;
|
| | | Map<Long,HongBaoActivityAdmin> HongBaoActivityAdminMap=new HashMap<Long, HongBaoActivityAdmin>();
|
| | |
| | | hbaIdList.add(rs.getId());
|
| | | }
|
| | | superHongBaoActivityList = superHongBaoActivityService.getSuperHongBaoActivitysByHongBaoActivitys(hbaIdList);
|
| | | 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 (SuperHongBaoActivity srs : superHongBaoActivityList) {
|
| | | rsId = srs.getHongBaoActivity().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 HongBaoActivityAdmin();
|
| | | }
|
| | | 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, String key) {
|
| | | platform = Utils.getMap().get(platform);
|
| | | final System system = systemService.getSystem(platform, packages);
|
| | | final BusinessSystem system = businessSystemService.getBusinessSystem(platform, packages);
|
| | | Long lcount;
|
| | | if(system==null){
|
| | | lcount = hongBaoActivityDao.getCount("select count(*) from HongBaoActivity h where h.name like ?",new Serializable[] {"%"+key+"%"});
|