项目

一般

简介

需求 #24209

关可今 更新于 大约 4 年 之前

<p>背景描述:原拉新成本更新的功能在快速报表系统-新客监控-拉新成本更新 中,每周会有两次人为手动上传数据更新,保证成本的正确性。但随着BI系统的启用,绿色报表和快速报表即将停止使用,也会失去拉新成本更新的入口</p>

<p>目的:在一手后台新增拉新成本更新入口,保证拉新成本数据的正确性</p>

<p>衡量指标:在一手OS可导入拉新成本数据,BI平台可通过一手OS取数</p>

<p>功能需求:</p>

<p>1)在一手后台 会员管理-新增&ldquo;拉新成本监控&rdquo; 菜单</p>

<p>2)导入形式以 Excel表格形式提交更新 字段为 &ldquo;日期&mdash;&mdash;用户来源&mdash;&mdash;投放费用&mdash;&mdash;转化费用&mdash;&mdash;包邮费用&rdquo;,</p>

<p>3)导入后,BI后台可在一手OS取数</p>

<p>PRD描述: http://192.168.1.244:7777/newOS/24209/  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>

<p>导入模板见附件。</p>

<p>&nbsp;</p>

<p>前端分支: feat/新客监控报表迁移</p>

<p>&nbsp;</p>

<p>后端分支:feature/21.06.09#24209新客监控报表迁移</p>

<p>相关表创建dll如下:</p>

<p>create table fmys_enrollment<br />
(<br />
&nbsp; &nbsp; id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int(10) auto_increment,<br />
&nbsp; &nbsp; user_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int(10) &nbsp; &nbsp; &nbsp;default 0 &nbsp;null comment &#39;用户id&#39;,<br />
&nbsp; &nbsp; service_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;null comment &#39;所属服务号&#39;,<br />
&nbsp; &nbsp; create_time &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;null comment &#39;录入时间&#39;,<br />
&nbsp; &nbsp; birthday &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;null comment &#39;生日&#39;,<br />
&nbsp; &nbsp; daily_sales_count &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;每日销售件数&#39;,<br />
&nbsp; &nbsp; other_sales_channel &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(100) default &#39;&#39; not null comment &#39;其他销售渠道&#39;,<br />
&nbsp; &nbsp; has_psi &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;有无进销存系统(0无、1有)&#39;,<br />
&nbsp; &nbsp; has_membership_policy &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;有无会员制度(0无、1有)&#39;,<br />
&nbsp; &nbsp; has_goods_planning_before_procurement int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;拿货前有无货品规划(0无、1有)&#39;,<br />
&nbsp; &nbsp; prefer_market &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(100) default &#39;&#39; not null comment &#39;偏好市场&#39;,<br />
&nbsp; &nbsp; store_style &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(100) default &#39;&#39; not null comment &#39;店铺风格&#39;,<br />
&nbsp; &nbsp; best_selling_category &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(100) default &#39;&#39; not null comment &#39;畅销品类&#39;,<br />
&nbsp; &nbsp; character_type &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;varchar(100) default &#39;&#39; not null comment &#39;性格&#39;,<br />
&nbsp; &nbsp; personal_advanced_planning &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;varchar(100) default &#39;&#39; not null comment &#39;个人进阶规划&#39;,<br />
&nbsp; &nbsp; store_owner_staging_problems &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;varchar(200) default &#39;&#39; not null comment &#39;当前店主所遇瓶颈&#39;,<br />
&nbsp; &nbsp; store_facing_problems &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(200) default &#39;&#39; not null comment &#39;当前最迫切需要改善的店铺问题&#39;,<br />
&nbsp; &nbsp; remarks &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(200) default &#39;&#39; not null comment &#39;备注&#39;,<br />
&nbsp; &nbsp; procurement_ratio &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;一手拿货占比&#39;,<br />
&nbsp; &nbsp; store_type &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;varchar(20) &nbsp;default &#39;&#39; not null comment &#39;店铺类型&#39;,<br />
&nbsp; &nbsp; store_employees &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;守店人数&#39;,<br />
&nbsp; &nbsp; store_count &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;店铺数量&#39;,<br />
&nbsp; &nbsp; store_rent &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;店铺租金&#39;,<br />
&nbsp; &nbsp; store_position &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;varchar(100) default &#39;&#39; not null comment &#39;店铺定位&#39;,<br />
&nbsp; &nbsp; store_monthly_sales &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;店铺月销售额&#39;,<br />
&nbsp; &nbsp; markup_rate &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;加价倍率&#39;,<br />
&nbsp; &nbsp; old_customers_sales_rate &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;老顾客占销售额比重&#39;,<br />
&nbsp; &nbsp; procurement_channel &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(100) default &#39;&#39; not null comment &#39;拿货渠道&#39;,<br />
&nbsp; &nbsp; operating_years &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;经营店铺年限&#39;,<br />
&nbsp; &nbsp; is_costume_fanatic &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;是否为服装狂热者{0:否,1是}&#39;,<br />
&nbsp; &nbsp; is_active_learner &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;是否有主动学习意识{0:否,1是}&#39;,<br />
&nbsp; &nbsp; admin_id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;最近一次详情保存人&#39;,<br />
&nbsp; &nbsp; update_time &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default 0 &nbsp;not null comment &#39;最近一次详情保存时间&#39;,<br />
&nbsp; &nbsp; constraint fmys_enrollment_id_uindex<br />
&nbsp; &nbsp; &nbsp; &nbsp; unique (id)<br />
)<br />
&nbsp; &nbsp; comment &#39;登记信息&#39;;</p>

<p>alter table fmys_enrollment<br />
&nbsp; &nbsp; add primary key (id);<br />
&nbsp;</p>

<p>&nbsp;</p>

<p>create table fmys_enrollment_option<br />
(<br />
&nbsp; &nbsp; id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int auto_increment,<br />
&nbsp; &nbsp; type &nbsp; &nbsp; &nbsp; &nbsp;int &nbsp; &nbsp; &nbsp; &nbsp; default 0 &nbsp;not null comment &#39;选项类型(默认0,1一手拿货占比,2店铺类型,3守店人数,4店铺数量,5店铺定位,6店铺月销售额,7加价倍率,8老顾客占销售额比重,9拿货渠道,10经营店铺年限)&#39;,<br />
&nbsp; &nbsp; status &nbsp; &nbsp; &nbsp;int &nbsp; &nbsp; &nbsp; &nbsp; default 0 &nbsp;not null comment &#39;状态(0禁用,1启用)&#39;,<br />
&nbsp; &nbsp; name &nbsp; &nbsp; &nbsp; &nbsp;varchar(20) default &#39;&#39; not null comment &#39;名称&#39;,<br />
&nbsp; &nbsp; create_time int &nbsp; &nbsp; &nbsp; &nbsp; default 0 &nbsp;not null comment &#39;添加时间&#39;,<br />
&nbsp; &nbsp; constraint fmys_enrollment_option_id_uindex<br />
&nbsp; &nbsp; &nbsp; &nbsp; unique (id)<br />
)<br />
&nbsp; &nbsp; comment &#39;登记信息相关选项&#39;;</p>

<p>create index fmys_enrollment_option_status_index<br />
&nbsp; &nbsp; on fmys_enrollment_option (status);</p>

<p>create index fmys_enrollment_option_type_index<br />
&nbsp; &nbsp; on fmys_enrollment_option (type);</p>

<p>alter table fmys_enrollment_option<br />
&nbsp; &nbsp; add primary key (id);</p>

返回

从剪贴板添加图片 (最大尺寸: 50.8 MB)