清除测试时产生的商户订单数据、商户余额、流水数据等
该文档为V3时编写的文档V4.0和V5.0同样适用,但截图与V4.0、及V5.0后台略有不同,不过同样具有参考价值
测试时,会产生大量的测试数据,如标题中描述的只是一部分,清除测试数据由于系统安全并未提供相关交互的功能,如果您需要进行此危险操作,可以按照下方说明进行。
首先,需要确定清除的数据所在的公众号和商户,即确定公众号ID,和商户ID,确定方法如下。
公众号ID和商户ID在哪里:http://help.jiancms.com/hc/kb/article/1082882/
清除数据的相关SQL语句,请分别执行:
特别提示:请操作前一定一定自行备份数据库,该操作误删数据无法恢复
版本说明:以下sql语句适用于V4, V5请将ims_lonaking 修改为 jiancms_jaf
清除商户财务账户余额: delete from ims_lonaking_restaurant_shop_account where shop_id='商户ID'; 设置某个商户的余额为指定金额: update `ims_lonaking_restaurant_shop_account` set amount='金额' where shop_id='商户ID' 删除某个商户绑定的提现账户: update `ims_lonaking_restaurant_shop_account` set bank_type=null,bank_name='',bank_account='',bank_username='' where shop_id='商户ID' 清除商户财务流水: delete from `ims_lonaking_restaurant_finance_flow` where shop_id='商户ID'; delete from `ims_lonaking_restaurant_finance_record` where shop_id='商户ID'; 清除商户测试订单记录: delete from ims_lonaking_restaurant_order where shop_id='商户ID'; delete from ims_lonaking_restaurant_menu_image where shop_id='商户ID'; 清除商户的员工记录: delete from ims_lonaking_restaurant_shop_admin where shop_id='商户ID'; 清除商户员工绑定的微信: update `ims_lonaking_restaurant_shop_admin` set openid=null where shop_id='商户ID'; 清除商户测试上传的菜品信息(如果是正式菜品可不需要删除): delete from ims_lonaking_restaurant_menu where shop_id='商户ID'; 清除商户预约插件的预约记录: delete from ims_lonaking_restaurant_book where shop_id='商户ID'; 清除商户一码付插件的付款订单记录: delete from ims_lonaking_restaurant_pay_for_order where shop_id='商户ID'; 商户菜品销量全部归零: update ims_lonaking_restaurant_menu set sold=0 where shop_id='商户ID'; 商户菜品库存全部设为1000(如需设置为其他数字,可自行修改1000): update ims_lonaking_restaurant_menu set num='1000' where shop_id='商户ID'; 清除商户所有借存插件产生的订单记录: delete from ims_lonaking_restaurant_borrow where shop_id='商户ID'; 修改公众号下所有会员积分为0 update ims_mc_members set credit1=0 where uniacid='公众号ID'; 修改公众号下所有会员余额为0 update ims_mc_members set credit2=0 where uniacid='公众号ID'; 删除公众号下的所有会员及粉丝信息(该操作不会清除余额和积分) delete from ims_lonaking_restaurant_user where uniacid='公众号ID'; 删除某个openid对应的用户信息(不会清除积分和余额) delete from ims_lonaking_restaurant_user where uniacid='公众号ID' and openid='粉丝的OPENID'; 清除某个商户下所有菜品绑定的后厨打印机,清除后需要单独设置 update `ims_lonaking_restaurant_menu` set printer_id=null where shop_id='商户id' 清楚某个商户下所有菜品退菜信息 update `ims_lonaking_restaurant_refund_menu` set printer_id=null where shop_id='商户id'