package com.platform.service; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.platform.dao.EncodeInfoDao; import com.platform.entities.EncodedInfoEntity; /** * 业务逻辑的具体实现类 * * @author wuming * */ @Service("encodeInfoService") public class EncodeInfoServiceImpl implements EncodeInfoService { @Resource(name = "encodeInfoDao") private EncodeInfoDao eiDao; public void setEiDao(EncodeInfoDao eiDao) { this.eiDao = eiDao; } /** * 根据传递的tableName参数获取对应实体信息(行政区划/系统) */ @Override public List getAllEncodeInfo(String tableName) { return eiDao.getAllEntityInfo(tableName); } /** * 测试事物 */ @Override public int deleteEncodeByCode(String code, String tableName) { // TODO Auto-generated method stub int cursor = eiDao.deleteEncodeByCode(code, tableName); //cursor = cursor / 0; return cursor; } @Override public String getEncodeNameByCode(String code, String tableName) { return eiDao.getEncodeNameByCode(code, tableName); } }