!5 代码规范

Merge pull request !5 from xushanchang/master
master
曹二众 2021-07-05 06:52:14 +00:00 committed by Gitee
commit 5f154ecf89
266 changed files with 3803 additions and 1894 deletions

View File

@ -0,0 +1,963 @@
 Oracle
 数据库整体设计规范(必读)
1设计
1. 应用里面,多个数据库之间请不要通过 DBLINK 访问。
2. 请不要采用触发器。
3. 请不要使用视图和物化视图。
4. 请不要使用外键约束,如果数据存在外键关系,请在程序层面实现。
5. 请尽量不要使用 job如果不得已必须使用Job 的设计必须是可重复执行的。
6. 请尽量不要采用存储过程。
7. 应用必须具有自动重连的机制。但是又要避免每执行一条 SQL 语句就检查一下 DB 的可
用性。
2命名
a) 命名应使用富有意义的英文词汇(见词知义),多个单词组成的,中间以下划线分割。
b) 命名只能使用英文字母,数字和下划线。
c) 命名避免使用 Oracle 保留字和系统关键字。
d) 命名长度以不超过 15 个字符为宜(避免超过 20)。
e) 命名全部采用小写,并且名称前后不能加引号。
 数据库对象设计规范
1. 表
设计
a) 在设计时尽量包含两个日期字段:gmt_created(创建日期),gmt_modified(修改日期)且
非空, 对表的记录进行更新的时候,必须包含对 gmt_modified 字段的更新。
b) 尽可能使用简单数据类型,不要使用类似数组或者嵌套表这种复杂类型。
c) 必须要有主键,且尽量不要使用有实际意义的字段做主键。
d) 需要 join 的字段,数据类型保持绝对一致。
e) 当表的字段数非常多时,可以将表分成两张表,一张作为条件查询表,一张作为详
细内容表(主要是为了性能考虑)。
f) 当字段的类型为枚举型或布尔型时,建议使用 char(1)类型。
命名
a) 同一个模块的表尽可能使用相同的前缀,表名尽可能表达含义,例如:
CRM_SAL_FUND_ITEM。
b) 字段命名应尽可能使用表达实际含义的英文单词或缩写不要使用类似“VALUE1”
这种无意义的字段名。
c) 布尔值类型的字段命名为 is+描述。如 member 表上表示是否为 enabled 的会员的字
段命名为 IsEnabled。
字段类型
类型 规范
NUMBER(p,s) 固定精度数字类型
NUMBER 不固定精度数字类型当不确定数字的精度时使用PK 通常使用此类型
DATE 当仅需精确到秒时,选择 DATE 而不是 TIMESTAMP 类型
TIMESTAMP 扩展日期类型,不建议使用
VARCHAR2 变长字符串,最长 4000 个字节
CHAR 定长字符串,除非是 CHAR(1),否则不要使用
CLOB 当超过 4000 字节时使用,但是要求这个字段必须单独创建到一张表中,
然后有 PK 与主表关联。此类型应该尽量控制使用
字段注释
a) 标准字段注释由一组"@"开头的标签+空格+文本组成。
以 MD_USER 表的部分字段为例:
Name Type Comments
PARTY_ID VARCHAR2(20) @desc 主键 ID
CORPORATION_ID VARCHAR2(20) @desc 用户所在公司 ID
@fk md_corporation.party_id
STATUS VARCHAR2(20) @desc 状态
@values disable|enable:未激活状
态|激活状态
IS_PRI_ACCOUNT CHAR(1) @desc 是否为主账号。后台生成
UK 时使用
@values y|n:是帐号,非主帐号
@logic 一个公司内部,有且仅有
一个主账号存在
b) 注释标签说明
标签名 中文含义 必填 备注
@desc 字段中文描述 Yes
@fk 字段对应的外键字段
@values 取值范围说明。多个值以"|"
分隔
如此字段的值由系统自动生成,可忽略不书写。
@sample 数据范本 对于复杂数据格式,最好给一个数据范本。
@formula 计算公式 写明该字段由哪些字段以何种公式计算得到。
@logic 数据逻辑 简要写明该字段的数据是在何种业务规则下,如何变
化的。
@redu 标识此字段冗余
@depr 标识此字段已废弃 简要写明:废弃人 废弃日期 废弃原因
2. 索引
设计
a) Bitmap 索引通常不适合我们的环境。
b) 索引根据实际业务SQL建立对应的索引字段。
c) 不要创建带约束的索引,所有的约束效果都通过显示创建约束然后再 using index 一
个已经创建好的普通索引来实现。
命名
a) <table_name>_<column_name>_ind,各部分以下划线_分割。
b) 多单词组成的 column name取前几个单词首字母加末单词组成 column_name。如
sample 表 member_id 上的索引sample_mid_ind。
3. 约束
设计
a) 主键最好是无意义的,由 Sequence 产生的 ID 字段,类型为 number不建议使用组
合主键。
b) 若要达到唯一性限制的效果,不要创建 unique index必须显式创建普通索引和约束
pk 或 uk即先创建一个以约束名命名的普通索引然后创建一个约束用 using
index ...指定索引。
c) 当删除约束的时候,为了确保不影响到 index最好加上 keep index 参数。
d) 主键的内容不能被修改。
e) 外键约束一般不在数据库上创建,只表达一个逻辑的概念,由程序控制。
f) 当万不得已必须使用外健的话,必须在外健列创建 INDEX。
命名
a) 主键约束: _pk 结尾,<table_name>_pk
b) unique 约束_uk 结尾,<table_name>_<column_name>_uk
c) check 约束: _ck 结尾,<table_name>_<column_name>_ck
d) 外键约束: _fk 结尾,以 pri 连接本表与主表,<table_name>_pri_<table_name>_fk
4. SEQUENCE
命名
a) seq_<table_name>
5. 触发器
命名
a) <table_name>_A(After)B(Before)I(Insert)U(Update)D(Delete)_trg。
b) 若是用于同步的触发器以 sync 作为前缀sync_<table_name>_trg。
6. 过程、函数、包
命名
a) 过程以 proc_开头函数以 func_开头包以 pkg_开头。
b) 变量命名约定:本地变量以 v_为前缀参数以 p_为前缀可以带_I(输入)_O(输出)、
_IO(输入输出)表示参数的输入输出类型。
 SQL 开发规范
