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
14902899
Commit
14902899
authored
Mar 28, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 好办sharding 测试
parent
d591479f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
TabHaobanInteractRecordMapper.xml
...esources/mapper/content/TabHaobanInteractRecordMapper.xml
+2
-2
MaterialReportServiceTest.java
...age3-service/src/test/java/MaterialReportServiceTest.java
+29
-0
No files found.
haoban-manage3-service/src/main/resources/mapper/content/TabHaobanInteractRecordMapper.xml
View file @
14902899
...
@@ -168,10 +168,10 @@
...
@@ -168,10 +168,10 @@
<!--新增所有列-->
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
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(
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)
values (#{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})
</insert>
</insert>
...
...
haoban-manage3-service/src/test/java/MaterialReportServiceTest.java
View file @
14902899
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.api.service.content.task.QywxGroupMsgTaskApiService
;
import
com.gic.haoban.manage.api.service.content.task.QywxGroupMsgTaskApiService
;
import
com.gic.haoban.manage.service.dao.mapper.content.TabHaobanInteractRecordMapper
;
import
com.gic.haoban.manage.service.entity.content.TabHaobanInteractRecord
;
import
com.gic.haoban.manage.service.service.content.MaterialReportService
;
import
com.gic.haoban.manage.service.service.content.MaterialReportService
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
...
@@ -7,6 +10,8 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -7,6 +10,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
java.util.Date
;
/**
/**
* @Author MUSI
* @Author MUSI
* @Date 2023/3/25 12:04 AM
* @Date 2023/3/25 12:04 AM
...
@@ -25,6 +30,8 @@ public class MaterialReportServiceTest {
...
@@ -25,6 +30,8 @@ public class MaterialReportServiceTest {
private
MaterialReportService
materialReportService
;
private
MaterialReportService
materialReportService
;
@Autowired
@Autowired
private
QywxGroupMsgTaskApiService
qywxGroupMsgTaskApiService
;
private
QywxGroupMsgTaskApiService
qywxGroupMsgTaskApiService
;
@Autowired
private
TabHaobanInteractRecordMapper
interactRecordMapper
;
String
eid
=
"ff8080815dacd3a2015dacd3ef5c0000"
;
String
eid
=
"ff8080815dacd3a2015dacd3ef5c0000"
;
String
wxEid
=
"ca66a01b79474c40b3e7c7f93daf1a3b"
;
String
wxEid
=
"ca66a01b79474c40b3e7c7f93daf1a3b"
;
...
@@ -41,4 +48,26 @@ public class MaterialReportServiceTest {
...
@@ -41,4 +48,26 @@ public class MaterialReportServiceTest {
public
void
weekReport
(){
public
void
weekReport
(){
qywxGroupMsgTaskApiService
.
handlerMaterialMonthReport
(
""
);
qywxGroupMsgTaskApiService
.
handlerMaterialMonthReport
(
""
);
}
}
@Test
public
void
shardingTest
(){
TabHaobanInteractRecord
temp
=
new
TabHaobanInteractRecord
();
temp
.
setId
(
UniqueIdUtils
.
uniqueLong
());
temp
.
setEnterpriseId
(
eid
);
temp
.
setClerkId
(
staffId
);
temp
.
setMemberId
(
staffId
);
temp
.
setUnionId
(
staffId
);
temp
.
setTraceId
(
staffId
);
temp
.
setBizType
(
1
);
temp
.
setStoreId
(
staffId
);
temp
.
setChannelSource
(
1
);
temp
.
setEventType
(
1
);
temp
.
setDurationTime
(
111
);
temp
.
setTimes
(
1
);
temp
.
setDeleteFlag
(
0
);
temp
.
setCreateTime
(
new
Date
());
temp
.
setUpdateTime
(
new
Date
());
temp
.
setBizId
(
UniqueIdUtils
.
uniqueLong
()+
""
);
int
insert
=
interactRecordMapper
.
insert
(
temp
);
}
}
}
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