增加事务配置和js工具类

This commit is contained in:
wanggeng 2022-08-09 21:03:53 +08:00
parent b1e79bf589
commit b640d644cd
2 changed files with 31 additions and 2 deletions

View File

@ -31,7 +31,7 @@ public class TransactionConfig {
/** /**
* 默认新增事务 * 默认新增事务
*/ */
private static String[] DEFAULT_SAVE_ARRAY = {"add*", "save*", "insert*", "create*"}; private static String[] DEFAULT_SAVE_ARRAY = {"add*", "save*", "insert*", "create*", "new*"};
/** /**
* 默认删除事务 * 默认删除事务
*/ */
@ -39,7 +39,7 @@ public class TransactionConfig {
/** /**
* 默认执行事务 * 默认执行事务
*/ */
private static String[] DEFAULT_UPDATE_ARRAY = {"update*", "edit*"}; private static String[] DEFAULT_UPDATE_ARRAY = {"update*", "edit*", "reset*"};
/** /**
* 默认其它事务 * 默认其它事务
*/ */

View File

@ -0,0 +1,29 @@
/**
* 通用工具类
* @constructor
*/
function CommonUtil() {
/**
* 获取html文本
* @param content
* @return {string|*}
*/
this.getHtmlText = function (content) {
if (!content) {
return ''
}
var str = content;
str = str.replace(/<xml>[\s\S]*?<\/xml>/ig, '');
str = str.replace('/class=(")?Mso[a-zA-Z]+(")?)/g', '');
str = str.replace(/\n|\r/ig, '')
var reg = new RegExp('<!--(.*?)-->', 'g')
str = str.replace(/<style>[\s\S]*?<\/style>/ig, '')
str = str.replace(/<\/?[^>]*>/g, '')
str = str.replace(/[ | ]*\n/g, '')
str = str.replace(/&nbsp;/ig, '')
str = str.replace(reg, '')
return str;
}
}