Commit a9a7a4fc authored by qa_quantgroup's avatar qa_quantgroup
parents dc02d3f4 97d74ed9
database_list=mall xyqb cash_loan_flow clotho contract display dujiangyan financial_system financial_system_api fund_manage gyxd mall_settlement merchant notify offline payment_center qinqiong quartz redpacket risk_control score silk_road spider_center traffic_distribution user_credit xyqb_app xyqb_btzt xyqb_user
database_list=mall xyqb cash_loan_flow clotho contract display dujiangyan financial_system financial_system_api fund_manage gyxd mall_settlement merchant notify offline payment_center qinqiong quartz reconciliation redpacket risk_control score silk_road spider_center traffic_distribution user_credit xyqb_app xyqb_btzt xyqb_user
source_db_pwd=Uiwb@o^fR&nHOa5t
\ No newline at end of file
......@@ -163,10 +163,10 @@ elif [[ $database_name = 'score' ]]; then
sys_table_list=''
source_db_host='192.168.4.249'
port='3322'
# elif [[ $database_name = 'silk_road' ]]; then
# sys_table_list='task'
# source_db_host='192.168.4.249'
# port='3322'
elif [[ $database_name = 'reconciliation' ]]; then
sys_table_list=''
source_db_host='192.168.3.19'
port='3308'
fi
echo "source_port is $port"
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
date=`date "+%Y-%m-%d %H:%M:%S"`
mysqld="-h$ip -p3306 -uqa -pqatest"
mysqld="-h$ip -p$port -uqa -pqatest"
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ];then
echo "请输入11位手机号!"
......@@ -14,7 +15,7 @@ if [ $? -ne 0 ];then
exit -1
fi
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
update xyqb.loan_application_history
set xyqb.loan_application_history.progress=40
where business_type=0 and user_id=(select id from xyqb_user.user where phone_no =$phone_no) and is_active=1;
......
......@@ -2,7 +2,7 @@
ip=$1
phone_no=$2
fund_id=$3
PORT="3306"
PORT=$4
USERNAME="qa"
PASSWORD="qatest"
len=`echo $phone_no|awk '{print length($0)}'`
......
#!/bin/bash
ip=$1
phone_no=$2
mysqld="-h$ip -p3306 -uqa -pqatest"
port=$3
mysqld="-h$ip -p$port -uqa -pqatest"
date=`date "+%Y-%m-%d %H:%M:%S"`
len=`echo $phone_no|awk '{print length($0)}'`
......@@ -16,7 +17,7 @@ if [ $? -ne 0 ];then
exit -1
fi
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use xyqb;
update xyqb.loan_application_history
set xyqb.loan_application_history.progress=21
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ];then
echo "请输入11位手机号!"
......@@ -11,7 +11,7 @@ fi
#把资金方放款时间更新为昨天,便于测试
date=`date -d yesterday "+%Y-%m-%d %H:%M:%S"`
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use xyqb;
update xyqb.loan_application_history
set xyqb.loan_application_history.progress=15
......
......@@ -4,7 +4,7 @@ phone_no=$2
num=$3 #激活白条的数量
merchant_id=$4 #渠道编号
bill_num_a=0
PORT="3306"
PORT=$5
USERNAME="qa"
PASSWORD="qatest"
mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}"
......
#!/bin/bash
ip=$1
phone_no=$2
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}"
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ];then
echo "请输入11位手机号!"
......@@ -8,7 +9,7 @@ if [ $len -ne 11 ];then
fi
seq=XYBT`date +%s%N`
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use xyqb;
update xyqb.loan_application_history
set progress=39
......
......@@ -3,7 +3,7 @@ ip=$1
phone_no=$2
bill_num=3
bill_num_a=0
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}"
......
......@@ -3,7 +3,7 @@ ip=$1
phone_no=$2
bill_num=3
bill_num_a=0
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}"
......
#!/bin/bash
ip=$1
phone_no=$2
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}"
......
......@@ -3,7 +3,7 @@ ip=$1
phone_no=$2
bill_num=$3
bill_num_a=0
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}"
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ]
then
......@@ -10,7 +11,7 @@ phone_no=$2
fi
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
update xyqb.loan_application_history
set xyqb.loan_application_history.progress=40
where business_type=0 and user_id=(select id from xyqb_user.user where phone_no =$phone_no) and is_active=1;
......
......@@ -2,6 +2,7 @@
ip=$1
phone_no=$2
fund_id=$3
port=$4
#fund_id:"请输入资金方编号,湖北消金输入290、洋钱罐140,广源小贷210,其他的参考表xyqb.fund_corp:"
......@@ -16,7 +17,7 @@ fund_id=$3
date=`date "+%Y-%m-%d %H:%M:%S"`
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use xyqb;
update xyqb.loan_application_history
set xyqb.loan_application_history.progress=9
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ]
......@@ -11,7 +12,7 @@ phone_no=$2
fi
date=`date "+%Y-%m-%d %H:%M:%S"`
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use xyqb;
update xyqb.loan_application_history
set xyqb.loan_application_history.progress=21
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ]
then
......@@ -12,7 +12,7 @@ phone_no=$2
#把资金方放款时间更新为昨天,便于测试
date=`date -d yesterday "+%Y-%m-%d %H:%M:%S"`
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use xyqb;
update xyqb.loan_application_history
set xyqb.loan_application_history.progress=15
......
......@@ -2,9 +2,10 @@
ip=$1
phone_no=$2
seq=$3
port=$4
#seq "请输入消费流水号(随意修改以下值几个数字值即可XYBT2015122219571073084102263893):"
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use xyqb;
update xyqb.loan_application_history
set progress=39
......
#!/bin/bash
ip=$1
phone_no=$2
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
DBNAME="xyqb"
......
......@@ -2,10 +2,11 @@
ip=$1
phone_no_after=$2
phone_no_before=$3
port=$4
#"请输入新用户手机号:" phone_no_after
#"请输入旧用户手机号:" phone_no_before
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use payment_center;
update payment_center.bank_card
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
#"input user's phone_no:" phone_no
#echo $phone_no
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use risk_control;
update risk_control.review_history
set user_id = 1 , progress=3 , credit_class=0 , comments=null , quantify_product_name=null, fund_assign_status=0 , fund_corp_id=null
......
#!/bin/bash
ip=$1
card_no=$2
port=$3
#"请输入要删除的银行卡号或者该银行卡绑卡的手机号:" card_no
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
delete from payment_center.bank_card where card_no=$card_no;
delete from payment_center.bank_card_detail where card_no=$card_no;
delete from payment_center.card_bind_info where card_no=$card_no;
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
#"请输入用户手机号:" phone_no
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ]
......@@ -10,7 +11,7 @@ phone_no=$2
break
fi
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use payment_center;
delete from payment_center.bank_card where user_id=111112222233333;
delete from payment_center.card_bind_info where user_id=111112222233333;
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
#"请输入用户手机号:" phone_no
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ]
......@@ -12,7 +13,7 @@ phone_no=$2
echo "开始授信:$phone_no ~"
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use spider_center;
insert into spider_center.user_authorization (auth_type,user_id)
select 0, u.id from spider_center.user u
......
......@@ -4,10 +4,11 @@ phone_no_before=$2
phone_no_after=$3
name=$4
id_no=$5
port=$6
DBNAME="payment_center"
TABLENAME="user_detail"
TABLENAME1="user"
mysqld="-h$ip -p3306 -uqa -pqatest"
mysqld="-h$ip -P$port -uqa -pqatest"
function updatecarddetail()
{
......
......@@ -2,6 +2,7 @@
ip=$1
phone_no=$2
set_channel=$3
port=$4
DBNAME="xyqb_user"
DBNAME1="xyqb"
DBNAME2="risk_control"
......@@ -10,7 +11,7 @@ TABLENAME1="loan_application_history"
TABLENAME2="review_history"
TABLENAME3="loan_submit_info"
mysqld="-h$ip -p3306 -uqa -pqatest"
mysqld="-h$ip -P$port -uqa -pqatest"
function updatecarddetail()
{
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
#"请输入用户手机号:" phone_no
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ]
......@@ -10,7 +11,7 @@ phone_no=$2
break
fi
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use xyqb;
update xyqb.repayment_plan
set repayment_status=3
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
#"请输入用户手机号:" phone_no
do
len=`echo $phone_no|awk '{print length($0)}'`
......@@ -13,7 +14,7 @@ do
done
echo "————start————"
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use xyqb;
update xyqb.repayment_plan
set repayment_status=3
......
......@@ -3,7 +3,7 @@ ip=$1
act_id=$2
start_time=$3
end_time=$4
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
DBNAME="redpacket"
......
#!/bin/bash
ip=$1
phone_no=$2
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
DBNAME="xyqb"
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
DBNAME="xyqb_user"
DBNAME1="payment_center"
DBNAME2="xyqb"
DBNAME3="spider_center"
TABLENAME="user"
mysqld="-h$ip -p3306 -uqa -pqatest"
mysqld="-h$ip -p$port -uqa -pqatest"
date=`date "+%Y-%m-%d %H:%M:%S"`
len=`echo $phone_no|awk '{print length($0)}'`
......
#!/bin/bash
HOSTNAME="`ifconfig | awk -F'addr:|Bcast' '/Bcast/{print $2}'`" #数据库信息
PORT="3306"
port=$1
USERNAME="qa"
PASSWORD="qatest"
for i in `/home/quant_group/mysql-5.6.31/bin/mysql -u${USERNAME} -p${PASSWORD} -se "show processlist" | grep -v "show processlist" | grep -v "$HOSTNAME" | awk '{if($4=="mall_settlement" )print $1}'`
for i in `/home/quant_group/mysql-5.6.31/bin/mysql -u${USERNAME} -p${PASSWORD} -P$port -se "show processlist" | grep -v "show processlist" | grep -v "$HOSTNAME" | awk '{if($4=="mall_settlement" )print $1}'`
do
mysql -u${USERNAME} -p${PASSWORD} -e "kill $i"
......
......@@ -2,7 +2,7 @@
ip=$1
orderId=$2 #mall订单号
orderStatus=$3 #mall订单状态值
port=$3
len=`echo $orderId |awk '{print length}'`
if [ -z "$len" ]
then
......@@ -10,7 +10,7 @@ then
exit -1 #exit命令同于退出shell,状态值0代表执行成功,其它值代表执行失败
fi
mysqld="-h$ip -p3306 -uqa -pqatest"
mysqld="-h$ip -p$port -uqa -pqatest"
# 更新mall.mall_order表的订单状态
mysql -N $mysqld mall -e "update mall_order set order_state='$orderStatus' where order_id='$orderId'";
......
#!/bin/bash
ip=$1
orderId=$2 #mall订单号
port=$3
len=`echo $orderId |awk '{print length}'`
if [ -z $len ]
then
......@@ -10,7 +10,7 @@ then
fi
seq=`date "+%Y-%m-%d %H:%M:%S"`
mysqld="-h$ip -p3306 -uqa -pqatest"
mysqld="-h$ip -p$port -uqa -pqatest"
# 更新mall.mall_order表的订单状态为3
mysql -N $mysqld mall -e "update mall_order set order_state='3' where order_id='$orderId'";
......
#!/bin/bash
ip=$1
mysqld="-h$ip -p3306 -uqa -pqatest"
port=$2
mysqld="-h$ip -P$port -uqa -pqatest"
# 先删除display库的discovery_config表
mysql -N $mysqld display -e "DROP TABLE IF EXISTS discovery_config";
......
#!/bin/bash
ip=$1
port=$3
seq=`date "+%Y-%m-%d %H:%M:%S"`
mysqld="-h$ip -p3306 -uqa -pqatest"
mysqld="-h$ip -P$port -uqa -pqatest"
# 0.未登录:先删除未登录状态下loan_config表数据,再插入新数据
mysql -N $mysqld mall -e "delete from loan_config where loan_state='0' and config_key='buttonConfig'";
......
......@@ -2,6 +2,7 @@
ip=$1
phone_no=$2
amount=$3
port=$4
len=`echo $phone_no |awk '{print length}'`
if [ $len -ne 11 ]
......@@ -23,7 +24,7 @@ difference=50
supplierAmount=`expr $amount - $difference`
seq=`date "+%Y-%m-%d %H:%M:%S"`
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use mall set names utf-8;
insert into mall.mall_order
......
#!/bin/bash
ip=$1
nav_url=$2
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
DBNAME="mall"
......
#!/bin/bash
ip=$1
card_no=$2
port=$3
len=`echo $card_no|awk '{print length($0)}'`
if [ $len -ne 11 ];then
......@@ -8,7 +9,7 @@ if [ $len -ne 11 ];then
exit -1
fi
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
delete from payment_center.bank_card where card_no=$card_no;
delete from payment_center.bank_card_detail where card_no=$card_no;
delete from payment_center.card_bind_info where card_no=$card_no;
......
#!/bin/bash
ip=$1
phone_no=$2
port=$3
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ];then
echo "请输入11位手机号!"
......@@ -10,7 +11,7 @@ fi
card_no=622700000`date +%s`
echo $card_no
card_last=`echo ${card_no:(-4):4}`
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
use payment_center;
delete from payment_center.bank_card where user_id=111112222233333;
delete from payment_center.card_bind_info where user_id=111112222233333;
......
#!/bin/bash
ip=$1
phone_no=$2
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
DBNAME="xyqb"
......
This diff is collapsed.
......@@ -2,6 +2,7 @@
ip=$1
phone_no=$2
account=$3
port=$4
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ];then
echo "请输入11位手机号!"
......@@ -14,7 +15,7 @@ fi
date=`date "+%Y-%m-%d %H:%M:%S"`
unique_business_id=CASH_LOAN`date +%s%N`
echo "unique_business_id:"$unique_business_id
mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
mysql -h"$ip" -P"$port" -u"qa" -p"qatest" <<EOF
INSERT INTO redpacket.tb_coupon (unique_business_id, phone, group_id, name, category, category_info, category_type, category_type_info, valid_start_date, valid_end_date, sms_reminder_on_invalid, status, created_at, used_at, updated_at, mark, uid)
VALUES
('$unique_business_id', '$phone_no', 10000574, N'小测福利~', 8, '{\"loanTerm\":[\"1\",\"2\",\"3\"]}', 3, '{\"rebate\":$account}', '2017-01-01 00:00:13', '2020-06-14 00:00:23', 0, 2, '$date', NULL, '$date', 1, NULL);
......
......@@ -5,7 +5,7 @@ phone_no=$2
merchant_id=$3 #渠道号,默认为7
HOSTNAME="$ip" #数据库信息
PORT="3306"
PORT=$4
USERNAME="qa"
PASSWORD="qatest"
......
#!/bin/bash
ip=$1
phone_no=$2
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
DBNAME="spider_center"
......
#!/bin/bash
ip=$1
phone_no=$2
mysqld="-h$ip -p3306 -uqa -pqatest"
port=$3
mysqld="-h$ip -P$port -uqa -pqatest"
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ];then
......
#!/bin/bash
ip=$1
phone_no=$2
PORT="3306"
PORT=$3
USERNAME="qa"
PASSWORD="qatest"
DBNAME="xyqb_user"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment