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
738c955d
Commit
738c955d
authored
Mar 16, 2018
by
tywldx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.quantgroup.cn/QA/qa-deploy-utils
parents
bdd7aef1
e4c26815
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
clotho_chanpin.sh
qa_shell_script/script_by_Contorller/clotho_chanpin.sh
+45
-0
No files found.
qa_shell_script/script_by_Contorller/clotho_chanpin.sh
0 → 100644
View file @
738c955d
#!/bin/bash
ip
=
$1
phone_no
=
$2
PORT
=
$3
# chanpin分配默认值为:QG_FIX0_6000_6,渠道惠金所2
chanpin
=
$4
USERNAME
=
"qa"
PASSWORD
=
"qatest"
DBNAME
=
"xyqb"
DBNAME1
=
"risk_control"
DBNAME2
=
"xyqb_user"
TABLENAME
=
"waiting_for_assignment"
TABLENAME1
=
"review_history"
TABLENAME2
=
"user"
mysqld
=
"-h
${
ip
}
-P
${
PORT
}
-u
${
USERNAME
}
-p
${
PASSWORD
}
"
date
=
`
date
"+%Y-%m-%d %H:%M:%S"
`
function
coltho_chanpin
()
{
len
=
`
echo
$phone_no
|awk
'{print length($0)}'
`
if
[
$len
-ne
11
]
;
then
echo
"请输入11位手机号!"
exit
-1
fi
if
[
-z
"
$chanpin
"
]
;
then
chanpin
=
QG_FIX0_6000_6
fi
#查询userID
select_sql
=
"select id from
${
TABLENAME2
}
where phone_no=
${
phone_no
}
"
user_id
=
`
mysql
-N
$mysqld
${
DBNAME2
}
-e
"
${
select_sql
}
"
`
echo
"user_id=
$user_id
"
update_sql0
=
"update
${
TABLENAME
}
set quantify_product_name='
${
chanpin
}
' where xyqb_user_id=
$user_id
order by id desc limit 1"
update_sql1
=
"update
${
TABLENAME1
}
set quantify_product_name='
${
chanpin
}
' where xyqb_user_id=
$user_id
order by id desc limit 1"
# echo "sql0=$update_sql0"
# echo "sql1=$update_sql1"
mysql
$mysqld
${
DBNAME
}
-e
"
${
update_sql0
}
"
mysql
$mysqld
${
DBNAME1
}
-e
"
${
update_sql1
}
"
echo
"done!!!
$date
"
}
coltho_chanpin
$ip
$phone_no
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