作者 linmadan

重构搜索功能,添加员工权限

... ... @@ -304,6 +304,160 @@
]
}
},
"/off-task-records/{offTaskRecordId}": {
"get": {
"tags": [
"offTaskRecord"
],
"summary": "返回关闭任务记录",
"description": "返回关闭任务记录",
"operationId": "offTaskRecord#getOffTaskRecord",
"parameters": [
{
"name": "offTaskRecordId",
"in": "path",
"description": "关闭任务记录ID",
"required": true,
"type": "integer"
}
],
"responses": {
"200": {
"description": "OK response.",
"schema": {
"$ref": "#/definitions/OffTaskRecordGetOffTaskRecordResponseBody"
}
}
},
"schemes": [
"http"
]
}
},
"/off-task-records/search-off-task-record": {
"post": {
"tags": [
"offTaskRecord"
],
"summary": "搜索关闭任务记录",
"description": "搜索关闭任务记录",
"operationId": "offTaskRecord#searchOffTaskRecord",
"parameters": [
{
"name": "SearchOffTaskRecordRequestBody",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/OffTaskRecordSearchOffTaskRecordRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK response.",
"schema": {
"$ref": "#/definitions/OffTaskRecordSearchOffTaskRecordResponseBody"
}
}
},
"schemes": [
"http"
]
}
},
"/statistics/person-su-money": {
"post": {
"tags": [
"statistics"
],
"summary": "获取个人素币统计",
"description": "获取个人素币统计",
"operationId": "statistics#personSuMoneyStatistics",
"parameters": [
{
"name": "PersonSuMoneyStatisticsRequestBody",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/StatisticsPersonSuMoneyStatisticsRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK response.",
"schema": {
"$ref": "#/definitions/StatisticsPersonSuMoneyStatisticsResponseBody"
}
}
},
"schemes": [
"http"
]
}
},
"/statistics/person-task": {
"post": {
"tags": [
"statistics"
],
"summary": "获取个人任务统计",
"description": "获取个人任务统计",
"operationId": "statistics#personTaskStatistics",
"parameters": [
{
"name": "PersonTaskStatisticsRequestBody",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/StatisticsPersonTaskStatisticsRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK response.",
"schema": {
"$ref": "#/definitions/StatisticsPersonTaskStatisticsResponseBody"
}
}
},
"schemes": [
"http"
]
}
},
"/statistics/system-task": {
"post": {
"tags": [
"statistics"
],
"summary": "获取系统任务统计",
"description": "获取系统任务统计",
"operationId": "statistics#systemTaskStatistics",
"parameters": [
{
"name": "SystemTaskStatisticsRequestBody",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/StatisticsSystemTaskStatisticsRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK response.",
"schema": {
"$ref": "#/definitions/StatisticsSystemTaskStatisticsResponseBody"
}
}
},
"schemes": [
"http"
]
}
},
"/su-money/exchange": {
"post": {
"tags": [
... ... @@ -385,7 +539,7 @@
{
"name": "sponsor",
"in": "query",
"description": "任务发起者",
"description": "任务发起者UID",
"required": false,
"type": "integer",
"format": "int64"
... ... @@ -442,7 +596,7 @@
{
"name": "receiver",
"in": "query",
"description": "任务领取人",
"description": "任务领取人UID",
"required": false,
"type": "integer",
"format": "int64"
... ... @@ -450,7 +604,7 @@
{
"name": "participator",
"in": "query",
"description": "任务参与者",
"description": "任务参与者UID",
"required": false,
"type": "integer",
"format": "int64"
... ... @@ -1096,6 +1250,148 @@
}
}
},
"OffTaskRecordGetOffTaskRecordResponseBody": {
"title": "Mediatype identifier: OffTaskRecordGetOffTaskRecordResponseBody",
"type": "object",
"properties": {
"offTaskRecord": {
"$ref": "#/definitions/offTaskRecordResponseBody"
}
}
},
"OffTaskRecordSearchOffTaskRecordRequestBody": {
"title": "OffTaskRecordSearchOffTaskRecordRequestBody",
"type": "object",
"properties": {
"companyId": {
"type": "integer",
"description": "公司ID",
"required": [
"companyId"
]
},
"customerValue": {
"type": "string",
"description": "客户价值"
},
"limit": {
"type": "integer",
"description": "查询限制",
"format": "int64"
},
"offEndTime": {
"type": "string",
"description": "关闭任务时间区间-截止时间",
"format": "datetime"
},
"offStartTime": {
"type": "string",
"description": "关闭任务时间区间-开始时间",
"format": "datetime"
},
"offset": {
"type": "integer",
"description": "查询偏离量",
"format": "int64"
},
"taskContentMatch": {
"type": "string",
"description": "任务内容匹配"
},
"taskNature": {
"type": "string",
"description": "任务性质"
},
"taskType": {
"type": "integer",
"description": "任务类型",
"format": "int64"
}
}
},
"OffTaskRecordSearchOffTaskRecordResponseBody": {
"title": "Mediatype identifier: OffTaskRecordSearchOffTaskRecordResponseBody",
"type": "object",
"properties": {
"count": {
"type": "integer",
"description": "结果总数",
"format": "int64"
},
"offTaskRecords": {
"type": "array",
"items": {
"$ref": "#/definitions/offTaskRecordResponseBody"
}
}
}
},
"StatisticsPersonSuMoneyStatisticsRequestBody": {
"title": "StatisticsPersonSuMoneyStatisticsRequestBody",
"type": "object",
"properties": {
"uid": {
"type": "integer",
"description": "统一用户UID",
"required": [
"uid"
]
}
}
},
"StatisticsPersonSuMoneyStatisticsResponseBody": {
"title": "Mediatype identifier: StatisticsPersonSuMoneyStatisticsResponseBody",
"type": "object",
"properties": {
"personSuMoneyStatistics": {
"$ref": "#/definitions/personSuMoneyStatisticsResponseBody"
}
}
},
"StatisticsPersonTaskStatisticsRequestBody": {
"title": "StatisticsPersonTaskStatisticsRequestBody",
"type": "object",
"properties": {
"uid": {
"type": "integer",
"description": "统一用户UID",
"required": [
"uid"
]
}
}
},
"StatisticsPersonTaskStatisticsResponseBody": {
"title": "Mediatype identifier: StatisticsPersonTaskStatisticsResponseBody",
"type": "object",
"properties": {
"personTaskStatistics": {
"$ref": "#/definitions/personTaskStatisticsResponseBody"
}
}
},
"StatisticsSystemTaskStatisticsRequestBody": {
"title": "StatisticsSystemTaskStatisticsRequestBody",
"type": "object",
"properties": {
"companyId": {
"type": "integer",
"description": "公司ID",
"required": [
"companyId"
]
}
}
},
"StatisticsSystemTaskStatisticsResponseBody": {
"title": "Mediatype identifier: StatisticsSystemTaskStatisticsResponseBody",
"type": "object",
"properties": {
"systemTaskStatistics": {
"$ref": "#/definitions/systemTaskStatisticsResponseBody"
}
}
},
"SuMoneyExchangeSuMoneyRequestBody": {
"title": "SuMoneyExchangeSuMoneyRequestBody",
"type": "object",
... ... @@ -1109,7 +1405,7 @@
},
"operator": {
"type": "integer",
"description": "操作人UID(默认为系统操作)",
"description": "操作人UID",
"format": "int64"
},
"suMoney": {
... ... @@ -1151,6 +1447,11 @@
"description": "查询偏离量",
"format": "int64"
},
"operator": {
"type": "integer",
"description": "操作人UID",
"format": "int64"
},
"recordType": {
"type": "integer",
"description": "记录类型(1兑换,2任务奖励)",
... ... @@ -1158,6 +1459,16 @@
"recordType"
]
},
"transactionEndTime": {
"type": "string",
"description": "事务时间区间-截止时间",
"format": "datetime"
},
"transactionStartTime": {
"type": "string",
"description": "事务时间区间-开始时间",
"format": "datetime"
},
"uid": {
"type": "integer",
"description": "统一用户UID",
... ... @@ -1588,6 +1899,11 @@
"description": "竞标时间(1全部,2已截止,3未截止)",
"format": "int64"
},
"bidder": {
"type": "integer",
"description": "竞标参与者UID",
"format": "int64"
},
"companyId": {
"type": "integer",
"description": "公司ID",
... ... @@ -1599,6 +1915,10 @@
"type": "string",
"description": "客户价值"
},
"isFilterCloseStatus": {
"type": "boolean",
"description": "是否过滤关闭状态任务"
},
"isRewardTake": {
"type": "boolean",
"description": "是否悬赏任务"
... ... @@ -1615,17 +1935,17 @@
},
"participator": {
"type": "integer",
"description": "任务参与者",
"description": "任务参与者UID",
"format": "int64"
},
"receiver": {
"type": "integer",
"description": "任务领取人",
"description": "任务领取人UID",
"format": "int64"
},
"sponsor": {
"type": "integer",
"description": "任务发起者",
"description": "任务发起者UID",
"format": "int64"
},
"taskContentMatch": {
... ... @@ -1928,6 +2248,104 @@
},
"description": "关闭任务记录"
},
"personSuMoneyStatisticsResponseBody": {
"title": "personSuMoneyStatisticsResponseBody",
"type": "object",
"properties": {
"currentSuMoney": {
"type": "number",
"description": "当前素币",
"required": [
"currentSuMoney"
]
},
"incomeSuMoneyOfYesterday": {
"type": "number",
"description": "昨日收益",
"required": [
"incomeSuMoneyOfYesterday"
]
}
},
"description": "个人素币统计"
},
"personTaskStatisticsResponseBody": {
"title": "personTaskStatisticsResponseBody",
"type": "object",
"properties": {
"bidAsParticipator": {
"type": "integer",
"description": "个人参与的竞标中任务",
"required": [
"bidAsParticipator"
]
},
"completedAsParticipator": {
"type": "integer",
"description": "个人参与的已完成任务",
"required": [
"completedAsParticipator"
]
},
"completedAsReceiver": {
"type": "integer",
"description": "个人领取的已完成任务",
"required": [
"completedAsReceiver"
]
},
"completedAsSponsor": {
"type": "integer",
"description": "个人发起的已完成任务",
"required": [
"completedAsSponsor"
]
},
"unAcceptanceAsReceiver": {
"type": "integer",
"description": "个人领取的待验收任务",
"required": [
"unAcceptanceAsReceiver"
]
},
"unAcceptanceAsSponsor": {
"type": "integer",
"description": "个人发起的待验收任务",
"required": [
"unAcceptanceAsSponsor"
]
},
"unClaimedAsSponsor": {
"type": "integer",
"description": "个人发起的待领取任务",
"required": [
"unClaimedAsSponsor"
]
},
"unReleasedAsSponsor": {
"type": "integer",
"description": "个人发起的待发布任务",
"required": [
"unReleasedAsSponsor"
]
},
"underwayAsReceiver": {
"type": "integer",
"description": "个人领取的进行中任务",
"required": [
"underwayAsReceiver"
]
},
"underwayAsSponsor": {
"type": "integer",
"description": "个人发起的进行中任务",
"required": [
"underwayAsSponsor"
]
}
},
"description": "个人任务统计"
},
"referenceResourceItemRequestBody": {
"title": "referenceResourceItemRequestBody",
"type": "object",
... ... @@ -2050,11 +2468,7 @@
"$ref": "#/definitions/employeeInfoResponseBody"
},
"operator": {
"type": "integer",
"description": "操作人",
"required": [
"operator"
]
"$ref": "#/definitions/employeeInfoResponseBody"
},
"recordDescription": {
"type": "string",
... ... @@ -2077,6 +2491,13 @@
"suMoney"
]
},
"suMoneyBeforeTransaction": {
"type": "number",
"description": "事务处理前素币值",
"required": [
"suMoneyBeforeTransaction"
]
},
"suMoneyTransactionRecordId": {
"type": "integer",
"description": "素币事务记录ID",
... ... @@ -2087,6 +2508,30 @@
},
"description": "素币事务记录"
},
"systemTaskStatisticsResponseBody": {
"title": "systemTaskStatisticsResponseBody",
"type": "object",
"properties": {
"completed": {
"type": "integer",
"description": "系统已完成任务",
"format": "int64"
},
"released": {
"type": "integer",
"description": "系统已发布任务",
"required": [
"released"
]
},
"underway": {
"type": "integer",
"description": "系统进行中任务",
"format": "int64"
}
},
"description": "系统任务统计"
},
"taskPercentageItemRequestBody": {
"title": "taskPercentageItemRequestBody",
"type": "object",
... ... @@ -2094,12 +2539,24 @@
"contributor": {
"$ref": "#/definitions/employeeInfoRequestBody"
},
"issueScore": {
"type": "number",
"description": "引用问题的得分",
"format": "double"
},
"percentage": {
"type": "integer",
"description": "任务贡献占比",
"required": [
"percentage"
]
},
"suMoney": {
"type": "number",
"description": "分配到的奖励素币",
"required": [
"suMoney"
]
}
},
"description": "任务贡献占比项"
... ... @@ -2111,12 +2568,24 @@
"contributor": {
"$ref": "#/definitions/employeeInfoResponseBody"
},
"issueScore": {
"type": "number",
"description": "引用问题的得分",
"format": "double"
},
"percentage": {
"type": "integer",
"description": "任务贡献占比",
"required": [
"percentage"
]
},
"suMoney": {
"type": "number",
"description": "分配到的奖励素币",
"required": [
"suMoney"
]
}
},
"description": "任务贡献占比项"
... ...
... ... @@ -204,6 +204,106 @@ paths:
$ref: '#/definitions/EmployeeRemoveEmployeeResponseBody'
schemes:
- http
/off-task-records/{offTaskRecordId}:
get:
tags:
- offTaskRecord
summary: 返回关闭任务记录
description: 返回关闭任务记录
operationId: offTaskRecord#getOffTaskRecord
parameters:
- name: offTaskRecordId
in: path
description: 关闭任务记录ID
required: true
type: integer
responses:
"200":
description: OK response.
schema:
$ref: '#/definitions/OffTaskRecordGetOffTaskRecordResponseBody'
schemes:
- http
/off-task-records/search-off-task-record:
post:
tags:
- offTaskRecord
summary: 搜索关闭任务记录
description: 搜索关闭任务记录
operationId: offTaskRecord#searchOffTaskRecord
parameters:
- name: SearchOffTaskRecordRequestBody
in: body
required: true
schema:
$ref: '#/definitions/OffTaskRecordSearchOffTaskRecordRequestBody'
responses:
"200":
description: OK response.
schema:
$ref: '#/definitions/OffTaskRecordSearchOffTaskRecordResponseBody'
schemes:
- http
/statistics/person-su-money:
post:
tags:
- statistics
summary: 获取个人素币统计
description: 获取个人素币统计
operationId: statistics#personSuMoneyStatistics
parameters:
- name: PersonSuMoneyStatisticsRequestBody
in: body
required: true
schema:
$ref: '#/definitions/StatisticsPersonSuMoneyStatisticsRequestBody'
responses:
"200":
description: OK response.
schema:
$ref: '#/definitions/StatisticsPersonSuMoneyStatisticsResponseBody'
schemes:
- http
/statistics/person-task:
post:
tags:
- statistics
summary: 获取个人任务统计
description: 获取个人任务统计
operationId: statistics#personTaskStatistics
parameters:
- name: PersonTaskStatisticsRequestBody
in: body
required: true
schema:
$ref: '#/definitions/StatisticsPersonTaskStatisticsRequestBody'
responses:
"200":
description: OK response.
schema:
$ref: '#/definitions/StatisticsPersonTaskStatisticsResponseBody'
schemes:
- http
/statistics/system-task:
post:
tags:
- statistics
summary: 获取系统任务统计
description: 获取系统任务统计
operationId: statistics#systemTaskStatistics
parameters:
- name: SystemTaskStatisticsRequestBody
in: body
required: true
schema:
$ref: '#/definitions/StatisticsSystemTaskStatisticsRequestBody'
responses:
"200":
description: OK response.
schema:
$ref: '#/definitions/StatisticsSystemTaskStatisticsResponseBody'
schemes:
- http
/su-money/exchange:
post:
tags:
... ... @@ -259,7 +359,7 @@ paths:
type: integer
- name: sponsor
in: query
description: 任务发起者
description: 任务发起者UID
required: false
type: integer
format: int64
... ... @@ -300,13 +400,13 @@ paths:
type: integer
- name: receiver
in: query
description: 任务领取人
description: 任务领取人UID
required: false
type: integer
format: int64
- name: participator
in: query
description: 任务参与者
description: 任务参与者UID
required: false
type: integer
format: int64
... ... @@ -734,6 +834,107 @@ definitions:
properties:
employee:
$ref: '#/definitions/employeeResponseBody'
OffTaskRecordGetOffTaskRecordResponseBody:
title: 'Mediatype identifier: OffTaskRecordGetOffTaskRecordResponseBody'
type: object
properties:
offTaskRecord:
$ref: '#/definitions/offTaskRecordResponseBody'
OffTaskRecordSearchOffTaskRecordRequestBody:
title: OffTaskRecordSearchOffTaskRecordRequestBody
type: object
properties:
companyId:
type: integer
description: 公司ID
required:
- companyId
customerValue:
type: string
description: 客户价值
limit:
type: integer
description: 查询限制
format: int64
offEndTime:
type: string
description: 关闭任务时间区间-截止时间
format: datetime
offStartTime:
type: string
description: 关闭任务时间区间-开始时间
format: datetime
offset:
type: integer
description: 查询偏离量
format: int64
taskContentMatch:
type: string
description: 任务内容匹配
taskNature:
type: string
description: 任务性质
taskType:
type: integer
description: 任务类型
format: int64
OffTaskRecordSearchOffTaskRecordResponseBody:
title: 'Mediatype identifier: OffTaskRecordSearchOffTaskRecordResponseBody'
type: object
properties:
count:
type: integer
description: 结果总数
format: int64
offTaskRecords:
type: array
items:
$ref: '#/definitions/offTaskRecordResponseBody'
StatisticsPersonSuMoneyStatisticsRequestBody:
title: StatisticsPersonSuMoneyStatisticsRequestBody
type: object
properties:
uid:
type: integer
description: 统一用户UID
required:
- uid
StatisticsPersonSuMoneyStatisticsResponseBody:
title: 'Mediatype identifier: StatisticsPersonSuMoneyStatisticsResponseBody'
type: object
properties:
personSuMoneyStatistics:
$ref: '#/definitions/personSuMoneyStatisticsResponseBody'
StatisticsPersonTaskStatisticsRequestBody:
title: StatisticsPersonTaskStatisticsRequestBody
type: object
properties:
uid:
type: integer
description: 统一用户UID
required:
- uid
StatisticsPersonTaskStatisticsResponseBody:
title: 'Mediatype identifier: StatisticsPersonTaskStatisticsResponseBody'
type: object
properties:
personTaskStatistics:
$ref: '#/definitions/personTaskStatisticsResponseBody'
StatisticsSystemTaskStatisticsRequestBody:
title: StatisticsSystemTaskStatisticsRequestBody
type: object
properties:
companyId:
type: integer
description: 公司ID
required:
- companyId
StatisticsSystemTaskStatisticsResponseBody:
title: 'Mediatype identifier: StatisticsSystemTaskStatisticsResponseBody'
type: object
properties:
systemTaskStatistics:
$ref: '#/definitions/systemTaskStatisticsResponseBody'
SuMoneyExchangeSuMoneyRequestBody:
title: SuMoneyExchangeSuMoneyRequestBody
type: object
... ... @@ -745,7 +946,7 @@ definitions:
- exchangeDescription
operator:
type: integer
description: 操作人UID(默认为系统操作)
description: 操作人UID
format: int64
suMoney:
type: number
... ... @@ -775,11 +976,23 @@ definitions:
type: integer
description: 查询偏离量
format: int64
operator:
type: integer
description: 操作人UID
format: int64
recordType:
type: integer
description: 记录类型(1兑换,2任务奖励)
required:
- recordType
transactionEndTime:
type: string
description: 事务时间区间-截止时间
format: datetime
transactionStartTime:
type: string
description: 事务时间区间-开始时间
format: datetime
uid:
type: integer
description: 统一用户UID
... ... @@ -1084,6 +1297,10 @@ definitions:
type: integer
description: 竞标时间(1全部,2已截止,3未截止)
format: int64
bidder:
type: integer
description: 竞标参与者UID
format: int64
companyId:
type: integer
description: 公司ID
... ... @@ -1092,6 +1309,9 @@ definitions:
customerValue:
type: string
description: 客户价值
isFilterCloseStatus:
type: boolean
description: 是否过滤关闭状态任务
isRewardTake:
type: boolean
description: 是否悬赏任务
... ... @@ -1105,15 +1325,15 @@ definitions:
format: int64
participator:
type: integer
description: 任务参与者
description: 任务参与者UID
format: int64
receiver:
type: integer
description: 任务领取人
description: 任务领取人UID
format: int64
sponsor:
type: integer
description: 任务发起者
description: 任务发起者UID
format: int64
taskContentMatch:
type: string
... ... @@ -1330,6 +1550,76 @@ definitions:
task:
$ref: '#/definitions/taskResponseBody'
description: 关闭任务记录
personSuMoneyStatisticsResponseBody:
title: personSuMoneyStatisticsResponseBody
type: object
properties:
currentSuMoney:
type: number
description: 当前素币
required:
- currentSuMoney
incomeSuMoneyOfYesterday:
type: number
description: 昨日收益
required:
- incomeSuMoneyOfYesterday
description: 个人素币统计
personTaskStatisticsResponseBody:
title: personTaskStatisticsResponseBody
type: object
properties:
bidAsParticipator:
type: integer
description: 个人参与的竞标中任务
required:
- bidAsParticipator
completedAsParticipator:
type: integer
description: 个人参与的已完成任务
required:
- completedAsParticipator
completedAsReceiver:
type: integer
description: 个人领取的已完成任务
required:
- completedAsReceiver
completedAsSponsor:
type: integer
description: 个人发起的已完成任务
required:
- completedAsSponsor
unAcceptanceAsReceiver:
type: integer
description: 个人领取的待验收任务
required:
- unAcceptanceAsReceiver
unAcceptanceAsSponsor:
type: integer
description: 个人发起的待验收任务
required:
- unAcceptanceAsSponsor
unClaimedAsSponsor:
type: integer
description: 个人发起的待领取任务
required:
- unClaimedAsSponsor
unReleasedAsSponsor:
type: integer
description: 个人发起的待发布任务
required:
- unReleasedAsSponsor
underwayAsReceiver:
type: integer
description: 个人领取的进行中任务
required:
- underwayAsReceiver
underwayAsSponsor:
type: integer
description: 个人发起的进行中任务
required:
- underwayAsSponsor
description: 个人任务统计
referenceResourceItemRequestBody:
title: referenceResourceItemRequestBody
type: object
... ... @@ -1418,10 +1708,7 @@ definitions:
employee:
$ref: '#/definitions/employeeInfoResponseBody'
operator:
type: integer
description: 操作人
required:
- operator
$ref: '#/definitions/employeeInfoResponseBody'
recordDescription:
type: string
description: 素币事务记录描述
... ... @@ -1437,23 +1724,55 @@ definitions:
description: 事务素币值
required:
- suMoney
suMoneyBeforeTransaction:
type: number
description: 事务处理前素币值
required:
- suMoneyBeforeTransaction
suMoneyTransactionRecordId:
type: integer
description: 素币事务记录ID
required:
- suMoneyTransactionRecordId
description: 素币事务记录
systemTaskStatisticsResponseBody:
title: systemTaskStatisticsResponseBody
type: object
properties:
completed:
type: integer
description: 系统已完成任务
format: int64
released:
type: integer
description: 系统已发布任务
required:
- released
underway:
type: integer
description: 系统进行中任务
format: int64
description: 系统任务统计
taskPercentageItemRequestBody:
title: taskPercentageItemRequestBody
type: object
properties:
contributor:
$ref: '#/definitions/employeeInfoRequestBody'
issueScore:
type: number
description: 引用问题的得分
format: double
percentage:
type: integer
description: 任务贡献占比
required:
- percentage
suMoney:
type: number
description: 分配到的奖励素币
required:
- suMoney
description: 任务贡献占比项
taskPercentageItemResponseBody:
title: taskPercentageItemResponseBody
... ... @@ -1461,11 +1780,20 @@ definitions:
properties:
contributor:
$ref: '#/definitions/employeeInfoResponseBody'
issueScore:
type: number
description: 引用问题的得分
format: double
percentage:
type: integer
description: 任务贡献占比
required:
- percentage
suMoney:
type: number
description: 分配到的奖励素币
required:
- suMoney
description: 任务贡献占比项
taskResponseBody:
title: taskResponseBody
... ...
package query
import (
"fmt"
"github.com/astaxie/beego/validation"
)
type ListEmployeePermissionQuery struct {
}
func (listEmployeePermissionQuery *ListEmployeePermissionQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(listEmployeePermissionQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}
... ...
... ... @@ -163,6 +163,28 @@ func (configService *ConfigService) ListBidTimeMatch(listBidTimeMatchQuery *quer
}, nil
}
// 返回员工权限字典列表(1任务管理,2素币管理,3成员管理)
func (configService *ConfigService) ListEmployeePermission(listEmployeePermissionQuery *query.ListEmployeePermissionQuery) (interface{}, error) {
if err := listEmployeePermissionQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
employeePermissionMap := map[int]string{
1: "任务管理",
2: "素币管理",
3: "成员管理",
}
var list []map[string]interface{}
for key, value := range employeePermissionMap {
list = append(list, map[string]interface{}{
"id": key,
"name": value,
})
}
return map[string]interface{}{
"employeePermissions": list,
}, nil
}
func NewConfigService(options map[string]interface{}) *ConfigService {
newConfigService := &ConfigService{}
return newConfigService
... ...
... ... @@ -2,15 +2,19 @@ package command
import (
"fmt"
"github.com/astaxie/beego/validation"
)
type CreateEmployeeCommand struct {
// 统一用户UID
Uid int64 `json:"uid" valid:"Required"`
// 员工姓名
EmployeeName string `json:"employeeName" valid:"Required"`
EmployeeName string `json:"employeeName,omitempty"`
// 员工账号
EmployeeAccount string `json:"employeeAccount" valid:"Required"`
EmployeeAccount string `json:"employeeAccount,omitempty"`
// 员工头像URL
EmployeeAvatarUrl string `json:"employeeAvatarUrl,omitempty"`
}
func (createEmployeeCommand *CreateEmployeeCommand) ValidateCommand() error {
... ...
... ... @@ -2,6 +2,7 @@ package command
import (
"fmt"
"github.com/astaxie/beego/validation"
)
... ...
... ... @@ -2,6 +2,7 @@ package command
import (
"fmt"
"github.com/astaxie/beego/validation"
)
... ... @@ -12,6 +13,10 @@ type UpdateEmployeeCommand struct {
EmployeeName string `json:"employeeName,omitempty"`
// 员工账号
EmployeeAccount string `json:"employeeAccount,omitempty"`
// 员工头像URL
EmployeeAvatarUrl string `json:"employeeAvatarUrl,omitempty"`
// 员工权限集合
Permissions []int `json:"permissions,omitempty"`
}
func (updateEmployeeCommand *UpdateEmployeeCommand) ValidateCommand() error {
... ...
... ... @@ -2,6 +2,7 @@ package query
import (
"fmt"
"github.com/astaxie/beego/validation"
)
... ...
... ... @@ -2,10 +2,15 @@ package query
import (
"fmt"
"github.com/astaxie/beego/validation"
)
type ListEmployeeQuery struct {
// 公司ID
CompanyId int64 `json:"companyId" valid:"Required"`
// 员工姓名匹配
EmployeeNameMatch string `json:"employeeNameMatch,omitempty"`
// 查询偏离量
Offset int `json:"offset,omitempty"`
// 查询限制
... ...
... ... @@ -15,7 +15,7 @@ type SearchOffTaskRecordCommand struct {
// 任务类型
TaskType int `json:"taskType,omitempty"`
// 客户价值
CustomerValue string `json:"customerValue,omitempty"`
CustomerValue []string `json:"customerValue,omitempty"`
// 任务性质
TaskNature string `json:"taskNature,omitempty"`
// 关闭任务时间区间-开始时间
... ...
... ... @@ -18,7 +18,7 @@ type SearchTaskCommand struct {
// 任务状态
TaskStatus int `json:"taskStatus,omitempty"`
// 客户价值
CustomerValue string `json:"customerValue,omitempty"`
CustomerValue []string `json:"customerValue,omitempty"`
// 任务性质
TaskNature string `json:"taskNature,omitempty"`
// 是否悬赏任务
... ...
... ... @@ -20,7 +20,7 @@ type ListTaskQuery struct {
// 任务状态
TaskStatus int `json:"taskStatus,omitempty"`
// 客户价值
CustomerValue string `json:"customerValue,omitempty"`
CustomerValue []string `json:"customerValue,omitempty"`
// 任务性质
TaskNature string `json:"taskNature,omitempty"`
// 是否悬赏任务
... ...
... ... @@ -12,6 +12,8 @@ type Employee struct {
SuMoney float64 `json:"suMoney"`
// 员工状态(启用或者禁用)
Status int `json:"status"`
// 员工权限集合
Permissions []int `json:"permissions"`
}
type EmployeeRepository interface {
... ... @@ -38,6 +40,9 @@ func (employee *Employee) Update(data map[string]interface{}) error {
if status, ok := data["status"]; ok {
employee.Status = status.(int)
}
if permissions, ok := data["permissions"]; ok {
employee.Permissions = permissions.([]int)
}
return nil
}
... ...
... ... @@ -8,4 +8,6 @@ type EmployeeInfo struct {
EmployeeName string `json:"employeeName"`
// 员工账号
EmployeeAccount string `json:"employeeAccount"`
// 员工头像URL
EmployeeAvatarUrl string `json:"employeeAvatarUrl"`
}
... ...
... ... @@ -12,8 +12,12 @@ type Employee struct {
EmployeeName string
// 员工账号
EmployeeAccount string
// 员工头像URL
EmployeeAvatarUrl string
// 当前素币
SuMoney float64
// 员工状态(启用或者禁用)
Status int
// 员工权限集合
Permissions []int `pg:",array"`
}
... ...
... ... @@ -30,16 +30,16 @@ func (repository *EmployeeRepository) Save(employee *domain.Employee) (*domain.E
return employee, err
}
if _, err := tx.QueryOne(
pg.Scan(&employee.EmployeeId, &employee.CompanyId, &employee.EmployeeInfo.Uid, &employee.EmployeeInfo.EmployeeName, &employee.EmployeeInfo.EmployeeAccount, &employee.SuMoney, &employee.Status),
"INSERT INTO employees (id, company_id, uid, employee_name, employee_account, su_money, status) VALUES (?, ?, ?, ?, ?, ?, ?) RETURNING id, company_id, uid, employee_name, employee_account, su_money, status",
employee.EmployeeId, employee.CompanyId, employee.EmployeeInfo.Uid, employee.EmployeeInfo.EmployeeName, employee.EmployeeInfo.EmployeeAccount, employee.SuMoney, employee.Status); err != nil {
pg.Scan(&employee.EmployeeId, &employee.CompanyId, &employee.EmployeeInfo.Uid, &employee.EmployeeInfo.EmployeeName, &employee.EmployeeInfo.EmployeeAccount, &employee.EmployeeInfo.EmployeeAvatarUrl, &employee.SuMoney, &employee.Status, pg.Array(&employee.Permissions)),
"INSERT INTO employees (id, company_id, uid, employee_name, employee_account, employee_avatar_url, su_money, status, permissions) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id, company_id, uid, employee_name, employee_account, employee_avatar_url, su_money, status, permissions",
employee.EmployeeId, employee.CompanyId, employee.EmployeeInfo.Uid, employee.EmployeeInfo.EmployeeName, employee.EmployeeInfo.EmployeeAccount, employee.EmployeeInfo.EmployeeAvatarUrl, employee.SuMoney, employee.Status, pg.Array(employee.Permissions)); err != nil {
return employee, err
}
} else {
if _, err := tx.QueryOne(
pg.Scan(&employee.EmployeeId, &employee.CompanyId, &employee.EmployeeInfo.Uid, &employee.EmployeeInfo.EmployeeName, &employee.EmployeeInfo.EmployeeAccount, &employee.SuMoney, &employee.Status),
"UPDATE employees SET employee_name=?, employee_account=?, su_money=?, status=? WHERE uid=? RETURNING id, company_id, uid, employee_name, employee_account, su_money, status",
employee.EmployeeInfo.EmployeeName, employee.EmployeeInfo.EmployeeAccount, employee.SuMoney, employee.Status, employee.EmployeeInfo.Uid); err != nil {
pg.Scan(&employee.EmployeeId, &employee.CompanyId, &employee.EmployeeInfo.Uid, &employee.EmployeeInfo.EmployeeName, &employee.EmployeeInfo.EmployeeAccount, &employee.EmployeeInfo.EmployeeAvatarUrl, &employee.SuMoney, &employee.Status, pg.Array(&employee.Permissions)),
"UPDATE employees SET employee_name=?, employee_account=?, employee_avatar_url=?, su_money=?, status=?, permissions=? WHERE uid=? RETURNING id, company_id, uid, employee_name, employee_account, employee_avatar_url, su_money, status, permissions",
employee.EmployeeInfo.EmployeeName, employee.EmployeeInfo.EmployeeAccount, &employee.EmployeeInfo.EmployeeAvatarUrl, employee.SuMoney, employee.Status, pg.Array(employee.Permissions), employee.EmployeeInfo.Uid); err != nil {
return employee, err
}
}
... ... @@ -82,6 +82,12 @@ func (repository *EmployeeRepository) Find(queryOptions map[string]interface{})
var employeeModels []*models.Employee
employees := make([]*domain.Employee, 0)
query := tx.Model(&employeeModels)
if companyId, ok := queryOptions["companyId"]; ok {
query = query.Where("employee.company_id = ?", companyId)
}
if employeeNameMatch, ok := queryOptions["employeeNameMatch"]; ok && (employeeNameMatch != "") {
query = query.Where("employee.employee_name LIKE ?", fmt.Sprintf("%%%s%%", employeeNameMatch.(string)))
}
if offset, ok := queryOptions["offset"]; ok {
offset := offset.(int)
if offset > -1 {
... ... @@ -117,12 +123,14 @@ func (repository *EmployeeRepository) transformPgModelToDomainModel(employeeMode
EmployeeId: employeeModel.Id,
CompanyId: employeeModel.CompanyId,
EmployeeInfo: &domain.EmployeeInfo{
Uid: employeeModel.Uid,
EmployeeName: employeeModel.EmployeeName,
EmployeeAccount: employeeModel.EmployeeAccount,
Uid: employeeModel.Uid,
EmployeeName: employeeModel.EmployeeName,
EmployeeAccount: employeeModel.EmployeeAccount,
EmployeeAvatarUrl: employeeModel.EmployeeAvatarUrl,
},
SuMoney: employeeModel.SuMoney,
Status: employeeModel.Status,
SuMoney: employeeModel.SuMoney,
Status: employeeModel.Status,
Permissions: employeeModel.Permissions,
}, nil
}
... ...
... ... @@ -114,8 +114,13 @@ func (repository *TaskRepository) Find(queryOptions map[string]interface{}) (int
if taskNature, ok := queryOptions["taskNature"]; ok && (taskNature != "") {
query = query.Where(`task.task_nature = ?`, taskNature)
}
if customerValue, ok := queryOptions["customerValue"]; ok && (customerValue != "") {
query = query.Where("task.customer_value @> ?", pg.Array([]string{customerValue.(string)}))
if customerValue, ok := queryOptions["customerValue"]; ok && len(customerValue.([]string)) != 0 {
query = query.WhereGroup(func(q *orm.Query) (*orm.Query, error) {
for _, value := range customerValue.([]string) {
q = q.WhereOr("task.customer_value @> ?", pg.Array([]string{value}))
}
return q, nil
})
}
if taskContentMatch, ok := queryOptions["taskContentMatch"]; ok && (taskContentMatch != "") {
query = query.WhereGroup(func(q *orm.Query) (*orm.Query, error) {
... ...
... ... @@ -94,3 +94,17 @@ func (controller *ConfigController) ListBidTimeMatch() {
controller.Data["json"] = response
controller.ServeJSON()
}
func (controller *ConfigController) ListEmployeePermission() {
configService := service.NewConfigService(nil)
listEmployeePermissionQuery := &query.ListEmployeePermissionQuery{}
data, err := configService.ListEmployeePermission(listEmployeePermissionQuery)
var response utils.JsonResponse
if err != nil {
response = utils.ResponseError(controller.Ctx, err)
} else {
response = utils.ResponseData(controller.Ctx, data)
}
controller.Data["json"] = response
controller.ServeJSON()
}
... ...
... ... @@ -2,6 +2,7 @@ package controllers
import (
"encoding/json"
"github.com/astaxie/beego"
"github.com/linmadan/egglib-go/web/beego/utils"
"gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/application/employee/command"
... ... @@ -80,6 +81,10 @@ func (controller *EmployeeController) RemoveEmployee() {
func (controller *EmployeeController) ListEmployee() {
employeeService := service.NewEmployeeService(nil)
listEmployeeQuery := &query.ListEmployeeQuery{}
companyId, _ := controller.GetInt64("companyId")
listEmployeeQuery.CompanyId = companyId
employeeNameMatch := controller.GetString("employeeNameMatch")
listEmployeeQuery.EmployeeNameMatch = employeeNameMatch
offset, _ := controller.GetInt("offset")
listEmployeeQuery.Offset = offset
limit, _ := controller.GetInt("limit")
... ...
... ... @@ -228,8 +228,6 @@ func (controller *TaskController) ListTask() {
listTaskQuery.TaskType = taskType
taskStatus, _ := controller.GetInt("taskStatus")
listTaskQuery.TaskStatus = taskStatus
customerValue := controller.GetString("customerValue")
listTaskQuery.CustomerValue = customerValue
taskNature := controller.GetString("taskNature")
listTaskQuery.TaskNature = taskNature
isRewardTake, _ := controller.GetBool("isRewardTake")
... ...
... ... @@ -12,4 +12,5 @@ func init() {
beego.Router("/config/customer-values", &controllers.ConfigController{}, "Get:ListCustomerValue")
beego.Router("/config/reference-resource-types", &controllers.ConfigController{}, "Get:ListReferenceResourceType")
beego.Router("/config/bid-time-matchs", &controllers.ConfigController{}, "Get:ListBidTimeMatch")
beego.Router("/config/employee-permissions", &controllers.ConfigController{}, "Get:ListEmployeePermission")
}
... ...
package config
import (
"net/http"
"github.com/gavv/httpexpect"
. "github.com/onsi/ginkgo"
)
var _ = Describe("返回员工权限字典列表(1任务管理,2素币管理,3成员管理)", func() {
Describe("返回员工权限字典列表(1任务管理,2素币管理,3成员管理)", func() {
Context("", func() {
It("", func() {
httpExpect := httpexpect.New(GinkgoT(), server.URL)
httpExpect.GET("/config/employee-permissions").
Expect().
Status(http.StatusOK).
JSON().
Object().
ContainsKey("code").ValueEqual("code", 0).
ContainsKey("msg").ValueEqual("msg", "ok").
ContainsKey("data").Value("data").Object()
})
})
})
})
... ...
package employee
import (
"net/http"
"github.com/gavv/httpexpect"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
pG "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/pg"
"net/http"
)
var _ = Describe("创建新员工", func() {
... ... @@ -14,11 +15,10 @@ var _ = Describe("创建新员工", func() {
It("返回员工数据", func() {
httpExpect := httpexpect.New(GinkgoT(), server.URL)
body := map[string]interface{}{
"uid": 123456,
"companyId": 101,
"employeeName": "蔡晓生",
"employeeAccount": "13799999999",
"status": 1,
"uid": 2499036607974745088,
"employeeName": "employeeName",
"employeeAccount": "employeeAccount",
"employeeAvatarUrl": "employeeAvatarUrl",
}
httpExpect.POST("/employees/").
WithJSON(body).
... ...
package employee
import (
"net/http"
"github.com/gavv/httpexpect"
"github.com/go-pg/pg"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
pG "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/pg"
"net/http"
)
var _ = Describe("返回员工", func() {
... ... @@ -14,15 +15,15 @@ var _ = Describe("返回员工", func() {
BeforeEach(func() {
_, err := pG.DB.QueryOne(
pg.Scan(&employeeId),
"INSERT INTO employees (id, company_id, uid, employee_name, employee_account, su_money) VALUES (?, ?, ?, ?, ?, ?) RETURNING id",
1, 101, 123456, "testEmployeeName", "testEmployeeAccount", 0)
"INSERT INTO employees (id, company_id, uid, employee_name, employee_account, employee_avatar_url, su_money, status, permissions) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id",
1, 101, 2499036607974745088, "employee_name", "employee_account", "employee_avatar_url", 1000.00, 1, pg.Array([]int{1, 3}))
Expect(err).NotTo(HaveOccurred())
})
Describe("根据uid参数返回员工", func() {
Context("传入有效的uid", func() {
Describe("根据employeeId参数返回员工", func() {
Context("传入有效的employeeId", func() {
It("返回员工数据", func() {
httpExpect := httpexpect.New(GinkgoT(), server.URL)
httpExpect.GET("/employees/123456").
httpExpect.GET("/employees/2499036607974745088").
Expect().
Status(http.StatusOK).
JSON().
... ...
package employee
import (
"net/http"
"github.com/gavv/httpexpect"
"github.com/go-pg/pg"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
pG "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/pg"
"net/http"
)
var _ = Describe("返回员工列表", func() {
... ... @@ -14,8 +15,8 @@ var _ = Describe("返回员工列表", func() {
BeforeEach(func() {
_, err := pG.DB.QueryOne(
pg.Scan(&employeeId),
"INSERT INTO employees (id, company_id, uid, employee_name, employee_account, su_money) VALUES (?, ?, ?, ?, ?, ?) RETURNING id",
1, 101, 123456, "testEmployeeName", "testEmployeeAccount", 0)
"INSERT INTO employees (id, company_id, uid, employee_name, employee_account, employee_avatar_url, su_money, status, permissions) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id",
1, 101, 2499036607974745088, "employee_name", "employee_account", "employee_avatar_url", 1000.00, 1, pg.Array([]int{1, 3}))
Expect(err).NotTo(HaveOccurred())
})
Describe("根据参数返回员工列表", func() {
... ... @@ -23,8 +24,9 @@ var _ = Describe("返回员工列表", func() {
It("返回员工数据列表", func() {
httpExpect := httpexpect.New(GinkgoT(), server.URL)
httpExpect.GET("/employees/").
WithQuery("companyId", 101).
WithQuery("offset", 0).
WithQuery("limit", 20).
WithQuery("limit", 1).
Expect().
Status(http.StatusOK).
JSON().
... ...
... ... @@ -15,15 +15,15 @@ var _ = Describe("移除员工", func() {
BeforeEach(func() {
_, err := pG.DB.QueryOne(
pg.Scan(&employeeId),
"INSERT INTO employees (id, company_id, uid, employee_name, employee_account, su_money) VALUES (?, ?, ?, ?, ?, ?) RETURNING id",
1, 101, 123456, "testEmployeeName", "testEmployeeAccount", 0)
"INSERT INTO employees (id, company_id, uid, employee_name, employee_account, employee_avatar_url, su_money, status, permissions) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id",
1, 101, 2499036607974745088, "employee_name", "employee_account", "employee_avatar_url", 1000.00, 1, pg.Array([]int{1, 3}))
Expect(err).NotTo(HaveOccurred())
})
Describe("根据参数移除员工", func() {
Context("传入有效的uid", func() {
Context("传入有效的employeeId", func() {
It("返回被移除员工的数据", func() {
httpExpect := httpexpect.New(GinkgoT(), server.URL)
httpExpect.DELETE("/employees/123456").
httpExpect.DELETE("/employees/2499036607974745088").
Expect().
Status(http.StatusOK).
JSON().
... ...
... ... @@ -15,8 +15,8 @@ var _ = Describe("更新员工", func() {
BeforeEach(func() {
_, err := pG.DB.QueryOne(
pg.Scan(&employeeId),
"INSERT INTO employees (id, company_id, uid, employee_name, employee_account, su_money) VALUES (?, ?, ?, ?, ?, ?) RETURNING id",
1, 101, 123456, "testEmployeeName", "testEmployeeAccount", 0)
"INSERT INTO employees (id, company_id, uid, employee_name, employee_account, employee_avatar_url, su_money, status, permissions) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id",
1, 101, 2499036607974745088, "employee_name", "employee_account", "employee_avatar_url", 1000.00, 1, pg.Array([]int{1, 3}))
Expect(err).NotTo(HaveOccurred())
})
Describe("提交数据更新员工", func() {
... ... @@ -24,10 +24,12 @@ var _ = Describe("更新员工", func() {
It("返回更新后的员工数据", func() {
httpExpect := httpexpect.New(GinkgoT(), server.URL)
body := map[string]interface{}{
"employeeName": "updateEmployeeName",
"employeeAccount": "updateEmployeeAccount",
"employeeName": "employeeName",
"employeeAccount": "employeeAccount",
"employeeAvatarUrl": "employeeAvatarUrl",
"permissions": []int{1, 2},
}
httpExpect.PUT("/employees/123456").
httpExpect.PUT("/employees/2499036607974745088").
WithJSON(body).
Expect().
Status(http.StatusOK).
... ...
... ... @@ -29,6 +29,20 @@ var _ = Describe("搜索任务", func() {
},
}, "null", "", pg.Array([]string{}), 2499036607974745099, time.Now(), time.Now().Add(dayAfter))
Expect(err).NotTo(HaveOccurred())
_, err1 := pG.DB.QueryOne(
pg.Scan(),
"INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
2, 101, "抢单任务2", 1, &domain.EmployeeInfo{
Uid: 2499036607974745088,
}, 1, "null", pg.Array([]string{"口感", "售后服务"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), false, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter))
Expect(err1).NotTo(HaveOccurred())
_, err2 := pG.DB.QueryOne(
pg.Scan(),
"INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
3, 101, "竞标任务1", 2, &domain.EmployeeInfo{
Uid: 2499036607974745088,
}, 1, "null", pg.Array([]string{"口感", "便利", "品牌"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter))
Expect(err2).NotTo(HaveOccurred())
})
Describe("搜索任务", func() {
Context("", func() {
... ... @@ -37,8 +51,13 @@ var _ = Describe("搜索任务", func() {
body := map[string]interface{}{
"companyId": 101,
"sponsor": 2499036607974745088,
"offset": 0,
"limit": 20,
"customerValue": []string{
"售后服务",
"口感",
"品牌",
},
"offset": 0,
"limit": 20,
}
httpExpect.POST("/tasks/search").
WithJSON(body).
... ...