feat(config): add finance rules, activity rules, and real expert application flow
这个提交包含在:
@@ -721,6 +721,25 @@ async function seedInitialDataIfEmpty(conn: any): Promise<void> {
|
||||
]
|
||||
});
|
||||
|
||||
const financeRulesVal = JSON.stringify({
|
||||
platformRatePercent: 10.0,
|
||||
firstReferralPercent: 5.0,
|
||||
secondReferralPercent: 2.0,
|
||||
minWithdrawAmount: 50,
|
||||
maxWithdrawAmount: 20000,
|
||||
withdrawFeePercent: 0.0,
|
||||
withdrawDesc: '提现将自动发起微信企业付款打款至微信零钱,工作日预计2小时内到账。'
|
||||
});
|
||||
|
||||
const activityRulesVal = JSON.stringify({
|
||||
minParticipants: 2,
|
||||
maxParticipants: 10,
|
||||
defaultParticipants: 4,
|
||||
presetPerPersonFees: [200, 300, 500, 800, 1000],
|
||||
presetTotalFees: [500, 1000, 2000, 3000, 5000],
|
||||
defaultAaFee: 50
|
||||
});
|
||||
|
||||
const [cfgItemRows]: any = await conn.query('SELECT COUNT(*) as count FROM platform_configs');
|
||||
if (cfgItemRows[0].count === 0) {
|
||||
const customerServiceVal = JSON.stringify({
|
||||
@@ -758,8 +777,15 @@ async function seedInitialDataIfEmpty(conn: any): Promise<void> {
|
||||
('faq_list', '帮助中心与常见问题FAQ', ?, '小程序端帮助中心常见问答与指引', 1),
|
||||
('security_words', '私下引流与违规自定义敏感词库', ?, '全平台发帖、评论及订单防私下交易关键词实时过滤', 1),
|
||||
('home_popup', '小程序首页运营全局弹窗', ?, '节日活动推广、新用户专享首单优惠全局浮层弹窗', 1),
|
||||
('expert_rules', '大神技能标签库与定价区间规范', ?, '陪玩大神入驻审核、定价上下限限制与官方推荐技能标签库', 1);
|
||||
`, [customerServiceVal, safetyNoticeVal, protocolVal, communityTopicsVal, communityNoticeVal, faqListVal, securityWordsVal, homePopupVal, expertRulesVal]);
|
||||
('expert_rules', '大神技能标签库与定价区间规范', ?, '陪玩大神入驻审核、定价上下限限制与官方推荐技能标签库', 1),
|
||||
('finance_rules', '平台抽成与推广分销规则', ?, '平台佣金抽成比例、二级分销返润与佣金提现门槛限制', 1),
|
||||
('activity_rules', '同城组局发单与预算预设规范', ?, '招募席位上下限、快捷单人赏金预设与包场预算梯队', 1);
|
||||
`, [
|
||||
customerServiceVal, safetyNoticeVal, protocolVal,
|
||||
communityTopicsVal, communityNoticeVal, faqListVal,
|
||||
securityWordsVal, homePopupVal, expertRulesVal,
|
||||
financeRulesVal, activityRulesVal
|
||||
]);
|
||||
} else {
|
||||
// 增量保证各核心配置项完整就绪
|
||||
const [existingRows]: any = await conn.query('SELECT config_key FROM platform_configs');
|
||||
@@ -800,5 +826,17 @@ async function seedInitialDataIfEmpty(conn: any): Promise<void> {
|
||||
VALUES ('expert_rules', '大神技能标签库与定价区间规范', ?, '陪玩大神入驻审核、定价上下限限制与官方推荐技能标签库', 1)
|
||||
`, [expertRulesVal]);
|
||||
}
|
||||
if (!existingKeys.has('finance_rules')) {
|
||||
await conn.query(`
|
||||
INSERT INTO platform_configs (config_key, name, value_json, description, status)
|
||||
VALUES ('finance_rules', '平台抽成与推广分销规则', ?, '平台佣金抽成比例、二级分销返润与佣金提现门槛限制', 1)
|
||||
`, [financeRulesVal]);
|
||||
}
|
||||
if (!existingKeys.has('activity_rules')) {
|
||||
await conn.query(`
|
||||
INSERT INTO platform_configs (config_key, name, value_json, description, status)
|
||||
VALUES ('activity_rules', '同城组局发单与预算预设规范', ?, '招募席位上下限、快捷单人赏金预设与包场预算梯队', 1)
|
||||
`, [activityRulesVal]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户