Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
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
徐少华
midjourney-proxy
Commits
0f259cc7
Commit
0f259cc7
authored
Feb 07, 2020
by
郑永强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决导出消息通知收不到的问题
parent
03bda40a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
SelfRobotKeywordBiz.java
...ava/com/pcloud/book/keywords/biz/SelfRobotKeywordBiz.java
+1
-1
SelfRobotKeywordBizImpl.java
...cloud/book/keywords/biz/impl/SelfRobotKeywordBizImpl.java
+4
-4
SelfRobotKeywordFacadeImpl.java
...book/keywords/facade/impl/SelfRobotKeywordFacadeImpl.java
+14
-2
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/SelfRobotKeywordBiz.java
View file @
0f259cc7
...
@@ -42,7 +42,7 @@ public interface SelfRobotKeywordBiz {
...
@@ -42,7 +42,7 @@ public interface SelfRobotKeywordBiz {
PageBeanNew
<
SelfRobotBookRecordDTO
>
getSelfRobotBookRecordList
(
Integer
currentPage
,
Integer
numPerPage
);
PageBeanNew
<
SelfRobotBookRecordDTO
>
getSelfRobotBookRecordList
(
Integer
currentPage
,
Integer
numPerPage
);
void
exportSelfRobotBookRecord
(
Long
partyId
);
void
exportSelfRobotBookRecord
(
String
systemCode
,
Long
partyId
);
Boolean
hasKeyword
(
Long
bookGroupId
);
Boolean
hasKeyword
(
Long
bookGroupId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/SelfRobotKeywordBizImpl.java
View file @
0f259cc7
...
@@ -764,7 +764,7 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
...
@@ -764,7 +764,7 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
}
}
@Override
@Override
public
void
exportSelfRobotBookRecord
(
Long
partyId
)
{
public
void
exportSelfRobotBookRecord
(
String
systemCode
,
Long
partyId
)
{
List
<
SelfRobotBookRecordDTO
>
list
=
selfRobotBookRecordDao
.
getAllSelfRobotBookRecordList
();
List
<
SelfRobotBookRecordDTO
>
list
=
selfRobotBookRecordDao
.
getAllSelfRobotBookRecordList
();
if
(
ListUtils
.
isEmpty
(
list
))
{
if
(
ListUtils
.
isEmpty
(
list
))
{
return
;
return
;
...
@@ -796,7 +796,7 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
...
@@ -796,7 +796,7 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
}
}
// 发送消息
// 发送消息
if
(
isSuccess
)
{
if
(
isSuccess
)
{
sendNotify
(
partyId
,
fileUrl
,
zipTitle
);
sendNotify
(
systemCode
,
partyId
,
fileUrl
,
zipTitle
);
}
}
});
});
}
}
...
@@ -804,7 +804,7 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
...
@@ -804,7 +804,7 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
/**
/**
* 发送站内信
* 发送站内信
*/
*/
private
void
sendNotify
(
Long
partyId
,
String
fileUrl
,
String
fileName
)
{
private
void
sendNotify
(
String
systemCode
,
Long
partyId
,
String
fileUrl
,
String
fileName
)
{
JSONObject
content
=
new
JSONObject
();
JSONObject
content
=
new
JSONObject
();
content
.
put
(
"commitTime"
,
DateUtils
.
formatDate
(
new
Date
()));
content
.
put
(
"commitTime"
,
DateUtils
.
formatDate
(
new
Date
()));
content
.
put
(
"type"
,
"书刊收录信息导出"
);
content
.
put
(
"type"
,
"书刊收录信息导出"
);
...
@@ -813,7 +813,7 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
...
@@ -813,7 +813,7 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
sendNotifyDto
.
setFromId
(
partyId
);
sendNotifyDto
.
setFromId
(
partyId
);
sendNotifyDto
.
setToId
(
partyId
);
sendNotifyDto
.
setToId
(
partyId
);
sendNotifyDto
.
setNotifyContent
(
content
.
toJSONString
());
sendNotifyDto
.
setNotifyContent
(
content
.
toJSONString
());
sendNotifyDto
.
setSystemCode
(
SystemCode
.
pcloud
.
c
ode
);
sendNotifyDto
.
setSystemCode
(
systemC
ode
);
sendNotifyDto
.
setTypeCode
(
"wechat_learn_export"
);
sendNotifyDto
.
setTypeCode
(
"wechat_learn_export"
);
sendNotifyDto
.
setResourceId
(
fileUrl
);
sendNotifyDto
.
setResourceId
(
fileUrl
);
sendNotifyDto
.
setFileName
(
fileName
);
sendNotifyDto
.
setFileName
(
fileName
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/facade/impl/SelfRobotKeywordFacadeImpl.java
View file @
0f259cc7
...
@@ -5,11 +5,13 @@ import com.pcloud.book.keywords.entity.SelfRobotKeyword;
...
@@ -5,11 +5,13 @@ import com.pcloud.book.keywords.entity.SelfRobotKeyword;
import
com.pcloud.book.keywords.facade.SelfRobotKeywordFacade
;
import
com.pcloud.book.keywords.facade.SelfRobotKeywordFacade
;
import
com.pcloud.book.keywords.vo.LabelVO
;
import
com.pcloud.book.keywords.vo.LabelVO
;
import
com.pcloud.book.keywords.vo.SelfRobotReplyVO
;
import
com.pcloud.book.keywords.vo.SelfRobotReplyVO
;
import
com.pcloud.common.core.constant.SystemCode
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.exceptions.BizException
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.utils.SessionUtil
;
import
com.pcloud.common.utils.SessionUtil
;
import
com.pcloud.common.utils.cookie.Cookie
;
import
com.pcloud.common.utils.cookie.Cookie
;
import
com.pcloud.wechatgroup.message.enums.IsSystem
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -23,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -23,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @Description
* @Description
...
@@ -195,8 +198,17 @@ public class SelfRobotKeywordFacadeImpl implements SelfRobotKeywordFacade {
...
@@ -195,8 +198,17 @@ public class SelfRobotKeywordFacadeImpl implements SelfRobotKeywordFacade {
@Override
@Override
public
ResponseDto
<?>
exportSelfRobotBookRecord
(
@RequestHeader
(
"token"
)
String
token
)
throws
BizException
,
PermissionException
{
public
ResponseDto
<?>
exportSelfRobotBookRecord
(
@RequestHeader
(
"token"
)
String
token
)
throws
BizException
,
PermissionException
{
Long
partyId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
String
systemCode
=
(
String
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
SYSTEM_CODE
);
selfRobotKeywordBiz
.
exportSelfRobotBookRecord
(
partyId
);
if
(!
SystemCode
.
pcloud
.
code
.
equalsIgnoreCase
(
systemCode
))
{
throw
new
PermissionException
(
PermissionException
.
PERMISSION_NOT_FOUND
);
}
Map
<
String
,
Object
>
map
=
SessionUtil
.
getToken4Redis
(
token
);
String
isSystem
=
(
String
)
map
.
get
(
SessionUtil
.
IS_SYSTEM
);
Long
partyId
=
(
Long
)
map
.
get
(
SessionUtil
.
PARTY_ID
);
if
(
IsSystem
.
NOT_SYSTEM
.
code
.
equals
(
isSystem
)){
partyId
=
(
Long
)
map
.
get
(
SessionUtil
.
MEMBER_ID
);
}
selfRobotKeywordBiz
.
exportSelfRobotBookRecord
(
systemCode
,
partyId
);
return
new
ResponseDto
<>();
return
new
ResponseDto
<>();
}
}
@Override
@Override
...
...
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