Commit 7330e167 authored by qa_quantgroup's avatar qa_quantgroup

增加修改用户渠道信息

parent d3d9ff82
...@@ -10,7 +10,7 @@ phone_no=$2 ...@@ -10,7 +10,7 @@ phone_no=$2
fi fi
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
update xyqb.loan_application_history update xyqb.loan_application_history
set xyqb.loan_application_history.progress=40 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; where business_type=0 and user_id=(select id from xyqb_user.user where phone_no =$phone_no) and is_active=1;
......
...@@ -16,7 +16,7 @@ fund_id=$3 ...@@ -16,7 +16,7 @@ fund_id=$3
date=`date "+%Y-%m-%d %H:%M:%S"` date=`date "+%Y-%m-%d %H:%M:%S"`
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
use xyqb; use xyqb;
update xyqb.loan_application_history update xyqb.loan_application_history
set xyqb.loan_application_history.progress=9 set xyqb.loan_application_history.progress=9
......
...@@ -11,7 +11,7 @@ phone_no=$2 ...@@ -11,7 +11,7 @@ phone_no=$2
fi fi
date=`date "+%Y-%m-%d %H:%M:%S"` date=`date "+%Y-%m-%d %H:%M:%S"`
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
use xyqb; use xyqb;
update xyqb.loan_application_history update xyqb.loan_application_history
set xyqb.loan_application_history.progress=21 set xyqb.loan_application_history.progress=21
......
...@@ -12,7 +12,7 @@ phone_no=$2 ...@@ -12,7 +12,7 @@ phone_no=$2
#把资金方放款时间更新为昨天,便于测试 #把资金方放款时间更新为昨天,便于测试
date=`date -d yesterday "+%Y-%m-%d %H:%M:%S"` date=`date -d yesterday "+%Y-%m-%d %H:%M:%S"`
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
use xyqb; use xyqb;
update xyqb.loan_application_history update xyqb.loan_application_history
set xyqb.loan_application_history.progress=15 set xyqb.loan_application_history.progress=15
......
...@@ -4,7 +4,7 @@ phone_no=$2 ...@@ -4,7 +4,7 @@ phone_no=$2
seq=$3 seq=$3
#seq "请输入消费流水号(随意修改以下值几个数字值即可XYBT2015122219571073084102263893):" #seq "请输入消费流水号(随意修改以下值几个数字值即可XYBT2015122219571073084102263893):"
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
use xyqb; use xyqb;
update xyqb.loan_application_history update xyqb.loan_application_history
set progress=39 set progress=39
......
...@@ -5,7 +5,7 @@ phone_no_before=$3 ...@@ -5,7 +5,7 @@ phone_no_before=$3
#"请输入新用户手机号:" phone_no_after #"请输入新用户手机号:" phone_no_after
#"请输入旧用户手机号:" phone_no_before #"请输入旧用户手机号:" phone_no_before
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
use payment_center; use payment_center;
update payment_center.bank_card update payment_center.bank_card
......
...@@ -4,7 +4,7 @@ phone_no=$2 ...@@ -4,7 +4,7 @@ phone_no=$2
#"input user's phone_no:" phone_no #"input user's phone_no:" phone_no
#echo $phone_no #echo $phone_no
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
use risk_control; use risk_control;
update risk_control.review_history 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 set user_id = 1 , progress=3 , credit_class=0 , comments=null , quantify_product_name=null, fund_assign_status=0 , fund_corp_id=null
......
...@@ -4,7 +4,7 @@ card_no=$2 ...@@ -4,7 +4,7 @@ card_no=$2
#"请输入要删除的银行卡号或者该银行卡绑卡的手机号:" card_no #"请输入要删除的银行卡号或者该银行卡绑卡的手机号:" card_no
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
delete from payment_center.bank_card where card_no=$card_no; 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.bank_card_detail where card_no=$card_no;
delete from payment_center.card_bind_info where card_no=$card_no; delete from payment_center.card_bind_info where card_no=$card_no;
......
...@@ -10,7 +10,7 @@ phone_no=$2 ...@@ -10,7 +10,7 @@ phone_no=$2
break break
fi fi
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
use payment_center; use payment_center;
delete from payment_center.bank_card where user_id=111112222233333; delete from payment_center.bank_card where user_id=111112222233333;
delete from payment_center.card_bind_info where user_id=111112222233333; delete from payment_center.card_bind_info where user_id=111112222233333;
......
...@@ -12,7 +12,7 @@ phone_no=$2 ...@@ -12,7 +12,7 @@ phone_no=$2
echo "开始授信:$phone_no ~" echo "开始授信:$phone_no ~"
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
use spider_center; use spider_center;
insert into spider_center.user_authorization (auth_type,user_id) insert into spider_center.user_authorization (auth_type,user_id)
select 0, u.id from spider_center.user u select 0, u.id from spider_center.user u
......
...@@ -10,7 +10,7 @@ phone_no=$2 ...@@ -10,7 +10,7 @@ phone_no=$2
break break
fi fi
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
use xyqb; use xyqb;
update xyqb.repayment_plan update xyqb.repayment_plan
set repayment_status=3 set repayment_status=3
......
...@@ -13,7 +13,7 @@ do ...@@ -13,7 +13,7 @@ do
done done
echo "————start————" echo "————start————"
mysql -h"192.168.4.$ip" -p"3306" -u"qa" -p"qatest" <<EOF mysql -h"$ip" -p"3306" -u"qa" -p"qatest" <<EOF
use xyqb; use xyqb;
update xyqb.repayment_plan update xyqb.repayment_plan
set repayment_status=3 set repayment_status=3
......
#!/bin/bash
ip=$1
phone_no=$2
set_channel=$3
DBNAME="xyqb_user"
DBNAME1="xyqb"
DBNAME2="risk_control"
TABLENAME="user"
TABLENAME1="loan_application_history"
TABLENAME2="review_history"
TABLENAME3="loan_submit_info"
mysqld="-h$ip -p3306 -uqa -pqatest"
function updatecarddetail()
{
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ]
then
echo "请输入11位手机号!"
else
echo "开始修改"
#查询userID
select_sql="select id from ${TABLENAME} where phone_no=${phone_no}"
user_id=`mysql -N $mysqld ${DBNAME} -e "${select_sql}"`
echo "user_id=$user_id"
#查询loanID
select_loanid="select id from ${TABLENAME1} where user_id=${user_id}"
select_loan_id=`mysql -N $mysqld ${DBNAME1} -e "${select_loanid}"`
echo "loan_id=$select_loan_id"
#修改用户表渠道
update_user_channel="update ${TABLENAME} set registered_from=$set_channel where phone_no=${phone_no}"
#修改订单表渠道
update_loan_channel="update ${TABLENAME1} set created_from=$set_channel where user_id=${user_id}"
#修改谛听渠道
update_diting_channel="update ${TABLENAME2} set created_from=$set_channel where loan_application_history_id=${select_loan_id}"
#修改订单提交渠道
update_submit_channel="update ${TABLENAME3} set channel_id=$set_channel where loan_id=${select_loan_id}"
mysql $mysqld ${DBNAME} -e "${update_user_channel}"
mysql $mysqld ${DBNAME1} -e "${update_loan_channel}"
mysql $mysqld ${DBNAME2} -e "${update_diting_channel}"
mysql $mysqld ${DBNAME1} -e "${update_submit_channel}"
echo "修改成功"
break
fi
}
updatecarddetail $ip $phone_no $set_channel
\ No newline at end of file
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