package com.cab.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cab.dao.CabBannerMapper;
import com.cab.model.CabBanner;
import com.cku.core.BaseDAOMapper;
import com.cku.core.BaseService;
import com.cku.core.ExecResultModel;

@Service("cabBannerSerivce")
public class CabBannerServiceImpl  extends BaseService<CabBanner>{
	@Autowired
	public CabBannerMapper cabBannerMapper;
	@Override
	protected BaseDAOMapper<CabBanner> getDAO() {
		return this.cabBannerMapper;
	}
	public String getAll(){
		ExecResultModel<CabBanner> resultModel = new ExecResultModel<CabBanner>();
		List<CabBanner> list = cabBannerMapper.getAll();
		resultModel.setItems(list);
		resultModel.setTotal((long) list.size());
		resultModel.setRc(0);
		return resultModel.getToJson();
	}

}
