Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
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
李丛阳
education
Commits
e84aa41b
Commit
e84aa41b
authored
Mar 25, 2020
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pdf大小限制150M 页数不限
parent
9c78cddf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
7 deletions
+40
-7
BNotice.java
...ain/java/org/rcisoft/business/bnotice/entity/BNotice.java
+26
-1
MTNotificationApiRequestClient.java
...common/util/outClient/MTNotificationApiRequestClient.java
+4
-3
FileReadableUtil.java
src/main/java/org/rcisoft/core/util/FileReadableUtil.java
+10
-3
No files found.
src/main/java/org/rcisoft/business/bnotice/entity/BNotice.java
View file @
e84aa41b
...
@@ -55,6 +55,31 @@ public class BNotice extends IdEntity<BNotice> {
...
@@ -55,6 +55,31 @@ public class BNotice extends IdEntity<BNotice> {
@Transient
@Transient
private
String
userId
;
private
String
userId
;
@Override
public
String
toString
()
{
return
"BNotice{"
+
"infoType='"
+
infoType
+
'\''
+
", infoText='"
+
infoText
+
'\''
+
", recipientId='"
+
recipientId
+
'\''
+
", senderId='"
+
senderId
+
'\''
+
", readFlag='"
+
readFlag
+
'\''
+
", queryParam='"
+
queryParam
+
'\''
+
", recipientIds="
+
recipientIds
+
", lessonId='"
+
lessonId
+
'\''
+
", headPic='"
+
headPic
+
'\''
+
", senderName='"
+
senderName
+
'\''
+
", userId='"
+
userId
+
'\''
+
", businessId='"
+
businessId
+
'\''
+
", token='"
+
token
+
'\''
+
", remarks='"
+
remarks
+
'\''
+
", createBy='"
+
createBy
+
'\''
+
", createDate="
+
createDate
+
", updateBy='"
+
updateBy
+
'\''
+
", updateDate="
+
updateDate
+
", delFlag='"
+
delFlag
+
'\''
+
", flag='"
+
flag
+
'\''
+
", corpId='"
+
corpId
+
'\''
+
'}'
;
}
}
}
src/main/java/org/rcisoft/common/util/outClient/MTNotificationApiRequestClient.java
View file @
e84aa41b
...
@@ -85,7 +85,7 @@ public class MTNotificationApiRequestClient {
...
@@ -85,7 +85,7 @@ public class MTNotificationApiRequestClient {
* @return
* @return
*/
*/
public
boolean
send
(
BNotice
message
,
String
noticeTitle
,
String
type
,
String
urlType
)
{
public
boolean
send
(
BNotice
message
,
String
noticeTitle
,
String
type
,
String
urlType
)
{
log
.
debug
(
"------------------------------------BNotice->>>"
+
message
+
"<<<---------------------------------------------"
);
log
.
debug
(
"------------------------------------BNotice->>>"
+
message
.
toString
()
+
"<<<---------------------------------------------"
);
if
(
"dev"
.
equalsIgnoreCase
(
serverType
))
{
if
(
"dev"
.
equalsIgnoreCase
(
serverType
))
{
return
true
;
return
true
;
}
}
...
@@ -138,7 +138,6 @@ public class MTNotificationApiRequestClient {
...
@@ -138,7 +138,6 @@ public class MTNotificationApiRequestClient {
return
false
;
return
false
;
}
}
List
<
String
>
haveJurisAccountIds
=
new
ArrayList
<>();
List
<
String
>
haveJurisAccountIds
=
new
ArrayList
<>();
List
<
String
>
getUserAccountList
=
new
ArrayList
<>();
List
<
String
>
getUserAccountList
=
new
ArrayList
<>();
List
<
Long
>
getUserAccountLongList
=
(
List
<
Long
>)
haveJurisList
.
getData
();
List
<
Long
>
getUserAccountLongList
=
(
List
<
Long
>)
haveJurisList
.
getData
();
getUserAccountLongList
.
forEach
(
getUserAccount
->{
getUserAccountLongList
.
forEach
(
getUserAccount
->{
...
@@ -146,7 +145,9 @@ public class MTNotificationApiRequestClient {
...
@@ -146,7 +145,9 @@ public class MTNotificationApiRequestClient {
});
});
MTUserGetsAccountReqDTO
mtUserGetsReqDTO
=
new
MTUserGetsAccountReqDTO
(
message
.
getCorpId
(),
getUserAccountList
);
MTUserGetsAccountReqDTO
mtUserGetsReqDTO
=
new
MTUserGetsAccountReqDTO
(
message
.
getCorpId
(),
getUserAccountList
);
log
.
debug
(
"----------------------通知-调用accountGetUserHead接口----------------------"
+
mtUserGetsReqDTO
);
List
<
MTAccountIdRspDTO
>
mtAccountIdRspDTOList
=
mtCotactApiRequestClient
.
accountGetUserHead
(
mtUserGetsReqDTO
);
List
<
MTAccountIdRspDTO
>
mtAccountIdRspDTOList
=
mtCotactApiRequestClient
.
accountGetUserHead
(
mtUserGetsReqDTO
);
log
.
debug
(
"----------------------通知-获取用户头像结果----------------------"
+
mtAccountIdRspDTOList
);
mtAccountIdRspDTOList
.
forEach
(
mtAccountIdRspDTO
->
{
mtAccountIdRspDTOList
.
forEach
(
mtAccountIdRspDTO
->
{
haveJurisAccountIds
.
add
(
mtAccountIdRspDTO
.
getAccountId
());
haveJurisAccountIds
.
add
(
mtAccountIdRspDTO
.
getAccountId
());
});
});
...
@@ -185,7 +186,7 @@ public class MTNotificationApiRequestClient {
...
@@ -185,7 +186,7 @@ public class MTNotificationApiRequestClient {
}});
}});
String
json
=
JSON
.
toJSONString
(
mtNotificationSendReqDTO
);
String
json
=
JSON
.
toJSONString
(
mtNotificationSendReqDTO
);
log
.
debug
(
json
);
log
.
debug
(
"----------------------通知-调用sendMessage接口----------------------"
+
json
);
try
{
try
{
ret
=
notificationFeignClient
.
sendMessage
(
mtNotificationSendReqDTO
,
"app"
,
noticeAppId
);
ret
=
notificationFeignClient
.
sendMessage
(
mtNotificationSendReqDTO
,
"app"
,
noticeAppId
);
...
...
src/main/java/org/rcisoft/core/util/FileReadableUtil.java
View file @
e84aa41b
...
@@ -124,7 +124,7 @@ public class FileReadableUtil {
...
@@ -124,7 +124,7 @@ public class FileReadableUtil {
}
}
FileReadableUtil
.
closeOtherStream
(
doc
);
FileReadableUtil
.
closeOtherStream
(
doc
);
}
}
return
pages
;
return
1
;
}
}
private
static
Integer
docxReadable
(
String
path
){
private
static
Integer
docxReadable
(
String
path
){
Integer
pages
;
Integer
pages
;
...
@@ -163,10 +163,17 @@ public class FileReadableUtil {
...
@@ -163,10 +163,17 @@ public class FileReadableUtil {
LogUtil
.
fileChangeLog
(
"-----------FileReadableUtil-路径------------"
+
path
);
LogUtil
.
fileChangeLog
(
"-----------FileReadableUtil-路径------------"
+
path
);
File
file
=
new
File
(
path
);
File
file
=
new
File
(
path
);
Long
size
=
file
.
length
();
Long
size
=
file
.
length
();
if
(
size
>
(
long
)(
1024
*
1024
*
fileMaxSize
)){
if
(
"pdf"
.
equals
(
path
.
substring
(
path
.
lastIndexOf
(
"."
)
+
1
))){
throw
new
ServiceException
(
400
,
"该文件超过最大"
+
fileMaxSize
+
"M限制"
);
if
(
size
>
(
long
)(
1024
*
1024
*
150
)){
throw
new
ServiceException
(
400
,
"该文件超过最大"
+
150
+
"M限制"
);
}
}
else
{
if
(
size
>
(
long
)(
1024
*
1024
*
fileMaxSize
)){
throw
new
ServiceException
(
400
,
"该文件超过最大"
+
fileMaxSize
+
"M限制"
);
}
}
}
Integer
pages
=
-
1
;
Integer
pages
=
-
1
;
switch
(
path
.
substring
(
path
.
lastIndexOf
(
"."
)
+
1
))
{
switch
(
path
.
substring
(
path
.
lastIndexOf
(
"."
)
+
1
))
{
...
...
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