一. 编码规范
1. 在代码中不允许出现任何 DDL 语句
a) DDL 语句一律由 DBA 编写并统一执行
2. 写 SQL 的时侯一定要使用绑定变量
a) 对于极少数情况下不使用绑定变量提高性能,使用之前一定要和 DBA 沟通
3. 写 SQL 的时候一定要给每个字段指定表名做前缀
a) 比如 select a.id,a.name from test a; 好处是一来带来性能的提升,二来可以避免一些错
误的发生。
4. 在 sqlmap 中的变量,要用#号,而不要用$符号
a) 如#appid#。因为$name$ 是字面意义的替换,这种形式会有 SQL 注入的漏洞,而
#name# 是带类型的替换,不存在 SQL 注入的风险。
5. 请不要写 select * 这样的代码,指定需要的字段名
6. 避免在 where 子句中对字段施加函数
a) 通常,不允许在字段上添加函数或者表达式,这样将导致索引失效,如:
错误的写法:
select * from iw_account_log where to_char ( trans_dt, 'yyyy-mm-dd') = '2007-04-04';
select qty from product where p_id + 12 = 168;
正确的写法:
select * from iw_account_log
where trans_dt >= to_date ( '2007-04-04', 'yyyy-mm-dd') and trans_dt < to_date
( '2007-04-05', 'yyyy-mm-dd');
select qty from product where p_id = 168 - 12;
b) 如果是业务要求的除外,但需要在编写时咨询 DBA
c) 特别注意,当表连接时,用于连接的两个表的字段如果数据类型不一致,则必须在
一边加上类型转换的函数,如
错误的写法a.id 是 number 类型,而 b.operator_number 是 char 类型):
select count from adm_user a, adm_action_log b where a.id = b.operator_number
and a.username = '小钗';
正确的写法:
select count from adm_user a, adm_action_log b where to_char(a.id) =
b.operator_number and a.username = '小钗';
select count from adm_user a, adm_action_log b where a.id =
to_number(b.operator_number) and a.username = '小钗';
上面两种写法哪个正确?遇到这种情况时必须咨询 DBA
7. 严格要求使用正确类型的变量,杜绝 oracle 做隐式类型转换的情况
a) 推荐在 sqlmap 的变量中指定变量的数据类型select * from iw_user where
iw_user_id = #userid:VARCHAR#
b) 其中,对于时间类型的字段,必须使用 TO_DATE 进行赋值(当前时间可直接用
sysdate 表示),不允许下列这些错误用法:
错误的写法(使用 date 类型的变量):
select *
from iw_account_log
where trans_account = #transaccount:varchar#
and trans_dt >= #dateBegin:date#
and trans_dt < #dateEnd:date#
错误的写法(将 to_date 函数和数字进行算术运算):
select *
from iw_account_log
where trans_account = #transaccount:varchar#
and trans_dt >= to_date(#dateBegin:varchar#, 'yyyy-mm-dd hh24:mi:ss')
and trans_dt < to_date(#dateBegin:varchar#, 'yyyy-mm-dd hh24:mi:ss') + 1
正确的写法:
select *
from iw_account_log
where trans_account = #transaccount:varchar#
and trans_dt >= to_date(#dateBegin:varchar#, 'yyyy-mm-dd hh24:mi:ss')
and trans_dt < to_date(#dateEnd:varchar#, 'yyyy-mm-dd hh24:mi:ss') /*或 trans_dt
< sysdate */
c) 3、对于变量数据类型错误导致 SQL 严重性能问题的,按严重的编码错误 Bug 处理!
8. 全模糊查询无法使用 INDEX应当尽可能避免
a) 比如select * from table where name like '%jacky%';
9. 外连接的写法
a) 不推荐使用 ANSI 连接,如 inner join、left join、right join、full outer join而推荐使
用(+)来表示外连接
不推荐的写法:
select a.*, b.goods_title from iw_account_log a left join beyond_trade_base b on
a.TRANS_OUT_ORDER_NO = b.trade_no
where a.trans_code = '6003' and a.trans_account = #transacnt:varchar# and
a.trans_dt > to_date(...)
推荐的写法:
select a.*, b.goods_title from iw_account_log a, beyond_trade_base b
where a.TRANS_OUT_ORDER_NO = b.trade_no(+) and a.trans_code = '6003'
and a.trans_account = #transacnt:varchar# and a.trans_dt > to_date(...)
10. 表连接分页查询的使用
a) 包含排序逻辑的分页查询写法,必须是三层 select 嵌套:
错误的写法:
SELECT t1.*
FROM (SELECT t.*, ROWNUM rnum
FROM beyond_trade_base t
WHERE seller_account = :1
AND gmt_create >= TO_DATE (:2, 'yyyy-mm-dd')
AND gmt_create < TO_DATE (:3, 'yyyy-mm-dd')
ORDER BY gmt_create DESC) t1
WHERE rnum >= :4 AND rnum < :5
正确的写法:
SELECT t2.*
FROM (SELECT t1.*, ROWNUM rnum
FROM (SELECT t.*
FROM beyond_trade_base t
WHERE seller_account = :1
AND gmt_create >= TO_DATE (:2, 'yyyy-mm-dd')
AND gmt_create < TO_DATE (:3, 'yyyy-mm-dd')
ORDER BY gmt_create DESC) t1
WHERE ROWNUM <= :4) t2
WHERE rnum >= :5
b) 不包含排序逻辑的分页查询写法,则是两层 select 嵌套,但对 rownum 的范围指定仍
然必须在不同的查询层次指定:
错误的写法:
SELECT t1.*
FROM (SELECT t.*, ROWNUM rnum
FROM beyond_trade_base t
WHERE seller_account = :1
AND gmt_create >= TO_DATE (:2, 'yyyy-mm-dd')
AND gmt_create < TO_DATE (:3, 'yyyy-mm-dd')) t1
WHERE rnum >= :4 AND rnum <= :5
正确的写法:
SELECT t1.*
FROM (SELECT t.*, ROWNUM rnum
FROM beyond_trade_base t
WHERE seller_account = :1
AND gmt_create >= TO_DATE (:2, 'yyyy-mm-dd')
AND gmt_create < TO_DATE (:3, 'yyyy-mm-dd')
AND ROWNUM <= :4) t1
WHERE rnum >= :5
c) 注意下面两种写法的逻辑含义是不同的:
按创建时间排序(倒序),然后再取前 10 条:
SELECT t2.*
FROM (SELECT t1.*, ROWNUM rnum
FROM (SELECT t.*
FROM sell_offer t
WHERE owner_member_id = :1
AND gmt_create >= TO_DATE (:2, 'yyyy-mm-dd')
AND gmt_create < TO_DATE (:3, 'yyyy-mm-dd')
ORDER BY gmt_create DESC) t1
WHERE ROWNUM <= 10) t2
WHERE rnum >= 1
随机取 10 条,然后在这 10 条中按照交易创建时间排序(倒序):
SELECT t1.*
FROM (SELECT t.*, ROWNUM rnum
FROM beyond_trade_base t
WHERE seller_account = :1
AND gmt_create >= TO_DATE (:2, 'yyyy-mm-dd')
AND gmt_create < TO_DATE (:3, 'yyyy-mm-dd')
AND ROWNUM <= 10
ORDER BY gmt_create DESC) t1
WHERE rnum >= 1
d) 先连接后分页与先分页后连接
性能较差:
SELECT t2.*
FROM (SELECT t1.*, ROWNUM rnum
FROM (SELECT a.*, b.receive_fee
FROM beyond_trade_base a, beyond_trade_process b
WHERE a.trade_no = b.trade_no
AND a.seller_account = :1
AND a.gmt_create >= TO_DATE (:2, 'yyyy-mm-dd')
AND a.gmt_create < TO_DATE (:3, 'yyyy-mm-dd')
ORDER BY a.gmt_create DESC) t1
WHERE ROWNUM <= :4) t2
WHERE rnum >= :5
性能较好:
SELECT /*+ ordered use_nl(a,b) */
a.*, b.receive_fee
FROM (SELECT t2.*
FROM (SELECT t1.*, ROWNUM rnum
FROM (SELECT t.*
FROM beyond_trade_base t
WHERE seller_account = :1
AND gmt_create >= TO_DATE (:2, 'yyyy-mm-dd')
AND gmt_create < TO_DATE (:3, 'yyyy-mm-dd')
ORDER BY gmt_create DESC) t1
WHERE ROWNUM <= :4) t2
WHERE rnum >= :5) a,
beyond_trade_process b
WHERE a.trade_no = b.trade_no
后面这种写法的适用情况:
1)where 子句中的查询条件都是针对 beyond_trade_base 表的(否则得到的结果将
不相同)
2关联 beyond_trade_process 表时,用的是该表的主键或者唯一键字段(否则将
改变结果集的条数)
11. Hint 的使用
a) sql 中的/*+ ordered use_nl(member offer)*/是 hint用来确定 SQL 的执行计划,请在
DBA 确认后使用。
12. "<>"、"!="、"not in"、"exsits"和"not exists"的使用规范
a) 原则上一般禁止使用"<>"、"!="和"not in",而应该转换成相应的"="和"in"查询条件
错误的写法:
select a.id,a.subject,a.create_type
from product
where status <> 'new'
and owner_member_id = :1
正确的写法:
select a.id,a.subject,a.create_type
from product
where status in ('auditing','modified','service-delete','tbd','user-delete','wait-for-audit')
and owner_member_id = :1
错误的写法:
select a.id,a.subject,a.create_type
from product
where create_type not in ('new_order','vip_add')
and owner_member_id = :1
正确的写法:
select a.id,a.subject,a.create_type
from product
where create_type = 'cust_add'
and owner_member_id = :1
b) 原则上不允许使用"exsits"和"not exists"查询,应转换成相应的"等连接"和外连接来查
错误的写法:
select a.id
from company a
where not exsits (select 1
from av_info_new b
where a.id = b.company_id
)
正确的写法:
select a.id
from company a,av_info_draft b
where a.id = b.company_id
and b.company_id is null
错误的写法:
select count
from company a
where exsits (select 1
from av_info_new b
where a.id = b.company_id
)
正确的写法:
select count
from company a,av_info_draft b
where a.id = b.company_id
注:在通过等连接替换 exsits 的时候有一点需要注意,只有在一对一的时候两者才
能较容易替换,如果是一对多的关系,直接替换后两者的结果会出现不一致情况。
因为 exsits 是实现是否存在,他不 care 存在一条还是多条,而等连接时返回所关联
上的所有数据。
c) 如有特殊需要无法完成相应的转换,必须在 DBA 允许的情况下使用"<>"、"!="、"not
in"、"exsits"和"not exists"
13. 其它编写规范
a) 对表的记录进行更新的时候,必须包含对 gmt_modified 字段的更新,并且不要使用
dynamic 标记,如:
错误的写法:
update BD_CONTACTINFO
<dynamic prepend="set">
......
<isNotNull prepend="," property="gmtModified">
GMT_MODIFIED = #gmtModified:TIMESTAMP#
</isNotNull>
</dynamic>
where ID = #id#
正确的写法(当然,这里更推荐直接更新为 sysdate
update BD_CONTACTINFO
set GMT_MODIFIED = #gmtModified:TIMESTAMP#
<dynamic>
......
</dynamic>
where ID = #id#
b) 不允许在 where 后添加 1=1 这样的无用条件where 可以写在 prepend 属性里,如:
错误的写法:
select count from BD_CONTRACT t where 1=1
<dynamic>
......
</dynamic>
正确的写法:
select count from BD_CONTRACT t
<dynamic prepend="where">
......
</dynamic>
c) 对大表进行查询时,在 SQLMAP 中需要加上对空条件的判断语句,具体可在遇到时
咨询 DBA
性能上不保险的写法:
select count from iw_user usr
<dynamic prepend="where">
<isNotEmpty prepend="AND" property="userId">
usr.iw_user_id = #userId:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="email">
usr.email = #email:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="certType">
usr.cert_type = #certType:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="certNo">
usr.cert_no = #certNo:varchar#
</isNotEmpty>
</dynamic>
性能上较保险的写法(防止那些能保证查询性能的关键条件都为空):
select count from iw_user usr
<dynamic prepend="where">
<isNotEmpty prepend="AND" property="userId">
usr.iw_user_id = #userId:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="email">
usr.email = #email:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="certType">
usr.cert_type = #certType:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="certNo">
usr.cert_no = #certNo:varchar#
</isNotEmpty>
<isEmpty property="userId">
<isEmpty property="email">
<isEmpty property="certNo">
query not allowed
</isEmpty>
</isEmpty>
</isEmpty>
</dynamic>
另外,对查询表单的查询控制建议使用 web 层进行控制而不是客户端脚本
JAVASCRIPT/VBSCRIPT
d) 聚合函数常见问题
1) 不要使用 count(1)代替 count*
2) count(column_name)计算该列不为 NULL 的记录条数
3) count(distinct column_name)计算该列不为 NULL 的不重复值数量
4) count()函数不会返回 NULL但 sum()函数可能返回 NULL可以使用
nvl(sum(qty),0)来避免返回 NULL
e) NULL 的使用
1) 理解 NULL 的含义,是"不确定",而不是"空"
2) 查询时,使用 is null 或者 is not null
3) 更新时使用等于号update tablename set column_name = null
f) STR2NUMLIST、STR2VARLIST 函数的使用:
1) 适用情况:使用唯一值(或者接近唯一值)批量取数据时
2) 编写规范a 表必须放在 from list 的第一位,并且必须在 select 后加上下面的 hint
正确的写法:
select /+ ordered use_nl(a,b) */ b.
from TABLE(CAST(str2varlist(:1) as vartabletype)) a, beyond_trade_base b
where a.column_value = b.trade_no;
二. 格式规范 1注释说明
a) 本注释说明主要用于 PL/SQL 程序及其它 SQL 文件,其它可作参考;
b) SQLPLUS 接受的注释有三种:
―― 这儿是注释
这儿是注释
REM 这儿是注释
c) 开始注释,类似 JAVAK 中的开始注释,主要列出文件名,编写日期,版权说明,程
序功能以及修改记录:
REM
REM $Header: filename, version, created date,auther
REM
REM Copyright
REM
REM FUNCTION
REM function explanation
REM
REM NOTES
REM
REM MODIFIED yy/mm/dd
REM who when - for what, recently goes first
d) 块注释如表注释PROCEDURE 注释等,同 JAVA:
/*
* This table is for TrustPass
* mainly store the information
* of TrustPass members
*/
注意: 在“/*”后应当另起一行,或与其后描述有间隔,否则在 SQLPLUS
中会有问题。
e) 单行注释,如列注释:
login_id VARCHAR2(32) NOT NULL, -- 会员标识
2缩进
低级别语句在高级别语句后的,一般缩进 4 个空格:
DECLARE
v_MemberId VARCHAR2(32),
BEGIN
SELECT admin_member_id INTO v_MemberId
FROM company
WHERE id = 10;
DBMS_OUTPUT.PUT_LINE(v_MemberId);
END;
同一语句不同部分的缩进,如果为 sub statement则通常为 2 个空格,如果与上一句某
部分有密切联系的,则缩至与其对齐:
BEGIN
FOR v_TmpRec IN
(SELECT login_id,
gmt_created, -- here indented as column above
satus
FROM member -- sub statement
WHERE site = 'china'
AND country='cn' )
LOOP
NULL;
END LOOP;
END;
3断行
a) 一行最长不能超过 80 字符
b) 同一语句不同字句之间
c) 逗号以后空格
d) 其他分割符前空格
SELECT offer_name
||','
||offer_count as offer_category,
id
FROM category
WHERE super_category_id_1 = 0;
 附录Oracle 关键字
ACCESS DECIMAL INITIAL ON START
ADD NOT INSERT ONLINE SUCCESSFUL
ALL DEFAULT INTEGER OPTION SYNONYM
ALTER DELETE INTERSECT OR SYSDATE
AND DESC INTO ORDER TABLE
ANY DISTINCT IS PCTFREE THEN
AS DROP LEVEL PRIOR TO
ASC ELSE LIKE PRIVILEGES TRIGGER
AUDIT EXCLUSIVE LOCK PUBLIC UID
BETWEEN EXISTS LONG RAW UNION
BY FILE MAXEXTENTS RENAME UNIQUE
FROM FLOAT MINUS RESOURCE UPDATE
CHAR FOR MLSLABEL REVOKE USER
CHECK SHARE MODE ROW VALIDATE
CLUSTER GRANT MODIFY ROWID VALUES
COLUMN GROUP NOAUDIT ROWNUM VARCHAR
COMMENT HAVING NOCOMPRESS ROWS VARCHAR2
COMPRESS IDENTIFIED NOWAIT SELECT VIEW
CONNECT IMMEDIATE NULL SESSION WHENEVER
CREATE IN NUMBER SET WHERE
CURRENT INCREMENT OF SIZE WITH
DATE INDEX OFFLINE SMALLINT
CHAR VARHCAR VARCHAR2 NUMBER DATE LONG
CLOB BLOB BFILE
INTEGER DECIMAL
SUM COUNT GROUPING AVERAGE
TYPE
 Oracle 名词解释
a) PKPrimary Key主键
b) UKUnique Key唯一性索引
c) FKForeign Key外键
d) DBLINKDatabase Link数据库链接
 Mysql
 数据库整体设计规范(必读)
1设计
1. 一般都使用 INNODB 存储引擎,除非读写比率<1%,才考虑使用 MYISAM 存储引擎;其
他存储引擎请在 DBA 的建议下使用。
2. Stored procedure (包括存储过程,函数,触发器)对于 MYSQL 来说还不是很成熟,
没有完善的出错记录处理,不建议使用。
3. UUID()USER()这样的 MYSQL INSIDE 函数对于复制来说是很危险的,会导致主备数
据.不一致。所以请不要使用。如果一定要使用 UUID 作为主键,让应用程序来产生。
4. 请不要使用外键约束,如果数据存在外键关系,请在程序层面实现。
5. 如果应用使用的是长连接,应用必须具有自动重连的机制。但请避免每执行一个 SQL
去检查一次 DB 可用性。
6. 如果应用使用的是长连接,应用应该具有连接的 TIMEOUT 检查机制,及时回收长时间
没有使用的连接。 TIMEOUT 时间一般建议为 20min。
7. 我们所有的 MySQL 数据库除历史原因外,都必须采用 UTF8 编码。
8. Mysql 对 DDL 支持很差,表结构推荐设计为 Key-Value 结构。如果是关系型结构的数
据库,请尽量预留一些字段,如 value1 ,value2 ,value3。
9. Mysql 用户名与数据库名字一样。 2命名
a) 命名应使用富有意义的英文词汇,多个单词组成的,中间以下划线分割。
b) 命名只能使用英文字母,数字和下划线。
c) 命名避免使用 Mysql 的保留字(详见附录 A和系统关键字。
d) 命名长度以不超过 15 个字符为宜(避免超过 20)。
e) 命名全部采用小写,并且名称前后不能加引号。
 数据库对象设计规范
1. 表
设计
a) 在设计时尽量包含两个日期字段:gmt_created(创建日期),gmt_modified(修改日期)且
非空, 对表的记录进行更新的时候,必须包含对 gmt_modified 字段的更新。
b) 必须要有主键,主键尽量用自增字段类型,推荐类型为 INT 或者 BIGINT 类型。
c) 需要多表 join 的字段,数据类型保持绝对一致。
d) Mysql 的表尽量设置成 KVKey-Value结构这样便于扩展和维护。
e) 当表的字段数非常多时,可以将表分成两张表,一张作为条件查询表,一张作为详
细内容表(主要是为了性能考虑)。
f) 当字段的类型为枚举型或布尔型时,建议使用 char(1)类型。
g) 同一表中,所有 varchar 字段的长度加起来,不能大于 65535.如果有这样的需求,请
使用 TEXT/LONGTEXT 类型。
h) 由于 MYSQL 表 DDL 维护成本很高,所以在适当的时候,可以有一定的字段容余。
比如Value1,Value2,Value3 这样的字段。
命名
a) 同一个模块的表尽可能使用相同的前缀,表名尽可能表达含义,例如:
CRM_SAL_FUND_ITEM。
b) 字段命名应尽可能使用表达实际含义的英文单词或缩写,
如,公司 ID不要使用corporation_id, 而用corp_id 即可。
c) 布尔值类型的字段命名为 is+描述。如 member 表上表示是否为 enabled 的会员的字
段命名为 IsEnabled。
常用字段类型
TINYINT 1 个字节, -128 to 127 || 0 to 255
SMALLINT 2 个字节, -32768 to 32767 || 0 to 65535
MEDIUMINT 3 个字节, -8388608 to 8388607 || 0 to 16777215.
INT, INTEGER 4 个字节, -2147483648 to 2147483647 || 0 to 4294967295.
BIGINT 8 个字节, -9223372036854775808 to 922337203685477580
0 to 18446744073709551615
DECIMAL(P,S) 定点数(以字符串形式存放) 默认:P 为 10,S 为 0,最大 65 位
DATE 范围'1000-01-01'到'9999-12-31' 格式'YYYY-MM-DD' (3 字节)
Time 范围'-838:59:59'到'838:59:59' 格式'HH:MM:SS' (3 字节)
DATETIME 范围 '1000-01-01 00:00:00' 到 '9999-12-31 23:59:59'
格式 'YYYY-MM-DD HH:MM:SS' (8 字节)
TIMESTAMP 范围 '1970-01-01 00:00:00' 到 2037 年
格式'YYYY-MM-DD HH:MM:SS' 宽度固定为 19 个字符(4 字节)
不建议使用。
VARCHAR(n) 变长字符串65532>n>4, 注意n 是字符数,而不是字节数
CHAR(n) 定长字符串,n 范围(0,255)
如果不是定长的数据n<=4 时才使用
TINYBLOB,
TINYTEXT
存储 L+1 个字节,其中 L < 2^8
BLOB, TEXT 存储 L+2 个字节,其中 L < 2^16
MEDIUMBLOB,
MEDIUMTEXT
存储 L+3 个字节,其中 L < 2^24
LONGBLOB,
LONGTEXT
存储 L+4 个字节,其中 L < 2^32
字段注释
a) 标准字段注释由一组"@"开头的标签+空格+文本组成。
以 MD_USER 表的部分字段为例:
Name Type Comments
PARTY_ID VARCHAR(20) @desc 主键 ID
CORP_ID VARCHAR(20) @desc 用户所在公司 ID
@fk md_corp_id
STATUS VARCHAR(20) @desc 状态
@values disable|enable:未激活状
态|激活状态
IS_PRI_ACCOUNT CHAR(1) @desc 是否为主账号。后台生成
UK 时使用
@values y|n:是帐号,非主帐号
@logic 一个公司内部,有且仅有
一个主账号存在
b) 注释标签说明
标签名 中文含义 必填 备注
@desc 字段中文描述 Yes
@fk 字段对应的外键字段
@values 取值范围说明。多个值以"|"
分隔
如此字段的值由系统自动生成,可忽略不书写。
@sample 数据范本 对于复杂数据格式,最好给一个数据范本。
@formula 计算公式 写明该字段由哪些字段以何种公式计算得到。
@logic 数据逻辑 简要写明该字段的数据是在何种业务规则下,如何变
化的。
@redu 标识此字段冗余
@depr 标识此字段已废弃 简要写明:废弃人 废弃日期 废弃原因
2. 索引
设计
a) Bitmap 索引通常不适合我们的环境。
b) 索引根据实际 SQL由 DBA 创建。
c) 不要创建带约束的索引,所有的约束效果都通过显示创建约束然后再 using index 一
个已经创建好的普通索引来实现。
命名
a) <table_name>_<column_name>_ind,各部分以下划线_分割。
b) 多单词组成的 column name取前几个单词首字母加末单词组成 column_name。如
sample 表 member_id 上的索引sample_mid_ind。
3. 约束
设计
a) 主键最好是无意义的,,统一由 Auto-Increment 字段生成整型数据,不建议使用组合
主键。
b) 若要达到唯一性限制的效果,不要创建 unique index必须显式创建普通索引和约束
pk 或 uk即先创建一个以约束名命名的普通索引然后创建一个约束用 using
index ...指定索引。
c) 当删除约束的时候,为了确保不影响到 index最好加上 keep index 参数。
d) 主键的内容不能被修改。
e) 外键约束一般不在数据库上创建,只表达一个逻辑的概念,由程序控制。
f) 当万不得已必须使用外健的话,必须在外健列创建 INDEX。
命名
a) 主键约束: _pk 结尾,<table_name>_pk
b) unique 约束_uk 结尾,<table_name>_<column_name>_uk
c) check 约束: _ck 结尾,<table_name>_<column_name>_ck
d) 外键约束: _fk 结尾,以 pri 连接本表与主表,<table_name>_pri_<table_name>_fk
4. 触发器
命名
a) <table_name>_A(After)B(Before)I(Insert)U(Update)D(Delete)_trg。
b) 若是用于同步的触发器以 sync 作为前缀sync_<table_name>_trg。
5. 过程、函数
设计
a) 如果要在 MYSQL 里使用存储过程类的技术,请务必和 DBA 沟通确认。
命名
a) 过程以 proc_开头函数以 func_开头。
b) 变量命名约定:本地变量以 v_为前缀参数以 p_为前缀可以带_I(输入)_O(输出)、
_IO(输入输出)表示参数的输入输出类型。
 SQL 开发规范
一.编码规范
1. 使用 SQL 操作数据库前,必须由 use DB_name 开始 Use Test ;
Insert into Table_name values ( … ) ;
Commit;
2. 如果需要事务的支持,在确认使用了 innodb 存储引擎的前提下,在数据库连接时,先
关闭自动提交
比如,设定 set auto_commit =0 ;
3. 写到应用程序里的 SQL 语句,禁止一切 DDL 操作
例: Create table Drop table Create database Drop database
Alter table grant … …
如有特殊需要,必需与 DBA 协商同意方可使用。
4. 获取当前时间请使用 now(),不要用 sysdate()来代替
这对复制来说是很危险的,会导致主从数据不一致的情况;
因为 sysdate,取的是系统主机时间,在 BINLOG 会原文传输,
当在应用时会与主库产生差异。
5. 写 SQL 的时候一定要给每个字段指定表名做前缀
比如:
select a.id,a.name from test a;
好处是 一来带来性能的提升,
二来可以避免一些错误的发生。
6. 在 iBatis 的 SqlMap 文件中绑定变量使用 “#var_name#”表示,替代变量使用
“$var_name$”
所有需要动态 Order By 条件的 Query在使用替代变量过程中需要将可能传入的内
容以枚举类写死在代码中,禁止接受任何外部传入内容。
7. 请不要写 select * 这样的代码,指定需要的字段名
8. Mysql 对日期datetime允许“不严格”语法
任何标点符都可以用做日期部分或时间部分之间的间割符。
例如,
'98-12-31 11:30:45'、'98.12.31 11+30+45'、'98/12/31 11*30*45'和'98@12@31 11^30^45'
是等价的。]
我们自己约定一种写法,与 Oracle 相通: '2009-12-31 11:30:45'
9. Mysql 的日期与字符是相同的,所以不需要做另外的转换
例:
Select e.username from employee e where
e.birthday >=1998-12-31 11:30:45
10. 避免多余的排序。使用 GROUP BY 时,默认会进行排序,当你不需要排序时,可以使用
order by null Select product,count(*) cnt from crm_sale_detail group by product order by null;
11. 避免在 where 子句中对字段施加函数
a) 通常,不允许在字段上添加函数或者表达式,这样将导致索引失效,如:
错误的写法:
select * from iw_account_log where substr(username,1,5)=abcde
正确的写法:
select * from iw_account_log where username like abcde%
b) 如果是业务要求的除外,但需要在编写时咨询 DBA
c) 特别注意,当表连接时,用于连接的两个表的字段如果数据类型不一致,则必须在
一边加上类型转换的函数
12. 严格要求使用正确类型的变量,杜绝 Mysql 做隐式类型转换的情况
13. 全模糊查询无法使用 INDEX应当尽可能避免
比如select * from table where name like '%jacky%';
14. 表连接规范
a) 所有非外连接 SQL即 INNER JOIN请把关联表统一写到 FROM 字句中,关
联条件与过滤条件统一写到 WHERE 字句中
b) 出于代码的可读性原因,所有外连接 SQL 语句中,请一律使用 LEFT JOIN禁用
RIGHT JOIN
c) 另外,请注意 LEFT JOIN 字句中,右边位置表的条件书写位置不同的影响:
SELECT A.rolename,A.gmt_create,B.nickname FROM gl_role A LEFT JOIN
gl_roledetail B ON A.ID=B.roleid AND B.roleID=2; +-------------+---------------------+----------+
| rolename | gmt_create | nickname |
+-------------+---------------------+----------+
| 163.com | 0000-00-00 00:00:00 | test2 |
| sina.com | 0000-00-00 00:00:00 | NULL |
| hotmail.com | 0000-00-00 00:00:00 | NULL |
| 126.com | 2009-08-20 18:20:18 | NULL |
+-------------+---------------------+----------+
SELECT A.rolename,A.gmt_create,B.nickname FROM gl_role A LEFT JOIN
gl_roledetail B ON A.ID=B.roleid WHERE B.roleID=2; +----------+---------------------+----------+
| rolename | gmt_create | nickname |
+----------+---------------------+----------+
| 163.com | 0000-00-00 00:00:00 | test2 |
+----------+---------------------+----------+
15. 表连接分页查询的使用
a) 常规分页语句写法(start起始记录数page_offset每页记录数)
SELECT ID,username FROM gl_user WHERE username like '%@163.com' ORDER BY
M.gmt_create LIMIT start, page_offset;
b) 多表 Join 的分页语句,如果过滤条件在单个表上,需要先分页,再 Join
低性能写法:
SELECT M.username,P.rolename FROM gl_user M INNER JOIN gl_role P ON
M.ID=P.userid WHERE username like '%@163.com' ORDER BY M.gmt_create LIMIT
start, page_offset;
高性能写法:
SELECT M.username,P.rolename
FROM (SELECT ID,username FROM gl_user WHERE username like '%@163.com'
ORDER BY M.gmt_create LIMIT start, page_offset)M,gl_role P
WHERE M.ID=P.userid;
这样写的前提是关联的表之间记录一一对应,否则可能会返回的记录数目少于或多余
page_offset 的值。
16. "join"、"in"、"not in"、"exsits"和"not exists"的使用
a) 比较 IN,EXISTS,JOIN
按效率从好到差排序:
字段上有索引 : EXISTS, IN, JOIN
字段上没有索引: JOIN, EXISTS ,IN
b) Anti-Joins: NOT IN ,NOT EXISTS, LEFT JOIN
按效率从好到差排序:
字段上有索引 : LEFT JOIN, NOT EXISTS, NOT IN
字段上没有索引: NOT IN, NOT EXISTS, LEFT JOIN
17. 其它编写规范
a) 对表的记录进行更新的时候,必须包含对 gmt_modified 字段的更新;
b) 不允许在 where 后添加 1=1 这样的无用条件where 可以写在 prepend 属性里,如:
错误的写法:
select count from BD_CONTRACT t where 1=1
<dynamic>
......
</dynamic>
正确的写法:
select count from BD_CONTRACT t
<dynamic prepend="where">
......
</dynamic>
c) 对大表进行查询时,在 SQLMAP 中需要加上对空条件的判断语句,具体可在遇到时
咨询 DBA
性能上不保险的写法:
select count from iw_user usr
<dynamic prepend="where">
<isNotEmpty prepend="AND" property="userId">
usr.iw_user_id = #userId:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="email">
usr.email = #email:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="certType">
usr.cert_type = #certType:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="certNo">
usr.cert_no = #certNo:varchar#
</isNotEmpty>
</dynamic>
性能上较保险的写法(防止那些能保证查询性能的关键条件都为空):
select count from iw_user usr
<dynamic prepend="where">
<isNotEmpty prepend="AND" property="userId">
usr.iw_user_id = #userId:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="email">
usr.email = #email:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="certType">
usr.cert_type = #certType:varchar#
</isNotEmpty>
<isNotEmpty prepend="AND" property="certNo">
usr.cert_no = #certNo:varchar#
</isNotEmpty>
<isEmpty property="userId">
<isEmpty property="email">
<isEmpty property="certNo">
query not allowed
</isEmpty>
</isEmpty>
</isEmpty>
</dynamic>
另外,对查询表单的查询控制建议使用 web 层进行控制而不是客户端脚本
JAVASCRIPT/VBSCRIPT
d) 聚合函数常见问题
1) 不要使用 count(1)代替 count*
2) count(column_name)计算该列不为 NULL 的记录条数
3) count(distinct column_name)计算该列不为 NULL 的不重复值数量
4) count()函数不会返回 NULL但 sum()函数可能返回 NULL可以使用
ifnull(sum(qty),0)来避免返回 NULL
e) NULL 的使用
1) 理解 NULL 的含义,是"不确定",而不是"空"
2) 查询时,使用 is null 或者 is not null
3) 更新时使用等于号update tablename set column_name = null
二.格式规范 1注释说明
a) 本注释说明主要用于 Mysql Client 程序及其它 SQL 文件,其它可作参考;
b) SQL 接受的注释有三种:
-- 这儿是注释 (注意,第 2 个破折号后面至少跟一个空格符)
/* 这儿是注释 */
# 这儿是注释
c) 下面的例子显示了 3 种风格的注释:
mysql> SELECT 1+1; # This comment continues to the end of line
mysql> SELECT 1+1; -- This comment continues to the end of line
mysql> SELECT 1 /* this is an in-line comment */ + 1;
mysql> SELECT 1+
/*
this is a
multiple-line comment
*/
2缩进
低级别语句在高级别语句后的,一般缩进 4 个空格:
DECLARE
v_MemberId VARCHAR(32),
BEGIN
SELECT admin_member_id INTO v_MemberId
FROM company
WHERE id = 10;
SELECT v_MemberId ;
END;
同一语句不同部分的缩进,如果为 sub statement则通常为 2 个空格,如果与上一句某
部分有密切联系的,则缩至与其对齐:
BEGIN
FOR v_TmpRec IN
(SELECT login_id,
gmt_created, -- here indented as column above
satus
FROM member -- sub statement
WHERE site = 'china'
AND country='cn' )
LOOP
NULL;
END LOOP;
END;
3断行
a) 一行最长不能超过 80 字符
b) 同一语句不同字句之间
c) 逗号以后空格
d) 其他分割符前空格
SELECT concat(offer_name,',',
offer_count as offer_category,
id)
FROM category
WHERE super_category_id_1 = 0;
 附录Mysql 保留字
