记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
8bd3d316
Commit
8bd3d316
authored
Jun 28, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交mongo 分片 索引
parent
1d82196f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
16 deletions
+85
-16
KylinCheckUserPerformancesMapper.xml
...service.kylin.mapper/KylinCheckUserPerformancesMapper.xml
+1
-1
mongo_db_ddl-prod.sql
...n/liquidnet-service-kylin-impl/docu/mongo_db_ddl-prod.sql
+42
-7
mongo_db_ddl.sql
...-kylin/liquidnet-service-kylin-impl/docu/mongo_db_ddl.sql
+42
-8
No files found.
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/resources/com.liquidnet.service.kylin.mapper/KylinCheckUserPerformancesMapper.xml
View file @
8bd3d316
...
...
@@ -37,7 +37,7 @@
p.title,
p.time_start,
p.time_end,
DATE_SUB(p.time_start,INTERVAL
-
3 DAY) as 'can_down_time'
DATE_SUB(p.time_start,INTERVAL 3 DAY) as 'can_down_time'
FROM kylin_performances AS p
LEFT JOIN kylin_performance_relations AS pr ON pr.performance_id = p.performances_id
WHERE p.performances_id NOT IN (
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/docu/mongo_db_ddl-prod.sql
View file @
8bd3d316
use
prod_ln_scene
;
#
创建集合
db
.
createCollection
(
"KylinOrderTicketVo"
);
db
.
createCollection
(
"KylinCheckUserPerformanceVo"
);
db
.
createCollection
(
"KylinCheckUserVo"
);
db
.
createCollection
(
"KylinOrderRefundEntitiesVo"
);
db
.
createCollection
(
"KylinOrderRefundPicVo"
);
db
.
createCollection
(
"KylinOrderRefundsVoBase"
);
db
.
createCollection
(
"KylinOrderTicketEntitiesVo"
);
db
.
createCollection
(
"KylinOrderTicketVo"
);
db
.
createCollection
(
"KylinPerformanceVo"
);
db
.
createCollection
(
"KylinRoadShowVo"
);
db
.
createCollection
(
"KylinPerformanceMisVo"
);
db
.
createCollection
(
"KylinTicketPartnerVo"
);
db
.
createCollection
(
"KylinTicketTimesPartnerVo"
);
db
.
createCollection
(
"PerformanceMemberAuditParam"
);
#
创建索引
db
.
KylinCheckUserPerformanceVo
.
createIndex
(
{
checkUserId
:
"hashed"
}
);
db
.
KylinCheckUserVo
.
createIndex
(
{
merchantId
:
"hashed"
}
);
db
.
KylinCheckUserVo
.
createIndex
(
{
mobile
:
"hashed"
}
);
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderRefundPicVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVoBase
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVoBase
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderId
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
orderCode
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
userId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderId
:
"hashed"
}
);
db
.
KylinPerformanceVo
.
createIndex
(
{
performancesId
:
"hashed"
}
);
db
.
KylinPerformanceMisVo
.
createIndex
(
{
performancesId
:
"hashed"
}
);
db
.
KylinTicketPartnerVo
.
createIndex
(
{
ticketsId
:
"hashed"
}
);
db
.
KylinTicketPartnerVo
.
createIndex
(
{
timesId
:
"hashed"
}
);
db
.
KylinTicketTimesPartnerVo
.
createIndex
(
{
performancesId
:
"hashed"
}
);
db
.
KylinTicketTimesPartnerVo
.
createIndex
(
{
ticketTimesId
:
"hashed"
}
);
db
.
PerformanceMemberAuditParam
.
createIndex
(
{
performancesId
:
"hashed"
}
);
#
创建分片
sh
.
enableSharding
(
"prod_ln_scene"
);
db
.
shardCollection
(
"prod_ln_scene.KylinCheckUserPerformanceVo"
,
{
"checkUserId"
:
"hashed"
}
);
db
.
shardCollection
(
"prod_ln_scene.KylinCheckUserVo"
,
{
"checkUserId"
:
"hashed"
}
);
db
.
shardCollection
(
"prod_ln_scene.KylinOrderRefundEntitiesVo"
,
{
"orderRefundsEntitiesId"
:
"hashed"
}
);
db
.
shardCollection
(
"prod_ln_scene.KylinOrderRefundPicVo"
,
{
"refundPicId"
:
"hashed"
}
);
db
.
shardCollection
(
"prod_ln_scene.KylinOrderRefundsVoBase"
,
{
"orderRefundsId"
:
"hashed"
}
);
db
.
shardCollection
(
"prod_ln_scene.KylinOrderTicketEntitiesVo"
,
{
"orderTicketEntitiesId"
:
"hashed"
}
);
db
.
shardCollection
(
"prod_ln_scene.KylinOrderTicketVo"
,
{
"orderTicketsId"
:
"hashed"
}
);
db
.
shardCollection
(
"prod_ln_scene.KylinPerformanceVo"
,
{
"performancesId"
:
"hashed"
}
);
db
.
shardCollection
(
"prod_ln_scene.KylinRoadShowVo"
,
{
"roadShowsId"
:
"hashed"
}
);
db
.
shardCollection
(
"prod_ln_scene.KylinPerformanceMisVo"
,
{
"performancesId"
:
"hashed"
}
);
db
.
shardCollection
(
prod_ln_scene
.
KylinTicketPartnerVo
",{"
ticketsId
":"
hashed
"});
db.shardCollection(prod_ln_scene.KylinTicketTimesPartnerVo"
,
{
"ticketTimesId"
:
"hashed"
}
);
db
.
shardCollection
(
"prod_ln_scene.PerformanceMemberAuditParam"
,
{
"performancesId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderTicketVo"
,
{
"orderTicketsId"
:
"hashed"
}
);
sh
.
shardCollection
(
"prod_ln_scene.KylinOrderTicketEntitiesVo"
,
{
"orderTicketEntitiesId"
:
"hashed"
}
);
\ No newline at end of file
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/docu/mongo_db_ddl.sql
View file @
8bd3d316
use
test_ln_scene
;
#
创建集合
db
.
createCollection
(
"KylinOrderTicketVo"
);
db
.
createCollection
(
"KylinCheckUserPerformanceVo"
);
db
.
createCollection
(
"KylinCheckUserVo"
);
db
.
createCollection
(
"KylinOrderRefundEntitiesVo"
);
db
.
createCollection
(
"KylinOrderRefundPicVo"
);
db
.
createCollection
(
"KylinOrderRefundsVoBase"
);
db
.
createCollection
(
"KylinOrderTicketEntitiesVo"
);
db
.
createCollection
(
"KylinOrderTicketVo"
);
db
.
createCollection
(
"KylinPerformanceVo"
);
db
.
createCollection
(
"KylinRoadShowVo"
);
db
.
createCollection
(
"KylinPerformanceMisVo"
);
db
.
createCollection
(
"KylinTicketPartnerVo"
);
db
.
createCollection
(
"KylinTicketTimesPartnerVo"
);
db
.
createCollection
(
"PerformanceMemberAuditParam"
);
#
创建索引
db
.
KylinCheckUserPerformanceVo
.
createIndex
(
{
checkUserId
:
"hashed"
}
);
db
.
KylinCheckUserVo
.
createIndex
(
{
merchantId
:
"hashed"
}
);
db
.
KylinCheckUserVo
.
createIndex
(
{
mobile
:
"hashed"
}
);
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderRefundPicVo
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVoBase
.
createIndex
(
{
orderRefundsId
:
"hashed"
}
);
db
.
KylinOrderRefundsVoBase
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderId
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
orderTicketsId
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
orderCode
:
"hashed"
}
);
db
.
KylinOrderTicketVo
.
createIndex
(
{
userId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderTicketEntitiesId
:
"hashed"
}
);
db
.
KylinOrderTicketEntitiesVo
.
createIndex
(
{
orderId
:
"hashed"
}
);
db
.
KylinPerformanceVo
.
createIndex
(
{
performancesId
:
"hashed"
}
);
db
.
KylinPerformanceMisVo
.
createIndex
(
{
performancesId
:
"hashed"
}
);
db
.
KylinTicketPartnerVo
.
createIndex
(
{
ticketsId
:
"hashed"
}
);
db
.
KylinTicketPartnerVo
.
createIndex
(
{
timesId
:
"hashed"
}
);
db
.
KylinTicketTimesPartnerVo
.
createIndex
(
{
performancesId
:
"hashed"
}
);
db
.
KylinTicketTimesPartnerVo
.
createIndex
(
{
ticketTimesId
:
"hashed"
}
);
db
.
PerformanceMemberAuditParam
.
createIndex
(
{
performancesId
:
"hashed"
}
);
#
创建分片
sh
.
enableSharding
(
"test_ln_scene"
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderTicketVo"
,
{
"orderTicketsId"
:
"hashed"
}
);
sh
.
shardCollection
(
"test_ln_scene.KylinOrderTicketEntitiesVo"
,
{
"orderTicketEntitiesId"
:
"hashed"
}
);
\ No newline at end of file
db
.
shardCollection
(
"test_ln_scene.KylinCheckUserPerformanceVo"
,
{
"checkUserId"
:
"hashed"
}
);
db
.
shardCollection
(
"test_ln_scene.KylinCheckUserVo"
,
{
"checkUserId"
:
"hashed"
}
);
db
.
shardCollection
(
"test_ln_scene.KylinOrderRefundEntitiesVo"
,
{
"orderRefundsEntitiesId"
:
"hashed"
}
);
db
.
shardCollection
(
"test_ln_scene.KylinOrderRefundPicVo"
,
{
"refundPicId"
:
"hashed"
}
);
db
.
shardCollection
(
"test_ln_scene.KylinOrderRefundsVoBase"
,
{
"orderRefundsId"
:
"hashed"
}
);
db
.
shardCollection
(
"test_ln_scene.KylinOrderTicketEntitiesVo"
,
{
"orderTicketEntitiesId"
:
"hashed"
}
);
db
.
shardCollection
(
"test_ln_scene.KylinOrderTicketVo"
,
{
"orderTicketsId"
:
"hashed"
}
);
db
.
shardCollection
(
"test_ln_scene.KylinPerformanceVo"
,
{
"performancesId"
:
"hashed"
}
);
db
.
shardCollection
(
"test_ln_scene.KylinRoadShowVo"
,
{
"roadShowsId"
:
"hashed"
}
);
db
.
shardCollection
(
"test_ln_scene.KylinPerformanceMisVo"
,
{
"performancesId"
:
"hashed"
}
);
db
.
shardCollection
(
test_ln_scene
.
KylinTicketPartnerVo
",{"
ticketsId
":"
hashed
"});
db.shardCollection(test_ln_scene.KylinTicketTimesPartnerVo"
,
{
"ticketTimesId"
:
"hashed"
}
);
db
.
shardCollection
(
"test_ln_scene.PerformanceMemberAuditParam"
,
{
"performancesId"
:
"hashed"
}
);
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