@caijinlin
2015-11-10T04:14:39.000000Z
字数 15196
阅读 479
lingxi
---sql语句在后面
1.分档筹款 option_fundraising crowdfunding,together
{
'is_enabled': 1,
'options':
[
{"money":"1000","desc":"这是一段描述文字", "limit_num":0},
{"money":"2000","desc":"这是一段描述文字", "limit_num":1000},
{"money":"3000","desc":"这是一段描述文字", "limit_num":0},
]
}
json:
{"is_enabled":1,"options":[{"money":"20","desc":"\u7ed9\u5c0f\u670b\u53cb\u6350\u4e2a\u4e66\u5305\u5427","limit_num":20},{"money":"50","desc":"\u7ed9\u5c0f\u670b\u53cb\u6350\u672c\u4e66\u5427","limit_num":20},{"money":"100","desc":"\u7ed9\u5c0f\u670b\u53cb\u6350\u4ef6\u8863\u670d\u5427","limit_num":20},{"money":"500","desc":"\u7ed9\u5c0f\u670b\u53cb\u6350\u4e2a\u590d\u8bfb\u673a\u5427","limit_num":20}]}
2.信息收集 form_items crowdfunding,together
{
'is_enabled': 1,
"form_items":
{
"name" :
{
"require" => "1"
"class" => "span6"
"param" : {
"tip" : ""
}
"display_name" : "姓名"
"display" : "姓名"
"type": "string"
}
"email" :
{
"require" : "0",
"class" : "span6"
"param" : {
"tip" : ""
}
"display_name" : "邮箱"
"display" : "邮箱"
"type": "string"
}
"mobile"
{
"require" : "0"
"class" : "span6"
"param": {
"tip" : ""
}
"display_name": "电话"
"display" : "电话"
"type" : "string"
}
}
}
json:
{"is_enabled":1,"form_items":{"name":{"require":"1","class":"span6","display_name":"\u59d3\u540d","display":"\u59d3\u540d","type":"string"},"email":{"require":"1","class":"span6","param":{"tip":""},"display_name":"\u90ae\u7bb1","display":"\u90ae\u7bb1","type":"string"},"mobile":{"require":"1","class":"span6","param":{"tip":""},"display_name":"\u624b\u673a","display":"\u624b\u673a","type":"string"}}}
3.1 is_anonymous_allowed 是否允许匿名 crowdfunding,together
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (NULL, 'crowdfunding,together', '0', 'is_anonymous_allowed', '是否允许匿名', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
3.自动创建联系人 is_auto_contact crowdfunding,together
4.关联活动 related_event_id crowdfunding,together
5.关联标签 related_tags crowdfunding,together
6.联系人分类 contact_roles crowdfunding,together
7.支付成功跳转显示 pay_success_page crowdfunding
{
'after_submit_action': 'text',
'header_image': '/',
'thank_text': '感谢分享',
'after_submit_link' : ''
}
8.邮件反馈 email_feedback crowdfunding,together
{
'is_enabled': 1,
'email_subject': '',
'email_content': '',
'email_template_id':
}
9.微信反馈 wechat_feedback crowdfunding,together
默认值(支付模板)
{
'is_enabled': 1,
'notify_template_id':
'first': 'text',
'DonateNum': '',
'DonateSum': '',
'remark': 'text',
}
用户只更改first, remark, 未来可能会根据type保存
保存信息:不同模板字段名称可能不一样
["first"] => string(51) "亲爱的[#name#]您已经成功捐款[#amount#]元"
["DonateNum"] => string(23) "【[#project_title#]】"
["DonateSum"] => string(13) "[#amount#]元"
["remark"] => string(26) "点击查看项目详情"
10.短信反馈 sms_feedback crowdfunding,together
{
'is_enabled': 1,
'sms_content': 'text',
}
11.管理员通知 notify_emails crowdfunding,together
12.筹款页面样式 fundraising_page_style crowdfunding
{
'progress_bar_color':
'support_btn_color':
'support_btn_text':
}
json:
{"progress_bar_color":"#FF0000","support_btn_color":"#be1d25","support_btn_text":"\u7acb\u5373\u652f\u6301"}
13.支付页面 pay_form_style crowdfunding
{
'option_border_color':'',
'collect_info_tip':'',
'legal_statement_enabled': 1
'pay_btn_text':'',
'pay_btn_color':''
}
json:
{"option_border_color":"#A073EF","collect_info_tip":"\u7559\u4e0b\u4e2a\u4eba\u4fe1\u606f\uff0c\u6211\u4eec\u4f1a\u5c06\u9879\u76ee\u6700\u65b0\u8fdb\u5ea6\u53ca\u65f6\u53cd\u9988\u7ed9\u60a8","legal_statement_enabled":1,"pay_btn_text":"\u7acb\u5373\u652f\u6301","pay_btn_color":"#be1d25"}
14.成功页面模板 pay_success_page_style crowdfunding
{
'share_btn_enabled': 1,
'share_btn_text':'',
'share_btn_color':'',
'share_model_img':'',
'share_words_text':'', //默认支付成功分享标题
'share_words_desc':'', //默认支付成功分享描述
'share_words_img':'',
'project_share_text': '', //项目分享
'project_share_desc': '',
'together_share_text': '', //一起捐分享
'together_share_desc': '',
'fund_share_text': '', //首页分享
'fund_share_desc': '',
'self_share_text': '', //自己分享(dashboard)
'self_share_desc': '',
}
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (104, 'crowdfunding,together', '0', 'option_fundraising', '分档筹款设置', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (105, 'crowdfunding,together', '0', 'collect_info', '表单信息收集', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (106, 'crowdfunding,together', '0', 'is_auto_contact', '自动创建联系人', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (107, 'crowdfunding,together', '0', 'related_event_id', '关联活动', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (108, 'crowdfunding,together', '0', 'related_tags', '关联标签', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (109, 'crowdfunding,together', '0', 'contact_roles', '联系人分类', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (110, 'crowdfunding', '0', 'pay_success_redirect', '支付者付款成功后显示', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (111, 'crowdfunding,together', '0', 'email_feedback', '邮件反馈', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (112, 'crowdfunding,together', '0', 'wechat_feedback', '微信反馈', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (113, 'crowdfunding,together', '0', 'sms_feedback', '短信反馈', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (114, 'crowdfunding,together', '0', 'notify_emails', '邮件通知管理员', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (115, 'crowdfunding', '0', 'fundraising_page_style', '筹款页面样式', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (116, 'crowdfunding', '0', 'pay_form_style', '支付页面样式', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO lingxi_config
.crowdfunding_option_keys
(id
, type
, scope
, option_name
, display_name
, is_required
, max_num
, desc
, append_tip
, column_type
, class
, update_time
, create_time
) VALUES (117, 'crowdfunding', '0', 'pay_success_page_style', '付款成功页面模板', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
1.灵析层面默认配置option, subdomain 加个默认值NUL吧---
ALTER TABLE crowdfunding_options
CHANGE subdomain
subdomain
VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
2.各自option默认值
--
-- 分档筹款默认配置
--
INSERT INTO lingxi_config
.crowdfunding_options
(id
, key_id
, team_id
, subdomain
, project_id
, option_value
, update_time
, create_time
) VALUES (NULL, '104', '0', NULL, '0', '{"is_enabled":1,"options":[{"money":"20","desc":"\u7ed9\u5c0f\u670b\u53cb\u6350\u4e2a\u4e66\u5305\u5427","limit_num":20},{"money":"50","desc":"\u7ed9\u5c0f\u670b\u53cb\u6350\u672c\u4e66\u5427","limit_num":20},{"money":"100","desc":"\u7ed9\u5c0f\u670b\u53cb\u6350\u4ef6\u8863\u670d\u5427","limit_num":20},{"money":"500","desc":"\u7ed9\u5c0f\u670b\u53cb\u6350\u4e2a\u590d\u8bfb\u673a\u5427","limit_num":20}]}', NULL, NULL);
--
-- 信息收集表单默认配置
--
INSERT INTO lingxi_config
.crowdfunding_options
(id
, key_id
, team_id
, subdomain
, project_id
, option_value
, update_time
, create_time
) VALUES (NULL, '105', '0', NULL, '0', '{"is_enabled":1,"form_items":{"name":{"require":"1","class":"span6","display_name":"\u59d3\u540d","display":"\u59d3\u540d","type":"string"},"email":{"require":"1","class":"span6","param":{"tip":""},"display_name":"\u90ae\u7bb1","display":"\u90ae\u7bb1","type":"string"},"mobile":{"require":"1","class":"span6","param":{"tip":""},"display_name":"\u624b\u673a","display":"\u624b\u673a","type":"string"}}}', NULL, NULL);
--
-- 筹款页面默认样式配置
--
INSERT INTO lingxi_config
.crowdfunding_options
(id
, key_id
, team_id
, subdomain
, project_id
, option_value
, update_time
, create_time
) VALUES (NULL, '115', '0', NULL, '0', '{"progress_bar_color":"#FF0000","support_btn_color":"#be1d25","support_btn_text":"\u7acb\u5373\u652f\u6301"}', NULL, NULL);
--
-- 支付表单样式默认配置
--
INSERT INTO lingxi_config
.crowdfunding_options
(id
, key_id
, team_id
, subdomain
, project_id
, option_value
, update_time
, create_time
) VALUES (NULL, '116', '0', NULL, '0', '{"option_border_color":"#A073EF","collect_info_tip":"\u7559\u4e0b\u4e2a\u4eba\u4fe1\u606f\uff0c\u6211\u4eec\u4f1a\u5c06\u9879\u76ee\u6700\u65b0\u8fdb\u5ea6\u53ca\u65f6\u53cd\u9988\u7ed9\u60a8","legal_statement_enabled":1,"pay_btn_text":"\u7acb\u5373\u652f\u6301","pay_btn_color":"#be1d25"}', NULL, NULL);
--
-- 成功页面默认配置
--
INSERT INTO lingxi_config
.crowdfunding_options
(id
, key_id
, team_id
, subdomain
, project_id
, option_value
, update_time
, create_time
) VALUES (NULL, '117', '0', NULL, '0', '{"share_btn_enabled":1,"share_btn_text":"\u5206\u4eab\u51fa\u53bb","share_btn_color":"#be1d25","share_model_img":"","share_words_text":"\u611f\u8c22\u60a8\uff0c\u8c22\u8c22\u5bf9\u6211\u4eec\u7684\u652f\u6301","share_words_desc":"","share_words_img":""}', NULL, NULL);
--
-- 微信反馈默认配置
--
INSERT INTO lingxi_config
.crowdfunding_options
(id
, key_id
, team_id
, subdomain
, project_id
, option_value
, update_time
, create_time
) VALUES (NULL, '112', '0', NULL, '0', '{"is_enabled":1,"notify_template_id":"WMBxH4eHY72WN1Dt0uDr2cs_h0xHpIiwRCyff7_lYKE","first":"\u4eb2\u7231\u7684[#name#]\u60a8\u5df2\u7ecf\u6210\u529f\u6350\u6b3e[#amount#]\u5143","DonateNum":"\u3010[#project_title#]\u3011","DonateSum":"[#amount#]\u5143","remark":"\u70b9\u51fb\u67e5\u770b\u9879\u76ee\u8be6\u60c5>>"}', NULL, NULL);
UPDATE lingxi_config
.crowdfunding_options
SET option_value
= '{"share_btn_enabled":1,"share_btn_text":"\u5206\u4eab\u51fa\u53bb","share_btn_color":"#be1d25","share_model_img":"/styles/css/images/crowdfund/wx_share.png","share_words_text":"\u611f\u8c22\u60a8\uff0c\u8c22\u8c22\u5bf9\u6211\u4eec\u7684\u652f\u6301","share_words_desc":"","share_words_img":""}' WHERE crowdfunding_options
.key_id
= 117;
INSERT INTO lingxi_config
.crowdfunding_options
(id
, key_id
, team_id
, subdomain
, project_id
, option_value
, update_time
, create_time
) VALUES (NULL, '111', '0', NULL, '0', '{"is_enabled":1,"email_subject":"\u8c22\u8c22\u4f60\u7684\u6350\u8d60","email_content":"\u7b79\u6b3e\u91d1\u989d","email_template_id":10}', NULL, NULL);
110, option_fundraising
111,collect_info
112,is_auto_contact
113,related_tags
114,contact_roles
115,related_event_id**
116,pay_success_page
117,email_feedback
118,wechat_feedback
119,sms_feedback
120,notify_emails
121,fundraising_page_style
122,pay_form_style
123,pay_success_page_style
INSERT INTO crowdfunding_options
(id
, key_id
, team_id
, subdomain
, project_id
, option_value
, update_time
, create_time
) VALUES
(190, 110, 0, NULL, 0, '{"is_enabled":1,"options":[{"money":"20","desc":"\u7ed9\u5c0f\u670b\u53cb\u6350\u4e2a\u4e66\u5305\u5427","limit_num":20},{"money":"50","desc":"\u7ed9\u5c0f\u670b\u53cb\u6350\u672c\u4e66\u5427","limit_num":20},{"money":"100","desc":"\u7ed9\u5c0f\u670b\u53cb\u6350\u4ef6\u8863\u670d\u5427","limit_num":20}],\r\n"is_allowed":0\r\n}', NULL, NULL),
(191, 111, 0, NULL, 0, '{"is_enabled":1,"form_items":{"name":{"require":"1","class":"span6","display_name":"\u59d3\u540d","display":"\u59d3\u540d","type":"string"},"email":{"require":"1","class":"span6","param":{"tip":""},"display_name":"\u90ae\u7bb1","display":"\u90ae\u7bb1","type":"string"},"mobile":{"require":"1","class":"span6","param":{"tip":""},"display_name":"\u624b\u673a","display":"\u624b\u673a","type":"string"}}}', NULL, NULL),
(220, 112, 0, NULL, 0, '1', NULL, NULL),
(227, 116, 0, NULL, 0, '{"after_submit_action":"text","header_image":"/styles/css/images/cr_success_default_header.jpg", "thank_text":"\u611f\u8c22\u5206\u4eab", "after_submit_link":"\/"}', NULL, NULL),
(229, 117, 0, NULL, 0, '{"share_btn_enabled":1,"share_btn_text":"u5206u4eabu51fau53bb","share_btn_color":"#be1d25","share_model_img":"/styles/css/images/crowdfund/wx_share.png","share_words_text":"u611fu8c22u60a8uff0cu8c22u8c22u5bf9u6211u4eecu7684u652fu6301","share_words_desc":"","share_words_img":""}', NULL, NULL),
(231, 118, 0, NULL, 0, '{"is_enabled":1,"notify_template_id":"WMBxH4eHY72WN1Dt0uDr2cs_h0xHpIiwRCyff7_lYKE","first":"u4eb2u7231u7684[#name#]u60a8u5df2u7ecfu6210u529fu6350u6b3e[#amount#]u5143","DonateNum":"u3010[#project_title#]u3011","DonateSum":"[#amount#]u5143","remark":"u70b9u51fbu67e5u770bu9879u76eeu8be6u60c5>>"}', NULL, NULL),
(224, 119, 0, NULL, 0, '{ "is_enabled": 1,"sms_content": "亲爱的[#name],感谢你的捐赠"}', NULL, NULL),
(249, 121, 0, NULL, 0, '{"progress_bar_color":"#FF0000","support_btn_color":"#be1d25","support_btn_text":"立即支持"}', NULL, NULL),
(250, 122, 0, NULL, 0, '{"option_border_color":"#A073EF","collect_info_tip":"\u7559\u4e0b\u4e2a\u4eba\u4fe1\u606f\uff0c\u6211\u4eec\u4f1a\u5c06\u9879\u76ee\u6700\u65b0\u8fdb\u5ea6\u53ca\u65f6\u53cd\u9988\u7ed9\u60a8","legal_statement_enabled":1,"pay_btn_text":"\u7acb\u5373\u652f\u6301","pay_btn_color":"#be1d25"}', NULL, NULL),
(251, 123, 0, NULL, 0, '{"share_btn_enabled":1,"share_btn_text":"\u5206\u4eab\u51fa\u53bb","share_btn_color":"#ff6811","share_words_text":"[#nickname#]捐助了[#project_name#],你还不过来看看?","share_words_desc":"","share_modal_img":"/styles/css/images/crowdfund/wx_share.png"}', NULL, NULL);
step1:
无project_id: /cf/public/demo_project?team_id={:TEAM_ID}&subdomain={:SUBDOMAIN}&type=crowdfunding&preview=1&unclick=1
有project_id:
/cf/public/detail?project_id={{$route.params.projectId}}&preview=1&unclick=1
step2:
/cf/public/pay_form?project_id={{$route.params.projectId}}&preview=1&unclick=1
step3:
/cf/public/return_success?project_id={{$route.params.projectId}}&preview=1&unclick=1
/project假数据/
INSERT INTO lingxi_config
.crowdfunding_projects
(id
, type
, team_id
, subdomain
, user_group_id
, user_id
, title
, summary
, desc
, parent_id
, is_donatable
, is_followable
, is_together_donatable
, is_special
, goal
, end_time
, pay_account_groups
, donator_info_form
, preview_image
, sequence
, css
, theme_id
, edit_step_num
, status
, create_time
, update_time
) VALUES (NULL, 'crowdfunding', '0', '', '0', '0', '这里是项目标题', '这里是项目描述', '这里是项目的详细信息,你可以在这里展示项目详情,以便让更多的人看见。', '0', '1', '1', '1', '0', '5000', NULL, NULL, 'null', '/styles/css/images/cf_demo_project_img.jpg', '0', NULL, '0', '0', 'draft', '2015-07-31 17:42:39', '2015-08-27 16:04:51');
ALTER TABLE crowdfunding_donates
ADD contact_id
INT NOT NULL AFTER donate_cf_user_id
;