ADD DEFAULT INSERT NULL
SQL_CALC_FOUN
D_ROWS
ALL DELAYED INT NUMERIC
SQL_SMALL_RES
ULT
ALTER DELETE INT1 ON SQLEXCEPTION
ANALYZE DESC INT2 OPTIMIZE SQLSTATE
AND DESCRIBE INT3 OPTION SQLWARNING
AS DETERMINISTIC INT4 OPTIONALLY SSL
ASC DISTINCT INT8 OR STARTING
ASENSITIVE DISTINCTROW INTEGER ORDER STRAIGHT_JOIN
BEFORE DIV INTERVAL OUT TABLE
BETWEEN DOUBLE INTO OUTER TERMINATED
BIGINT DROP IS OUTFILE THEN
BINARY DUAL ITERATE PRECISION TINYBLOB
BLOB EACH JOIN PRIMARY TINYINT
BOTH ELSE KEY PROCEDURE TINYTEXT
BY ELSEIF KEYS PURGE TO
CALL ENCLOSED KILL RAID0 TRAILING
CASCADE ESCAPED LABEL RANGE TRIGGER
CASE EXISTS LEADING READ UNDO
CHANGE EXIT LEAVE READS UNION
CHAR EXPLAIN LEFT REAL UNIQUE
CHARACTER FETCH LIKE REFERENCES UNLOCK
CHECK FLOAT LIMIT REGEXP UNSIGNED
COLLATE FLOAT4 LINEAR RELEASE UPDATE
COLUMN FLOAT8 LINES RENAME USAGE
CONDITION FOR LOAD REPEAT USE
CONNECTION FORCE LOCALTIME REPLACE USING
CONSTRAINT FOREIGN LOCALTIMESTAMP REQUIRE UTC_DATE
CONTINUE FROM LOCK RESTRICT UTC_TIME
CONVERT FULLTEXT LONG RETURN UTC_TIMESTAMP
CREATE GOTO LONGBLOB REVOKE VALUES
CROSS GRANT LONGTEXT RIGHT VARBINARY
CURRENT_DATE GROUP LOOP RLIKE VARCHAR
CURRENT_TIME HAVING LOW_PRIORITY SCHEMA VARCHARACTER
CURRENT_TIMESTAMP HIGH_PRIORITY MATCH SCHEMAS VARYING
CURRENT_USER HOUR_MICROSECOND MEDIUMBLOB SECOND_MICROSECOND WHEN
CURSOR HOUR_MINUTE MEDIUMINT SELECT WHERE
DATABASE HOUR_SECOND MEDIUMTEXT SENSITIVE WHILE
DATABASES IF MIDDLEINT SEPARATOR WITH
DAY_HOUR IGNORE
MINUTE_MICROSEC
OND SET WRITE
DAY_MICROSECOND IN MINUTE_SECOND SHOW X509
DAY_MINUTE INDEX MOD SMALLINT XOR
DAY_SECOND INFILE MODIFIES SPATIAL YEAR_MONTH
DEC INNER NATURAL SPECIFIC ZEROFILL
DECIMAL INOUT
NO_WRITE_TO_BIN
LOG SQL FALSE
DECLARE INSENSITIVE NOT SQL_BIG_RESULT TRUE
 Mysql 名词解释
a) PKPrimary Key主键
b) UKUnique Key唯一性索引
c) FKForeign Key外键

View File

