package com.fh.service.system.createcode.impl; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.fh.dao.DaoSupport; import com.fh.entity.Page; import com.fh.service.system.createcode.CreateCodeManager; import com.fh.util.PageData; @Service("createcodeService") public class CreateCodeService implements CreateCodeManager{ @Resource(name = "daoSupport") private DaoSupport dao; /**新增 * @param pd * @throws Exception */ public void save(PageData pd)throws Exception{ dao.save("CreateCodeMapper.save", pd); } /**删除 * @param pd * @throws Exception */ public void delete(PageData pd)throws Exception{ dao.delete("CreateCodeMapper.delete", pd); } /**列表 * @param page * @throws Exception */ @SuppressWarnings("unchecked") public List list(Page page)throws Exception{ return (List)dao.findForList("CreateCodeMapper.datalistPage", page); } /**通过id获取数据 * @param pd * @throws Exception */ public PageData findById(PageData pd)throws Exception{ return (PageData)dao.findForObject("CreateCodeMapper.findById", pd); } /**批量删除 * @param ArrayDATA_IDS * @throws Exception */ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ dao.delete("CreateCodeMapper.deleteAll", ArrayDATA_IDS); } /**列表(主表) * @param page * @throws Exception */ @SuppressWarnings("unchecked") public List listFa() throws Exception { return (List)dao.findForList("CreateCodeMapper.listFa", ""); } }