/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.sysnumberclass.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.common.service.TreeService;
import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.modules.sysnumberclass.entity.SysNumberClass;
import com.jeeplus.modules.sysnumberclass.dao.SysNumberClassDao;

/**
 * 编码管理Service
 * @author 丁旭
 * @version 2017-03-22
 */
@Service
@Transactional(readOnly = true)
public class SysNumberClassService extends TreeService<SysNumberClassDao, SysNumberClass> {

	public SysNumberClass get(String id) {
		return super.get(id);
	}
	
	public List<SysNumberClass> findList(SysNumberClass sysNumberClass) {
		if (StringUtils.isNotBlank(sysNumberClass.getParentIds())){
			sysNumberClass.setParentIds(","+sysNumberClass.getParentIds()+",");
		}
		return super.findList(sysNumberClass);
	}
	
	@Transactional(readOnly = false)
	public void save(SysNumberClass sysNumberClass) {
		super.save(sysNumberClass);
	}
	
	@Transactional(readOnly = false)
	public void delete(SysNumberClass sysNumberClass) {
		super.delete(sysNumberClass);
	}
	
}