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
5c06ae85
Commit
5c06ae85
authored
Apr 21, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新跟进时间
parent
590285b7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
11 deletions
+69
-11
TabHaobanInteractRecordMapper.java
...ice/dao/mapper/content/TabHaobanInteractRecordMapper.java
+8
-0
TabHaobanInteractRecord.java
...anage/service/entity/content/TabHaobanInteractRecord.java
+13
-0
InteractRecordService.java
...manage/service/service/content/InteractRecordService.java
+7
-1
InteractRecordServiceImpl.java
...rvice/service/content/impl/InteractRecordServiceImpl.java
+16
-1
PotentialCustomerServiceImpl.java
...ce/service/content/impl/PotentialCustomerServiceImpl.java
+8
-6
TabHaobanInteractRecordMapper.xml
...esources/mapper/content/TabHaobanInteractRecordMapper.xml
+17
-3
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/content/TabHaobanInteractRecordMapper.java
View file @
5c06ae85
...
...
@@ -143,5 +143,13 @@ public interface TabHaobanInteractRecordMapper {
*/
int
modifyUnionId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"oldUnionId"
)
String
oldUnionId
,
@Param
(
"newUnionId"
)
String
newUnionId
);
/**
* 更新跟进时间
*
* @param enterpriseId
* @return
*/
int
modifyFollowTimeBatch
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"memberId"
)
String
memberId
,
@Param
(
"limitTime"
)
Date
limitTime
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/content/TabHaobanInteractRecord.java
View file @
5c06ae85
...
...
@@ -88,6 +88,11 @@ public class TabHaobanInteractRecord implements Serializable {
*/
private
Date
lastAccessTime
;
/**
* 跟进时间
*/
private
Date
followTime
;
public
Long
getId
()
{
return
id
;
...
...
@@ -240,5 +245,13 @@ public class TabHaobanInteractRecord implements Serializable {
public
void
setLastAccessTime
(
Date
lastAccessTime
)
{
this
.
lastAccessTime
=
lastAccessTime
;
}
public
Date
getFollowTime
()
{
return
followTime
;
}
public
void
setFollowTime
(
Date
followTime
)
{
this
.
followTime
=
followTime
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/InteractRecordService.java
View file @
5c06ae85
...
...
@@ -76,7 +76,13 @@ public interface InteractRecordService {
*/
InteractRecordBO
queryLeastRecord
(
String
enterpriseId
,
String
clerkId
,
String
bizId
,
String
memberId
);
// void modifyFollowTime(String enterpriseId,String clerkId, String memberId);
/**
* 更新销售线索跟进时间
* @param enterpriseId
* @param clerkId
* @param memberId
*/
void
modifyFollowTime
(
String
enterpriseId
,
String
clerkId
,
String
memberId
);
/**
* 更新unionId
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/InteractRecordServiceImpl.java
View file @
5c06ae85
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
impl
;
import
cn.hutool.core.date.DateTime
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.DateUtil
;
...
...
@@ -25,7 +26,6 @@ import org.springframework.stereotype.Component;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -267,6 +267,21 @@ public class InteractRecordServiceImpl implements InteractRecordService {
}
@Override
public
void
modifyFollowTime
(
String
enterpriseId
,
String
clerkId
,
String
memberId
)
{
DateTime
now
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
date
();
DateTime
limitTime
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetDay
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
endOfDay
(
now
),
-
7
);
log
.
info
(
"更新跟进时间 now:{},limitTime:{}"
,
now
,
limitTime
);
tabHaobanInteractRecordMapper
.
modifyFollowTimeBatch
(
enterpriseId
,
clerkId
,
memberId
,
limitTime
);
InteractRecordBO
interactRecordBO
=
queryLeastRecord
(
enterpriseId
,
clerkId
,
null
,
memberId
);
if
(
interactRecordBO
!=
null
)
{
TabHaobanInteractRecord
modifyInteractRecord
=
new
TabHaobanInteractRecord
();
modifyInteractRecord
.
setId
(
interactRecordBO
.
getId
());
modifyInteractRecord
.
setFollowTime
(
now
);
tabHaobanInteractRecordMapper
.
update
(
modifyInteractRecord
);
}
}
@Override
public
List
<
InteractRecordBO
>
lastInteractRecord
(
String
enterpriseId
,
String
clerkId
,
List
<
MemberLastInteractBO
>
list
)
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
new
ArrayList
<>();
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/PotentialCustomerServiceImpl.java
View file @
5c06ae85
...
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.content.impl;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Constant
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.UniqueIdUtils
;
...
...
@@ -41,12 +42,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -246,6 +242,12 @@ public class PotentialCustomerServiceImpl implements PotentialCustomerService {
temp
.
setStarFlag
(
potentialCustomerBO
.
getStarFlag
());
temp
.
setSeeFlag
(
potentialCustomerBO
.
getSeeFlag
());
potentialCustomerMapper
.
update
(
temp
);
if
(
Objects
.
equals
(
potentialCustomerBO
.
getSeeFlag
(),
Constant
.
FLAG_TRUE
))
{
String
enterpriseId
=
potentialCustomerBO
.
getEnterpriseId
();
String
clerkId
=
potentialCustomerBO
.
getClerkId
();
String
memberId
=
potentialCustomerBO
.
getMemberId
();
interactRecordService
.
modifyFollowTime
(
enterpriseId
,
clerkId
,
memberId
);
}
}
/**
...
...
haoban-manage3-service/src/main/resources/mapper/content/TabHaobanInteractRecordMapper.xml
View file @
5c06ae85
...
...
@@ -22,6 +22,7 @@
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"lastAccessTime"
column=
"last_access_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"followTime"
column=
"follow_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"baseSql"
>
...
...
@@ -43,7 +44,8 @@
extend_info,
create_time,
update_time,
last_access_time
last_access_time,
follow_time
</sql>
<!--查询单个-->
...
...
@@ -66,7 +68,8 @@
extend_info,
create_time,
update_time,
last_access_time
last_access_time,
follow_time
from tab_haoban_interact_record
where id = #{id}
</select>
...
...
@@ -75,7 +78,7 @@
<select
id=
"queryAllByLimit"
resultMap=
"TabHaobanInteractRecordMap"
>
select
id, enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type, store_id, channel_source,share_source,
event_type, duration_time, times, delete_flag, extend_info, create_time, update_time,last_access_time
event_type, duration_time, times, delete_flag, extend_info, create_time, update_time,last_access_time
,follow_time
from tab_haoban_interact_record
<where>
<if
test=
"clerkId != null and clerkId != ''"
>
...
...
@@ -256,6 +259,9 @@
<if
test=
"lastAccessTime != null"
>
last_access_time = #{lastAccessTime}
</if>
<if
test=
"followTime != null"
>
follow_time = #{followTime}
</if>
</set>
where id = #{id}
</update>
...
...
@@ -367,5 +373,13 @@
where enterprise_id = #{enterpriseId} and union_id = #{oldUnionId} and delete_flag = 0
</update>
<update
id=
"modifyFollowTimeBatch"
>
update tab_haoban_interact_record
set follow_time = now()
where enterprise_id = #{enterpriseId} and clerk_id = #{clerkId} and member_id = #{memberId}
and create_time >= #{limitTime} and follow_time is null
and delete_flag = 0
</update>
</mapper>
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