d4fa81187db38eee3f735b609dd58d9682510308.svn-base 1.34 KB
/**
 * Copyright © 2015-2018 ODM All rights reserved.
 */
package com.thinkgem.jeesite.modules.reg.service.base;

import java.util.List;

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

import com.thinkgem.jeesite.common.service.TreeService;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.reg.entity.base.RegBaseElementCode;
import com.thinkgem.jeesite.modules.reg.dao.base.RegBaseElementCodeDao;

/**
 * 要素代码与名称描述表Service
 * @author xuyg
 * @version 2015-10-05
 */
@Service
@Transactional(readOnly = true)
public class RegBaseElementCodeService extends TreeService<RegBaseElementCodeDao, RegBaseElementCode> {

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