@ -30,184 +30,185 @@ import com.jeecg.demo.dao.JeecgMinidaoDao;
import net.sf.json.JSONArray;
/**
* @author jeecg
* @ClassName: JeecgFormDemoController
* @Description: TODO()
* @author jeecg
*/
@Controller
@RequestMapping("/jeecgFormDemoController")
public class JeecgFormDemoController extends BaseController {
private static final Logger logger = Logger.getLogger(JeecgFormDemoController.class);
@Autowired
private SystemService systemService;
@Autowired
private JeecgMinidaoDao jeecgMinidaoDao;
@RequestMapping(params = "uitag")
public ModelAndView uitag(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/form_uitag");
}
@RequestMapping(params = "formValidDemo")
public ModelAndView formValidDemo(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/form_valid");
}
private static final Logger logger = Logger.getLogger(JeecgFormDemoController.class);
@RequestMapping(params = "testsubmit=1",method ={RequestMethod.GET, RequestMethod.POST})
public ModelAndView testsubmit(HttpServletRequest request) {
logger.info("请求成功byebye");
return new ModelAndView("com/jeecg/demo/form_valid");
}
@RequestMapping(params = "nature")
public ModelAndView easyDemo(HttpServletRequest request) {
logger.info("demo-nature");
//ztree同步加载
JSONArray jsonArray=JSONArray.fromObject(getZtreeData());
request.setAttribute("regions", jsonArray.toString().replaceAll("pid","pId"));
return new ModelAndView("com/jeecg/demo/form_nature");
}
@Autowired
private SystemService systemService;
@Autowired
private JeecgMinidaoDao jeecgMinidaoDao;
@RequestMapping(params = "ueditor")
public ModelAndView ueditor(HttpServletRequest request) {
logger.info("ueditor");
return new ModelAndView("com/jeecg/demo/ueditor");
}
@RequestMapping(params = "uitag")
public ModelAndView uitag(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/form_uitag");
}
@RequestMapping(params = "formValidDemo")
public ModelAndView formValidDemo(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/form_valid");
}
@RequestMapping(params = "testsubmit=1", method = {RequestMethod.GET, RequestMethod.POST})
public ModelAndView testsubmit(HttpServletRequest request) {
logger.info("请求成功byebye");
return new ModelAndView("com/jeecg/demo/form_valid");
}
@RequestMapping(params = "nature")
public ModelAndView easyDemo(HttpServletRequest request) {
logger.info("demo-nature");
//ztree同步加载
JSONArray jsonArray = JSONArray.fromObject(getZtreeData());
request.setAttribute("regions", jsonArray.toString().replaceAll("pid", "pId"));
return new ModelAndView("com/jeecg/demo/form_nature");
}
@RequestMapping(params = "ueditor")
public ModelAndView ueditor(HttpServletRequest request) {
logger.info("ueditor");
return new ModelAndView("com/jeecg/demo/ueditor");
}
/**
* ---
*/
@RequestMapping(params = "regionSelect", method = RequestMethod.GET)
@ResponseBody
public List<Map<String, String>> cityselect(HttpServletRequest req) throws Exception {
logger.info("----省市区联动-----");
String pid = req.getParameter("pid");
//List<Map<String, String>> list=jeecgMinidaoDao.getProCity(pid);
return jeecgMinidaoDao.getProCity(pid);
}
/**
* Ztree
*
*
* @return
*/
public List<Map<String, String>> getZtreeData() {
return jeecgMinidaoDao.getAllRegions();
}
/**
*---
*/
@RequestMapping(params="regionSelect",method = RequestMethod.GET)
@ResponseBody
public List<Map<String, String>> cityselect(HttpServletRequest req) throws Exception{
logger.info("----省市区联动-----");
String pid=req.getParameter("pid");
//List<Map<String, String>> list=jeecgMinidaoDao.getProCity(pid);
return jeecgMinidaoDao.getProCity(pid);
}
/**
* Ztree
*
* @return
*/
public List<Map<String, String>> getZtreeData(){
return jeecgMinidaoDao.getAllRegions();
}
/**
* DEMO
*/
@RequestMapping(params = "getComboTreeData")
@ResponseBody
public List<ComboTree> getComboTreeData(HttpServletRequest request, ComboTree comboTree) {
CriteriaQuery cq = new CriteriaQuery(TSDepart.class);
if (comboTree.getId() != null) {
cq.eq("TSPDepart.id", comboTree.getId());
}
if (comboTree.getId() == null) {
cq.isNull("TSPDepart");
}
cq.add();
List<TSDepart> demoList = systemService.getListByCriteriaQuery(cq, false);
/**
* DEMO
*/
@RequestMapping(params = "getComboTreeData")
@ResponseBody
public List<ComboTree> getComboTreeData(HttpServletRequest request, ComboTree comboTree) {
CriteriaQuery cq = new CriteriaQuery(TSDepart.class);
if (comboTree.getId() != null) {
cq.eq("TSPDepart.id", comboTree.getId());
}
if (comboTree.getId() == null) {
cq.isNull("TSPDepart");
}
cq.add();
List<TSDepart> demoList = systemService.getListByCriteriaQuery(cq, false);
// List<ComboTree> comboTrees = new ArrayList<ComboTree>();
ComboTreeModel comboTreeModel = new ComboTreeModel("id", "departname", "TSDeparts");
List<ComboTree> comboTrees = systemService.ComboTree(demoList, comboTreeModel, null, false);
return comboTrees;
}
/**
* ztree
* @param response
* @param request
* @return
*/
@RequestMapping(params="getTreeData",method ={RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public AjaxJson getTreeData(TSDepart depatr,HttpServletResponse response,HttpServletRequest request ){
AjaxJson j = new AjaxJson();
try{
ComboTreeModel comboTreeModel = new ComboTreeModel("id", "departname", "TSDeparts");
List<ComboTree> comboTrees = systemService.ComboTree(demoList, comboTreeModel, null, false);
return comboTrees;
}
/**
* ztree
*
* @param response
* @param request
* @return
*/
@RequestMapping(params = "getTreeData", method = {RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public AjaxJson getTreeData(TSDepart depatr, HttpServletResponse response, HttpServletRequest request) {
AjaxJson j = new AjaxJson();
try {
// List<TSDepart> depatrList = new ArrayList<TSDepart>();
StringBuffer hql = new StringBuffer(" from TSDepart t");
//hql.append(" and (parent.id is null or parent.id='')");
List<TSDepart> depatrList = this.systemService.findHql(hql.toString());
List<Map<String,Object>> dataList = new ArrayList<Map<String,Object>>();
Map<String,Object> map = null;
for (TSDepart tsdepart : depatrList) {
String sqls = null;
Object[] paramss = null;
map = new HashMap<String,Object>();
map.put("id", tsdepart.getId());
map.put("name", tsdepart.getDepartname());
if (tsdepart.getTSPDepart() != null) {
map.put("pId", tsdepart.getTSPDepart().getId());
map.put("open",false);
}else {
map.put("pId", "1");
map.put("open",false);
}
sqls = "select count(1) from t_s_depart t where t.parentdepartid = ?";
paramss = new Object[]{tsdepart.getId()};
long counts = this.systemService.getCountForJdbcParam(sqls, paramss);
if(counts>0){
dataList.add(map);
}else{
TSDepart de = this.systemService.get(TSDepart.class, tsdepart.getId());
if (de != null) {
map.put("id", de.getId());
map.put("name", de.getDepartname());
if(tsdepart.getTSPDepart()!=null){
map.put("pId", tsdepart.getTSPDepart().getId());
map.put("open",false);
}else{
map.put("pId", "1");
map.put("open",false);
}
dataList.add(map);
}else{
map.put("open",false);
dataList.add(map);
}
}
}
j.setObj(dataList);
}catch(Exception e){
e.printStackTrace();
}
return j;
}
/**
*
* @param request
* @param responss
*/
@RequestMapping(params = "getAutocompleteData",method ={RequestMethod.GET, RequestMethod.POST})
public void getAutocompleteData(HttpServletRequest request, HttpServletResponse response) {
String searchVal = request.getParameter("searchVal");
String hql = "from TSUser where userName like '%"+searchVal+"%'";
List autoList = systemService.findHql(hql);
try {
response.setContentType("application/json;charset=UTF-8");
response.setHeader("Pragma", "No-cache");
StringBuffer hql = new StringBuffer(" from TSDepart t");
//hql.append(" and (parent.id is null or parent.id='')");
List<TSDepart> depatrList = this.systemService.findHql(hql.toString());
List<Map<String, Object>> dataList = new ArrayList<Map<String, Object>>();
Map<String, Object> map = null;
for (TSDepart tsdepart : depatrList) {
String sqls = null;
Object[] paramss = null;
map = new HashMap<String, Object>();
map.put("id", tsdepart.getId());
map.put("name", tsdepart.getDepartname());
if (tsdepart.getTSPDepart() != null) {
map.put("pId", tsdepart.getTSPDepart().getId());
map.put("open", false);
} else {
map.put("pId", "1");
map.put("open", false);
}
sqls = "select count(1) from t_s_depart t where t.parentdepartid = ?";
paramss = new Object[]{tsdepart.getId()};
long counts = this.systemService.getCountForJdbcParam(sqls, paramss);
if (counts > 0) {
dataList.add(map);
} else {
TSDepart de = this.systemService.get(TSDepart.class, tsdepart.getId());
if (de != null) {
map.put("id", de.getId());
map.put("name", de.getDepartname());
if (tsdepart.getTSPDepart() != null) {
map.put("pId", tsdepart.getTSPDepart().getId());
map.put("open", false);
} else {
map.put("pId", "1");
map.put("open", false);
}
dataList.add(map);
} else {
map.put("open", false);
dataList.add(map);
}
}
}
j.setObj(dataList);
} catch (Exception e) {
e.printStackTrace();
}
return j;
}
/**
*
*
* @param request
* @param response
*/
@RequestMapping(params = "getAutocompleteData", method = {RequestMethod.GET, RequestMethod.POST})
public void getAutocompleteData(HttpServletRequest request, HttpServletResponse response) {
String searchVal = request.getParameter("searchVal");
String hql = "from TSUser where userName like '%" + searchVal + "%'";
List autoList = systemService.findHql(hql);
try {
response.setContentType("application/json;charset=UTF-8");
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
response.getWriter().write(JSONHelper.listtojson(new String[]{"userName"},1,autoList));
response.getWriter().write(JSONHelper.listtojson(new String[]{"userName"}, 1, autoList));
response.getWriter().flush();
} catch (Exception e1) {
e1.printStackTrace();
}finally{
try {
response.getWriter().close();
} catch (IOException e) {
}
}
} catch (Exception e1) {
e1.printStackTrace();
} finally {
try {
response.getWriter().close();
} catch (IOException e) {
}
}
}
}
}

View File

@ -146,7 +146,6 @@ public class JeecgListDemoController extends BaseController {
* @param request
* @param response
* @param dataGrid
* @param user
*/
@RequestMapping(params = "datagrid")
@ -240,10 +239,12 @@ public class JeecgListDemoController extends BaseController {
if (StringUtil.isNotEmpty(jeecgDemo.getId())) {
jeecgDemo = jeecgDemoService.getEntity(JeecgDemoEntity.class, jeecgDemo.getId());
req.setAttribute("jgDemo", jeecgDemo);
if ("0".equals(jeecgDemo.getSex()))
req.setAttribute("sex", "男");
if ("1".equals(jeecgDemo.getSex()))
req.setAttribute("sex", "女");
if ("0".equals(jeecgDemo.getSex())) {
req.setAttribute("sex", "男");
}
if ("1".equals(jeecgDemo.getSex())) {
req.setAttribute("sex", "女");
}
}
return new ModelAndView("com/jeecg/demo/jeecgDemo-print");
}
@ -304,7 +305,7 @@ public class JeecgListDemoController extends BaseController {
/**
* jeecg_demo
*
* @param ids
* @param jeecgDemo
* @return
*/
@RequestMapping(params = "doAdd")
@ -328,7 +329,7 @@ public class JeecgListDemoController extends BaseController {
/**
* jeecg_demo
*
* @param ids
* @param jeecgDemo
* @return
*/
@RequestMapping(params = "doUpdate")

View File

@ -18,6 +18,13 @@ import com.jeecg.demo.entity.JeecgLogReport;
@MiniDao
public interface JeecgMinidaoDao {
/**
* @Description
* @Author xushanchang
* @Date 2021/7/411:08
* @Param
* @return
**/
@Arguments("pid")
@Sql("select ID,NAME,PID from t_s_region where pid=:pid order by name_en")
List<Map<String, String>> getProCity(String pid);

View File

@ -20,20 +20,23 @@ import com.jeecg.demo.service.JeecgDemoServiceI;
public class JeecgDemoServiceImpl extends CommonServiceImpl implements JeecgDemoServiceI {
public void delete(JeecgDemoEntity entity) throws Exception{
@Override
public void delete(JeecgDemoEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(JeecgDemoEntity entity) throws Exception{
@Override
public Serializable save(JeecgDemoEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(JeecgDemoEntity entity) throws Exception{
@Override
public void saveOrUpdate(JeecgDemoEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -55,7 +58,7 @@ public class JeecgDemoServiceImpl extends CommonServiceImpl implements JeecgDemo
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(JeecgDemoEntity t) throws Exception{

View File

@ -1,16 +1,12 @@
package com.zzjee.api;
import com.sap.conn.jco.JCoParameterList;
import com.sap.conn.jco.JCoTable;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.jeecgframework.core.util.*;
import org.jeecgframework.web.system.service.SystemService;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.web.system.service.SystemService;
import org.jeecgframework.web.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@ -18,12 +14,7 @@ import org.springframework.web.util.UriComponentsBuilder;
import javax.validation.Validator;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import static com.xiaoleilu.hutool.date.DateTime.now;
@Controller
@RequestMapping(value = "/tmsapi")

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class BaCostConfServiceImpl extends CommonServiceImpl implements BaCostConfServiceI {
public void delete(BaCostConfEntity entity) throws Exception{
@Override
public void delete(BaCostConfEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(BaCostConfEntity entity) throws Exception{
@Override
public Serializable save(BaCostConfEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(BaCostConfEntity entity) throws Exception{
@Override
public void saveOrUpdate(BaCostConfEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class BaCostConfServiceImpl extends CommonServiceImpl implements BaCostCo
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(BaCostConfEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class BaCostServiceImpl extends CommonServiceImpl implements BaCostServiceI {
public void delete(BaCostEntity entity) throws Exception{
@Override
public void delete(BaCostEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(BaCostEntity entity) throws Exception{
@Override
public Serializable save(BaCostEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(BaCostEntity entity) throws Exception{
@Override
public void saveOrUpdate(BaCostEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class BaCostServiceImpl extends CommonServiceImpl implements BaCostServic
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(BaCostEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class BaGoodsTypeServiceImpl extends CommonServiceImpl implements BaGoodsTypeServiceI {
public void delete(BaGoodsTypeEntity entity) throws Exception{
@Override
public void delete(BaGoodsTypeEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(BaGoodsTypeEntity entity) throws Exception{
@Override
public Serializable save(BaGoodsTypeEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(BaGoodsTypeEntity entity) throws Exception{
@Override
public void saveOrUpdate(BaGoodsTypeEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class BaGoodsTypeServiceImpl extends CommonServiceImpl implements BaGoods
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(BaGoodsTypeEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class BaPlatformServiceImpl extends CommonServiceImpl implements BaPlatformServiceI {
public void delete(BaPlatformEntity entity) throws Exception{
@Override
public void delete(BaPlatformEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(BaPlatformEntity entity) throws Exception{
@Override
public Serializable save(BaPlatformEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(BaPlatformEntity entity) throws Exception{
@Override
public void saveOrUpdate(BaPlatformEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class BaPlatformServiceImpl extends CommonServiceImpl implements BaPlatfo
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(BaPlatformEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class BaStoreServiceImpl extends CommonServiceImpl implements BaStoreServiceI {
public void delete(BaStoreEntity entity) throws Exception{
@Override
public void delete(BaStoreEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(BaStoreEntity entity) throws Exception{
@Override
public Serializable save(BaStoreEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(BaStoreEntity entity) throws Exception{
@Override
public void saveOrUpdate(BaStoreEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class BaStoreServiceImpl extends CommonServiceImpl implements BaStoreServ
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(BaStoreEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class BaUnitServiceImpl extends CommonServiceImpl implements BaUnitServiceI {
public void delete(BaUnitEntity entity) throws Exception{
@Override
public void delete(BaUnitEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(BaUnitEntity entity) throws Exception{
@Override
public Serializable save(BaUnitEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(BaUnitEntity entity) throws Exception{
@Override
public void saveOrUpdate(BaUnitEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class BaUnitServiceImpl extends CommonServiceImpl implements BaUnitServic
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(BaUnitEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class TmsYufeiConfServiceImpl extends CommonServiceImpl implements TmsYufeiConfServiceI {
public void delete(TmsYufeiConfEntity entity) throws Exception{
@Override
public void delete(TmsYufeiConfEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(TmsYufeiConfEntity entity) throws Exception{
@Override
public Serializable save(TmsYufeiConfEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(TmsYufeiConfEntity entity) throws Exception{
@Override
public void saveOrUpdate(TmsYufeiConfEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class TmsYufeiConfServiceImpl extends CommonServiceImpl implements TmsYuf
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(TmsYufeiConfEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WmsWaveConfServiceImpl extends CommonServiceImpl implements WmsWaveConfServiceI {
public void delete(WmsWaveConfEntity entity) throws Exception{
@Override
public void delete(WmsWaveConfEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WmsWaveConfEntity entity) throws Exception{
@Override
public Serializable save(WmsWaveConfEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WmsWaveConfEntity entity) throws Exception{
@Override
public void saveOrUpdate(WmsWaveConfEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WmsWaveConfServiceImpl extends CommonServiceImpl implements WmsWave
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WmsWaveConfEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class RpPeriodInOutServiceImpl extends CommonServiceImpl implements RpPeriodInOutServiceI {
public void delete(RpPeriodInOutEntity entity) throws Exception{
@Override
public void delete(RpPeriodInOutEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(RpPeriodInOutEntity entity) throws Exception{
@Override
public Serializable save(RpPeriodInOutEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(RpPeriodInOutEntity entity) throws Exception{
@Override
public void saveOrUpdate(RpPeriodInOutEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class RpPeriodInOutServiceImpl extends CommonServiceImpl implements RpPer
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(RpPeriodInOutEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class MvCusCostServiceImpl extends CommonServiceImpl implements MvCusCostServiceI {
public void delete(MvCusCostEntity entity) throws Exception{
@Override
public void delete(MvCusCostEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(MvCusCostEntity entity) throws Exception{
@Override
public Serializable save(MvCusCostEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(MvCusCostEntity entity) throws Exception{
@Override
public void saveOrUpdate(MvCusCostEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class MvCusCostServiceImpl extends CommonServiceImpl implements MvCusCost
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(MvCusCostEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WvDayCostSumServiceImpl extends CommonServiceImpl implements WvDayCostSumServiceI {
public void delete(WvDayCostSumEntity entity) throws Exception{
@Override
public void delete(WvDayCostSumEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WvDayCostSumEntity entity) throws Exception{
@Override
public Serializable save(WvDayCostSumEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WvDayCostSumEntity entity) throws Exception{
@Override
public void saveOrUpdate(WvDayCostSumEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WvDayCostSumServiceImpl extends CommonServiceImpl implements WvDayC
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WvDayCostSumEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class FxjOtherLoginServiceImpl extends CommonServiceImpl implements FxjOtherLoginServiceI {
public void delete(FxjOtherLoginEntity entity) throws Exception{
@Override
public void delete(FxjOtherLoginEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(FxjOtherLoginEntity entity) throws Exception{
@Override
public Serializable save(FxjOtherLoginEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(FxjOtherLoginEntity entity) throws Exception{
@Override
public void saveOrUpdate(FxjOtherLoginEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class FxjOtherLoginServiceImpl extends CommonServiceImpl implements FxjOt
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(FxjOtherLoginEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WxConfigServiceImpl extends CommonServiceImpl implements WxConfigServiceI {
public void delete(WxConfigEntity entity) throws Exception{
@Override
public void delete(WxConfigEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WxConfigEntity entity) throws Exception{
@Override
public Serializable save(WxConfigEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WxConfigEntity entity) throws Exception{
@Override
public void saveOrUpdate(WxConfigEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WxConfigServiceImpl extends CommonServiceImpl implements WxConfigSe
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WxConfigEntity t) throws Exception{

View File

@ -8,7 +8,8 @@ import java.util.List;
public interface TMdBomHeadServiceI extends CommonService {
public <T> void delete(T entity);
@Override
public <T> void delete(T entity);
/**
*
*
@ -25,19 +26,19 @@ public interface TMdBomHeadServiceI extends CommonService {
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(TMdBomHeadEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(TMdBomHeadEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(TMdBomHeadEntity t);

View File

@ -23,20 +23,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class MdBinServiceImpl extends CommonServiceImpl implements MdBinServiceI {
public void delete(MdBinEntity entity) throws Exception{
@Override
public void delete(MdBinEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(MdBinEntity entity) throws Exception{
@Override
public Serializable save(MdBinEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(MdBinEntity entity) throws Exception{
@Override
public void saveOrUpdate(MdBinEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -68,7 +71,7 @@ public class MdBinServiceImpl extends CommonServiceImpl implements MdBinServiceI
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(MdBinEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class MdCusOtherServiceImpl extends CommonServiceImpl implements MdCusOtherServiceI {
public void delete(MdCusOtherEntity entity) throws Exception{
@Override
public void delete(MdCusOtherEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(MdCusOtherEntity entity) throws Exception{
@Override
public Serializable save(MdCusOtherEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(MdCusOtherEntity entity) throws Exception{
@Override
public void saveOrUpdate(MdCusOtherEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class MdCusOtherServiceImpl extends CommonServiceImpl implements MdCusOth
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(MdCusOtherEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class MdCusServiceImpl extends CommonServiceImpl implements MdCusServiceI {
public void delete(MdCusEntity entity) throws Exception{
@Override
public void delete(MdCusEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(MdCusEntity entity) throws Exception{
@Override
public Serializable save(MdCusEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(MdCusEntity entity) throws Exception{
@Override
public void saveOrUpdate(MdCusEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class MdCusServiceImpl extends CommonServiceImpl implements MdCusServiceI
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(MdCusEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class MdGoodsServiceImpl extends CommonServiceImpl implements MdGoodsServiceI {
public void delete(MdGoodsEntity entity) throws Exception{
@Override
public void delete(MdGoodsEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(MdGoodsEntity entity) throws Exception{
@Override
public Serializable save(MdGoodsEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(MdGoodsEntity entity) throws Exception{
@Override
public void saveOrUpdate(MdGoodsEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class MdGoodsServiceImpl extends CommonServiceImpl implements MdGoodsServ
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(MdGoodsEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class MdSupServiceImpl extends CommonServiceImpl implements MdSupServiceI {
public void delete(MdSupEntity entity) throws Exception{
@Override
public void delete(MdSupEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(MdSupEntity entity) throws Exception{
@Override
public Serializable save(MdSupEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(MdSupEntity entity) throws Exception{
@Override
public void saveOrUpdate(MdSupEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class MdSupServiceImpl extends CommonServiceImpl implements MdSupServiceI
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(MdSupEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class MvCusOtherServiceImpl extends CommonServiceImpl implements MvCusOtherServiceI {
public void delete(MvCusOtherEntity entity) throws Exception{
@Override
public void delete(MvCusOtherEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(MvCusOtherEntity entity) throws Exception{
@Override
public Serializable save(MvCusOtherEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(MvCusOtherEntity entity) throws Exception{
@Override
public void saveOrUpdate(MvCusOtherEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class MvCusOtherServiceImpl extends CommonServiceImpl implements MvCusOth
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(MvCusOtherEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class MvGoodsServiceImpl extends CommonServiceImpl implements MvGoodsServiceI {
public void delete(MvGoodsEntity entity) throws Exception{
@Override
public void delete(MvGoodsEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(MvGoodsEntity entity) throws Exception{
@Override
public Serializable save(MvGoodsEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(MvGoodsEntity entity) throws Exception{
@Override
public void saveOrUpdate(MvGoodsEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class MvGoodsServiceImpl extends CommonServiceImpl implements MvGoodsServ
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(MvGoodsEntity t) throws Exception{

View File

@ -18,14 +18,16 @@ import java.util.UUID;
@Transactional
public class TMdBomHeadServiceImpl extends CommonServiceImpl implements TMdBomHeadServiceI {
public <T> void delete(T entity) {
@Override
public <T> void delete(T entity) {
super.delete(entity);
//执行删除操作配置的sql增强
this.doDelSql((TMdBomHeadEntity)entity);
}
public void addMain(TMdBomHeadEntity tMdBomHead,
List<TMdBomItemEntity> tMdBomItemList){
@Override
public void addMain(TMdBomHeadEntity tMdBomHead,
List<TMdBomItemEntity> tMdBomItemList){
//保存主信息
this.save(tMdBomHead);
@ -40,8 +42,9 @@ public class TMdBomHeadServiceImpl extends CommonServiceImpl implements TMdBomHe
}
public void updateMain(TMdBomHeadEntity tMdBomHead,
List<TMdBomItemEntity> tMdBomItemList) {
@Override
public void updateMain(TMdBomHeadEntity tMdBomHead,
List<TMdBomItemEntity> tMdBomItemList) {
//保存主表信息
this.saveOrUpdate(tMdBomHead);
//===================================================================================
@ -89,7 +92,8 @@ public class TMdBomHeadServiceImpl extends CommonServiceImpl implements TMdBomHe
}
public void delMain(TMdBomHeadEntity tMdBomHead) {
@Override
public void delMain(TMdBomHeadEntity tMdBomHead) {
//删除主表信息
this.delete(tMdBomHead);
//===================================================================================
@ -105,26 +109,29 @@ public class TMdBomHeadServiceImpl extends CommonServiceImpl implements TMdBomHe
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(TMdBomHeadEntity t){
@Override
public boolean doAddSql(TMdBomHeadEntity t){
return true;
}
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(TMdBomHeadEntity t){
@Override
public boolean doUpdateSql(TMdBomHeadEntity t){
return true;
}
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(TMdBomHeadEntity t){
@Override
public boolean doDelSql(TMdBomHeadEntity t){
return true;
}

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class MvStockYjServiceImpl extends CommonServiceImpl implements MvStockYjServiceI {
public void delete(MvStockYjEntity entity) throws Exception{
@Override
public void delete(MvStockYjEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(MvStockYjEntity entity) throws Exception{
@Override
public Serializable save(MvStockYjEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(MvStockYjEntity entity) throws Exception{
@Override
public void saveOrUpdate(MvStockYjEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class MvStockYjServiceImpl extends CommonServiceImpl implements MvStockYj
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(MvStockYjEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class OmsOederDetailServiceImpl extends CommonServiceImpl implements OmsOederDetailServiceI {
public void delete(OmsOederDetailEntity entity) throws Exception{
@Override
public void delete(OmsOederDetailEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(OmsOederDetailEntity entity) throws Exception{
@Override
public Serializable save(OmsOederDetailEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(OmsOederDetailEntity entity) throws Exception{
@Override
public void saveOrUpdate(OmsOederDetailEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class OmsOederDetailServiceImpl extends CommonServiceImpl implements OmsO
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(OmsOederDetailEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class RpWmHisStockKuServiceImpl extends CommonServiceImpl implements RpWmHisStockKuServiceI {
public void delete(RpWmHisStockKuEntity entity) throws Exception{
@Override
public void delete(RpWmHisStockKuEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(RpWmHisStockKuEntity entity) throws Exception{
@Override
public Serializable save(RpWmHisStockKuEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(RpWmHisStockKuEntity entity) throws Exception{
@Override
public void saveOrUpdate(RpWmHisStockKuEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class RpWmHisStockKuServiceImpl extends CommonServiceImpl implements RpWm
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(RpWmHisStockKuEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class RpWmInQmServiceImpl extends CommonServiceImpl implements RpWmInQmServiceI {
public void delete(RpWmInQmEntity entity) throws Exception{
@Override
public void delete(RpWmInQmEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(RpWmInQmEntity entity) throws Exception{
@Override
public Serializable save(RpWmInQmEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(RpWmInQmEntity entity) throws Exception{
@Override
public void saveOrUpdate(RpWmInQmEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class RpWmInQmServiceImpl extends CommonServiceImpl implements RpWmInQmSe
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(RpWmInQmEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class RpWmToDownGoodsServiceImpl extends CommonServiceImpl implements RpWmToDownGoodsServiceI {
public void delete(RpWmToDownGoodsEntity entity) throws Exception{
@Override
public void delete(RpWmToDownGoodsEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(RpWmToDownGoodsEntity entity) throws Exception{
@Override
public Serializable save(RpWmToDownGoodsEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(RpWmToDownGoodsEntity entity) throws Exception{
@Override
public void saveOrUpdate(RpWmToDownGoodsEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class RpWmToDownGoodsServiceImpl extends CommonServiceImpl implements RpW
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(RpWmToDownGoodsEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class RpWmToUpGoodsServiceImpl extends CommonServiceImpl implements RpWmToUpGoodsServiceI {
public void delete(RpWmToUpGoodsEntity entity) throws Exception{
@Override
public void delete(RpWmToUpGoodsEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(RpWmToUpGoodsEntity entity) throws Exception{
@Override
public Serializable save(RpWmToUpGoodsEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(RpWmToUpGoodsEntity entity) throws Exception{
@Override
public void saveOrUpdate(RpWmToUpGoodsEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class RpWmToUpGoodsServiceImpl extends CommonServiceImpl implements RpWmT
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(RpWmToUpGoodsEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class RpWmUpAndDownServiceImpl extends CommonServiceImpl implements RpWmUpAndDownServiceI {
public void delete(RpWmUpAndDownEntity entity) throws Exception{
@Override
public void delete(RpWmUpAndDownEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(RpWmUpAndDownEntity entity) throws Exception{
@Override
public Serializable save(RpWmUpAndDownEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(RpWmUpAndDownEntity entity) throws Exception{
@Override
public void saveOrUpdate(RpWmUpAndDownEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class RpWmUpAndDownServiceImpl extends CommonServiceImpl implements RpWmU
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(RpWmUpAndDownEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class RfidBuseServiceImpl extends CommonServiceImpl implements RfidBuseServiceI {
public void delete(RfidBuseEntity entity) throws Exception{
@Override
public void delete(RfidBuseEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(RfidBuseEntity entity) throws Exception{
@Override
public Serializable save(RfidBuseEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(RfidBuseEntity entity) throws Exception{
@Override
public void saveOrUpdate(RfidBuseEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class RfidBuseServiceImpl extends CommonServiceImpl implements RfidBuseSe
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(RfidBuseEntity t) throws Exception{

View File

@ -183,8 +183,9 @@ public class SapRFC {
}
public String convertNull(String str) {
if (str == null)
return "";
if (str == null) {
return "";
}
return str;
}

View File

@ -180,9 +180,9 @@ public class HttpClientUtil {
}
/**
* SSLContext
* @param trustFile
* @param trustFileInputStream
* @param trustPasswd
* @param keyFile
* @param keyFileInputStream
* @param keyPasswd
* @return
* @throws NoSuchAlgorithmException
@ -225,7 +225,9 @@ public class HttpClientUtil {
* @return char[]
*/
public static char[] str2CharArray(String str) {
if(null == str) return null;
if(null == str) {
return null;
}
return str.toCharArray();
}
@ -248,8 +250,9 @@ public class HttpClientUtil {
byte[] data = new byte[BUFFER_SIZE];
int count = -1;
while((count = in.read(data,0,BUFFER_SIZE)) != -1)
while((count = in.read(data,0,BUFFER_SIZE)) != -1) {
outStream.write(data, 0, count);
}
data = null;
byte[] outByte = outStream.toByteArray();

View File

@ -11,16 +11,18 @@ public class MD5Util {
*/
private static String byteArrayToHexString(byte b[]) {
StringBuffer resultSb = new StringBuffer();
for (int i = 0; i < b.length; i++)
for (int i = 0; i < b.length; i++) {
resultSb.append(byteToHexString(b[i]));
}
return resultSb.toString();
}
private static String byteToHexString(byte b) {
int n = b;
if (n < 0)
if (n < 0) {
n += 256;
}
int d1 = n / 16;
int d2 = n % 16;
return hexDigits[d1] + hexDigits[d2];
@ -32,12 +34,13 @@ public class MD5Util {
//Dm DM_STRING_CTOR 因为使用StringString构造函数生成新字符串会浪费内存推荐使用原有字符串。
resultString = origin;
MessageDigest md = MessageDigest.getInstance("MD5");
if (charsetname == null || "".equals(charsetname))
if (charsetname == null || "".equals(charsetname)) {
resultString = byteArrayToHexString(md.digest(resultString
.getBytes()));
else
} else {
resultString = byteArrayToHexString(md.digest(resultString
.getBytes(charsetname)));
}
} catch (Exception exception) {
}
return resultString;

View File

@ -52,8 +52,9 @@ public class PrepayIdRequestHandler extends RequestHandler {
resContent = httpClient.getResContent();
System.out.println("获取prepayid的返回值"+resContent);
Map<String,String> map=XMLUtil.doXMLParse(resContent);
if(map.containsKey("prepay_id"))
if(map.containsKey("prepay_id")) {
prepayid=map.get("prepay_id");
}
}
return prepayid;
}

View File

@ -94,8 +94,9 @@ public class RequestHandler {
public void setParameter(String parameter, Object parameterValue) {
String v = "";
if(null != parameterValue) {
if(parameterValue instanceof String)
if(parameterValue instanceof String) {
v = ((String) parameterValue).trim();
}
}
this.parameters.put(parameter, v);
}

View File

@ -13,8 +13,9 @@ public class TenpayUtil {
* @return String ,null,.
*/
public static String toString(Object obj) {
if(obj == null)
if(obj == null) {
return "";
}
return obj.toString();
}
@ -29,8 +30,9 @@ public class TenpayUtil {
public static int toInt(Object obj) {
int a = 0;
try {
if (obj != null)
if (obj != null) {
a = Integer.parseInt(obj.toString());
}
} catch (Exception e) {
}

View File

@ -9,8 +9,9 @@ public class UUID {
private static final int ROTATION = 99999;
public static synchronized long next() {
if (seq > ROTATION)
if (seq > ROTATION) {
seq = 0;
}
buf.delete(0, buf.length());
date.setTime(System.currentTimeMillis());
String str = String.format("%1$tY%1$tm%1$td%1$tk%1$tM%1$tS%2$05d", date, seq++);

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class SysParaServiceImpl extends CommonServiceImpl implements SysParaServiceI {
public void delete(SysParaEntity entity) throws Exception{
@Override
public void delete(SysParaEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(SysParaEntity entity) throws Exception{
@Override
public Serializable save(SysParaEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(SysParaEntity entity) throws Exception{
@Override
public void saveOrUpdate(SysParaEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class SysParaServiceImpl extends CommonServiceImpl implements SysParaServ
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(SysParaEntity t) throws Exception{

View File

@ -20,20 +20,23 @@ import java.util.UUID;
public class TmsMdCheliangServiceImpl extends CommonServiceImpl implements TmsMdCheliangServiceI {
public void delete(TmsMdCheliangEntity entity) throws Exception{
@Override
public void delete(TmsMdCheliangEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(TmsMdCheliangEntity entity) throws Exception{
@Override
public Serializable save(TmsMdCheliangEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(TmsMdCheliangEntity entity) throws Exception{
@Override
public void saveOrUpdate(TmsMdCheliangEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -65,7 +68,7 @@ public class TmsMdCheliangServiceImpl extends CommonServiceImpl implements TmsMd
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(TmsMdCheliangEntity t) throws Exception{

View File

@ -20,20 +20,23 @@ import java.util.UUID;
public class TmsMdDzServiceImpl extends CommonServiceImpl implements TmsMdDzServiceI {
public void delete(TmsMdDzEntity entity) throws Exception{
@Override
public void delete(TmsMdDzEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(TmsMdDzEntity entity) throws Exception{
@Override
public Serializable save(TmsMdDzEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(TmsMdDzEntity entity) throws Exception{
@Override
public void saveOrUpdate(TmsMdDzEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -65,7 +68,7 @@ public class TmsMdDzServiceImpl extends CommonServiceImpl implements TmsMdDzServ
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(TmsMdDzEntity t) throws Exception{

View File

@ -20,20 +20,23 @@ import java.util.UUID;
public class TmsYwDingdanServiceImpl extends CommonServiceImpl implements TmsYwDingdanServiceI {
public void delete(TmsYwDingdanEntity entity) throws Exception{
@Override
public void delete(TmsYwDingdanEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(TmsYwDingdanEntity entity) throws Exception{
@Override
public Serializable save(TmsYwDingdanEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(TmsYwDingdanEntity entity) throws Exception{
@Override
public void saveOrUpdate(TmsYwDingdanEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -65,7 +68,7 @@ public class TmsYwDingdanServiceImpl extends CommonServiceImpl implements TmsYwD
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(TmsYwDingdanEntity t) throws Exception{

View File

@ -20,20 +20,23 @@ import java.util.UUID;
public class VTmsDzServiceImpl extends CommonServiceImpl implements VTmsDzServiceI {
public void delete(VTmsDzEntity entity) throws Exception{
@Override
public void delete(VTmsDzEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(VTmsDzEntity entity) throws Exception{
@Override
public Serializable save(VTmsDzEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(VTmsDzEntity entity) throws Exception{
@Override
public void saveOrUpdate(VTmsDzEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -65,7 +68,7 @@ public class VTmsDzServiceImpl extends CommonServiceImpl implements VTmsDzServic
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(VTmsDzEntity t) throws Exception{

View File

@ -20,20 +20,23 @@ import java.util.UUID;
public class VYsddServiceImpl extends CommonServiceImpl implements VYsddServiceI {
public void delete(VYsddEntity entity) throws Exception{
@Override
public void delete(VYsddEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(VYsddEntity entity) throws Exception{
@Override
public Serializable save(VYsddEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(VYsddEntity entity) throws Exception{
@Override
public void saveOrUpdate(VYsddEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -65,7 +68,7 @@ public class VYsddServiceImpl extends CommonServiceImpl implements VYsddServiceI
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(VYsddEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WaveToDownServiceImpl extends CommonServiceImpl implements WaveToDownServiceI {
public void delete(WaveToDownEntity entity) throws Exception{
@Override
public void delete(WaveToDownEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WaveToDownEntity entity) throws Exception{
@Override
public Serializable save(WaveToDownEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WaveToDownEntity entity) throws Exception{
@Override
public void saveOrUpdate(WaveToDownEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WaveToDownServiceImpl extends CommonServiceImpl implements WaveToDo
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WaveToDownEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WaveToFjServiceImpl extends CommonServiceImpl implements WaveToFjServiceI {
public void delete(WaveToFjEntity entity) throws Exception{
@Override
public void delete(WaveToFjEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WaveToFjEntity entity) throws Exception{
@Override
public Serializable save(WaveToFjEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WaveToFjEntity entity) throws Exception{
@Override
public void saveOrUpdate(WaveToFjEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WaveToFjServiceImpl extends CommonServiceImpl implements WaveToFjSe
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WaveToFjEntity t) throws Exception{

View File

@ -8,7 +8,8 @@ import java.io.Serializable;
public interface WmCusCostHServiceI extends CommonService{
public <T> void delete(T entity);
@Override
public <T> void delete(T entity);
/**
*
*
@ -25,19 +26,19 @@ public interface WmCusCostHServiceI extends CommonService{
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(WmCusCostHEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(WmCusCostHEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(WmCusCostHEntity t);

View File

@ -8,7 +8,8 @@ import java.io.Serializable;
public interface WmImNoticeHServiceI extends CommonService{
public <T> void delete(T entity);
@Override
public <T> void delete(T entity);
/**
*
*
@ -25,19 +26,19 @@ public interface WmImNoticeHServiceI extends CommonService{
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(WmImNoticeHEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(WmImNoticeHEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(WmImNoticeHEntity t);

View File

@ -12,7 +12,8 @@ import java.io.Serializable;
public interface WmOmNoticeHServiceI extends CommonService{
public <T> void delete(T entity);
@Override
public <T> void delete(T entity);
/**
*
*
@ -31,19 +32,19 @@ public interface WmOmNoticeHServiceI extends CommonService{
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(WmOmNoticeHEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(WmOmNoticeHEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(WmOmNoticeHEntity t);

View File

@ -21,14 +21,16 @@ import java.io.Serializable;
@Transactional
public class WmCusCostHServiceImpl extends CommonServiceImpl implements WmCusCostHServiceI {
public <T> void delete(T entity) {
@Override
public <T> void delete(T entity) {
super.delete(entity);
//执行删除操作配置的sql增强
this.doDelSql((WmCusCostHEntity)entity);
}
public void addMain(WmCusCostHEntity wmCusCostH,
List<WmCusCostIEntity> wmCusCostIList){
@Override
public void addMain(WmCusCostHEntity wmCusCostH,
List<WmCusCostIEntity> wmCusCostIList){
//保存主信息
this.save(wmCusCostH);
@ -43,8 +45,9 @@ public class WmCusCostHServiceImpl extends CommonServiceImpl implements WmCusCos
}
public void updateMain(WmCusCostHEntity wmCusCostH,
List<WmCusCostIEntity> wmCusCostIList) {
@Override
public void updateMain(WmCusCostHEntity wmCusCostH,
List<WmCusCostIEntity> wmCusCostIList) {
//保存主表信息
this.saveOrUpdate(wmCusCostH);
//===================================================================================
@ -92,7 +95,8 @@ public class WmCusCostHServiceImpl extends CommonServiceImpl implements WmCusCos
}
public void delMain(WmCusCostHEntity wmCusCostH) {
@Override
public void delMain(WmCusCostHEntity wmCusCostH) {
//删除主表信息
this.delete(wmCusCostH);
//===================================================================================
@ -108,26 +112,29 @@ public class WmCusCostHServiceImpl extends CommonServiceImpl implements WmCusCos
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(WmCusCostHEntity t){
@Override
public boolean doAddSql(WmCusCostHEntity t){
return true;
}
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(WmCusCostHEntity t){
@Override
public boolean doUpdateSql(WmCusCostHEntity t){
return true;
}
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(WmCusCostHEntity t){
@Override
public boolean doDelSql(WmCusCostHEntity t){
return true;
}

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WmDayCostConfServiceImpl extends CommonServiceImpl implements WmDayCostConfServiceI {
public void delete(WmDayCostConfEntity entity) throws Exception{
@Override
public void delete(WmDayCostConfEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WmDayCostConfEntity entity) throws Exception{
@Override
public Serializable save(WmDayCostConfEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WmDayCostConfEntity entity) throws Exception{
@Override
public void saveOrUpdate(WmDayCostConfEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WmDayCostConfServiceImpl extends CommonServiceImpl implements WmDay
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WmDayCostConfEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WmDayCostServiceImpl extends CommonServiceImpl implements WmDayCostServiceI {
public void delete(WmDayCostEntity entity) throws Exception{
@Override
public void delete(WmDayCostEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WmDayCostEntity entity) throws Exception{
@Override
public Serializable save(WmDayCostEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WmDayCostEntity entity) throws Exception{
@Override
public void saveOrUpdate(WmDayCostEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WmDayCostServiceImpl extends CommonServiceImpl implements WmDayCost
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WmDayCostEntity t) throws Exception{

View File

@ -34,14 +34,16 @@ import java.io.Serializable;
@Transactional
public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNoticeHServiceI {
public <T> void delete(T entity) {
@Override
public <T> void delete(T entity) {
super.delete(entity);
//执行删除操作配置的sql增强
this.doDelSql((WmImNoticeHEntity)entity);
}
public void addMain(WmImNoticeHEntity wmImNoticeH,
List<WmImNoticeIEntity> wmImNoticeIList){
@Override
public void addMain(WmImNoticeHEntity wmImNoticeH,
List<WmImNoticeIEntity> wmImNoticeIList){
//保存主信息
this.save(wmImNoticeH);
@ -147,8 +149,9 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot
}
public void updateMain(WmImNoticeHEntity wmImNoticeH,
List<WmImNoticeIEntity> wmImNoticeIList) {
@Override
public void updateMain(WmImNoticeHEntity wmImNoticeH,
List<WmImNoticeIEntity> wmImNoticeIList) {
//保存主表信息
this.saveOrUpdate(wmImNoticeH);
//===================================================================================
@ -232,7 +235,8 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot
}
public void delMain(WmImNoticeHEntity wmImNoticeH) {
@Override
public void delMain(WmImNoticeHEntity wmImNoticeH) {
//删除主表信息
this.delete(wmImNoticeH);
//===================================================================================
@ -250,21 +254,24 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot
* -sql-
* @return
*/
public boolean doAddSql(WmImNoticeHEntity t){
@Override
public boolean doAddSql(WmImNoticeHEntity t){
return true;
}
/**
* -sql-
* @return
*/
public boolean doUpdateSql(WmImNoticeHEntity t){
@Override
public boolean doUpdateSql(WmImNoticeHEntity t){
return true;
}
/**
* -sql-
* @return
*/
public boolean doDelSql(WmImNoticeHEntity t){
@Override
public boolean doDelSql(WmImNoticeHEntity t){
return true;
}

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WmInQmIServiceImpl extends CommonServiceImpl implements WmInQmIServiceI {
public void delete(WmInQmIEntity entity) throws Exception{
@Override
public void delete(WmInQmIEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WmInQmIEntity entity) throws Exception{
@Override
public Serializable save(WmInQmIEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WmInQmIEntity entity) throws Exception{
@Override
public void saveOrUpdate(WmInQmIEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WmInQmIServiceImpl extends CommonServiceImpl implements WmInQmIServ
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WmInQmIEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WmNoticeConfServiceImpl extends CommonServiceImpl implements WmNoticeConfServiceI {
public void delete(WmNoticeConfEntity entity) throws Exception{
@Override
public void delete(WmNoticeConfEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WmNoticeConfEntity entity) throws Exception{
@Override
public Serializable save(WmNoticeConfEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WmNoticeConfEntity entity) throws Exception{
@Override
public void saveOrUpdate(WmNoticeConfEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WmNoticeConfServiceImpl extends CommonServiceImpl implements WmNoti
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WmNoticeConfEntity t) throws Exception{

View File

@ -30,14 +30,16 @@ import java.io.Serializable;
@Transactional
public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNoticeHServiceI {
public <T> void delete(T entity) {
@Override
public <T> void delete(T entity) {
super.delete(entity);
//执行删除操作配置的sql增强
this.doDelSql((WmOmNoticeHEntity)entity);
}
public void addMain(WmOmNoticeHEntity wmOmNoticeH,
List<WmOmNoticeIEntity> wmOmNoticeIList){
@Override
public void addMain(WmOmNoticeHEntity wmOmNoticeH,
List<WmOmNoticeIEntity> wmOmNoticeIList){
//保存主信息
this.save(wmOmNoticeH);
Double jishu = 0.00;
@ -125,8 +127,9 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
//执行新增操作配置的sql增强
this.doAddSql(wmOmNoticeH);
}
public void addMaintms(WmTmsNoticeHEntity wmOmNoticeH,
List<WmTmsNoticeIEntity> wmOmNoticeIList){
@Override
public void addMaintms(WmTmsNoticeHEntity wmOmNoticeH,
List<WmTmsNoticeIEntity> wmOmNoticeIList){
//保存主信息
this.save(wmOmNoticeH);
Double jishu = 0.00;
@ -215,8 +218,9 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
}
public void updateMain(WmOmNoticeHEntity wmOmNoticeH,
List<WmOmNoticeIEntity> wmOmNoticeIList,List<TmsYwDingdanEntity> wmOmtmsIList) {
@Override
public void updateMain(WmOmNoticeHEntity wmOmNoticeH,
List<WmOmNoticeIEntity> wmOmNoticeIList, List<TmsYwDingdanEntity> wmOmtmsIList) {
//保存主表信息
this.saveOrUpdate(wmOmNoticeH);
//===================================================================================
@ -328,7 +332,8 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
}
public void delMain(WmOmNoticeHEntity wmOmNoticeH) {
@Override
public void delMain(WmOmNoticeHEntity wmOmNoticeH) {
//删除主表信息
this.delete(wmOmNoticeH);
//===================================================================================
@ -346,21 +351,24 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
* -sql-
* @return
*/
public boolean doAddSql(WmOmNoticeHEntity t){
@Override
public boolean doAddSql(WmOmNoticeHEntity t){
return true;
}
/**
* -sql-
* @return
*/
public boolean doUpdateSql(WmOmNoticeHEntity t){
@Override
public boolean doUpdateSql(WmOmNoticeHEntity t){
return true;
}
/**
* -sql-
* @return
*/
public boolean doDelSql(WmOmNoticeHEntity t){
@Override
public boolean doDelSql(WmOmNoticeHEntity t){
return true;
}

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WmOmQmIServiceImpl extends CommonServiceImpl implements WmOmQmIServiceI {
public void delete(WmOmQmIEntity entity) throws Exception{
@Override
public void delete(WmOmQmIEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WmOmQmIEntity entity) throws Exception{
@Override
public Serializable save(WmOmQmIEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WmOmQmIEntity entity) throws Exception{
@Override
public void saveOrUpdate(WmOmQmIEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WmOmQmIServiceImpl extends CommonServiceImpl implements WmOmQmIServ
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WmOmQmIEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WmPlatIoServiceImpl extends CommonServiceImpl implements WmPlatIoServiceI {
public void delete(WmPlatIoEntity entity) throws Exception{
@Override
public void delete(WmPlatIoEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WmPlatIoEntity entity) throws Exception{
@Override
public Serializable save(WmPlatIoEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WmPlatIoEntity entity) throws Exception{
@Override
public void saveOrUpdate(WmPlatIoEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WmPlatIoServiceImpl extends CommonServiceImpl implements WmPlatIoSe
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WmPlatIoEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WmSttInGoodsServiceImpl extends CommonServiceImpl implements WmSttInGoodsServiceI {
public void delete(WmSttInGoodsEntity entity) throws Exception{
@Override
public void delete(WmSttInGoodsEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WmSttInGoodsEntity entity) throws Exception{
@Override
public Serializable save(WmSttInGoodsEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WmSttInGoodsEntity entity) throws Exception{
@Override
public void saveOrUpdate(WmSttInGoodsEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WmSttInGoodsServiceImpl extends CommonServiceImpl implements WmSttI
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WmSttInGoodsEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WmToDownGoodsServiceImpl extends CommonServiceImpl implements WmToDownGoodsServiceI {
public void delete(WmToDownGoodsEntity entity) throws Exception{
@Override
public void delete(WmToDownGoodsEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WmToDownGoodsEntity entity) throws Exception{
@Override
public Serializable save(WmToDownGoodsEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WmToDownGoodsEntity entity) throws Exception{
@Override
public void saveOrUpdate(WmToDownGoodsEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WmToDownGoodsServiceImpl extends CommonServiceImpl implements WmToD
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WmToDownGoodsEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WmToMoveGoodsServiceImpl extends CommonServiceImpl implements WmToMoveGoodsServiceI {
public void delete(WmToMoveGoodsEntity entity) throws Exception{
@Override
public void delete(WmToMoveGoodsEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WmToMoveGoodsEntity entity) throws Exception{
@Override
public Serializable save(WmToMoveGoodsEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WmToMoveGoodsEntity entity) throws Exception{
@Override
public void saveOrUpdate(WmToMoveGoodsEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WmToMoveGoodsServiceImpl extends CommonServiceImpl implements WmToM
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WmToMoveGoodsEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WmToUpGoodsServiceImpl extends CommonServiceImpl implements WmToUpGoodsServiceI {
public void delete(WmToUpGoodsEntity entity) throws Exception{
@Override
public void delete(WmToUpGoodsEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WmToUpGoodsEntity entity) throws Exception{
@Override
public Serializable save(WmToUpGoodsEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WmToUpGoodsEntity entity) throws Exception{
@Override
public void saveOrUpdate(WmToUpGoodsEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WmToUpGoodsServiceImpl extends CommonServiceImpl implements WmToUpG
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WmToUpGoodsEntity t) throws Exception{

View File

@ -23,20 +23,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WvStockServiceImpl extends CommonServiceImpl implements WvStockServiceI {
public void delete(WvStockEntity entity) throws Exception{
@Override
public void delete(WvStockEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WvStockEntity entity) throws Exception{
@Override
public Serializable save(WvStockEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WvStockEntity entity) throws Exception{
@Override
public void saveOrUpdate(WvStockEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -68,7 +71,7 @@ public class WvStockServiceImpl extends CommonServiceImpl implements WvStockServ
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WvStockEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WvStockSttBinServiceImpl extends CommonServiceImpl implements WvStockSttBinServiceI {
public void delete(WvStockSttBinEntity entity) throws Exception{
@Override
public void delete(WvStockSttBinEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WvStockSttBinEntity entity) throws Exception{
@Override
public Serializable save(WvStockSttBinEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WvStockSttBinEntity entity) throws Exception{
@Override
public void saveOrUpdate(WvStockSttBinEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WvStockSttBinServiceImpl extends CommonServiceImpl implements WvSto
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WvStockSttBinEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WvGiNoticeServiceImpl extends CommonServiceImpl implements WvGiNoticeServiceI {
public void delete(WvGiNoticeEntity entity) throws Exception{
@Override
public void delete(WvGiNoticeEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WvGiNoticeEntity entity) throws Exception{
@Override
public Serializable save(WvGiNoticeEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WvGiNoticeEntity entity) throws Exception{
@Override
public void saveOrUpdate(WvGiNoticeEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WvGiNoticeServiceImpl extends CommonServiceImpl implements WvGiNoti
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WvGiNoticeEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WvGiServiceImpl extends CommonServiceImpl implements WvGiServiceI {
public void delete(WvGiEntity entity) throws Exception{
@Override
public void delete(WvGiEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WvGiEntity entity) throws Exception{
@Override
public Serializable save(WvGiEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WvGiEntity entity) throws Exception{
@Override
public void saveOrUpdate(WvGiEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WvGiServiceImpl extends CommonServiceImpl implements WvGiServiceI {
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WvGiEntity t) throws Exception{

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class WvNoticeServiceImpl extends CommonServiceImpl implements WvNoticeServiceI {
public void delete(WvNoticeEntity entity) throws Exception{
@Override
public void delete(WvNoticeEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WvNoticeEntity entity) throws Exception{
@Override
public Serializable save(WvNoticeEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WvNoticeEntity entity) throws Exception{
@Override
public void saveOrUpdate(WvNoticeEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class WvNoticeServiceImpl extends CommonServiceImpl implements WvNoticeSe
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(WvNoticeEntity t) throws Exception{

View File

@ -1,14 +1,10 @@
package com.zzjee.wmutil;
import com.xiaoleilu.hutool.http.HttpUtil;
import net.sf.json.JSONObject;
import netscape.javascript.JSObject;
import org.apache.commons.chain.web.servlet.RequestParameterMapper;
import org.jeecgframework.core.util.DateUtils;
import org.jeecgframework.core.util.JSONHelper;
import org.jeecgframework.core.util.ResourceUtil;
import org.jeecgframework.core.util.StringUtil;
import org.json.HTTP;
import org.springframework.util.DigestUtils;
import java.nio.charset.Charset;
@ -44,223 +40,226 @@ public class uasUtil {
}
//
public static uasloginres getToken(String master) {
uasloginres uasloginres = null;
String url;
url = "http://36.110.2.114:8099/XKN/wms2uas/login.action";
try{
url = ResourceUtil.getConfigByName("uas.url")+"wms2uas/login.action";
}catch (Exception e){
try {
url = ResourceUtil.getConfigByName("uas.url") + "wms2uas/login.action";
} catch (Exception e) {
}
Map<String, Object> paramMap = new HashMap<String, Object>();
String userName= "xknTest";
String passWord = "xknTest123";
master = "XKN_TEST";
try{
String userName = "xknTest";
String passWord = "xknTest123";
master = "XKN_TEST";
try {
userName = ResourceUtil.getConfigByName("uas.userName");
}catch (Exception e){
} catch (Exception e) {
}
try{
passWord = ResourceUtil.getConfigByName("uas.passWord");
}catch (Exception e){
try {
passWord = ResourceUtil.getConfigByName("uas.passWord");
} catch (Exception e) {
}
try{
if(StringUtil.isEmpty(master)){
try {
if (StringUtil.isEmpty(master)) {
master = ResourceUtil.getConfigByName("uas.master");
}
}catch (Exception e){
} catch (Exception e) {
}
paramMap.put("userName",userName);
paramMap.put("passWord",passWord);
paramMap.put("master",master);
String res = HttpUtil.post(url,paramMap);
uasloginres = JSONHelper.fromJsonToObject(res,uasloginres.class);
paramMap.put("userName", userName);
paramMap.put("passWord", passWord);
paramMap.put("master", master);
String res = HttpUtil.post(url, paramMap);
uasloginres = JSONHelper.fromJsonToObject(res, uasloginres.class);
org.jeecgframework.core.util.LogUtil
.info("===================获取TOKEN==================="+uasloginres);
return uasloginres;
.info("===================获取TOKEN===================" + uasloginres);
return uasloginres;
}
public static productResult getProduct(Map<String, Object> params) {
productResult productResult = null;
String token=null;
String url = ResourceUtil.getConfigByName("uas.url")+"basic/getProduct.action";
String token = null;
String url = ResourceUtil.getConfigByName("uas.url") + "basic/getProduct.action";
String master = ResourceUtil.getConfigByName("uas.master");
token = getToken("").getToken();
Map<String, Object> paramMap = new HashMap<String, Object>();
String formDate = DateUtils.date2Str(DateUtils.date_sdf);
try{
try {
formDate = params.get("formDate").toString();
}catch (Exception e){
} catch (Exception e) {
}
paramMap.put("formDate",formDate);
paramMap.put("token",token);
paramMap.put("master",master);
paramMap.put("timestamp",DateUtils.gettimestamp());
paramMap.put("formDate", formDate);
paramMap.put("token", token);
paramMap.put("master", master);
paramMap.put("timestamp", DateUtils.gettimestamp());
String sign = createSign(paramMap);
paramMap.put("sign",sign);
String res = HttpUtil.post(url,paramMap);
productResult = JSONHelper.fromJsonToObject(res,productResult.class);
paramMap.put("sign", sign);
String res = HttpUtil.post(url, paramMap);
productResult = JSONHelper.fromJsonToObject(res, productResult.class);
org.jeecgframework.core.util.LogUtil
.info("===================获取商品==================="+productResult);
return productResult;
.info("===================获取商品===================" + productResult);
return productResult;
}
public static customerResult getCustomer(Map<String, Object> params) {
customerResult customerResult = null;
String token=null;
String url = ResourceUtil.getConfigByName("uas.url")+"basic/getCustomer.action";
String token = null;
String url = ResourceUtil.getConfigByName("uas.url") + "basic/getCustomer.action";
String master = ResourceUtil.getConfigByName("uas.master");
token = getToken("").getToken();
Map<String, Object> paramMap = new HashMap<String, Object>();
String formDate = DateUtils.date2Str(DateUtils.date_sdf);
try{
try {
formDate = params.get("formDate").toString();
}catch (Exception e){
} catch (Exception e) {
}
paramMap.put("formDate",formDate);
paramMap.put("token",token);
paramMap.put("master",master);
paramMap.put("timestamp",DateUtils.gettimestamp());
paramMap.put("formDate", formDate);
paramMap.put("token", token);
paramMap.put("master", master);
paramMap.put("timestamp", DateUtils.gettimestamp());
String sign = createSign(paramMap);
paramMap.put("sign",sign);
String res = HttpUtil.post(url,paramMap);
paramMap.put("sign", sign);
String res = HttpUtil.post(url, paramMap);
customerResult = JSONHelper.fromJsonToObject(res,customerResult.class);
customerResult = JSONHelper.fromJsonToObject(res, customerResult.class);
org.jeecgframework.core.util.LogUtil
.info("===================获取客户==================="+customerResult);
return customerResult;
.info("===================获取客户===================" + customerResult);
return customerResult;
}
public static vendorResult getVendor(Map<String, Object> params) {
vendorResult vendorResult = null;
String token=null;
String url = ResourceUtil.getConfigByName("uas.url")+"basic/getVendor.action";
String token = null;
String url = ResourceUtil.getConfigByName("uas.url") + "basic/getVendor.action";
String master = ResourceUtil.getConfigByName("uas.master");
token = getToken("").getToken();
Map<String, Object> paramMap = new HashMap<String, Object>();
String formDate = DateUtils.date2Str(DateUtils.date_sdf);
try{
try {
formDate = params.get("formDate").toString();
}catch (Exception e){
} catch (Exception e) {
}
paramMap.put("formDate",formDate);
paramMap.put("token",token);
paramMap.put("master",master);
paramMap.put("timestamp",DateUtils.gettimestamp());
paramMap.put("formDate", formDate);
paramMap.put("token", token);
paramMap.put("master", master);
paramMap.put("timestamp", DateUtils.gettimestamp());
String sign = createSign(paramMap);
paramMap.put("sign",sign);
String res = HttpUtil.post(url,paramMap);
paramMap.put("sign", sign);
String res = HttpUtil.post(url, paramMap);
vendorResult = JSONHelper.fromJsonToObject(res,vendorResult.class);
vendorResult = JSONHelper.fromJsonToObject(res, vendorResult.class);
org.jeecgframework.core.util.LogUtil
.info("===================获取供应商==================="+vendorResult);
return vendorResult;
.info("===================获取供应商===================" + vendorResult);
return vendorResult;
}
public static warehouseResult getWarehouse(Map<String, Object> params) {
warehouseResult warehouseResult = null;
String token=null;
String url = ResourceUtil.getConfigByName("uas.url")+"basic/getWarehouse.action";
String token = null;
String url = ResourceUtil.getConfigByName("uas.url") + "basic/getWarehouse.action";
String master = ResourceUtil.getConfigByName("uas.master");
token = getToken("").getToken();
Map<String, Object> paramMap = new HashMap<String, Object>();
String formDate = DateUtils.date2Str(DateUtils.date_sdf);
try{
try {
formDate = params.get("formDate").toString();
}catch (Exception e){
} catch (Exception e) {
}
paramMap.put("formDate",formDate);
paramMap.put("token",token);
paramMap.put("master",master);
paramMap.put("timestamp",DateUtils.gettimestamp());
paramMap.put("formDate", formDate);
paramMap.put("token", token);
paramMap.put("master", master);
paramMap.put("timestamp", DateUtils.gettimestamp());
String sign = createSign(paramMap);
paramMap.put("sign",sign);
String res = HttpUtil.post(url,paramMap);
paramMap.put("sign", sign);
String res = HttpUtil.post(url, paramMap);
warehouseResult = JSONHelper.fromJsonToObject(res,warehouseResult.class);
warehouseResult = JSONHelper.fromJsonToObject(res, warehouseResult.class);
org.jeecgframework.core.util.LogUtil
.info("===================获取仓库==================="+warehouseResult);
return warehouseResult;
.info("===================获取仓库===================" + warehouseResult);
return warehouseResult;
}
public static billResult getBil(Map<String, Object> params) {
billResult billResult = null;
String token=null;
String url = ResourceUtil.getConfigByName("uas.url")+"productio/getBill.action";
String token = null;
String url = ResourceUtil.getConfigByName("uas.url") + "productio/getBill.action";
String master = params.get("master").toString();
token = getToken(master).getToken();
Map<String, Object> paramMap = new HashMap<String, Object>();
String formDate = DateUtils.date2Str(DateUtils.date_sdf);
try{
try {
formDate = params.get("lastUpdateTime").toString();
}catch (Exception e){
} catch (Exception e) {
}
paramMap.put("pi_class",params.get("pi_class").toString());
paramMap.put("lastUpdateTime",formDate);
paramMap.put("token",token);
paramMap.put("master",master);
paramMap.put("timestamp",Calendar.getInstance().getTimeInMillis());
paramMap.put("pi_class", params.get("pi_class").toString());
paramMap.put("lastUpdateTime", formDate);
paramMap.put("token", token);
paramMap.put("master", master);
paramMap.put("timestamp", Calendar.getInstance().getTimeInMillis());
String sign = createSign(paramMap);
paramMap.put("sign",sign);
String res = HttpUtil.post(url,paramMap);
paramMap.put("sign", sign);
String res = HttpUtil.post(url, paramMap);
billResult = JSONHelper.fromJsonToObject(res,billResult.class);
billResult = JSONHelper.fromJsonToObject(res, billResult.class);
org.jeecgframework.core.util.LogUtil
.info("===================获取单据==================="+billResult);
return billResult;
.info("===================获取单据===================" + billResult);
return billResult;
}
public static sdresult getsdBil(Map<String, Object> params) {
sdresult sdresult = null;
String token=null;
String url = ResourceUtil.getConfigByName("uas.url")+"productio/getBill.action";
String token = null;
String url = ResourceUtil.getConfigByName("uas.url") + "productio/getBill.action";
String master = params.get("master").toString();
token = getToken(master).getToken();
Map<String, Object> paramMap = new HashMap<String, Object>();
String formDate = DateUtils.date2Str(DateUtils.date_sdf);
try{
try {
formDate = params.get("lastUpdateTime").toString();
}catch (Exception e){
} catch (Exception e) {
}
paramMap.put("pi_class",params.get("pi_class").toString());
paramMap.put("lastUpdateTime",formDate);
paramMap.put("token",token);
paramMap.put("master",master);
paramMap.put("timestamp",Calendar.getInstance().getTimeInMillis());
paramMap.put("pi_class", params.get("pi_class").toString());
paramMap.put("lastUpdateTime", formDate);
paramMap.put("token", token);
paramMap.put("master", master);
paramMap.put("timestamp", Calendar.getInstance().getTimeInMillis());
String sign = createSign(paramMap);
paramMap.put("sign",sign);
String res = HttpUtil.post(url,paramMap);
paramMap.put("sign", sign);
String res = HttpUtil.post(url, paramMap);
sdresult = JSONHelper.fromJsonToObject(res,sdresult.class);
sdresult = JSONHelper.fromJsonToObject(res, sdresult.class);
org.jeecgframework.core.util.LogUtil
.info("===================获取单据==================="+sdresult);
return sdresult;
.info("===================获取单据===================" + sdresult);
return sdresult;
}
public static resResult postBill(Map<String, Object> params) {
public static resResult postBill(Map<String, Object> params) {
resResult resResult = null;
String token=null;
String url = ResourceUtil.getConfigByName("uas.url")+"porductio/post.action";
String token = null;
String url = ResourceUtil.getConfigByName("uas.url") + "porductio/post.action";
String master = params.get("master").toString();
token = getToken(master).getToken();
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("data", params.get("data").toString());
paramMap.put("token",token);
paramMap.put("master",master);
paramMap.put("timestamp",Calendar.getInstance().getTimeInMillis());
paramMap.put("token", token);
paramMap.put("master", master);
paramMap.put("timestamp", Calendar.getInstance().getTimeInMillis());
String sign = createSign(paramMap);
paramMap.put("sign",sign);
String res = HttpUtil.post(url,paramMap);
paramMap.put("sign", sign);
String res = HttpUtil.post(url, paramMap);
resResult = JSONHelper.fromJsonToObject(res,resResult.class);
resResult = JSONHelper.fromJsonToObject(res, resResult.class);
org.jeecgframework.core.util.LogUtil
.info("===================提交单据==================="+resResult);
return resResult;
.info("===================提交单据===================" + resResult);
return resResult;
}
}

View File

@ -18,20 +18,23 @@ import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
public class MvStockCusServiceImpl extends CommonServiceImpl implements MvStockCusServiceI {
public void delete(MvStockCusEntity entity) throws Exception{
@Override
public void delete(MvStockCusEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(MvStockCusEntity entity) throws Exception{
@Override
public Serializable save(MvStockCusEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(MvStockCusEntity entity) throws Exception{
@Override
public void saveOrUpdate(MvStockCusEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -63,7 +66,7 @@ public class MvStockCusServiceImpl extends CommonServiceImpl implements MvStockC
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(MvStockCusEntity t) throws Exception{

View File

@ -21,20 +21,23 @@ import java.util.UUID;
public class TWzLocationServiceImpl extends CommonServiceImpl implements TWzLocationServiceI {
public void delete(TWzLocationEntity entity) throws Exception{
@Override
public void delete(TWzLocationEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(TWzLocationEntity entity) throws Exception{
@Override
public Serializable save(TWzLocationEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(TWzLocationEntity entity) throws Exception{
@Override
public void saveOrUpdate(TWzLocationEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -66,7 +69,7 @@ public class TWzLocationServiceImpl extends CommonServiceImpl implements TWzLoca
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(TWzLocationEntity t) throws Exception{

View File

@ -21,20 +21,23 @@ import java.util.UUID;
public class TWzMaterialServiceImpl extends CommonServiceImpl implements TWzMaterialServiceI {
public void delete(TWzMaterialEntity entity) throws Exception{
@Override
public void delete(TWzMaterialEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(TWzMaterialEntity entity) throws Exception{
@Override
public Serializable save(TWzMaterialEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(TWzMaterialEntity entity) throws Exception{
@Override
public void saveOrUpdate(TWzMaterialEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -66,7 +69,7 @@ public class TWzMaterialServiceImpl extends CommonServiceImpl implements TWzMate
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(TWzMaterialEntity t) throws Exception{

View File

@ -21,20 +21,23 @@ import java.util.UUID;
public class TWzSpConfServiceImpl extends CommonServiceImpl implements TWzSpConfServiceI {
public void delete(TWzSpConfEntity entity) throws Exception{
@Override
public void delete(TWzSpConfEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(TWzSpConfEntity entity) throws Exception{
@Override
public Serializable save(TWzSpConfEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(TWzSpConfEntity entity) throws Exception{
@Override
public void saveOrUpdate(TWzSpConfEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -66,7 +69,7 @@ public class TWzSpConfServiceImpl extends CommonServiceImpl implements TWzSpConf
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(TWzSpConfEntity t) throws Exception{

View File

@ -20,20 +20,23 @@ import java.util.UUID;
public class VWzPoWqServiceImpl extends CommonServiceImpl implements VWzPoWqServiceI {
public void delete(VWzPoWqEntity entity) throws Exception{
@Override
public void delete(VWzPoWqEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(VWzPoWqEntity entity) throws Exception{
@Override
public Serializable save(VWzPoWqEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(VWzPoWqEntity entity) throws Exception{
@Override
public void saveOrUpdate(VWzPoWqEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -65,7 +68,7 @@ public class VWzPoWqServiceImpl extends CommonServiceImpl implements VWzPoWqServ
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(VWzPoWqEntity t) throws Exception{

View File

@ -20,20 +20,23 @@ import java.util.UUID;
public class TWzRepairServiceImpl extends CommonServiceImpl implements TWzRepairServiceI {
public void delete(TWzRepairEntity entity) throws Exception{
@Override
public void delete(TWzRepairEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(TWzRepairEntity entity) throws Exception{
@Override
public Serializable save(TWzRepairEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(TWzRepairEntity entity) throws Exception{
@Override
public void saveOrUpdate(TWzRepairEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
@ -65,7 +68,7 @@ public class TWzRepairServiceImpl extends CommonServiceImpl implements TWzRepair
}
/**
*
* @param id
* @param t
* @return
*/
private void doDelBus(TWzRepairEntity t) throws Exception{

View File

@ -8,7 +8,8 @@ import java.util.List;
public interface TWzCkHeadServiceI extends CommonService {
public <T> void delete(T entity);
@Override
public <T> void delete(T entity);
/**
*
*
@ -25,19 +26,19 @@ public interface TWzCkHeadServiceI extends CommonService {
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(TWzCkHeadEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(TWzCkHeadEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(TWzCkHeadEntity t);

View File

@ -8,7 +8,8 @@ import java.util.List;
public interface TWzPoHeadServiceI extends CommonService {
public <T> void delete(T entity);
@Override
public <T> void delete(T entity);
/**
*
*
@ -25,19 +26,19 @@ public interface TWzPoHeadServiceI extends CommonService {
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(TWzPoHeadEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(TWzPoHeadEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(TWzPoHeadEntity t);

View File

@ -8,7 +8,8 @@ import java.util.List;
public interface TWzRkHeadServiceI extends CommonService {
public <T> void delete(T entity);
@Override
public <T> void delete(T entity);
/**
*
*
@ -25,19 +26,19 @@ public interface TWzRkHeadServiceI extends CommonService {
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(TWzRkHeadEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(TWzRkHeadEntity t);
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(TWzRkHeadEntity t);

View File

@ -19,14 +19,16 @@ import java.util.UUID;
@Transactional
public class TWzCkHeadServiceImpl extends CommonServiceImpl implements TWzCkHeadServiceI {
public <T> void delete(T entity) {
@Override
public <T> void delete(T entity) {
super.delete(entity);
//执行删除操作配置的sql增强
this.doDelSql((TWzCkHeadEntity)entity);
}
public void addMain(TWzCkHeadEntity tWzCkHead,
List<TWzCkItemEntity> tWzCkItemList){
@Override
public void addMain(TWzCkHeadEntity tWzCkHead,
List<TWzCkItemEntity> tWzCkItemList){
//保存主信息
// tWzCkHead.setBpmStatus("0");
this.save(tWzCkHead);
@ -43,8 +45,9 @@ public class TWzCkHeadServiceImpl extends CommonServiceImpl implements TWzCkHead
}
public void updateMain(TWzCkHeadEntity tWzCkHead,
List<TWzCkItemEntity> tWzCkItemList) {
@Override
public void updateMain(TWzCkHeadEntity tWzCkHead,
List<TWzCkItemEntity> tWzCkItemList) {
//保存主表信息
if(StringUtil.isNotEmpty(tWzCkHead.getId())){
try {
@ -102,7 +105,8 @@ public class TWzCkHeadServiceImpl extends CommonServiceImpl implements TWzCkHead
}
public void delMain(TWzCkHeadEntity tWzCkHead) {
@Override
public void delMain(TWzCkHeadEntity tWzCkHead) {
//删除主表信息
this.delete(tWzCkHead);
//===================================================================================
@ -118,10 +122,11 @@ public class TWzCkHeadServiceImpl extends CommonServiceImpl implements TWzCkHead
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(TWzCkHeadEntity t){
@Override
public boolean doAddSql(TWzCkHeadEntity t){
String tsql = "call p_wz_shenpi("+"'"+t.getId()+")";
try {
@ -134,18 +139,20 @@ public class TWzCkHeadServiceImpl extends CommonServiceImpl implements TWzCkHead
}
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(TWzCkHeadEntity t){
@Override
public boolean doUpdateSql(TWzCkHeadEntity t){
return true;
}
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(TWzCkHeadEntity t){
@Override
public boolean doDelSql(TWzCkHeadEntity t){
return true;
}

View File

@ -19,14 +19,16 @@ import java.util.UUID;
@Transactional
public class TWzPoHeadServiceImpl extends CommonServiceImpl implements TWzPoHeadServiceI {
public <T> void delete(T entity) {
@Override
public <T> void delete(T entity) {
super.delete(entity);
//执行删除操作配置的sql增强
this.doDelSql((TWzPoHeadEntity)entity);
}
public void addMain(TWzPoHeadEntity tWzPoHead,
List<TWzPoItemEntity> tWzPoItemList){
@Override
public void addMain(TWzPoHeadEntity tWzPoHead,
List<TWzPoItemEntity> tWzPoItemList){
//保存主信息
this.save(tWzPoHead);
@ -41,8 +43,9 @@ public class TWzPoHeadServiceImpl extends CommonServiceImpl implements TWzPoHead
}
public void updateMain(TWzPoHeadEntity tWzPoHead,
List<TWzPoItemEntity> tWzPoItemList) {
@Override
public void updateMain(TWzPoHeadEntity tWzPoHead,
List<TWzPoItemEntity> tWzPoItemList) {
//保存主表信息
if(StringUtil.isNotEmpty(tWzPoHead.getId())){
try {
@ -100,7 +103,8 @@ public class TWzPoHeadServiceImpl extends CommonServiceImpl implements TWzPoHead
}
public void delMain(TWzPoHeadEntity tWzPoHead) {
@Override
public void delMain(TWzPoHeadEntity tWzPoHead) {
//删除主表信息
this.delete(tWzPoHead);
//===================================================================================
@ -116,26 +120,29 @@ public class TWzPoHeadServiceImpl extends CommonServiceImpl implements TWzPoHead
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(TWzPoHeadEntity t){
@Override
public boolean doAddSql(TWzPoHeadEntity t){
return true;
}
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(TWzPoHeadEntity t){
@Override
public boolean doUpdateSql(TWzPoHeadEntity t){
return true;
}
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(TWzPoHeadEntity t){
@Override
public boolean doDelSql(TWzPoHeadEntity t){
return true;
}

View File

@ -19,13 +19,15 @@ import java.util.UUID;
@Transactional
public class TWzRkHeadServiceImpl extends CommonServiceImpl implements TWzRkHeadServiceI {
public <T> void delete(T entity) {
@Override
public <T> void delete(T entity) {
super.delete(entity);
//执行删除操作配置的sql增强
this.doDelSql((TWzRkHeadEntity)entity);
}
public void addMain(TWzRkHeadEntity tWzRkHead,
@Override
public void addMain(TWzRkHeadEntity tWzRkHead,
List<TWzRkItemEntity> tWzRkItemList){
//保存主信息
tWzRkHead.setBpmStatus("0");
@ -43,7 +45,8 @@ public class TWzRkHeadServiceImpl extends CommonServiceImpl implements TWzRkHead
}
public void updateMain(TWzRkHeadEntity tWzRkHead,
@Override
public void updateMain(TWzRkHeadEntity tWzRkHead,
List<TWzRkItemEntity> tWzRkItemList) {
//保存主表信息
if(StringUtil.isNotEmpty(tWzRkHead.getId())){
@ -102,7 +105,8 @@ public class TWzRkHeadServiceImpl extends CommonServiceImpl implements TWzRkHead
}
public void delMain(TWzRkHeadEntity tWzRkHead) {
@Override
public void delMain(TWzRkHeadEntity tWzRkHead) {
//删除主表信息
this.delete(tWzRkHead);
//===================================================================================
@ -118,27 +122,30 @@ public class TWzRkHeadServiceImpl extends CommonServiceImpl implements TWzRkHead
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doAddSql(TWzRkHeadEntity t){
@Override
public boolean doAddSql(TWzRkHeadEntity t){
return true;
}
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doUpdateSql(TWzRkHeadEntity t){
@Override
public boolean doUpdateSql(TWzRkHeadEntity t){
return true;
}
/**
* -sql-
* @param id
* @param t
* @return
*/
public boolean doDelSql(TWzRkHeadEntity t){
@Override
public boolean doDelSql(TWzRkHeadEntity t){
return true;
}

View File

@ -140,8 +140,6 @@ public class HttpUtil {
*
* @param url
* @param params
* @param connTimeout
* @param readTimeout
* @return
* @throws ConnectTimeoutException
* @throws SocketTimeoutException
@ -218,7 +216,6 @@ public class HttpUtil {
* GET
*
* @param url
* @param charset
* @return
* @throws Exception
*/
@ -323,28 +320,33 @@ public class HttpUtil {
private static CloseableHttpClient createSSLInsecureClient() throws GeneralSecurityException {
try {
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() {
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
@Override
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
return true;
}
}).build();
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, new X509HostnameVerifier() {
public boolean verify(String arg0, SSLSession arg1) {
@Override
public boolean verify(String arg0, SSLSession arg1) {
// TODO Auto-generated method stub
return true;
}
public void verify(String host, SSLSocket ssl) throws IOException {
@Override
public void verify(String host, SSLSocket ssl) throws IOException {
// TODO Auto-generated method stub
}
public void verify(String host, X509Certificate cert) throws SSLException {
@Override
public void verify(String host, X509Certificate cert) throws SSLException {
// TODO Auto-generated method stub
}
public void verify(String host, String[] cns, String[] subjectAlts) throws SSLException {
@Override
public void verify(String host, String[] cns, String[] subjectAlts) throws SSLException {
// TODO Auto-generated method stub
}
@ -361,7 +363,6 @@ public class HttpUtil {
*
* @param url
* http://www.xxx.com/img/333.jpg
* @param destFileName
* xxx.jpg/xxx.png/xxx.txt
* @throws ClientProtocolException
* @throws IOException

View File

@ -24,8 +24,9 @@ public class HiberAspect extends EmptyInterceptor {
@Override
public boolean onSave(Object entity, Serializable id, Object[] state,
String[] propertyNames, Type[] types) {
String[] propertyNames, Type[] types) {
TSUser currentUser = null;
try {
currentUser = ResourceUtil.getSessionUserName();
@ -102,9 +103,10 @@ public boolean onSave(Object entity, Serializable id, Object[] state,
}
@Override
public boolean onFlushDirty(Object entity, Serializable id,
Object[] currentState, Object[] previousState,
String[] propertyNames, Type[] types) {
Object[] currentState, Object[] previousState,
String[] propertyNames, Type[] types) {
TSUser currentUser = null;
try {
currentUser = ResourceUtil.getSessionUserName();

View File

@ -46,6 +46,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
/**
*
* */
@Override
public TSUser getUserByUserIdAndUserNameExits(TSUser user) {
// String password = PasswordUtil.encrypt(user.getUserName(), user.getPassword(), PasswordUtil.getStaticSalt());
// String query = "from TSUser u where u.userName = :username and u.password=:passowrd";
@ -100,6 +101,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
/**
*
* */
@Override
public TSUser findUserByAccountAndPassword(String username,String inpassword) {
// String password = PasswordUtil.encrypt(username, inpassword, PasswordUtil.getStaticSalt());
// String query = "from TSUser u where u.userName = :username and u.password=:passowrd";
@ -150,6 +152,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
/**
* admin
*/
@Override
public void pwdInit(TSUser user,String newPwd){
String query ="from TSUser u where u.userName = :username ";
Query queryObject = getSession().createQuery(query);
@ -165,6 +168,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
}
@Override
public String getUserRole(TSUser user) {
String userRole = "";
List<TSRoleUser> sRoleUser = findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
@ -180,6 +184,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
*
* @throws Exception
*/
@Override
@SuppressWarnings("unchecked")
public Object uploadFile(UploadFile uploadFile) {
Object object = uploadFile.getObject();
@ -343,6 +348,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
* @throws Exception
* @throws Exception
*/
@Override
@SuppressWarnings("unchecked")
public HttpServletResponse viewOrDownloadFile(UploadFile uploadFile) {
uploadFile.getResponse().setContentType("UTF-8");
@ -363,8 +369,9 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
e.printStackTrace();
}
} else {
if (uploadFile.getContent() != null)
bis = new ByteArrayInputStream(uploadFile.getContent());
if (uploadFile.getContent() != null) {
bis = new ByteArrayInputStream(uploadFile.getContent());
}
fileLength = uploadFile.getContent().length;
}
try {
@ -408,6 +415,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
return response;
}
@Override
public Map<Object, Object> getDataSourceMap(Template template) {
return DataSourceMap.getDataSourceMap();
}
@ -415,6 +423,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
/**
* XML importFile xml
*/
@Override
public HttpServletResponse createXml(ImportFile importFile) {
HttpServletResponse response = importFile.getResponse();
HttpServletRequest request = importFile.getRequest();
@ -465,6 +474,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
/**
* XML
*/
@Override
@SuppressWarnings("unchecked")
public void parserXml(String fileName) {
try {
@ -533,6 +543,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
*
* @return
*/
@Override
public List<ComboTree> comTree(List<TSDepart> all, ComboTree comboTree) {
List<ComboTree> trees = new ArrayList<ComboTree>();
for (TSDepart depart : all) {
@ -565,6 +576,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
return tree;
}
@Override
public List<ComboTree> ComboTree(List all, ComboTreeModel comboTreeModel, List in, boolean recursive) {
List<ComboTree> trees = new ArrayList<ComboTree>();
for (Object obj : all) {
@ -634,6 +646,7 @@ public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGene
/**
*
*/
@Override
public List<TreeGrid> treegrid(List all, TreeGridModel treeGridModel) {
List<TreeGrid> treegrid = new ArrayList<TreeGrid>();
for (Object obj : all) {

View File

@ -83,7 +83,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
@Qualifier("sessionFactory")
private SessionFactory sessionFactory;
public Session getSession() {
@Override
public Session getSession() {
// 事务必须是开启的(Required),否则获取不到
return sessionFactory.getCurrentSession();
}
@ -109,7 +110,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
*
* @return
*/
public List<DBTable> getAllDbTableName() {
@Override
public List<DBTable> getAllDbTableName() {
List<DBTable> resultList = new ArrayList<DBTable>();
SessionFactory factory = getSession().getSessionFactory();
Map<String, ClassMetadata> metaMap = factory.getAllClassMetadata();
@ -137,7 +139,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
*
* @return
*/
public Integer getAllDbTableSize() {
@Override
public Integer getAllDbTableSize() {
SessionFactory factory = getSession().getSessionFactory();
Map<String, ClassMetadata> metaMap = factory.getAllClassMetadata();
return metaMap.size();
@ -150,8 +153,9 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* @param value
* @return
*/
public <T> T findUniqueByProperty(Class<T> entityClass,
String propertyName, Object value) {
@Override
public <T> T findUniqueByProperty(Class<T> entityClass,
String propertyName, Object value) {
Assert.hasText(propertyName);
return (T) createCriteria(entityClass,
Restrictions.eq(propertyName, value)).uniqueResult();
@ -160,8 +164,9 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* .
*/
public <T> List<T> findByProperty(Class<T> entityClass,
String propertyName, Object value) {
@Override
public <T> List<T> findByProperty(Class<T> entityClass,
String propertyName, Object value) {
Assert.hasText(propertyName);
return (List<T>) createCriteria(entityClass,
Restrictions.eq(propertyName, value)).list();
@ -170,7 +175,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
*
*/
public <T> Serializable save(T entity) {
@Override
public <T> Serializable save(T entity) {
try {
Serializable id = getSession().save(entity);
//getSession().flush();
@ -192,7 +198,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* @param entitys
*
*/
public <T> void batchSave(List<T> entitys) {
@Override
public <T> void batchSave(List<T> entitys) {
for (int i = 0; i < entitys.size(); i++) {
getSession().save(entitys.get(i));
if (i % 1000 == 0) {
@ -214,7 +221,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* @param entity
*/
public <T> void saveOrUpdate(T entity) {
@Override
public <T> void saveOrUpdate(T entity) {
try {
getSession().saveOrUpdate(entity);
//getSession().flush();
@ -230,7 +238,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
*
*/
public <T> void delete(T entity) {
@Override
public <T> void delete(T entity) {
try {
getSession().delete(entity);
//getSession().flush();
@ -247,9 +256,10 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
*
*
* @param <T>
* @param pojo
* @param id
*/
public <T> void deleteEntityById(Class entityName, Serializable id) {
@Override
public <T> void deleteEntityById(Class entityName, Serializable id) {
delete(get(entityName, id));
//getSession().flush();
}
@ -261,7 +271,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
*
* @param entitys
*/
public <T> void deleteAllEntitie(Collection<T> entitys) {
@Override
public <T> void deleteAllEntitie(Collection<T> entitys) {
for (Object entity : entitys) {
getSession().delete(entity);
//getSession().flush();
@ -271,7 +282,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* Id
*/
public <T> T get(Class<T> entityClass, final Serializable id) {
@Override
public <T> T get(Class<T> entityClass, final Serializable id) {
return (T) getSession().get(entityClass, id);
@ -283,10 +295,10 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* @param <T>
* @param entityName
* @param id
* @param lock
* @return
*/
public <T> T getEntity(Class entityName, Serializable id) {
@Override
public <T> T getEntity(Class entityName, Serializable id) {
T t = (T) getSession().get(entityName, id);
if (t != null) {
@ -301,7 +313,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* @param <T>
* @param pojo
*/
public <T> void updateEntitie(T pojo) {
@Override
public <T> void updateEntitie(T pojo) {
getSession().update(pojo);
//getSession().flush();
}
@ -310,7 +323,7 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
*
*
* @param <T>
* @param pojo
* @param id
*/
public <T> void updateEntitie(String className, Object id) {
getSession().update(className, id);
@ -320,18 +333,19 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
*
*/
public <T> void updateEntityById(Class entityName, Serializable id) {
@Override
public <T> void updateEntityById(Class entityName, Serializable id) {
updateEntitie(get(entityName, id));
}
/**
* hql
*
* @param <T>
* @param query
* @return
*/
public List<T> findByQueryString(final String query) {
@Override
public List<T> findByQueryString(final String query) {
Query queryObject = getSession().createQuery(query);
List<T> list = queryObject.list();
@ -346,10 +360,11 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* hql
*
* @param <T>
* @param query
* @param hql
* @return
*/
public <T> T singleResult(String hql) {
@Override
public <T> T singleResult(String hql) {
T t = null;
Query queryObject = getSession().createQuery(hql);
List<T> list = queryObject.list();
@ -365,11 +380,11 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* hql HashMap
*
* @param <T>
* @param query
* @param hql
* @return
*/
public Map<Object, Object> getHashMapbyQuery(String hql) {
@Override
public Map<Object, Object> getHashMapbyQuery(String hql) {
Query query = getSession().createQuery(hql);
List list = query.list();
@ -385,11 +400,11 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* sql
*
* @param <T>
* @param query
* @return
*/
public int updateBySqlString(final String query) {
@Override
public int updateBySqlString(final String query) {
Query querys = getSession().createSQLQuery(query);
return querys.executeUpdate();
@ -398,11 +413,11 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* sql
*
* @param <T>
* @param query
* @param sql
* @return
*/
public List<T> findListbySql(final String sql) {
@Override
public List<T> findListbySql(final String sql) {
Query querys = getSession().createSQLQuery(sql);
return querys.list();
}
@ -412,7 +427,6 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
*
* @param <T>
* @param entityClass
* @param orderBy
* @param isAsc
* @param criterions
* @return
@ -445,7 +459,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
return criteria;
}
public <T> List<T> loadAll(final Class<T> entityClass) {
@Override
public <T> List<T> loadAll(final Class<T> entityClass) {
Criteria criteria = createCriteria(entityClass);
return criteria.list();
}
@ -455,7 +470,6 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
*
* @param <T>
* @param entityClass
* @param criterions
* @return
*/
private <T> Criteria createCriteria(Class<T> entityClass) {
@ -470,12 +484,12 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* @param entityClass
* @param propertyName
* @param value
* @param orderBy
* @param isAsc
* @return
*/
public <T> List<T> findByPropertyisOrder(Class<T> entityClass,
String propertyName, Object value, boolean isAsc) {
@Override
public <T> List<T> findByPropertyisOrder(Class<T> entityClass,
String propertyName, Object value, boolean isAsc) {
Assert.hasText(propertyName);
return createCriteria(entityClass, isAsc,
Restrictions.eq(propertyName, value)).list();
@ -517,8 +531,7 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
*
*
* @param clas
* @param values
* @param entityList
* @return
*/
public <T> int batchInsertsEntitie(List<T> entityList) {
@ -541,9 +554,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* 使 like"%"+username+"%" Hibernate Query
*
* @param hibernateTemplate
* @param hql
* @param valus
* @param values
* ? null
* @return 2008-07-19 add by liuyang
*/
@ -566,8 +578,9 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* @return
*/
public List findByExample(final String entityName,
final Object exampleEntity) {
@Override
public List findByExample(final String entityName,
final Object exampleEntity) {
Assert.notNull(exampleEntity, "Example entity must not be null");
Criteria executableCriteria = (entityName != null ? getSession()
.createCriteria(entityName) : getSession().createCriteria(
@ -610,7 +623,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* @param isOffset
* @return
*/
public PageList getPageList(final CriteriaQuery cq, final boolean isOffset) {
@Override
public PageList getPageList(final CriteriaQuery cq, final boolean isOffset) {
Criteria criteria = cq.getDetachedCriteria().getExecutableCriteria(
getSession());
@ -653,8 +667,9 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* JQUERY datatables DataTableReturn
*/
public DataTableReturn getDataTableReturn(final CriteriaQuery cq,
final boolean isOffset) {
@Override
public DataTableReturn getDataTableReturn(final CriteriaQuery cq,
final boolean isOffset) {
Criteria criteria = cq.getDetachedCriteria().getExecutableCriteria(
getSession());
@ -689,8 +704,9 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* easyui datagrid DataGridReturn
*/
public DataGridReturn getDataGridReturn(final CriteriaQuery cq,
final boolean isOffset) {
@Override
public DataGridReturn getDataGridReturn(final CriteriaQuery cq,
final boolean isOffset) {
Criteria criteria = cq.getDetachedCriteria().getExecutableCriteria(getSession());
CriteriaImpl impl = (CriteriaImpl) criteria;
// 先把Projection和OrderBy条件取出来,清空两者来执行Count操作
@ -750,11 +766,12 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* SqlQuery
*
* @param cq
* @param isOffset
* @param hqlQuery
* @param isToEntity
* @return
*/
@SuppressWarnings("unchecked")
@Override
@SuppressWarnings("unchecked")
public PageList getPageListBySql(final HqlQuery hqlQuery,
final boolean isToEntity) {
@ -782,11 +799,12 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* HqlQuery
*
* @param cq
* @param isOffset
* @param hqlQuery
* @param needParameter
* @return
*/
@SuppressWarnings("unchecked")
@Override
@SuppressWarnings("unchecked")
public PageList getPageList(final HqlQuery hqlQuery,
final boolean needParameter) {
@ -810,10 +828,11 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* CriteriaQueryList
*
* @param cq
* @param isOffset
* @param ispage
* @return
*/
@SuppressWarnings("unchecked")
@Override
@SuppressWarnings("unchecked")
public List<T> getListByCriteriaQuery(final CriteriaQuery cq, Boolean ispage) {
Criteria criteria = cq.getDetachedCriteria().getExecutableCriteria(
getSession());
@ -840,7 +859,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* 使
*/
public List<Map<String, Object>> findForJdbc(String sql, int page, int rows) {
@Override
public List<Map<String, Object>> findForJdbc(String sql, int page, int rows) {
// 封装分页SQL
sql = JdbcDao.jeecgCreatePageSql(sql, page, rows);
return this.jdbcTemplate.queryForList(sql);
@ -852,8 +872,9 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* @throws IllegalAccessException
* @throws InstantiationException
*/
public <T> List<T> findObjForJdbc(String sql, int page, int rows,
Class<T> clazz) {
@Override
public <T> List<T> findObjForJdbc(String sql, int page, int rows,
Class<T> clazz) {
List<T> rsList = new ArrayList<T>();
// 封装分页SQL
sql = JdbcDao.jeecgCreatePageSql(sql, page, rows);
@ -875,14 +896,15 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* 使-
*
* @param criteria
* @param firstResult
* @param maxResults
* @param sql
* @param page
* @param objs
* @return
* @throws DataAccessException
*/
public List<Map<String, Object>> findForJdbcParam(String sql, int page,
int rows, Object... objs) {
@Override
public List<Map<String, Object>> findForJdbcParam(String sql, int page,
int rows, Object... objs) {
// 封装分页SQL
sql = JdbcDao.jeecgCreatePageSql(sql, page, rows);
return this.jdbcTemplate.queryForList(sql, objs);
@ -891,7 +913,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* 使For JDBC
*/
public Long getCountForJdbc(String sql) {
@Override
public Long getCountForJdbc(String sql) {
return this.jdbcTemplate.queryForObject(sql,Long.class);
}
@ -899,29 +922,35 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* 使For JDBC-
*
*/
public Long getCountForJdbcParam(String sql, Object[] objs) {
@Override
public Long getCountForJdbcParam(String sql, Object[] objs) {
return this.jdbcTemplate.queryForObject(sql, objs,Long.class);
}
public List<Map<String, Object>> findForJdbc(String sql, Object... objs) {
@Override
public List<Map<String, Object>> findForJdbc(String sql, Object... objs) {
return this.jdbcTemplate.queryForList(sql, objs);
}
public Integer executeSql(String sql, List<Object> param) {
@Override
public Integer executeSql(String sql, List<Object> param) {
return this.jdbcTemplate.update(sql, param);
}
public Integer executeSql(String sql, Object... param) {
@Override
public Integer executeSql(String sql, Object... param) {
return this.jdbcTemplate.update(sql, param);
}
public Integer executeSql(String sql, Map<String, Object> param) {
@Override
public Integer executeSql(String sql, Map<String, Object> param) {
return this.namedParameterJdbcTemplate.update(sql, param);
}
public Object executeSqlReturnKey(final String sql, Map<String, Object> param) {
@Override
public Object executeSqlReturnKey(final String sql, Map<String, Object> param) {
Object keyValue = null;
KeyHolder keyHolder = null;
SqlParameterSource sqlp = new MapSqlParameterSource(param);
@ -948,7 +977,8 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
}
public Map<String, Object> findOneForJdbc(String sql, Object... objs) {
@Override
public Map<String, Object> findOneForJdbc(String sql, Object... objs) {
try {
return this.jdbcTemplate.queryForMap(sql, objs);
} catch (EmptyResultDataAccessException e) {
@ -960,10 +990,11 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* hql
*
* @param <T>
* @param query
* @param hql
* @return
*/
public <T> List<T> findHql(String hql, Object... param) {
@Override
public <T> List<T> findHql(String hql, Object... param) {
Query q = getSession().createQuery(hql);
if (param != null && param.length > 0) {
for (int i = 0; i < param.length; i++) {
@ -979,13 +1010,15 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
* @param hql
* @return
*/
public Integer executeHql(String hql) {
@Override
public Integer executeHql(String hql) {
Query q = getSession().createQuery(hql);
return q.executeUpdate();
}
public <T> List<T> pageList(DetachedCriteria dc, int firstResult,
int maxResult) {
@Override
public <T> List<T> pageList(DetachedCriteria dc, int firstResult,
int maxResult) {
Criteria criteria = dc.getExecutableCriteria(getSession());
criteria.setResultTransformer(CriteriaSpecification.ROOT_ENTITY);
criteria.setFirstResult(firstResult);
@ -996,14 +1029,16 @@ public abstract class GenericBaseCommonDao<T, PK extends Serializable>
/**
* 线
*/
public <T> List<T> findByDetached(DetachedCriteria dc) {
@Override
public <T> List<T> findByDetached(DetachedCriteria dc) {
return dc.getExecutableCriteria(getSession()).list();
}
/**
*
*/
@SuppressWarnings({ "unchecked",})
@Override
@SuppressWarnings({ "unchecked",})
public <T> List<T> executeProcedure(String executeSql,Object... params) {
SQLQuery sqlQuery = getSession().createSQLQuery(executeSql);

View File

@ -46,54 +46,59 @@ public class JdbcDao extends SimpleJdbcTemplate{
/**
* sql
* @param sql(select * from tb where id=:id)
* @param clazz
* @param parameters(keyvalue)
* @param sql (select * from tb where id=:id)
* @param clazz
* @param parameters (keyvalue)
* @return bean
*/
public List find(String sql,Class clazz,Map parameters){
@Override
public List find(String sql, Class clazz, Map parameters){
return super.find(sql,clazz,parameters);
}
/**
* sql
* @param sql(select * from tb where id=:id)
* @param clazz
* @param parameters(keyvalue)
* @param sql (select * from tb where id=:id)
* @param clazz
* @param parameters (keyvalue)
* @return bean
*/
public Object findForObject(String sql,Class clazz,Map parameters){
@Override
public Object findForObject(String sql, Class clazz, Map parameters){
return super.findForObject(sql, clazz, parameters);
}
/**
* sql
* @param sql(select count(*) from tb where id=:id)
* @param parameters(keyvalue)
* @param sql (select count(*) from tb where id=:id)
* @param parameters (keyvalue)
* @return bean
*/
public long findForLong(String sql,Map parameters){
@Override
public long findForLong(String sql, Map parameters){
return super.findForLong(sql, parameters);
}
/**
* sqlMap,Bean使MapKey,value
* @param sql(select count(*) from tb where id=:id)
* @param parameters(keyvalue)
* @param sql (select count(*) from tb where id=:id)
* @param parameters (keyvalue)
* @return bean
*/
public Map findForMap(String sql,Map parameters){
@Override
public Map findForMap(String sql, Map parameters){
return super.findForMap(sql, parameters);
}
/**
* sqlMap
* @see findForMap
* @param sql(select count(*) from tb where id=:id)
* @param parameters(keyvalue)
* @see
* @param sql (select count(*) from tb where id=:id)
* @param parameters (keyvalue)
* @return bean
*/
public List<Map<String,Object>> findForListMap(String sql,Map parameters){
@Override
public List<Map<String,Object>> findForListMap(String sql, Map parameters){
return super.findForListMap(sql, parameters);
}
@ -104,7 +109,8 @@ public class JdbcDao extends SimpleJdbcTemplate{
* @param sql
* @param bean
*/
public int executeForObject(String sql,Object bean){
@Override
public int executeForObject(String sql, Object bean){
return super.executeForObject(sql, bean);
}
@ -115,7 +121,8 @@ public class JdbcDao extends SimpleJdbcTemplate{
* @param sql
* @param parameters
*/
public int executeForMap(String sql,Map parameters){
@Override
public int executeForMap(String sql, Map parameters){
return super.executeForMap(sql, parameters);
}
/*
@ -123,7 +130,8 @@ public class JdbcDao extends SimpleJdbcTemplate{
* update t_actor set first_name = :firstName, last_name = :lastName where id = :id
*
*/
public int[] batchUpdate(final String sql,List<Object[]> batch ){
@Override
public int[] batchUpdate(final String sql, List<Object[]> batch ){
return super.batchUpdate(sql,batch);
}
@ -169,9 +177,9 @@ public class JdbcDao extends SimpleJdbcTemplate{
/**
* 使-
*
* @param criteria
* @param firstResult
* @param maxResults
* @param sql
* @param page
* @param rows
* @return
* @throws DataAccessException
*/

View File

@ -40,8 +40,9 @@ public class GlobalExceptionResolver implements HandlerExceptionResolver {
/**
*
*/
public ModelAndView resolveException(HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex) {
@Override
public ModelAndView resolveException(HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex) {
boolean isajax = isAjax(request,response);
Throwable deepestException = deepestException(ex);
return processException(request, response, handler, deepestException, isajax);
@ -75,7 +76,6 @@ public class GlobalExceptionResolver implements HandlerExceptionResolver {
* @param request
* @param response
* @param handler
* @param deepestException
* @param isajax
* @return
*/
@ -142,7 +142,7 @@ public class GlobalExceptionResolver implements HandlerExceptionResolver {
* @param request
* @param response
* @param handler
* @param deepestException
* @param ex
* @return
*/
private ModelAndView processNotAjax(HttpServletRequest request,

View File

@ -24,8 +24,9 @@ public class MyExceptionHandler implements HandlerExceptionResolver {
private static final Logger logger = Logger
.getLogger(MyExceptionHandler.class);
public ModelAndView resolveException(HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex) {
@Override
public ModelAndView resolveException(HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex) {
String exceptionMessage = ExceptionUtil.getExceptionMessage(ex);
logger.error(exceptionMessage);
Map<String, Object> model = new HashMap<String, Object>();

View File

@ -3,11 +3,13 @@ package org.jeecgframework.core.common.hibernate.dialect;
public class DB2Dialect extends Dialect
{
@Override
public boolean supportsLimit()
{
return true;
}
@Override
public boolean supportsLimitOffset()
{
return true;
@ -30,6 +32,7 @@ public class DB2Dialect extends Dialect
return sql.toLowerCase().indexOf("select distinct") >= 0;
}
@Override
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
{
int startOfSelect = sql.toLowerCase().indexOf("select");
@ -57,6 +60,7 @@ public class DB2Dialect extends Dialect
return pagingSelect.toString();
}
@Override
public String getCountSql(String sql)
{
return null;

View File

@ -3,16 +3,19 @@ package org.jeecgframework.core.common.hibernate.dialect;
public class DerbyDialect extends Dialect
{
@Override
public boolean supportsLimit()
{
return false;
}
@Override
public boolean supportsLimitOffset()
{
return false;
}
@Override
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
{
throw new UnsupportedOperationException("paged queries not supported");

View File

@ -15,7 +15,8 @@ public class DialectFactoryBean implements FactoryBean<Dialect> {
this.dbType = dbType;
}
public Dialect getObject() throws Exception {
@Override
public Dialect getObject() throws Exception {
if (this.dbType.equals("oracle")) {
this.dialect = new OracleDialect();
} else if (this.dbType.equals("sqlserver")) {
@ -32,11 +33,13 @@ public class DialectFactoryBean implements FactoryBean<Dialect> {
return this.dialect;
}
public Class<?> getObjectType() {
@Override
public Class<?> getObjectType() {
return Dialect.class;
}
public boolean isSingleton() {
@Override
public boolean isSingleton() {
return true;
}
}

View File

@ -3,16 +3,19 @@ package org.jeecgframework.core.common.hibernate.dialect;
public class H2Dialect extends Dialect
{
@Override
public boolean supportsLimit()
{
return true;
}
@Override
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
{
return new StringBuffer(sql.length() + 40).append(sql).append(" limit " + limitPlaceholder).toString();
}
@Override
public boolean supportsLimitOffset()
{
return true;

View File

@ -3,16 +3,19 @@ package org.jeecgframework.core.common.hibernate.dialect;
public class HSQLDialect extends Dialect
{
@Override
public boolean supportsLimit()
{
return true;
}
@Override
public boolean supportsLimitOffset()
{
return true;
}
@Override
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
{
boolean hasOffset = offset > 0;

View File

@ -5,7 +5,8 @@ import org.hibernate.dialect.PostgreSQLDialect;
public class MyPostgreSQLDialect extends PostgreSQLDialect {
public boolean useInputStreamToInsertBlob() {
@Override
public boolean useInputStreamToInsertBlob() {
// TODO Auto-generated method stub
return true;
}

View File

@ -3,16 +3,19 @@ package org.jeecgframework.core.common.hibernate.dialect;
public class MySQLDialect extends Dialect
{
@Override
public boolean supportsLimitOffset()
{
return true;
}
@Override
public boolean supportsLimit()
{
return true;
}
@Override
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
{
if (offset > 0)

View File

@ -3,16 +3,19 @@ package org.jeecgframework.core.common.hibernate.dialect;
public class OracleDialect extends Dialect
{
@Override
public boolean supportsLimit()
{
return true;
}
@Override
public boolean supportsLimitOffset()
{
return true;
}
@Override
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
{
sql = sql.trim();

Some files were not shown because too many files have changed in this diff Show More