Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-deploy-utils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-deploy-utils
Commits
0db54a24
Commit
0db54a24
authored
Aug 07, 2017
by
qa_quantgroup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加手动推送订单状态脚本pushloanprogress.sh
parent
7822a97d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
10 deletions
+95
-10
delete_All_Data.sh
qa_shell_script/script_by_Contorller/delete_All_Data.sh
+16
-10
pushloanprogress.sh
qa_shell_script/script_by_Contorller/pushloanprogress.sh
+79
-0
No files found.
qa_shell_script/script_by_Contorller/delete_All_Data.sh
View file @
0db54a24
...
...
@@ -32,6 +32,7 @@ function deleteAlldata()
mysql
$mysqld
${
DBNAME
}
-e
"delete from wechat_userinfo where user_id=
$xyqb_user_id
"
echo
"删除xyqb数据,xyqb_user_id=
$xyqb_user_id
,loan_id=
$loan_id
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from user_contact where user_id=
$xyqb_user_id
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from loan_application_history where user_id=
$xyqb_user_id
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from baitiao_account where user_id=
$xyqb_user_id
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from baitiao_bill where user_id=
$xyqb_user_id
"
...
...
@@ -42,21 +43,22 @@ function deleteAlldata()
mysql
$mysqld
${
DBNAME2
}
-e
"delete from baitiao_order_history where user_id=
$xyqb_user_id
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from baitiao_repayment_plan where user_id=
$xyqb_user_id
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from loan_application_manifest_history where user_id=
$xyqb_user_id
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from loan_demand_history where loan_application_history_id in (
$loan_id
)"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from loan_demand_history_app where phone_no=
$phone_no
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from loan_submit_info where loan_id in (
$loan_id
)"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from pay_center_bank_card where phone_no=
$phone_no
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from pay_center_biao_tiao_bank_card where phone_no=
$phone_no
"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from repayment_plan where user_id=
$xyqb_user_id
"
if
[
-n
$loan_id
]
;
then
mysql
$mysqld
${
DBNAME2
}
-e
"delete from loan_demand_history where loan_application_history_id in (
$loan_id
)"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from loan_submit_info where loan_id in (
$loan_id
)"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from user_authorization_history where loan_application_history_id in (
$loan_id
)"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from user_finance_history where loan_application_history_id in (
$loan_id
)"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from waiting_for_assignment where loan_application_history_id in (
$loan_id
)"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from waiting_funding_corp_operate_people where loan_application_history_id in (
$loan_id
)"
mysql
$mysqld
${
DBNAME2
}
-e
"delete from user_contact where user_id=
$xyqb_user_id
"
echo
"删除cash-loan-flow数据"
mysql
$mysqld
cash_loan_flow
-e
"delete from order_progress_record where loan_id in (
$loan_id
)"
fi
fi
#支付中心id
payment_center_user_id
=
`
mysql
-N
$mysqld
${
DBNAME1
}
-e
"select id from
${
TABLENAME
}
where phone_no=
${
phone_no
}
"
`
...
...
@@ -98,6 +100,10 @@ function deleteAlldata()
echo
"删除谛听中心数据"
mysql
$mysqld
risk_control
-e
"delete from review_history where phone_no=
$phone_no
"
echo
"删除redis缓存"
redis-cli
-h
$ip
-p
6379 keys
*
$phone_no
*
| xargs redis-cli
-h
$ip
-p
6379 del
redis-cli
-h
$ip
-p
6379 keys
*
$xyqb_user_id
*
| xargs redis-cli
-h
$ip
-p
6379 del
fi
}
...
...
qa_shell_script/script_by_Contorller/pushloanprogress.sh
0 → 100644
View file @
0db54a24
#!/bin/bash
ip
=
$1
phone_no
=
$2
PORT
=
"3306"
USERNAME
=
"qa"
PASSWORD
=
"qatest"
DBNAME
=
"xyqb"
TABLENAME
=
"loan_application_history"
DBNAME1
=
"xyqb_user"
TABLENAME1
=
"user"
mysqld
=
"-h
${
ip
}
-P
${
PORT
}
-u
${
USERNAME
}
-p
${
PASSWORD
}
"
function
pushloanprogress
(){
len
=
`
echo
$phone_no
|awk
'{print length($0)}'
`
if
[
$len
-ne
11
]
then
echo
"请输入11位手机号!"
else
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
"
#查找loanid
loanid
=
"select id from
${
TABLENAME
}
where user_id=
${
user_id
}
"
loan_id
=
`
mysql
-N
$mysqld
${
DBNAME
}
-e
"
${
loanid
}
"
`
echo
"loan_id=
$loan_id
"
#查询订单状态
progressid
=
"select progress from
${
TABLENAME
}
where user_id=
${
user_id
}
"
progress_id
=
`
mysql
-N
$mysqld
${
DBNAME
}
-e
"
${
progressid
}
"
`
#echo "progress=$progress_id"
#push订单状态
#终审中
if
[
$progress_id
-eq
7
]
;
then
curl
-d
"loanId=
${
loan_id
}
&loanProgress=FINAL_SCREENING"
"http://
${
ip
}
:7037/test/loanMq/one"
#终审拒绝
elif
[
$progress_id
-eq
8
]
;
then
curl
-d
"loanId=
${
loan_id
}
&loanProgress=FINAL_SCREENING_REJECT"
"http://
${
ip
}
:7037/test/loanMq/one"
#未通过初筛
elif
[
$progress_id
-eq
19
]
;
then
curl
-d
"loanId=
${
loan_id
}
&loanProgress=FILTERING_DECLINED"
"http://
${
ip
}
:7037/test/loanMq/one"
#借款清单生成完成
elif
[
$progress_id
-eq
9
]
;
then
curl
-d
"loanId=
${
loan_id
}
&loanProgress=LOAN_APPLICATION_MANIFEST_COMPLETE"
"http://
${
ip
}
:7037/test/loanMq/one"
#等待资金方放款
elif
[
$progress_id
-eq
20
]
;
then
curl
-d
"loanId=
${
loan_id
}
&loanProgress=WAITING_FUND"
"http://
${
ip
}
:7037/test/loanMq/one"
#查看还款计划
elif
[
$progress_id
-eq
15
]
;
then
curl
-d
"loanId=
${
loan_id
}
&loanProgress=CHECK_REPAYMENT_PLAN"
"http://
${
ip
}
:7037/test/loanMq/one"
#马上金融放款失败
elif
[
$progress_id
-eq
23
]
;
then
curl
-d
"loanId=
${
loan_id
}
&loanProgress=FINAL_FUNDED_APPROVAL_FAIL"
"http://
${
ip
}
:7037/test/loanMq/one"
#借款完成
elif
[
$progress_id
-eq
16
]
;
then
curl
-d
"loanId=
${
loan_id
}
&loanProgress=LOAN_COMPLETE"
"http://
${
ip
}
:7037/test/loanMq/one"
else
echo
"progress=
$progress_id
,订单状态不对"
fi
echo
"修改成功"
break
fi
}
pushloanprogress
$ip
$phone_no
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment