All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ajaxjs.cms.AdsService Maven / Gradle / Ivy

The newest version!
package com.ajaxjs.cms;

import java.util.List;

import com.ajaxjs.cms.app.catelog.Catelogable;
import com.ajaxjs.config.ConfigService;
import com.ajaxjs.framework.BaseService;
import com.ajaxjs.framework.PageResult;
import com.ajaxjs.framework.Repository;
import com.ajaxjs.ioc.Bean;

@Bean("AdsService")
public class AdsService extends BaseService implements Catelogable {
	public AdsDao dao = new Repository().bind(AdsDao.class);

	{
		setUiName("广告");
		setShortName("ads");
		setDao(dao);
	}

	@Override
	public Ads findById(Long id) {
		return dao.findById_cover(id);
	}
	@Override
	public PageResult findPagedListByCatelogId(int catelogId, int start, int limit) {
		if (catelogId == 0)
			catelogId = getDomainCatelogId();
		return dao.findPagedListByCatelogId_Cover(catelogId, start, limit);
	}

	@Override
	public int getDomainCatelogId() {
		return ConfigService.getValueAsInt("data.adsCatalog_Id");
	}

	@Override
	public List findListByCatelogId(int catelogId) {
		return dao.findListByCatelog_Cover(catelogId);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy