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
afa733e2
Commit
afa733e2
authored
Dec 11, 2017
by
qa_quantgroup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new scr
parent
42e2370e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
125 additions
and
1 deletion
+125
-1
kill_mall-settlement_pid.sh
...l_script/script_by_Contorller/kill_mall-settlement_pid.sh
+1
-1
mall_alterOrderStatus.sh
...hell_script/script_by_Contorller/mall_alterOrderStatus.sh
+18
-0
mall_deliveryOrder.sh
qa_shell_script/script_by_Contorller/mall_deliveryOrder.sh
+46
-0
mall_makeMallOrder.sh
qa_shell_script/script_by_Contorller/mall_makeMallOrder.sh
+60
-0
No files found.
qa_shell_script/script_by_Contorller/kill_mall-settlement_pid.sh
View file @
afa733e2
...
@@ -4,7 +4,7 @@ PORT="3306"
...
@@ -4,7 +4,7 @@ PORT="3306"
USERNAME
=
"qa"
USERNAME
=
"qa"
PASSWORD
=
"qatest"
PASSWORD
=
"qatest"
for
i
in
`
mysql
-u
${
USERNAME
}
-p
${
PASSWORD
}
-se
"show processlist"
|
grep
-v
"show processlist"
|
grep
-v
"
$HOSTNAME
"
|
awk
'{if($4=="mall_settlement" )print $1}'
`
for
i
in
`
/home/quant_group/mysql-5.6.31/bin/
mysql
-u
${
USERNAME
}
-p
${
PASSWORD
}
-se
"show processlist"
|
grep
-v
"show processlist"
|
grep
-v
"
$HOSTNAME
"
|
awk
'{if($4=="mall_settlement" )print $1}'
`
do
do
mysql
-u
${
USERNAME
}
-p
${
PASSWORD
}
-e
"kill
$i
"
mysql
-u
${
USERNAME
}
-p
${
PASSWORD
}
-e
"kill
$i
"
...
...
qa_shell_script/script_by_Contorller/mall_alterOrderStatus.sh
0 → 100644
View file @
afa733e2
#!/bin/bash
ip
=
$1
orderId
=
$2
#mall订单号
orderStatus
=
$3
#mall订单状态值
len
=
`
echo
$orderId
|awk
'{print length}'
`
if
[
-z
"
$len
"
]
then
echo
"请输入订单号"
exit
-1
#exit命令同于退出shell,状态值0代表执行成功,其它值代表执行失败
fi
mysqld
=
"-h
$ip
-p3306 -uqa -pqatest"
# 更新mall.mall_order表的订单状态
mysql
-N
$mysqld
mall
-e
"update mall_order set order_state='
$orderStatus
' where order_id='
$orderId
'"
;
echo
"mall.mall_order表的订单状态已改"
qa_shell_script/script_by_Contorller/mall_deliveryOrder.sh
0 → 100644
View file @
afa733e2
#!/bin/bash
ip
=
$1
orderId
=
$2
#mall订单号
len
=
`
echo
$orderId
|awk
'{print length}'
`
if
[
-z
$len
]
then
echo
"请输入订单号"
exit
-1
#exit命令同于退出shell,状态值0代表执行成功,其它值代表执行失败
fi
seq
=
`
date
"+%Y-%m-%d %H:%M:%S"
`
mysqld
=
"-h
$ip
-p3306 -uqa -pqatest"
# 更新mall.mall_order表的订单状态为3
mysql
-N
$mysqld
mall
-e
"update mall_order set order_state='3' where order_id='
$orderId
'"
;
# 更新mall.digital_order_detail表的物流信息
mallOrderId
=
`
mysql
-N
$mysqld
mall
-e
"select id from mall_order where order_id='
$orderId
'"
`
;
mysql
-N
$mysqld
mall
-e
"update digital_order_detail set logistics_company='韵达',logistics_phone='18800001111',
logistics_delivery_code='1234567890',logistics_delivery_time='
$seq
' where order_id='
$mallOrderId
'"
;
# 更新merchant.supplier_order表的订单状态
mysql
-N
$mysqld
merchant
-e
"update supplier_order set order_status='1',updated_at='
$seq
' where mall_order_no='
$orderId
'"
;
# 更新merchant.supplier_order_status_history表的操作记录
supplierOrderId
=
`
mysql
-N
$mysqld
merchant
-e
"select id from supplier_order where mall_order_no='
$orderId
'"
`
;
mysql
-N
$mysqld
merchant
-e
"insert into supplier_order_status_history
( supplier_order_id, status, operator, created_at, updated_at)
values
( '
$supplierOrderId
', '1', '38', '
$seq
', '
$seq
')"
;
# 更新merchant.supplier_order_logistics表的物流信息
orderStatusId
=
`
mysql
-N
$mysqld
merchant
-e
"select id from supplier_order_status_history where supplier_order_id='
$supplierOrderId
'"
`
;
mysql
-N
$mysqld
merchant
-e
"insert into supplier_order_logistics
( order_id, order_status_id, mall_order_no, operator, created_at, updated_at, logistics_order_no, express_company, express_phone, delivery_at)
values
( '
$supplierOrderId
', '
$orderStatusId
', '
$orderId
', '38', '
$seq
', '
$seq
', '789211463752', '韵达', '18800001111', '
$seq
')"
;
echo
"mall.mall_order表的订单状态已改"
echo
"mall.digital_order_detail表的物流信息已更新"
echo
"merchant.supplier_order表的订单状态已更新"
echo
"merchant.supplier_order_status_history表的操作记录已更新"
echo
"merchant.supplier_order_logistics表的物流信息已更新"
qa_shell_script/script_by_Contorller/mall_makeMallOrder.sh
0 → 100644
View file @
afa733e2
#!/bin/bash
ip
=
$1
phone_no
=
$2
amount
=
$3
len
=
`
echo
$phone_no
|awk
'{print length}'
`
if
[
$len
-ne
11
]
then
echo
"请输入11位的手机号"
exit
-1
#exit命令同于退出shell,状态值0代表执行成功,其它值代表执行失败
fi
b
=
0
if
[
$amount
-le
$b
]
then
echo
"请输入正确的金额"
exit
-1
fi
orderId
=
aektxyqbmallceshi
`
date
+%s%N
`
merchantId
=
merchantOrderNo
`
date
+%s%N
`
difference
=
50
supplierAmount
=
`
expr
$amount
-
$difference
`
seq
=
`
date
"+%Y-%m-%d %H:%M:%S"
`
mysql
-h
"
$ip
"
-p
"3306"
-u
"qa"
-p
"qatest"
<<
EOF
use mall;
insert into mall.mall_order
(order_id, user_id, order_state, is_active, product_id, pay_approach, pay_amount, created_at, updated_at)
values
('
$orderId
',(select id from mall.user where phone_no='
$phone_no
'),
11,1,1170,0,'
$amount
','
$seq
','
$seq
');
insert into mall.digital_order_detail
(order_id, pay_time, customer_service_phone, logistics_delivery_time, contact_name, contact_id_no, contact_phone,
contact_province, contact_city, contact_area, contact_street, product_id, user_ip, fillnum, group_id, supplier_id,
refunded_time, canceled_time, traded_time, confirm_time, refund_close_time, real_amount, user_percent, merchant_percent)
values
((select id from mall.mall_order where order_id='
$orderId
'),'
$seq
','400-002-0061','
$seq
','张晋','632132197909064776','
$phone_no
',
'北京市','海淀区','三环以内','丹棱街',205741,'61.50.0.0',1,'3845',13,
'
$seq
','
$seq
','
$seq
','
$seq
','
$seq
','
$amount
',1.00,0.03);
use merchant;
insert into merchant.supplier_order
(order_no,mall_order_no,supplier_id,mall_order_time,order_status,created_at,updated_at, goods_name,
goods_amount,supplier_amount,user_name,user_phone,user_address,user_id_no,
receive_name, real_pay_amount, payment_type)
values
( '
$merchantId
', '
$orderId
', '13', '
$seq
', '0', '
$seq
', '
$seq
','匡威男女帆布经典学生情侣休闲高帮常青款硫化鞋 42.5 M9613',
'
$amount
', '
$supplierAmount
', '张晋', '
$phone_no
',"北京市
\$\$\$
海淀区
\$\$\$
三环以内
\$\$\$
123", '632132197909064776',
'张晋', '
$amount
','0');
EOF
echo
"mall.mall_order、digital_order_detail表插入一条订单"
echo
"mall.supplier_order表插入一条订单"
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