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
d1e28789
Commit
d1e28789
authored
Mar 19, 2018
by
智勇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.quantgroup.cn/QA/qa-deploy-utils
parents
d8a7bc80
6bff3b49
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
188 deletions
+64
-188
get_env_ip.sh
qa_shell_script/config_server/get_env_ip.sh
+1
-1
exception_sub_shell.sh
qa_shell_script/exception_sub_shell.sh
+0
-180
clotho_chanpin.sh
qa_shell_script/script_by_Contorller/clotho_chanpin.sh
+12
-7
xyqb_speed.sh
qa_shell_script/script_by_Contorller/xyqb_speed.sh
+51
-0
No files found.
qa_shell_script/config_server/get_env_ip.sh
View file @
d1e28789
1
3 15 16 17 22 26 28 46 50 72 74 88 119 151 152 153 154 155 156 158 160 161 162 164 172.30.199.2 172.30.199.3
1
5 16 50 72 88 119 151 152 153 154 155 156 158 160 161 162 164
qa_shell_script/exception_sub_shell.sh
View file @
d1e28789
This diff is collapsed.
Click to expand it.
qa_shell_script/script_by_Contorller/clotho_chanpin.sh
View file @
d1e28789
...
...
@@ -19,22 +19,27 @@ function coltho_chanpin()
{
len
=
`
echo
$phone_no
|awk
'{print length($0)}'
`
if
[
$len
-ne
11
]
;
then
echo
"请输入11位手机号!"
else
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
"
update_sql1
=
"update
${
TABLENAME1
}
set quantify_product_name='
${
chanpin
}
' where xyqb_user_id=
$user_id
"
echo
"sql0=
$update_sql0
"
echo
"sql1=
$update_sql1
"
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
"
fi
}
coltho_chanpin
$ip
$phone_no
qa_shell_script/script_by_Contorller/xyqb_speed.sh
0 → 100644
View file @
d1e28789
#!/bin/bash
ip
=
$1
phone_no
=
$2
PORT
=
$3
# 默认金额39
amount
=
$4
USERNAME
=
"qa"
PASSWORD
=
"qatest"
DBNAME
=
"xyqb"
DBNAME1
=
"xyqb_user"
TABLENAME
=
"loan_application_history"
TABLENAME1
=
"loan_extra_fee"
TABLENAME2
=
"user"
mysqld
=
"-h
${
ip
}
-P
${
PORT
}
-u
${
USERNAME
}
-p
${
PASSWORD
}
"
date
=
`
date
"+%Y-%m-%d %H:%M:%S"
`
function
xyqb_speed
()
{
len
=
`
echo
$phone_no
|awk
'{print length($0)}'
`
if
[
$len
-ne
11
]
;
then
echo
"请输入11位手机号!"
exit
-1
fi
# 默认金额39
if
[
-z
"
$amount
"
]
;
then
amount
=
39
fi
#查询userID
select_sql
=
"select id from
${
TABLENAME2
}
where phone_no=
${
phone_no
}
"
user_id
=
`
mysql
-N
$mysqld
${
DBNAME1
}
-e
"
${
select_sql
}
"
`
echo
"user_id=
$user_id
"
# 查询loan_ID和channel_ID
select_loanID
=
"select id from
${
TABLENAME
}
where user_id=
${
user_id
}
"
select_channelID
=
"select created_from from
${
TABLENAME
}
where user_id=
${
user_id
}
"
loan_id
=
`
mysql
-N
$mysqld
${
DBNAME
}
-e
"
${
select_loanID
}
"
`
channel_id
=
`
mysql
-N
$mysqld
${
DBNAME
}
-e
"
${
select_channelID
}
"
`
echo
"loan_id=
$loan_id
"
echo
"channel_id=
$channel_id
"
# 插入加速包数据
insert_sql0
=
"insert into
${
TABLENAME1
}
( "
loan_id
", "
channel_id
", "
user_id
", "
product_type
", "
product_desc
", "
amount
", "
pay_status
", "
loan_status
", "
pay_order_no
", "
pay_started_at
", "
pay_finished_at
", "
is_active
") values ('
$loan_id
', '
$channel_id
', '
$user_id
', '1', '加速卡', '
$amount
', '0', '0', 'ACCELERATE_CARD_
$loan_id
', null, null, '1');"
#echo "insert=$insert_sql0"
mysql
$mysqld
${
DBNAME
}
-e
"
${
insert_sql0
}
"
echo
"done!!!
$date
"
}
xyqb_speed
$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