Commit 14902899 by songyinghui

feat: 好办sharding 测试

parent d591479f
......@@ -168,10 +168,10 @@
<!--新增所有列-->
<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,
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},
#{updateTime})
</insert>
......
import com.gic.commons.util.UniqueIdUtils;
import com.gic.haoban.manage.api.enums.content.MaterialReportType;
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 org.junit.Test;
import org.junit.runner.RunWith;
......@@ -7,6 +10,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.util.Date;
/**
* @Author MUSI
* @Date 2023/3/25 12:04 AM
......@@ -25,6 +30,8 @@ public class MaterialReportServiceTest {
private MaterialReportService materialReportService;
@Autowired
private QywxGroupMsgTaskApiService qywxGroupMsgTaskApiService;
@Autowired
private TabHaobanInteractRecordMapper interactRecordMapper;
String eid = "ff8080815dacd3a2015dacd3ef5c0000";
String wxEid = "ca66a01b79474c40b3e7c7f93daf1a3b";
......@@ -41,4 +48,26 @@ public class MaterialReportServiceTest {
public void weekReport(){
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);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment