
oghurt.generator.1.0.6.source-code.ServiceImpl.vm Maven / Gradle / Ivy
package ${modulePackage}.service.impl;
import java.io.Serializable;
import com.github.jyoghurt.core.exception.ServiceException;
import com.github.jyoghurt.core.service.impl.ServiceSupport;
import ${modulePackage}.dao.${replaceSuffixClassName}Mapper;
import ${modulePackage}.domain.${className};
import ${modulePackage}.service.${replaceSuffixClassName}Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("${replaceSuffixLowerName}Service")
public class ${replaceSuffixClassName}ServiceImpl extends ServiceSupport<${className}, ${replaceSuffixClassName}Mapper> implements ${replaceSuffixClassName}Service {
@Autowired
private ${replaceSuffixClassName}Mapper ${replaceSuffixLowerName}Mapper;
@Override
public ${replaceSuffixClassName}Mapper getMapper() {
return ${replaceSuffixLowerName}Mapper;
}
@Override
public void logicDelete(Serializable id) throws ServiceException {
getMapper().logicDelete(${className}.class, id);
}
@Override
public ${className} find(Serializable id) throws ServiceException {
return getMapper().selectById(${className}.class,id);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy