---初始化项目
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
package com.xjrsoft.common;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.pictc.utils.DataLogTools;
|
||||
|
||||
@Service
|
||||
public class CommonEnhancedService {
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public <T>T insert(T entity) {
|
||||
return DataLogTools.insert(entity);
|
||||
}
|
||||
|
||||
|
||||
public <T>T updateById(T entity) {
|
||||
return DataLogTools.update(entity);
|
||||
}
|
||||
|
||||
public <T>T delete(T entity) {
|
||||
return DataLogTools.delete(entity);
|
||||
}
|
||||
|
||||
public <T>T deleteById(Class<T> klazz,long id) {
|
||||
return DataLogTools.deleteById(klazz, id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user