Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
common
Commits
4ae91871
Commit
4ae91871
authored
Oct 11, 2018
by
zhangyong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://zhangyong@gitlab.egolm.com/key/common.git
parents
ece9e4a1
cff23526
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
MailUtil.java
src/main/java/com/egolm/common/MailUtil.java
+2
-2
ReverseUtil.java
src/main/java/com/egolm/common/jdbc/dialect/ReverseUtil.java
+1
-5
No files found.
src/main/java/com/egolm/common/MailUtil.java
View file @
4ae91871
...
...
@@ -39,7 +39,7 @@ public class MailUtil {
* @param emailTo 接收邮件地址
* @return 是否成功
*/
public
static
void
send
Mail
(
String
host
,
Integer
port
,
boolean
is_auth
,
final
String
from
,
final
String
passwd
,
String
subject
,
String
content
,
File
[]
attachments
,
String
...
emailTo
)
{
public
static
void
send
BySmtp
(
String
host
,
Integer
port
,
boolean
is_auth
,
final
String
from
,
final
String
passwd
,
String
subject
,
String
content
,
File
[]
attachments
,
String
...
emailTo
)
{
Properties
properties
=
new
Properties
();
properties
.
put
(
"mail.smtp.host"
,
host
);
properties
.
put
(
"mail.smtp.auth"
,
is_auth
?
"true"
:
"false"
);
...
...
@@ -99,7 +99,7 @@ public class MailUtil {
// sender.send(mailMessage, "13384825689@163.com");
//String json = "{\"password\": \"hong804334\",\"port\": 25,\"protocol\": \"smtp\",\"smtpAuth\": \"true\",\"smtpHost\": \"smtp.163.com\",\"sslEnable\": \"false\",\"username\": \"13384825689@163.com\"}";
File
[]
files
=
new
File
[]{
new
File
(
"C:/opt/modules/dev/boot/file/excel/40001-收银员资料维护-20180813.xlsx"
),
new
File
(
"C:/opt/modules/dev/boot/file/2018-08-15/admin_客单价对比图表.html"
),
new
File
(
"C:/opt/modules/dev/boot/file/2018-08-15/admin_销售对比图表.html"
)};
MailUtil
.
send
Mail
(
"smtp.163.com"
,
25
,
true
,
"13384825689@163.com"
,
"hong804334"
,
"测试aaa"
,
"测hi"
,
files
,
"13384825689@163.com"
);
MailUtil
.
send
BySmtp
(
"smtp.163.com"
,
25
,
true
,
"13384825689@163.com"
,
"hong804334"
,
"测试aaa"
,
"测hi"
,
files
,
"13384825689@163.com"
);
}
}
src/main/java/com/egolm/common/jdbc/dialect/ReverseUtil.java
View file @
4ae91871
...
...
@@ -140,11 +140,7 @@ public class ReverseUtil {
public
static
String
sqlType2JavaType
(
String
sqlType
)
{
if
(
sqlType
.
startsWith
(
"bit"
)){
return
"Boolean"
;
}
else
if
(
sqlType
.
startsWith
(
"tinyint"
)){
return
"Byte"
;
}
else
if
(
sqlType
.
startsWith
(
"smallint"
)){
return
"Short"
;
}
else
if
(
sqlType
.
startsWith
(
"int"
)
||
sqlType
.
startsWith
(
"integer"
)){
}
else
if
(
sqlType
.
startsWith
(
"int"
)
||
sqlType
.
startsWith
(
"integer"
)
||
sqlType
.
startsWith
(
"tinyint"
)
||
sqlType
.
startsWith
(
"smallint"
)){
return
"Integer"
;
}
else
if
(
sqlType
.
startsWith
(
"bigint"
)){
return
"Long"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment