作者 bianxinhua

add README

name: 公司悬赏任务
name: 公司任务(进行中)
base_url: ${ENV(base_url)}
verify: False
variables:
... ... @@ -19,10 +19,12 @@ request:
X-MMM-Uuid: $uuid
X-MMM-Version: 1.0.0
json:
action: 0
newest: 1
pageIndex: 0
pageSize: 20
method: POST
url: v1/task/rewards
url: v1/task/currentTasks
validate:
- eq:
- content.code
... ...
... ... @@ -4,7 +4,7 @@ verify: False
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
access_token: ${get_accesstoken()}
access_token: ${get_task_accesstoken()}
sign: ${make_sign($currtime, $uuid, $access_token)}
request:
headers:
... ...
... ... @@ -2,7 +2,7 @@ name: 抢单任务验收
base_url: ${ENV(base_worth_url)}
verify: False
variables:
taskId: ${get_task_status_4_from_database()}
taskId: ${get_loot_task_id()}
remark: 上传报告${get_nowtime()}
realityTime: ${get_today()}
uid0: ${get_uid0()}
... ... @@ -21,13 +21,13 @@ request:
X-Requested-With: XMLHttpRequest
json:
receiver:
uid: $uid15
name: $name15
uid: $uid0
name: $name0
percent: 25
reward: 500
participant:
- uid: $uid0
name: $name0
- uid: $uid15
name: $name15
percent: ${convert_to_number(25)}
reward: ${convert_to_number(500)}
- uid: $uid1
... ... @@ -44,13 +44,13 @@ request:
solution:
total: ${convert_to_number(20)}
receiver:
uid: $uid15
name: $name15
uid: $uid0
name: $name0
percent: ${convert_to_number(25)}
score: ${convert_to_number(5)}
participant:
- uid: $uid0
name: $name0
- uid: $uid15
name: $name15
percent: ${convert_to_number(25)}
score: ${convert_to_number(5)}
- uid: $uid1
... ... @@ -67,10 +67,10 @@ request:
taskId: $taskId
method: POST
url: task/loot/accept
#validate:
## - eq:
## - content.code
## - 0
## - eq:
## - content.msg
## - $msg
\ No newline at end of file
validate:
- eq:
- content.code
- 0
- eq:
- content.msg
- $msg
\ No newline at end of file
... ...
name: 任务详情
base_url: ${ENV(base_url)}
verify: False
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
access_token: ${get_accesstoken()}
sign: ${make_sign($currtime, $uuid, $access_token)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
X-MMM-AccessToken: $access_token
X-MMM-AppName: com.mmm.ability
X-MMM-AppProject: ability
X-MMM-DeviceType: '0'
X-MMM-Sign: $sign
X-MMM-Timestamp: $currtime
X-MMM-Uuid: $uuid
X-MMM-Version: 1.0.0
json:
id: $id
method: POST
url: v1/task/taskDetails
validate:
- eq:
- content.code
- 0
- eq:
- content.msg
- 获取详情成功
# - $msg
\ No newline at end of file
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zdXBsdXMtYnVzaW5lc3MtYWRtaW4tZ2F0ZXdheS10ZXN0LmZqbWFpbWFpbWFpLmNvbVwvYXV0aFwvcHdkTG9naW4iLCJpYXQiOjE1OTg5NDY5NTksImV4cCI6MTU5ODk1Nzc1OSwibmJmIjoxNTk4OTQ2OTU5LCJqdGkiOiIzN1RYSHNmc1hna0F0cnI5Iiwic3ViIjozMjQ4ODE3NjEzNjgxNjY0LCJwcnYiOiI4N2UwYWYxZWY5ZmQxNTgxMmZkZWM5NzE1M2ExNGUwYjA0NzU0NmFhIiwiY29tcGFueUlkIjozNjYsIm5pY2tuYW1lIjoiXHU4Yzc5XHU1YjUwXHU1OTM0IiwicGhvbmUiOiIxOTk5MDAwMDAwOCIsImlkIjozMjQ4ODE3NjEzNjgxNjY0LCJhZG1pblR5cGUiOjF9.xwdYIQhfWtIqKld0ylGyH9LBuZw6kMuqEaBupm5jCWs
\ No newline at end of file
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zdXBsdXMtYnVzaW5lc3MtYWRtaW4tZ2F0ZXdheS10ZXN0LmZqbWFpbWFpbWFpLmNvbVwvYXV0aFwvcHdkTG9naW4iLCJpYXQiOjE1OTkwMzQ4OTMsImV4cCI6MTU5OTA0NTY5MywibmJmIjoxNTk5MDM0OD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XMtYnVzaW5lc3MtYWRtaW4tZ2F0ZXdheS10ZXN0LmZqbWFpbWFpbWFpLmNvbVwvYXV0aFwvYW5vbnltb3VzTG9naW4iLCJpYXQiOjE1OTkwMzQ4OTMsImV4cCI6MTU5OTA0NTY5MywibmJmIjoxNTk5MDM0ODkzLCJqdGkiOiI1ZTRlV0xLS2lkU0U2MGRiIiwic3ViIjozMjQ4ODE3NjEzNjgxNjY0LCJwcnYiOiI4N2UwYWYxZWY5ZmQxNTgxMmZkZWM5NzE1M2ExNGUwYjA0NzU0NmFhIiwiY29tcGFueUlkIjozNjYsIm5pY2tuYW1lIjoiXHU4Yzc5XHU1YjUwXHU1OTM0IiwicGhvbmUiOiIxOTk5MDAwMDAwOCIsImlkIjozMjQ4ODE3NjEzNjgxNjY0LCJhZG1pblR5cGUiOjF9.tkoNNuALbJhZy7By1GohDSW4pb3LVIx0V1NVSakAdwU
\ No newline at end of file
... ...
amk7iu8zz8
\ No newline at end of file
jwbedlg4b0n
\ No newline at end of file
... ...
b8a8ace231fae55cbad834ad5b66e3d6a560f139581366548d37fe19f52167107b45d02b
\ No newline at end of file
57276bc0f85217d57aac66c76c540ecf693b5eaa4d972e421f53bea3b526c63b7db79386
\ No newline at end of file
... ...
akJLKfTT99ux5Pb/hJfAYc8ibr82OYYJRZ7s8yVO81THB4Zq3tkWqy6+nVOzvioN9EgeWrQkQ1CWDr+U4avOBRBnmXgzEwnlx5k10SvrUQA0QFei99aIz3CoLMl04vI3T3p9qV8iMhapaEuwSYM2/ZnMjaZeYCMa+hTLyab4kc0=
\ No newline at end of file
KdQYph4cXCd0ZIUPvpnlFnFX3bXM1BbbYDK7ggdolQF/W4pdas9QauY54nYH6tqiSmUpHXvIo7Le65l3zfGhrFk07OW9H3IrqCSrCwSssV68XNsiPLauiZ+Uvv+K5rMkuf8NpKEdT2BuoSTPlRElFCxaclAQJOf/hStJSAlQHO8=
\ No newline at end of file
... ...
3036831452701918208
\ No newline at end of file
3038263396358685696
\ No newline at end of file
... ...
мֵ53
\ No newline at end of file
мֵ31
\ No newline at end of file
... ...
3274643368620288
\ No newline at end of file
3274823457706240
\ No newline at end of file
... ...
мֵ53
\ No newline at end of file
мֵ31
\ No newline at end of file
... ...
11005
\ No newline at end of file
11011
\ No newline at end of file
... ...
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zdXBsdXMtd29ydGgtd2ViLWdhdGV3YXktdGVzdC5mam1haW1haW1haS5jb21cL2F1dGhcL2xvZ2luIiwiaWF0IjoxNTk4OTQ2OTU5LCJleHAiOjE1OTg5NTc3NTksIm5iZiI6MTU5ODk0Njk1OSwianRpIjoiMGpXMDdCRzZRa0pDVGtrciIsInN1YiI6MzI0ODgxNzYxMzY4MTY2NCwicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSIsImNvbXBhbnlJZCI6MzY2LCJuaWNrbmFtZSI6Ilx1OGM3OVx1NWI1MFx1NTkzNCIsInBob25lIjoiMTk5OTAwMDAwMDgiLCJ1aWQiOjMyNDg4MTc2MTM2ODE2NjQsImFkbWluVHlwZSI6Mn0.BrAra3HX8D3ozIz5UpQ997mmetNm5ZUt62Qdg50tFxM
\ No newline at end of file
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9zdXBsdXMtd29ydGgtd2ViLWdhdGV3YXktdGVzdC5mam1haW1haW1haS5jb21cL2F1dGhcL2xvZ2luIiwiaWF0IjoxNTk5MDM0ODkzLCJleHAiOjE1OTkwNDU2OTMsIm5iZiI6MTU5OTAzNDg5MywianRpIjoiMEZOd3JOOEd0NTJVUWFjQyIsInN1YiI6MzI0ODgxNzYxMzY4MTY2NCwicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSIsImNvbXBhbnlJZCI6MzY2LCJuaWNrbmFtZSI6Ilx1OGM3OVx1NWI1MFx1NTkzNCIsInBob25lIjoiMTk5OTAwMDAwMDgiLCJ1aWQiOjMyNDg4MTc2MTM2ODE2NjQsImFkbWluVHlwZSI6Mn0.5mhMghMPFP8ZZcAeH2EkWsooDol1K6df8a5Oe0C_rlI
\ No newline at end of file
... ...
GMd7aPHQ5JbSTseas5GxisiiksKeTC8n
\ No newline at end of file
NGQDN5sFaCTCK3y5xmhFBJWpiQxD8pKJ
\ No newline at end of file
... ...
h30g7yrn9iq
\ No newline at end of file
tovgw90nveo
\ No newline at end of file
... ...
... ... @@ -4,7 +4,7 @@ import time
from helpfunc.header_func import *
from helpfunc.login_func import *
from helpfunc.m_func import *
from helpfunc.pg_db_func import *
from helpfunc.pg_db_loot_func import *
# from helpfunc.time_func import *
import time,datetime,re
... ...
... ... @@ -145,12 +145,46 @@ def get_task_status_4_from_database():
db = GetConnect()
cursor = db.cursor()
# sql= "select id from " + '''"''' + tbl + '''"'''+ ' ' + 'order by id desc '
sql = '''select id from tasks t where t.company_id = 366 and t.task_status = 4 and t.receiver_uid = '3248817613892608' and id = {}'''.format(get_loot_task_id())
sql = '''select task_status from tasks t where t.company_id = 366 and t.task_status = 4 and t.receiver_uid = '3248817613892608' and id = {}'''.format(get_loot_task_id())
# print(sql)
try:
cursor.execute(sql)
result = cursor.fetchone()
return str(result[0])
return result[0]
except Exception as err:
# 发生错误时回滚
print(err)
db.rollback()
db.close()
#获取任务单的状态:已完成
def get_task_status_5_from_database():
db = GetConnect()
cursor = db.cursor()
# sql= "select id from " + '''"''' + tbl + '''"'''+ ' ' + 'order by id desc '
sql = '''select task_status from tasks t where t.company_id = 366 and t.task_status = 5 and id = {}'''.format(get_loot_task_id())
# print(sql)
try:
cursor.execute(sql)
result = cursor.fetchone()
return result[0]
except Exception as err:
# 发生错误时回滚
print(err)
db.rollback()
db.close()
#获取任务单的状态:已关闭
def get_task_status_6_from_database():
db = GetConnect()
cursor = db.cursor()
# sql= "select id from " + '''"''' + tbl + '''"'''+ ' ' + 'order by id desc '
sql = '''select task_status from tasks t where t.company_id = 366 and t.task_status = 6 and id = {}'''.format(get_loot_task_id())
# print(sql)
try:
cursor.execute(sql)
result = cursor.fetchone()
return result[0]
except Exception as err:
# 发生错误时回滚
print(err)
... ...
config:
name: 抢单任务状态验证-已验收,已完成
teststeps:
- name: 抢单任务状态验证-已完成,待验收
testcase: testcases/common/COM011_loot_open_status_4_testcase.yml
- name: 用户列表
output:
- uid0
- name0
- uid1
- name1
- uid2
- name2
- uid15
- name15
api: api/m_api/common/user_api.yml
extract:
uid0: content.data.list.0.uid
name0: content.data.list.0.name
uid1: content.data.list.1.uid
name1: content.data.list.1.name
uid2: content.data.list.2.uid
name2: content.data.list.2.name
uid15: content.data.list.15.uid
name15: content.data.list.15.name
- name: 抢单任务验收
api: api/m_api/loot/loot_task_accept_api.yml
validate:
- eq:
- content.code
- 0
- eq:
- content.msg
- ok
- name: 查看详情中的状态
api: api/m_api/loot/loot_detail_api.yml
variables:
status: ${get_task_status_5_from_database()}
msg: ok
varidate:
validate:
- eq:
- content.msg
- $msg
- eq:
- content.data.status
- $status
\ No newline at end of file
... ...
config:
name: 抢单任务状态验证-已验收,已完成
teststeps:
- name: 抢单任务状态验证-已发布,待领取
testcase: testcases/common/COM008_loot_open_status_2_testcase.yml
- name: 抢单任务验收
api: api/m_api/loot/loot_task_accept_api.yml
validate:
- eq:
- content.code
- 0
- eq:
- content.msg
- ok
- name: 查看详情中的状态
api: api/m_api/loot/loot_detail_api.yml
variables:
status: ${get_task_status_5_from_database()}
msg: ok
varidate:
validate:
- eq:
- content.msg
- $msg
- eq:
- content.data.status
- $status
\ No newline at end of file
... ...
... ... @@ -10,10 +10,10 @@ teststeps:
- name: 登录价值系统
testcase: testcases/common/COM001_task_login_testcases.yml
- name: 公司任务(抢单任务
- name: 公司任务(进行中
output:
- id
api: api/m_api/loot/loot_contendTasks_api.yml
api: api/m_api/loot/loot_currentTasks_api.yml
extract:
id: content.data.tasks.0.id
validate:
... ...
... ... @@ -13,5 +13,5 @@ testcases:
#- name: member_set_permission 成员管理设置权限
# testcase: testcases/task/member/member_set_permission_testcases.yml
- name: 任务状态验证-已完成,待验收
testcase: testcases/common/COM011_loot_open_status_4_testcase.yml
\ No newline at end of file
- name: 任务状态验证-已验收,已完成
testcase: testcases/common/COM012_loot_open_status_5_testcase.yml
\ No newline at end of file
... ...