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
f7a13a30
Commit
f7a13a30
authored
Jul 28, 2017
by
qa_quantgroup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change ip
parent
620888a7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
42 deletions
+59
-42
authorization.sh
qa_shell_script/script_by_Contorller/authorization.sh
+21
-15
closeloan.sh
qa_shell_script/script_by_Contorller/closeloan.sh
+17
-14
updatecarddetail.sh
qa_shell_script/script_by_Contorller/updatecarddetail.sh
+21
-13
No files found.
qa_shell_script/script_by_Contorller/authorization.sh
View file @
f7a13a30
#!/bin/bash
ip
=
$1
phone_no
=
$2
HOSTNAME
=
"192.168.4.
$ip
"
PORT
=
"3306"
USERNAME
=
"qa"
PASSWORD
=
"qatest"
DBNAME
=
"spider_center"
TABLENAME
=
"user_authorization"
TABLENAME1
=
"user"
mysqld
=
"-h
${
HOSTNAME
}
-P
${
PORT
}
-u
${
USERNAME
}
-p
${
PASSWORD
}
"
mysqld
=
"-h
${
ip
}
-P
${
PORT
}
-u
${
USERNAME
}
-p
${
PASSWORD
}
"
function
authorization
()
{
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
}
"
...
...
@@ -27,6 +31,8 @@ function authorization()
mysql
$mysqld
${
DBNAME
}
-e
"
${
insert_sql0
}
"
mysql
$mysqld
${
DBNAME
}
-e
"
${
insert_sql3
}
"
echo
"修改成功"
break
fi
...
...
qa_shell_script/script_by_Contorller/closeloan.sh
View file @
f7a13a30
#!/bin/bash
ip
=
$1
phone_no
=
$2
HOSTNAME
=
"192.168.4.
$ip
"
PORT
=
"3306"
USERNAME
=
"qa"
PASSWORD
=
"qatest"
...
...
@@ -9,10 +8,15 @@ DBNAME="xyqb"
TABLENAME
=
"loan_application_history"
DBNAME1
=
"xyqb_user"
TABLENAME1
=
"user"
mysqld
=
"-h
${
HOSTNAME
}
-P
${
PORT
}
-u
${
USERNAME
}
-p
${
PASSWORD
}
"
mysqld
=
"-h
${
ip
}
-P
${
PORT
}
-u
${
USERNAME
}
-p
${
PASSWORD
}
"
function
closeloan
()
{
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
}
"
...
...
@@ -23,9 +27,8 @@ function closeloan()
update_sql
=
"update
${
TABLENAME
}
set is_active=0 where user_id=
${
user_id
}
"
mysql
$mysqld
${
DBNAME
}
-e
"
${
update_sql
}
"
echo
"修改成功"
break
fi
}
...
...
qa_shell_script/script_by_Contorller/updatecarddetail.sh
View file @
f7a13a30
...
...
@@ -7,11 +7,16 @@ id_no=$5
DBNAME
=
"payment_center"
TABLENAME
=
"user_detail"
TABLENAME1
=
"user"
mysqld
=
"-h
192.168.4.
$ip
-p3306 -uqa -pqatest"
mysqld
=
"-h
$ip
-p3306 -uqa -pqatest"
function
updatecarddetail
()
{
echo
"开始修改"
len
=
`
echo
$phone_no_before
|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_before
}
"
#echo "$select_sql"
...
...
@@ -21,10 +26,13 @@ echo "开始修改"
#插入授信数据0和3
update_sql
=
"update
${
TABLENAME
}
set phone_no=
$phone_no_after
,name='
$name
',id_no=
$id_no
where user_id=
${
user_id
}
"
echo
"
$update_sql
"
#
echo "$update_sql"
#echo "$insert_sql3"
mysql
$mysqld
${
DBNAME
}
-e
"
${
update_sql
}
"
echo
"修改成功"
break
fi
}
updatecarddetail
$ip
$phone_no_before
$phone_no_after
$name
$id_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