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
412a7a96
Commit
412a7a96
authored
Jun 11, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多个建联
parent
5af432aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
7 deletions
+43
-7
ContactBizTypeEnum.java
...c/haoban/manage/api/enums/contact/ContactBizTypeEnum.java
+31
-1
ContactLogServiceImpl.java
...e/service/service/contact/impl/ContactLogServiceImpl.java
+11
-5
TabContactFollowMapper.xml
.../main/resources/mapper/contact/TabContactFollowMapper.xml
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/enums/contact/ContactBizTypeEnum.java
View file @
412a7a96
package
com
.
gic
.
haoban
.
manage
.
api
.
enums
.
contact
;
package
com
.
gic
.
haoban
.
manage
.
api
.
enums
.
contact
;
import
java.util.Objects
;
import
cn.hutool.core.date.DateUtil
;
import
com.gic.haoban.manage.api.dto.contact.ContactLogDTO
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.*
;
import
java.util.stream.Collectors
;
public
enum
ContactBizTypeEnum
{
public
enum
ContactBizTypeEnum
{
...
@@ -32,6 +38,30 @@ public enum ContactBizTypeEnum {
...
@@ -32,6 +38,30 @@ public enum ContactBizTypeEnum {
return
Long
.
parseLong
(
this
.
getCodePre
()
+
contactTime
);
return
Long
.
parseLong
(
this
.
getCodePre
()
+
contactTime
);
}
}
public
static
List
<
Long
>
getEsClerkContactTimeList
(
List
<
ContactLogDTO
>
list
)
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
new
ArrayList
<>();
}
list
=
list
.
stream
().
sorted
(
Comparator
.
comparing
(
ContactLogDTO:
:
getBizType
))
.
collect
(
Collectors
.
toList
());
List
<
Long
>
clerkContactTimeList
=
Lists
.
newArrayList
();
Long
maxContactTime
=
null
;
for
(
ContactLogDTO
contactLogDTO
:
list
)
{
Date
contactTime
=
contactLogDTO
.
getContactTime
();
ContactBizTypeEnum
bizTypeEnum
=
ContactBizTypeEnum
.
fromType
(
contactLogDTO
.
getBizType
());
Long
orginalContactTimeLong
=
Long
.
parseLong
(
DateUtil
.
format
(
contactTime
,
"yyyyMMddHHmmss"
));
Long
contactTimeLong
=
bizTypeEnum
.
getEsClerkContactTime
(
orginalContactTimeLong
);
clerkContactTimeList
.
add
(
contactTimeLong
);
if
(
maxContactTime
==
null
||
orginalContactTimeLong
>
maxContactTime
)
{
maxContactTime
=
orginalContactTimeLong
;
}
}
if
(
maxContactTime
!=
null
)
{
clerkContactTimeList
.
add
(
maxContactTime
);
}
return
clerkContactTimeList
;
}
ContactBizTypeEnum
(
String
codePre
,
int
type
,
String
description
)
{
ContactBizTypeEnum
(
String
codePre
,
int
type
,
String
description
)
{
this
.
codePre
=
codePre
;
this
.
codePre
=
codePre
;
this
.
type
=
type
;
this
.
type
=
type
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/contact/impl/ContactLogServiceImpl.java
View file @
412a7a96
...
@@ -405,14 +405,20 @@ public class ContactLogServiceImpl implements ContactLogService {
...
@@ -405,14 +405,20 @@ public class ContactLogServiceImpl implements ContactLogService {
ContactBizTypeEnum
bizTypeEnum
=
ContactBizTypeEnum
.
fromType
(
bizType
);
ContactBizTypeEnum
bizTypeEnum
=
ContactBizTypeEnum
.
fromType
(
bizType
);
Long
bizContactTime
=
bizTypeEnum
.
getEsClerkContactTime
(
contactTime
);
Long
bizContactTime
=
bizTypeEnum
.
getEsClerkContactTime
(
contactTime
);
clerkContactTimeList
=
clerkContactTimeList
.
stream
().
map
(
time
->
{
clerkContactTimeList
=
clerkContactTimeList
.
stream
().
map
(
time
->
{
if
(
String
.
valueOf
(
time
).
startsWith
(
bizTypeEnum
.
getCodePre
()))
{
if
(
String
.
valueOf
(
time
).
length
()
==
16
)
{
return
bizContactTime
;
return
null
;
}
else
{
}
return
time
;
if
(
String
.
valueOf
(
time
).
startsWith
(
bizTypeEnum
.
getCodePre
()))
{
}
return
bizContactTime
;
}
else
{
return
time
;
}
}).
filter
(
Objects:
:
nonNull
)
}).
filter
(
Objects:
:
nonNull
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
}
}
// 增加原始创建时间用于排序
clerkContactTimeList
.
add
(
contactTime
);
logger
.
info
(
"刷新建联时间:{},memberId:{}"
,
clerkContactTimeList
,
memberId
);
logger
.
info
(
"刷新建联时间:{},memberId:{}"
,
clerkContactTimeList
,
memberId
);
DynamicDocDTO
dynamicDocDTO
=
new
DynamicDocDTO
();
DynamicDocDTO
dynamicDocDTO
=
new
DynamicDocDTO
();
dynamicDocDTO
.
setEnterpriseId
(
enterpriseId
);
dynamicDocDTO
.
setEnterpriseId
(
enterpriseId
);
...
...
haoban-manage3-service/src/main/resources/mapper/contact/TabContactFollowMapper.xml
View file @
412a7a96
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.followId}, #{item.memberId}, #{item.clerkId}, #{item.clerkCode},
(#{item.followId}, #{item.memberId}, #{item.clerkId}, #{item.clerkCode},
#{item.followType}, #{item.followRemark}, #{item.followMaterial},
#{item.followType}, #{item.followRemark}, #{item.followMaterial},
#{item.goodsInfo}, #{item.followTime}, #{
sourceType}, #{bizType}, #{
bizId}, #{item.enterpriseId})
#{item.goodsInfo}, #{item.followTime}, #{
item.sourceType}, #{item.bizType}, #{item.
bizId}, #{item.enterpriseId})
</foreach>
</foreach>
ON DUPLICATE KEY UPDATE
ON DUPLICATE KEY UPDATE
biz_type = CASE
biz_type = CASE
...
...
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