Commit 118848b5 authored by tywldx's avatar tywldx
parents 0d530592 05bbf386
......@@ -2,6 +2,7 @@
ip=$1
phone_no=$2
date=`date "+%Y-%m-%d %H:%M:%S"`
mysqld="-h$ip -p3306 -uqa -pqatest"
len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ];then
echo "请输入11位手机号!"
......
#!/bin/bash
ip=$1
phone_no=$2
mysqld="-h$ip -p3306 -uqa -pqatest"
date=`date "+%Y-%m-%d %H:%M:%S"`
len=`echo $phone_no|awk '{print length($0)}'`
......
#!/bin/bash
ip=$1
branch_name=$2
date=`date "+%Y-%m-%d %H:%M:%S"`
function Git_branch(){
if [ -z $2 ]; then
echo "查看所有服务分支 $date"
expect -c "
set timeout 10
spawn ssh root@${ip}
expect \"]#\"
send \"for x in `find /home/quant_group/ -maxdepth 2 -name .git`;do cd $(dirname $x);echo $(dirname $x):;git branch | grep '*';done\r\"
set timeout -1
expect \"]#\"
send \"exit\r\"
expect eof;"
else
echo "查看服务$2的分支 $date"
expect -c "
set timeout 10
spawn ssh root@${ip}
expect \"]#\"
send \"cd /home/quant_group/$2\r\"
expect \"]#\"
send \"git branch\r\"
set timeout -1
expect \"]#\"
send \"exit\r\"
expect eof;"
fi
}
Git_branch $1 $2
\ No newline at end of file
#!/bin/bash
ip=$1
nav_url=$2
PORT="3306"
USERNAME="qa"
PASSWORD="qatest"
DBNAME="mall"
TABLENAME="ad_detail"
mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}"
date=`date "+%Y-%m-%d %H:%M:%S"`
date_next_year=`date -d "next year" "+%Y-%m-%d %H:%M:%S"`
function doMysql()
{
update_sql="update ${TABLENAME} set enable=0 where type=16 and sort=1"
mysql $mysqld ${DBNAME} -e "${update_sql}"
insert_sql="INSERT INTO ${TABLENAME} (type, sort, start_date, end_date, image_url, nav_url, name, text, removed, created_at, updated_at, enable, min_version, expand_data, code)
VALUES
(16, 1, '$date', '$date_next_year', 'Fk1o1SKzPPsax0eFboLAjzkusmo2', '$nav_url', N'现金贷轮播', '', 0, '$date', '$date', 1, NULL, N'{\"needLogin\":0,\"iosAlert\":\"本活动由信用钱包提供,与苹果无关\",\"skipBtn\":0,\"displayTime\":5}', '1498016852359')"
echo $insert_sql
mysql $mysqld ${DBNAME} -e "${insert_sql}"
}
doMysql
echo "done!!! $date"
......@@ -9,6 +9,7 @@ TABLENAME="loan_application_history"
DBNAME1="xyqb_user"
TABLENAME1="user"
mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}"
date=`date "+%Y-%m-%d %H:%M:%S"`
function pushloanprogress(){
len=`echo $phone_no|awk '{print length($0)}'`
......@@ -16,21 +17,21 @@ function pushloanprogress(){
then
echo "请输入11位手机号!"
else
echo "开始修改"
#echo "开始修改"
#查询userID
select_sql="select id from ${TABLENAME1} where phone_no=${phone_no}"
user_id=`mysql -N $mysqld ${DBNAME1} -e "${select_sql}"`
echo "user_id=$user_id"
#cho "user_id=$user_id"
#查找loanid
loanid="select id from ${TABLENAME} where user_id=${user_id} and is_active = 1"
loan_id=`mysql -N $mysqld ${DBNAME} -e "${loanid}"`
echo "loan_id=$loan_id"
#cho "loan_id=$loan_id"
#查询订单状态
progressid="select progress from ${TABLENAME} where user_id=${user_id} and is_active = 1"
progress_id=`mysql -N $mysqld ${DBNAME} -e "${progressid}"`
#echo "progress=$progress_id"
echo "progress=$progress_id"
......@@ -38,37 +39,37 @@ function pushloanprogress(){
#终审中
if [ $progress_id -eq 7 ]; then
curl -d "loanId=${loan_id}&loanProgress=FINAL_SCREENING" "http://${ip}:7037/test/loanMq/one"
echo "推送成功"
echo "推送成功 $date"
#终审拒绝
elif [ $progress_id -eq 8 ]; then
curl -d "loanId=${loan_id}&loanProgress=FINAL_SCREENING_REJECT" "http://${ip}:7037/test/loanMq/one"
echo "推送成功"
echo "推送成功 $date"
#未通过初筛
elif [ $progress_id -eq 19 ]; then
curl -d "loanId=${loan_id}&loanProgress=FILTERING_DECLINED" "http://${ip}:7037/test/loanMq/one"
echo "推送成功"
echo "推送成功 $date"
#借款清单生成完成
elif [ $progress_id -eq 9 ]; then
curl -d "loanId=${loan_id}&loanProgress=LOAN_APPLICATION_MANIFEST_COMPLETE" "http://${ip}:7037/test/loanMq/one"
echo "推送成功"
echo "推送成功 $date"
#等待资金方放款
elif [ $progress_id -eq 20 ]; then
curl -d "loanId=${loan_id}&loanProgress=WAITING_FUND" "http://${ip}:7037/test/loanMq/one"
echo "推送成功"
echo "推送成功 $date"
#查看还款计划
elif [ $progress_id -eq 15 ]; then
curl -d "loanId=${loan_id}&loanProgress=CHECK_REPAYMENT_PLAN" "http://${ip}:7037/test/loanMq/one"
echo "推送成功"
echo "推送成功 $date"
#马上金融放款失败
elif [ $progress_id -eq 23 ]; then
curl -d "loanId=${loan_id}&loanProgress=FINAL_FUNDED_APPROVAL_FAIL" "http://${ip}:7037/test/loanMq/one"
echo "推送成功"
echo "推送成功 $date"
#借款完成
elif [ $progress_id -eq 16 ]; then
......
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