测试用模板使用步骤
<p>为了在各地做演示推广而不受数据库数据的影响,特做下列演示模板数据。 因文件比较大,导出和导入需要花点时间所以请提前导入。具体操作步骤如下:
一。在需要演示的服务器或本地服务器上创建一个空的数据库。具体库名的规范是方便好记。
二.执行生成数据库表结构语句 /sftp/share2.0/2.0new_custom_init/sql/create_eb3_database.sql
三.本演示用数据模板,参照的是eb3的数据内容。经过对组织id,店铺id,商品id,vip编号等为参照进行筛选而出。语句见/sftp/share2.0/hana/delete_shuju/delete_shuju.sql。
四.经过筛选的数据导出。
1.使用navecat,右键选择导出向导图1所示->选择.sql结尾的文件导出图2所示->选择人需要导出的表,并选择下载的地址图3所示。想多表下载到同一个目录下见图4全部下拉框中导出选择的到相同文件夹即可。->选择需要修改导出部分字段数据的表。->点击下一步->点击开始即可开始导出。文件在/sftp/share2.0/hana/insert_all/insert_all.sql。
<img src="https://www.showdoc.cc/home/common/visitfile/sign/7b284050c042f6081c5b905e00d0b52d?showdoc=.jpg" alt="" />(图1)
<img src="https://www.showdoc.cc/home/common/visitfile/sign/b0fc257d26659f25d0c04b8a265432a4?showdoc=.jpg" alt="" />(图2)
<img src="https://www.showdoc.cc/home/common/visitfile/sign/d9f7cc61a8ee817b9aa703250cc0efba?showdoc=.jpg" alt="" />(图3)
<img src="https://www.showdoc.cc/home/common/visitfile/sign/a3dba1703ba4b7963a2062cc374b8a85?showdoc=.jpg" alt="" />(图4)
多个SQL文件合并,在windows系统或linux命令行下输入 OPY *.sql 新的SQL名.sql 即可合并成一个。</p>
<p>五.下载insert_all.sql文件在已经建好表的数据库执行语句生成语句。
六.配置好公司演示的软件数据库配置地址,登录软件即可正常操作软件。</p>
<p>delete_shuju.sql 内容 </p>
<p>/<em>库存表根据商品主表和款号</em>/
delete from g_endstore where shopid not in( select shopid from s_shopid);
delete from g_endstore where code not in (select code from g_spdm);</p>
<p>/<em>根据组织id查询g_mokuaiqx_d(模块特殊权限表);</em>/
delete from g_mokuaiqx_d where companyid not in (select companyid from s_company);
/<em>根据组织id查询g_mokuaiqx表(系统模块权限表);</em>/
delete from g_mokuaiqx where companyid not in (select companyid from s_company);
/<em>在系统参数设置表根据组织id查询不存在的数据</em>/
delete from s_argutbl where companyid not in (select companyid from s_company) and companyid <>'00000';
/<em>在岗位表根据组织id查询不存在的数据);</em>/
delete from g_usergroup where companyid not in (select companyid from s_company);
/<em>在用户表根据组织查询不存在的数据);</em>/
delete from g_yongh where c_beiy1 not in (select companyid from s_company);
/<em>在用户岗位对应表根据用户表用户编号查询不存在的数据);</em>/
delete from g_userandgroup where c_userid not in (select c_yonghbh from g_yongh);
/<em>在员工表根据组织id查询店铺表,然后再根据店铺shopid查询出不在对应组织下的员工数据</em>/
delete from r_yuang where shopid not in (select shopid from s_shopid );
/<em>在店铺表根据组织id查询店铺表不存在的数据</em>/
delete from s_shopid where companyid not in(select companyid from s_company);
/<em>店铺选店权限表根据店铺表shopid查询出不存在的数据删掉</em>/
delete from s_userselectshop where n_leix not in (select shopid from s_shopid);
delete from s_userselectshop where c_yonghbh not in (select c_yonghbh from g_yongh);</p>
<p>/<em>商品从表 部分</em>/
delete from g_spdmdetail where code not in(select code from g_spdm);</p>
<p>/<em>小票主表</em>/
delete from g_inouttbl_zmd where gfrom not in (select shopid from s_shopid);
delete from g_inouttbl_zmd where gto not in (select shopid from s_shopid);
/<em>小票从表</em>/
delete from g_iodetail_zmd where code not in (select code from g_spdm);
/<em>零售小票导购表</em>/
delete from g_zmd_sell where scripno not in (select scripno from g_inouttbl_zmd);</p>
<p>/<em>零售小票支付表</em>/
delete from g_zmd_pay where scripno not in (select scripno from g_inouttbl_zmd);</p>
<p>/<em>进销存主表</em>/
delete from g_inouttbl where gfrom not in (select shopid from s_shopid);
delete from g_inouttbl where gto not in (select shopid from s_shopid);
/<em>非进销存主表</em>/
delete from g_inouttblbill where gfrom not in (select shopid from s_shopid);
delete from g_inouttblbill where gto not in (select shopid from s_shopid);
/<em>根据商品表商品编号code查询进销存明细表数据</em>/
delete from g_iodetail where code not in (select code from g_spdm);
/<em>根据商品表商品编号code查询非进销存明细表数据</em>/
delete from g_iodetailbill where code not in (select code from g_spdm);</p>
<p>上面已删除</p>
<p>/<em>根据商品code和店铺id删除</em>/
delete from g_lastkcqc where shopid not in (select shopid from s_shopid);
delete from g_lastkcqc where code not in (select code from g_spdm);
/<em>根据商品code和店铺id删除</em>/
delete from g_lastkcprc where shopid not in (select shopid from s_shopid);
delete from g_lastkcprc where code not in (select code from g_spdm);
/<em>短信记录明细表根据店铺id删除</em>/
delete from g_duanxdtl where shopid not in (select shopid from s_shopid);</p>
<p>/<em>根据商品code和店铺id删除</em>/
delete from rpt_shop_month_rtl_d where shopid not in (select shopid from s_shopid);
delete from rpt_shop_month_rtl_d where code not in (select code from g_spdm);</p>
<p>/<em>配货数量表根据商品code和店铺shopid删除</em>/
delete from g_endstoreph where shopid not in (select shopid from s_shopid);
delete from g_endstoreph where code not in (select code from g_spdm);</p>
<p>/<em>价格中心表根据商品code和店铺shopid删除</em>/
delete from g_jiagzx where shopid not in (select shopid from s_shopid);
delete from g_jiagzx where code not in (select code from g_spdm);</p>
<p>/<em>期初表表根据商品code和店铺shopid删除</em>/
delete from g_lastkc where shopid not in (select shopid from s_shopid);
delete from g_lastkc where code not in (select code from g_spdm);</p>
<p>/<em>根据商品code和店铺shopid删除</em>/
delete from g_scandata where code not in (select code from g_spdm);
delete from g_scandata where gfrom not in (select shopid from s_shopid);
delete from g_scandata where gto not in (select shopid from s_shopid);</p>
<p>/<em>交接班从表根据店铺shopid删除</em>/
delete from g_shopjjb_d where shopid not in (select shopid from s_shopid);</p>
<p>/<em>店铺参数设置表根据店铺shopid删除</em>/
delete from g_dianpqx where shopid not in (select shopid from s_shopid);
/<em>店铺日结表根据店铺shopid删除</em>/
delete from g_ribao where shopid not in (select shopid from s_shopid);</p>
<p>/<em>促销商品店铺表根据商品code和店铺shopid删除</em>/
delete from g_cux_shop where shopid not in (select shopid from s_shopid);
delete from g_cux_shop where code not in (select code from g_spdm);</p>
<p>/<em>短信记录主表根据商品code和店铺shopid删除</em>/
delete from g_duanxjl where shopid not in (select shopid from s_shopid);
/<em>提交差异申请时保存当时库存表根据商品code和店铺shopid删除</em>/
delete from g_kucce where shopid not in (select shopid from s_shopid);
delete from g_kucce where code not in (select code from g_spdm);
/<em>凭证表根据商品code和店铺shopid删除</em>/
delete from a_ysyf where shopid not in (select shopid from s_shopid);
/<em>根据店铺shopid删除</em>/
delete from rpt_shop_day_task where shopid not in (select shopid from s_shopid);
/<em>条码从表根据商品code</em>/<br />
delete from g_barcodedetail where c_code not in (select code from g_spdm);
/<em>商品详细信息表根据商品code</em>/
delete from g_spdmdtl where code not in (select code from g_spdm);</p>
<p>/<em>根据商品code和组织cpmpanyid删除</em>/
delete from g_spdmprice where companyid not in (select companyid from company);
delete from g_spdmprice where code not in (select code from g_spdm);</p>
<p>/<em>根据商品code和组织cpmpanyid删除</em>/
delete from g_spdmjgdmx where companyid not in (select companyid from company);
delete from g_spdmjgdmx where code not in (select code from g_spdm);</p>
<p>/<em>客流记录表根据店铺shopid删除</em>/
delete from g_keliu where shopid not in (select shopid from s_shopid);</p>
<p>/<em>商品尺码表根据商品code</em>/<br />
delete from g_spdmspec where code not in (select code from g_spdm);</p>
<p>/<em>条码主表根据商品code</em>/<br />
delete from g_barcode where code not in (select code from g_spdm);</p>
<p>/<em>交接班表根据店铺shopid删除</em>/
delete from g_shopjjb where shopid not in (select shopid from s_shopid);</p>
<p>/<em>删除编号表里的数据</em>/
TRUNCATE TABLE s_bianh</p>
<p>/<em>商品促销表根据商品code</em>/<br />
delete from g_cux where c_cusbh not in (select code from g_spdm);</p>
<p>/<em>商品调价明细表根据商品code和组织cpmpanyid删除</em>/
delete from g_spdmtjmx where companyid not in (select companyid from company);
delete from g_spdmtjmx where code not in (select code from g_spdm);</p>
<p>/<em>根据店铺shopid删除</em>/
delete from rpt_shop_month_rtl where shopid not in (select shopid from s_shopid);</p>
<p>/<em>会员系列
根据会员编号c_vipbh筛选</em>/
delete * from g_viprecord where c_vipbh not in(select c_vipbh from g_vip);</p>
<p>/<em>根据会员编号c_vipbh和店铺shopid筛选</em>/
delete from g_vip_tran where c_vipbh not in(select c_vipbh from g_vip);
delete from g_vip_tran where s_shopid not in (select shopid from s_shopid);</p>
<p>/<em>根据会员编号c_vipbh筛选</em>/
delete from g_vipsc where c_vipbh not in(select c_vipbh from g_vip); </p>
<p>/<em>根据会员编号c_vipbh筛选</em>/
delete from g_viphw where c_vipbh not in(select c_vipbh from g_vip); </p>
<p>/<em>根据会员编号c_vipbh筛选</em>/
delete from g_vip_recom where c_vipbh not in(select c_vipbh from g_vip);</p>
<p>/<em>根据会员编号c_vipbh和店铺shopid筛选</em>/
delete from g_vip_svc where c_vipbh not in(select c_vipbh from g_vip);
delete from g_vip_svc where s_shopid not in (select shopid from s_shopid);</p>
<p>/<em>根据会员编号c_vipbh筛选</em>/
delete from g_vip_birthmsg where c_vipbh not in(select c_vipbh from g_vip);</p>
<p>/<em>会员图片表根据会员编号c_vipbh筛选</em>/
delete from g_vipimg where c_vipbh not in(select c_vipbh from g_vip);</p>
<p>/<em>根据会员编号c_vipbh筛选</em>/
delete from g_vip_file where c_vipbh not in(select c_vipbh from g_vip);</p>