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
4fc3c576
Commit
4fc3c576
authored
Apr 18, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 互动记录访问时间
parent
48573527
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
8 deletions
+42
-8
TabHaobanInteractRecord.java
...anage/service/entity/content/TabHaobanInteractRecord.java
+12
-0
InteractRecordBO.java
...oban/manage/service/pojo/bo/content/InteractRecordBO.java
+5
-0
InteractRecordMessageContext.java
...pojo/bo/content/context/InteractRecordMessageContext.java
+1
-0
InteractRecordMessageService.java
...service/content/message/InteractRecordMessageService.java
+4
-0
InteractRecordApiServiceImpl.java
...ervice/out/impl/content/InteractRecordApiServiceImpl.java
+3
-0
TabHaobanInteractRecordMapper.xml
...esources/mapper/content/TabHaobanInteractRecordMapper.xml
+17
-8
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/content/TabHaobanInteractRecord.java
View file @
4fc3c576
...
@@ -78,6 +78,11 @@ public class TabHaobanInteractRecord implements Serializable {
...
@@ -78,6 +78,11 @@ public class TabHaobanInteractRecord implements Serializable {
private
Date
updateTime
;
private
Date
updateTime
;
/**
* 最新访问时间
*/
private
Date
lastAccessTime
;
public
Long
getId
()
{
public
Long
getId
()
{
return
id
;
return
id
;
...
@@ -215,5 +220,12 @@ public class TabHaobanInteractRecord implements Serializable {
...
@@ -215,5 +220,12 @@ public class TabHaobanInteractRecord implements Serializable {
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
}
}
public
Date
getLastAccessTime
()
{
return
lastAccessTime
;
}
public
void
setLastAccessTime
(
Date
lastAccessTime
)
{
this
.
lastAccessTime
=
lastAccessTime
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/content/InteractRecordBO.java
View file @
4fc3c576
...
@@ -94,4 +94,9 @@ public class InteractRecordBO {
...
@@ -94,4 +94,9 @@ public class InteractRecordBO {
* 下单的商品数量
* 下单的商品数量
*/
*/
private
Integer
orderGoodsNum
;
private
Integer
orderGoodsNum
;
/**
* 最新访问时间
*/
private
Date
lastAccessTime
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/content/context/InteractRecordMessageContext.java
View file @
4fc3c576
...
@@ -101,6 +101,7 @@ public class InteractRecordMessageContext {
...
@@ -101,6 +101,7 @@ public class InteractRecordMessageContext {
temp
.
setDeleteFlag
(
0
);
temp
.
setDeleteFlag
(
0
);
temp
.
setCreateTime
(
new
Date
());
temp
.
setCreateTime
(
new
Date
());
temp
.
setUpdateTime
(
new
Date
());
temp
.
setUpdateTime
(
new
Date
());
temp
.
setLastAccessTime
(
new
Date
(
this
.
interactRecordMessageBO
.
getLastAccessTime
()));
temp
.
setExtendInfo
(
InteractRecordExtendInfoBO
.
empty
());
temp
.
setExtendInfo
(
InteractRecordExtendInfoBO
.
empty
());
return
temp
;
return
temp
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/message/InteractRecordMessageService.java
View file @
4fc3c576
...
@@ -93,6 +93,10 @@ public class InteractRecordMessageService {
...
@@ -93,6 +93,10 @@ public class InteractRecordMessageService {
interactRecordBO
.
setEventType
(
interactRecordMessageBO
.
getEventType
());
interactRecordBO
.
setEventType
(
interactRecordMessageBO
.
getEventType
());
}
}
}
}
// 更新互动记录的最新访问时间
if
(
interactRecordBO
.
getLastAccessTime
().
before
(
new
Date
(
interactRecordMessageBO
.
getLastAccessTime
())))
{
interactRecordBO
.
setLastAccessTime
(
new
Date
(
interactRecordMessageBO
.
getLastAccessTime
()));
}
if
(!
MaterialInteractRecordEventType
.
VISIT_MATERIAL
.
getCode
().
equals
(
interactRecordMessageBO
.
getEventType
())
if
(!
MaterialInteractRecordEventType
.
VISIT_MATERIAL
.
getCode
().
equals
(
interactRecordMessageBO
.
getEventType
())
&&
null
==
interactRecordBO
.
getExtendInfo
())
{
&&
null
==
interactRecordBO
.
getExtendInfo
())
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/content/InteractRecordApiServiceImpl.java
View file @
4fc3c576
...
@@ -64,6 +64,9 @@ public class InteractRecordApiServiceImpl implements InteractRecordApiService {
...
@@ -64,6 +64,9 @@ public class InteractRecordApiServiceImpl implements InteractRecordApiService {
.
map
(
item
->
{
.
map
(
item
->
{
InteractRecordInfoDTO
temp
=
new
InteractRecordInfoDTO
();
InteractRecordInfoDTO
temp
=
new
InteractRecordInfoDTO
();
BeanUtils
.
copyProperties
(
item
,
temp
);
BeanUtils
.
copyProperties
(
item
,
temp
);
if
(
item
.
getLastAccessTime
()
!=
null
)
{
temp
.
setCreateTime
(
item
.
getLastAccessTime
());
}
temp
.
setInteractRecordId
(
item
.
getId
());
temp
.
setInteractRecordId
(
item
.
getId
());
if
(
item
.
getExtendInfo
()
!=
null
)
{
if
(
item
.
getExtendInfo
()
!=
null
)
{
InteractRecordExtendInfoDTO
extendInfo
=
new
InteractRecordExtendInfoDTO
();
InteractRecordExtendInfoDTO
extendInfo
=
new
InteractRecordExtendInfoDTO
();
...
...
haoban-manage3-service/src/main/resources/mapper/content/TabHaobanInteractRecordMapper.xml
View file @
4fc3c576
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
<result
property=
"extendInfo"
column=
"extend_info"
jdbcType=
"VARCHAR"
/>
<result
property=
"extendInfo"
column=
"extend_info"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"lastAccessTime"
column=
"last_access_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
</resultMap>
<sql
id=
"baseSql"
>
<sql
id=
"baseSql"
>
...
@@ -39,7 +40,8 @@
...
@@ -39,7 +40,8 @@
delete_flag,
delete_flag,
extend_info,
extend_info,
create_time,
create_time,
update_time
update_time,
last_access_time
</sql>
</sql>
<!--查询单个-->
<!--查询单个-->
...
@@ -60,7 +62,8 @@
...
@@ -60,7 +62,8 @@
delete_flag,
delete_flag,
extend_info,
extend_info,
create_time,
create_time,
update_time
update_time,
last_access_time
from tab_haoban_interact_record
from tab_haoban_interact_record
where id = #{id}
where id = #{id}
</select>
</select>
...
@@ -69,7 +72,7 @@
...
@@ -69,7 +72,7 @@
<select
id=
"queryAllByLimit"
resultMap=
"TabHaobanInteractRecordMap"
>
<select
id=
"queryAllByLimit"
resultMap=
"TabHaobanInteractRecordMap"
>
select
select
id, enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type, store_id, channel_source,
id, enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type, store_id, channel_source,
event_type, duration_time, times, delete_flag, extend_info, create_time, update_time
event_type, duration_time, times, delete_flag, extend_info, create_time, update_time
,last_access_time
from tab_haoban_interact_record
from tab_haoban_interact_record
<where>
<where>
<if
test=
"clerkId != null and clerkId != ''"
>
<if
test=
"clerkId != null and clerkId != ''"
>
...
@@ -141,21 +144,21 @@
...
@@ -141,21 +144,21 @@
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into tab_haoban_interact_record(id, enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type,
insert into tab_haoban_interact_record(id, enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type,
store_id, channel_source, event_type, duration_time, times, delete_flag,
store_id, channel_source, event_type, duration_time, times, delete_flag,
extend_info, create_time, update_time)
extend_info, create_time, update_time
, last_access_time
)
values (#{id}, #{enterpriseId}, #{memberId}, #{unionId}, #{clerkId}, #{traceId}, #{bizId}, #{bizType}, #{storeId},
values (#{id}, #{enterpriseId}, #{memberId}, #{unionId}, #{clerkId}, #{traceId}, #{bizId}, #{bizType}, #{storeId},
#{channelSource}, #{eventType}, #{durationTime}, #{times}, #{deleteFlag}, #{extendInfo}, #{createTime},
#{channelSource}, #{eventType}, #{durationTime}, #{times}, #{deleteFlag}, #{extendInfo}, #{createTime},
#{updateTime})
#{updateTime}
, #{lastAccessTime}
)
</insert>
</insert>
<insert
id=
"insertBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insertBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into tab_haoban_interact_record(enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type,
insert into tab_haoban_interact_record(enterprise_id, member_id, union_id, clerk_id, trace_id, biz_id, biz_type,
store_id, channel_source, event_type, duration_time, times, delete_flag, extend_info, create_time, update_time)
store_id, channel_source, event_type, duration_time, times, delete_flag, extend_info, create_time, update_time
, last_access_time
)
values
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.enterpriseId}, #{entity.memberId}, #{entity.unionId}, #{entity.clerkId}, #{entity.traceId},
(#{entity.enterpriseId}, #{entity.memberId}, #{entity.unionId}, #{entity.clerkId}, #{entity.traceId},
#{entity.bizId}, #{entity.bizType}, #{entity.storeId}, #{entity.channelSource}, #{entity.eventType},
#{entity.bizId}, #{entity.bizType}, #{entity.storeId}, #{entity.channelSource}, #{entity.eventType},
#{entity.durationTime}, #{entity.times}, #{entity.deleteFlag}, #{entity.extendInfo}, #{entity.createTime},
#{entity.durationTime}, #{entity.times}, #{entity.deleteFlag}, #{entity.extendInfo}, #{entity.createTime},
#{entity.updateTime})
#{entity.updateTime}
, #{entity.lastAccessTime}
)
</foreach>
</foreach>
</insert>
</insert>
...
@@ -240,6 +243,9 @@
...
@@ -240,6 +243,9 @@
<if
test=
"updateTime != null"
>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
update_time = #{updateTime},
</if>
</if>
<if
test=
"lastAccessTime != null"
>
last_access_time = #{lastAccessTime}
</if>
</set>
</set>
where id = #{id}
where id = #{id}
</update>
</update>
...
@@ -262,6 +268,9 @@
...
@@ -262,6 +268,9 @@
from tab_haoban_interact_record
from tab_haoban_interact_record
<where>
<where>
delete_flag = 0
delete_flag = 0
<if
test=
"enterpriseId != null and enterpriseId != ''"
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"clerkId != null and clerkId != ''"
>
<if
test=
"clerkId != null and clerkId != ''"
>
and clerk_id = #{clerkId}
and clerk_id = #{clerkId}
</if>
</if>
...
@@ -281,7 +290,7 @@
...
@@ -281,7 +290,7 @@
and biz_id = #{bizId}
and biz_id = #{bizId}
</if>
</if>
</where>
</where>
order by id desc
order by
last_access_time desc,
id desc
</select>
</select>
<select
id=
"staticsClerkInteractRecordNew"
resultType=
"com.gic.haoban.manage.service.pojo.bo.content.PotentialCustomerStaticsBO"
>
<select
id=
"staticsClerkInteractRecordNew"
resultType=
"com.gic.haoban.manage.service.pojo.bo.content.PotentialCustomerStaticsBO"
>
...
...
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