修复删除拦截异常问题

v1.4.1
Parker 4 years ago
parent ed0b6111b2
commit 1d30bf2641

@ -65,8 +65,8 @@ public class SQLDataAop {
public void deleteHadnler(Object ret){
try {
if(ret != null){
Integer retCount = (Integer) ret;
if(retCount == 0){
Boolean retFlag = (Boolean) ret;
if(!retFlag){
throw new ServiceException(CoreMsg.SQL_EXCEPTION_DELETE);
}
}else{

@ -49,13 +49,13 @@ public class AutoFillInterceptor implements Interceptor {
SqlCommandType sqlCommandType = null;
for (int i = 0; i < args.length; i++) {
Object arg = args[i];
String className = arg.getClass().getName();
log.info(i + " 参数类型:" + className);
//String className = arg.getClass().getName();
//log.info(i + " 参数类型:" + className);
//第一个参数处理。根据它判断是否给“操作属性”赋值。
if (arg instanceof MappedStatement) {//如果是第一个参数 MappedStatement
MappedStatement ms = (MappedStatement) arg;
sqlCommandType = ms.getSqlCommandType();
log.info("操作类型:" + sqlCommandType);
//log.info("操作类型:" + sqlCommandType);
if (sqlCommandType == SqlCommandType.INSERT || sqlCommandType == SqlCommandType.UPDATE) {//如果是“增加”或“更新”操作,则继续进行默认操作信息赋值。否则,则退出
continue;
} else {

Loading…
Cancel
Save