Commit 34f4165a authored by 智勇's avatar 智勇

namespace

parent 395be6df
...@@ -19,7 +19,7 @@ fi ...@@ -19,7 +19,7 @@ fi
cash_domain="qapi-$namespace.q-gp.com" cash_domain="qapi-$namespace.q-gp.com"
xyqb_domain="api-$namespace.q-gp.com" xyqb_domain="api-$namespace.q-gp.com"
if [ -z "$domainName" ];then if [ -z "$namespace" ];then
cash_domain=$ip:7037 cash_domain=$ip:7037
xyqb_domain=$ip:7001 xyqb_domain=$ip:7001
fi fi
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
ip=$1 ip=$1
phone_no=$2 phone_no=$2
PORT=$3 PORT=$3
namespace=$4
USERNAME="qa" USERNAME="qa"
PASSWORD="qatest" PASSWORD="qatest"
DBNAME="xyqb" DBNAME="xyqb"
...@@ -11,6 +12,12 @@ TABLENAME1="user" ...@@ -11,6 +12,12 @@ TABLENAME1="user"
mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}" mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}"
date=`date "+%Y-%m-%d %H:%M:%S"` date=`date "+%Y-%m-%d %H:%M:%S"`
cash_domain="qapi-$namespace.q-gp.com"
if [ -z "$namespace" ];then
cash_domain=$ip:7037
fi
function pushloanprogress(){ function pushloanprogress(){
len=`echo $phone_no|awk '{print length($0)}'` len=`echo $phone_no|awk '{print length($0)}'`
if [ $len -ne 11 ] if [ $len -ne 11 ]
...@@ -38,42 +45,42 @@ function pushloanprogress(){ ...@@ -38,42 +45,42 @@ function pushloanprogress(){
#push订单状态 #push订单状态
#终审中 #终审中
if [ $progress_id -eq 7 ]; then if [ $progress_id -eq 7 ]; then
curl -d "loanId=${loan_id}&loanProgress=FINAL_SCREENING" "http://${ip}:7037/test/loanMq/one" curl -d "loanId=${loan_id}&loanProgress=FINAL_SCREENING" "http://${cash_domain}/test/loanMq/one"
echo "推送成功 $date" echo "推送成功 $date"
#终审拒绝 #终审拒绝
elif [ $progress_id -eq 8 ]; then elif [ $progress_id -eq 8 ]; then
curl -d "loanId=${loan_id}&loanProgress=FINAL_SCREENING_REJECT" "http://${ip}:7037/test/loanMq/one" curl -d "loanId=${loan_id}&loanProgress=FINAL_SCREENING_REJECT" "http://${cash_domain}/test/loanMq/one"
echo "推送成功 $date" echo "推送成功 $date"
#未通过初筛 #未通过初筛
elif [ $progress_id -eq 19 ]; then elif [ $progress_id -eq 19 ]; then
curl -d "loanId=${loan_id}&loanProgress=FILTERING_DECLINED" "http://${ip}:7037/test/loanMq/one" curl -d "loanId=${loan_id}&loanProgress=FILTERING_DECLINED" "http://${cash_domain}/test/loanMq/one"
echo "推送成功 $date" echo "推送成功 $date"
#借款清单生成完成 #借款清单生成完成
elif [ $progress_id -eq 9 ]; then elif [ $progress_id -eq 9 ]; then
curl -d "loanId=${loan_id}&loanProgress=LOAN_APPLICATION_MANIFEST_COMPLETE" "http://${ip}:7037/test/loanMq/one" curl -d "loanId=${loan_id}&loanProgress=LOAN_APPLICATION_MANIFEST_COMPLETE" "http://${cash_domain}/test/loanMq/one"
echo "推送成功 $date" echo "推送成功 $date"
#等待资金方放款 #等待资金方放款
elif [ $progress_id -eq 20 ]; then elif [ $progress_id -eq 20 ]; then
curl -d "loanId=${loan_id}&loanProgress=WAITING_FUND" "http://${ip}:7037/test/loanMq/one" curl -d "loanId=${loan_id}&loanProgress=WAITING_FUND" "http://${cash_domain}/test/loanMq/one"
echo "推送成功 $date" echo "推送成功 $date"
#查看还款计划 #查看还款计划
elif [ $progress_id -eq 15 ]; then elif [ $progress_id -eq 15 ]; then
curl -d "loanId=${loan_id}&loanProgress=CHECK_REPAYMENT_PLAN" "http://${ip}:7037/test/loanMq/one" curl -d "loanId=${loan_id}&loanProgress=CHECK_REPAYMENT_PLAN" "http://${cash_domain}/test/loanMq/one"
echo "推送成功 $date" echo "推送成功 $date"
#马上金融放款失败 #马上金融放款失败
elif [ $progress_id -eq 23 ]; then elif [ $progress_id -eq 23 ]; then
curl -d "loanId=${loan_id}&loanProgress=FINAL_FUNDED_APPROVAL_FAIL" "http://${ip}:7037/test/loanMq/one" curl -d "loanId=${loan_id}&loanProgress=FINAL_FUNDED_APPROVAL_FAIL" "http://${cash_domain}/test/loanMq/one"
echo "推送成功 $date" echo "推送成功 $date"
#借款完成 #借款完成
elif [ $progress_id -eq 16 ]; then elif [ $progress_id -eq 16 ]; then
curl -d "loanId=${loan_id}&loanProgress=LOAN_COMPLETE" "http://${ip}:7037/test/loanMq/one" curl -d "loanId=${loan_id}&loanProgress=LOAN_COMPLETE" "http://${cash_domain}/test/loanMq/one"
else else
echo "progress=$progress_id,订单状态不对" echo "progress=$progress_id,订单状态不对"
fi fi
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
ip=$1 ip=$1
phone_no=$2 phone_no=$2
PORT=$3 PORT=$3
namespace=$4
USERNAME="qa" USERNAME="qa"
PASSWORD="qatest" PASSWORD="qatest"
DBNAME="spider_center" DBNAME="spider_center"
...@@ -10,6 +11,12 @@ TABLENAME1="user" ...@@ -10,6 +11,12 @@ TABLENAME1="user"
mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}" mysqld="-h${ip} -P${PORT} -u${USERNAME} -p${PASSWORD}"
date=`date "+%Y-%m-%d %H:%M:%S"` date=`date "+%Y-%m-%d %H:%M:%S"`
spider_center_domain="sc-$namespace.q-gp.com"
if [ -z "$namespace" ];then
spider_center_domain=$ip:7021
fi
function authorization() function authorization()
{ {
len=`echo $phone_no|awk '{print length($0)}'` len=`echo $phone_no|awk '{print length($0)}'`
...@@ -45,7 +52,7 @@ function authorization() ...@@ -45,7 +52,7 @@ function authorization()
mysql $mysqld ${DBNAME} -e "${insert_sql00}" mysql $mysqld ${DBNAME} -e "${insert_sql00}"
mysql $mysqld ${DBNAME} -e "${insert_sql03}" mysql $mysqld ${DBNAME} -e "${insert_sql03}"
curl -s "http://${ip}:7021/ex/quartz/notity_generate_report_new" curl -s "http://${spider_center_domain}/ex/quartz/notity_generate_report_new"
echo "done!!! $date" echo "done!!! $date"
fi fi
......
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