package ${t.packagePath};

import java.util.List;
import com.pj.utils.so.SoMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import ${cfg.package_utils};

/**
 * Service: ${t.tableName} -- ${t.tableComment}
 * @author ${cfg.author} 
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ${t.mkNameBig}Service extends ServiceImpl<${t.mkNameBig}Mapper, ${t.mkNameBig}> implements IService<${t.mkNameBig}>{

	/** 底层 Mapper 对象 */
	@Autowired
	${t.mkNameBig}Mapper ${t.varName}Mapper;

	/** 增 */
	void add(${t.modelName} ${t.varNameSimple}){
		save(t);
	}

	/** 删 */
	void delete(Long id){
		removeById(id);
	}

	/** 改 */
	void update(${t.modelName} ${t.varNameSimple}){
		updateById(${t.varNameSimple});

	}

	/** 查 */
	${t.modelName} getById(${t.primaryKey.fieldType} ${t.primaryKey.fieldName}){
		return super.getById(${t.primaryKey.fieldName});
	}

	/** 查集合 - 根据条件（参数为空时代表忽略指定条件） */  
	List<${t.modelName}> getList(SoMap so) { 
		return ${t.varName}Mapper.getList(so);	
	}
	

}
