Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
2d9eac57
Commit
2d9eac57
authored
May 11, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
9c5df230
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
9 deletions
+38
-9
MemberUnionidRelatedApiService.java
...an/manage/api/service/MemberUnionidRelatedApiService.java
+4
-1
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+17
-5
MyApplicationContextAware.java
...gic/haoban/manage/web/init/MyApplicationContextAware.java
+17
-3
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/MemberUnionidRelatedApiService.java
View file @
2d9eac57
...
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.api.service;
import
java.util.Date
;
import
java.util.List
;
import
com.gic.api.base.commons.JSONResponse
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.manage.api.dto.MemberStoreDTO
;
...
...
@@ -33,6 +34,8 @@ public interface MemberUnionidRelatedApiService {
Page
<
MemberUnionidRelatedDTO
>
pageMemberUnionByParams
(
List
<
String
>
userIdList
,
List
<
String
>
sendMemberIds
,
String
enterpriseId
,
BasePageInfo
pageInfo
);
void
sendMessage
(
String
wxEnterpriseId
,
String
userId
,
List
<
String
>
extendUserList
,
String
materialId
);
String
sendMessage
(
String
wxEnterpriseId
,
String
userId
,
List
<
String
>
extendUserList
,
String
materialId
);
JSONResponse
getMessageStatus
(
String
wxEnterpriseId
,
String
wxMessageId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
2d9eac57
...
...
@@ -25,6 +25,7 @@ import org.apache.logging.log4j.Logger;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.api.base.commons.JSONResponse
;
import
com.gic.api.base.commons.Page
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
...
...
@@ -681,12 +682,13 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
@Override
public
void
sendMessage
(
String
wxEnterpriseId
,
String
userId
,
List
<
String
>
extendUserList
,
String
materialId
){
public
String
sendMessage
(
String
wxEnterpriseId
,
String
userId
,
List
<
String
>
extendUserList
,
String
materialId
){
WxEnterpriseDTO
enterprise
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
MaterialDTO
material
=
materialApiService
.
selectMaterialById
(
materialId
);
if
(
material
==
null
){
return
;
return
""
;
}
JSONResponse
jp
=
null
;
if
(
material
.
getMaterialType
()
==
2
||
material
.
getMaterialType
()
==
4
||
material
.
getMaterialType
()
==
5
){
Date
wxLastTime
=
material
.
getWxLastUploadTime
();
String
maerialId
=
material
.
getMaterialId
();
...
...
@@ -698,14 +700,14 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
dto
.
setChatType
(
""
);
dto
.
setExternalUserid
(
extendUserList
);
dto
.
setSenderUserId
(
userId
);
qywxSuiteApiService
.
sendExternalMessage
(
enterprise
.
getCorpid
(),
config
.
getWxSuiteid
(),
dto
);
jp
=
qywxSuiteApiService
.
sendExternalMessage
(
enterprise
.
getCorpid
(),
config
.
getWxSuiteid
(),
dto
);
}
else
if
(
material
.
getMaterialType
()
==
1
){
QywxTextExternalMessageDTO
dto
=
new
QywxTextExternalMessageDTO
();
dto
.
setChatType
(
""
);
dto
.
setExternalUserid
(
extendUserList
);
dto
.
setSenderUserId
(
userId
);
dto
.
setText
(
material
.
getMaterialContent
());
qywxSuiteApiService
.
sendExternalMessage
(
enterprise
.
getCorpid
(),
config
.
getWxSuiteid
(),
dto
);
jp
=
qywxSuiteApiService
.
sendExternalMessage
(
enterprise
.
getCorpid
(),
config
.
getWxSuiteid
(),
dto
);
}
else
if
(
material
.
getMaterialType
()
==
3
){
QywxIinkExternalMessageDTO
dto
=
new
QywxIinkExternalMessageDTO
();
dto
.
setChatType
(
""
);
...
...
@@ -715,7 +717,17 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
dto
.
setPicurl
(
material
.
getImgUrl
());
dto
.
setTitle
(
material
.
getMaterialTitle
());
dto
.
setUrl
(
material
.
getLink
());
qywxSuiteApiService
.
sendExternalMessage
(
enterprise
.
getCorpid
(),
config
.
getWxSuiteid
(),
dto
);
jp
=
qywxSuiteApiService
.
sendExternalMessage
(
enterprise
.
getCorpid
(),
config
.
getWxSuiteid
(),
dto
);
}
return
jp
.
getResult
().
toString
();
}
@Override
public
JSONResponse
getMessageStatus
(
String
wxEnterpriseId
,
String
wxMessageId
)
{
WxEnterpriseDTO
enterprise
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
if
(
enterprise
==
null
){
return
null
;
}
JSONResponse
jp
=
qywxSuiteApiService
.
resultExternalMessage
(
enterprise
.
getCorpid
(),
config
.
getWxSuiteid
(),
wxMessageId
);
return
jp
;
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/init/MyApplicationContextAware.java
View file @
2d9eac57
package
com
.
gic
.
haoban
.
manage
.
web
.
init
;
import
com.gic.dict.api.dto.GlobalDictMap
;
import
com.gic.dict.api.service.ManagerDictService
;
import
com.gic.quartz.api.dto.QuartzTaskDTO
;
import
com.gic.quartz.api.service.QuartzService
;
...
...
@@ -18,12 +16,28 @@ public class MyApplicationContextAware implements ApplicationContextAware {
private
Logger
log
=
LogManager
.
getLogger
(
MyApplicationContextAware
.
class
);
private
static
ApplicationContext
applicationContext
;
@Autowired
private
QuartzService
quartzService
;
@Override
public
void
setApplicationContext
(
ApplicationContext
applicationContext
)
throws
BeansException
{
// TODO Auto-generated method stub
QuartzTaskDTO
taskDTO
=
buildQuartzMessageDTO
(
"haoban-update-message-status-time"
);
taskDTO
.
setTaskParam
(
""
);
taskDTO
.
setTaskStatus
(
1
);
taskDTO
.
setTaskTimeInfo
(
"0 30 0 * * *"
);
// taskDTO.setTaskTimeInfo("0 0/1 * * * *");
quartzService
.
addOrUpdateQuartzTask
(
taskDTO
);
}
private
QuartzTaskDTO
buildQuartzMessageDTO
(
String
id
)
{
QuartzTaskDTO
taskDTO
=
new
QuartzTaskDTO
();
taskDTO
.
setReferId
(
id
);
taskDTO
.
setTaskMethod
(
"quartzUpdateMessageStatus"
);
taskDTO
.
setTaskService
(
"com.gic.haoban.app.customer.service.api.service.messageLogApiService"
);
return
taskDTO
;
}
}
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