/** * 列表(分页) * * @param page * @param searchBean :过滤条件 buyTime 购买时间(搜索所有指定时间当天购买的数据) startSearchTime 开始搜索时间(搜索所有指定时间后购买的数据) * endSearchTime 结束搜索时间(搜索所有指定时间前购买的数据) refrenceId 资料编号 dealerName 经销商名称(模糊) serviceId 服务编号 * servicerCate 服务类别 * @return * @author 周光暖 */ @Override public PaginateResult<DealerBuyService> searchByClient( Pagination page, DealerBuyService searchBean) { searchBean.setPage(page); return new PaginateResult<>( searchBean.getPage(), dealerBuyServiceMapper.searchByClient(searchBean)); }
@Override public PaginateResult<DealerShopEnv> getDealerShopEnvsBy( DealerShopEnv dealerShopEnv, Pagination pagination) { dealerShopEnv.setPage(pagination); List<DealerShopEnv> resultList = dealerShopEnvMapper.selectDealerShopEnvsBy(dealerShopEnv); for (DealerShopEnv _dealerShopEnv : resultList) { // 查询相应的服务 DealerBuyService dbs = dealerBuyServiceMapper.findBy( _dealerShopEnv.getDealerId(), CommonConstant.WebServiceItems.SERVICE_SYSTEM_PLATFORM); if (dbs != null) { _dealerShopEnv.setPayedUser( dbs.getEndTime() != null && dbs.getEndTime() > com.zttx.web.utils.CalendarUtils.getCurrentLong()); } _dealerShopEnv.setDealerImages( dealerImageMapper.selectDealerImagesByDealerId(_dealerShopEnv.getDealerId())); if (null != OnLineUserUtils.getPrincipal()) { _dealerShopEnv.setUserType(OnLineUserUtils.getPrincipal().getUserType()); if (OnLineUserUtils.getPrincipal().getUserType().shortValue() == UserInfoConst.USER_TYPE_BRAND.shortValue()) { _dealerShopEnv.setCollectedState( brandFavoriteService.isCollected( OnLineUserUtils.getPrincipal().getRefrenceId(), _dealerShopEnv.getDealerId())); } } } return new PaginateResult<>(pagination, resultList); }
@Override public List<DealerShopEnv> getTopNewestDealerShopEnvs(int topn) { List<DealerShopEnv> list = dealerShopEnvMapper.selectTopNewestDealerShopEnvs(topn); for (DealerShopEnv _dealerShopEnv : list) { // 查询相应的服务 DealerBuyService dbs = dealerBuyServiceMapper.findBy( _dealerShopEnv.getDealerId(), CommonConstant.WebServiceItems.SERVICE_SYSTEM_PLATFORM); if (dbs != null) { _dealerShopEnv.setPayedUser( dbs.getEndTime() != null && dbs.getEndTime() > com.zttx.web.utils.CalendarUtils.getCurrentLong()); } _dealerShopEnv.setDealerImages( dealerImageMapper.selectDealerImagesByDealerId(_dealerShopEnv.getDealerId())); } return list; }
@Override public PaginateResult<DealerShopEnv> getExcludeDealerShopEnvsBy( int currAreaNo, Pagination pagination) { List<DealerShopEnv> result = dealerShopEnvMapper.selectExcludeDealerShopEnvsBy(currAreaNo, pagination); for (DealerShopEnv _dealerShopEnv : result) { // 查询相应的服务 DealerBuyService dbs = dealerBuyServiceMapper.findBy( _dealerShopEnv.getDealerId(), CommonConstant.WebServiceItems.SERVICE_SYSTEM_PLATFORM); if (dbs != null) { _dealerShopEnv.setPayedUser( dbs.getEndTime() != null && dbs.getEndTime() > com.zttx.web.utils.CalendarUtils.getCurrentLong()); } _dealerShopEnv.setDealerImages( dealerImageMapper.selectDealerImagesByDealerId(_dealerShopEnv.getDealerId())); } return new PaginateResult<>(pagination, result); }