Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
entrance_api
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
王琮
entrance_api
Commits
ba959d4f
Commit
ba959d4f
authored
Feb 22, 2023
by
罗可心
😕
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/import' into import
parents
9e8f7ba5
94882dc0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
32 deletions
+40
-32
JieLinkServiceImpl.java
.../integration/jieLink/service/impl/JieLinkServiceImpl.java
+31
-30
application-jie-conf.yml
src/main/resources/application-jie-conf.yml
+1
-1
application-prod-conf.yml
src/main/resources/application-prod-conf.yml
+1
-1
DoorRecordMapper.xml
src/main/resources/mapper/DoorRecordMapper.xml
+1
-0
MessageInstanceMapper.xml
src/main/resources/mapper/MessageInstanceMapper.xml
+6
-0
No files found.
src/main/java/org/rcisoft/integration/jieLink/service/impl/JieLinkServiceImpl.java
View file @
ba959d4f
...
...
@@ -1186,36 +1186,37 @@ public class JieLinkServiceImpl implements IJieLinkService {
messageInstance
.
setTitle
(
"访客进入通知"
);
mes
=
"已进入行政办公楼"
;
}
for
(
Integer
id
:
visitId
)
{
VisitInfoMation
inf
=
visitInfomationRepository
.
selectById
(
id
);
//查询当天是否已经发送过消息,每天只发一次
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
QueryWrapper
<
MessageInstance
>
wrapper
=
new
QueryWrapper
();
wrapper
.
eq
(
"push_time"
,
sf
.
format
(
new
Date
()));
wrapper
.
eq
(
"recipient_id"
,
inf
.
getUserId
());
wrapper
.
eq
(
"title"
,
messageInstance
.
getTitle
());
List
<
MessageInstance
>
list
=
messageInstanceRepository
.
selectList
(
wrapper
);
if
(
list
.
isEmpty
())
{
messageInstance
.
setContent
(
"您邀请的访客"
+
sysUserData
.
getName
()
+
mes
+
" <a href=\"/pages/init/init?flag=2&id="
+
id
+
"\" style=\"color: #3497CE;\">点击查看</a>"
);
messageInstance
.
setRecipientId
(
BigInteger
.
valueOf
(
inf
.
getUserId
()));
messageInstanceService
.
sendMessage
(
messageInstance
);
if
(
message
)
{
String
token
=
cyWxMiniServiceImpl
.
getAccessToken
();
//公众号推送消息
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
keyMap
=
new
HashMap
<>();
keyMap
.
put
(
"value"
,
"您邀请的访客"
+
sysUserData
.
getName
()
+
mes
);
keyMap
.
put
(
"color"
,
"#173177"
);
map
.
put
(
"first"
,
keyMap
);
keyMap
=
new
HashMap
<>();
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
keyMap
.
put
(
"value"
,
format
.
format
(
new
Date
()));
keyMap
.
put
(
"color"
,
"#173177"
);
map
.
put
(
"keyword1"
,
keyMap
);
SysUser
sysUser
=
sysUserRepositorys
.
getUserByBusinessId
(
inf
.
getUserId
());
if
(
sysUser
!=
null
)
cyWxMiniServiceImpl
.
pushWeChatMessage
(
token
,
sysUser
.
getWxOpenid
(),
arriveTemplateId
,
null
,
map
);
if
(
"1"
.
equals
(
deviceInfo
.
getDeviceType
()))
{
for
(
Integer
id
:
visitId
)
{
VisitInfoMation
inf
=
visitInfomationRepository
.
selectById
(
id
);
//查询当天是否已经发送过消息,每天只发一次
MessageInstance
instance
=
new
MessageInstance
();
instance
.
setRecipientId
(
BigInteger
.
valueOf
(
inf
.
getUserId
()));
instance
.
setTitle
(
messageInstance
.
getTitle
());
instance
.
setPushTime
(
new
Date
());
List
<
MessageInstance
>
list
=
messageInstanceRepository
.
queryMessageInstances
(
instance
);
if
(
list
.
isEmpty
())
{
messageInstance
.
setContent
(
"您邀请的访客"
+
sysUserData
.
getName
()
+
mes
+
" <a href=\"/pages/init/init?flag=2&id="
+
id
+
"\" style=\"color: #3497CE;\">点击查看</a>"
);
messageInstance
.
setRecipientId
(
BigInteger
.
valueOf
(
inf
.
getUserId
()));
messageInstanceService
.
sendMessage
(
messageInstance
);
if
(
message
)
{
String
token
=
cyWxMiniServiceImpl
.
getAccessToken
();
//公众号推送消息
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
keyMap
=
new
HashMap
<>();
keyMap
.
put
(
"value"
,
"您邀请的访客"
+
sysUserData
.
getName
()
+
mes
);
keyMap
.
put
(
"color"
,
"#173177"
);
map
.
put
(
"first"
,
keyMap
);
keyMap
=
new
HashMap
<>();
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
keyMap
.
put
(
"value"
,
format
.
format
(
new
Date
()));
keyMap
.
put
(
"color"
,
"#173177"
);
map
.
put
(
"keyword1"
,
keyMap
);
SysUser
sysUser
=
sysUserRepositorys
.
getUserByBusinessId
(
inf
.
getUserId
());
if
(
sysUser
!=
null
)
cyWxMiniServiceImpl
.
pushWeChatMessage
(
token
,
sysUser
.
getWxOpenid
(),
arriveTemplateId
,
null
,
map
);
}
}
}
}
...
...
src/main/resources/application-jie-conf.yml
View file @
ba959d4f
...
...
@@ -137,7 +137,7 @@ syncSchedule:
config
:
false
message
:
config
:
fals
e
config
:
tru
e
dahua
:
videoStatus
:
false
\ No newline at end of file
src/main/resources/application-prod-conf.yml
View file @
ba959d4f
...
...
@@ -137,7 +137,7 @@ syncSchedule:
config
:
true
message
:
config
:
fals
e
config
:
tru
e
dahua
:
videoStatus
:
false
\ No newline at end of file
src/main/resources/mapper/DoorRecordMapper.xml
View file @
ba959d4f
...
...
@@ -247,6 +247,7 @@
where dr.del_flag = '0'
and dr.tenement_type = '0'
and dr.record_type = '1'
and dr.source = '1'
<if
test=
"attendance.beginTime !=null and attendance.endTime != null "
>
and dr.cross_time between #{attendance.beginTime} and #{attendance.endTime}
</if>
...
...
src/main/resources/mapper/MessageInstanceMapper.xml
View file @
ba959d4f
...
...
@@ -31,6 +31,12 @@
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and read_flag = #{entity.flag}
</if>
<if
test=
"entity.title !=null"
>
and title = #{entity.title}
</if>
<if
test=
"entity.pushTime !=null"
>
and DATE_FORMAT(push_time,'%y%m%d') = DATE_FORMAT( #{entity.pushTime},'%y%m%d')
</if>
</select>
<select
id=
"queryMessageInstancesPaged"
resultMap=
"BaseResultMap"
>
...
...
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