作者 Administrator

合并分支 'dev' 到 'master'

Dev



查看合并请求 !1
正在显示 33 个修改的文件 包含 3680 行增加364 行删除

要显示太多修改。

为保证性能只显示 33 of 33+ 个文件。

1 -#mmm-worth  
  1 +#mmm-worth 1
1 #!/bin/bash 1 #!/bin/bash
2 export PATH=/root/local/bin:$PATH 2 export PATH=/root/local/bin:$PATH
3 -kubectl -n mmm-worth-dev get pods | grep -q mmm-worth 3 +kubectl -n mmm-suplus-dev get pods | grep -q mmm-worth
4 if [ "$?" == "1" ];then 4 if [ "$?" == "1" ];then
5 kubectl create -f /tmp/dev/mmm-worth/mmm-worth.yaml --record 5 kubectl create -f /tmp/dev/mmm-worth/mmm-worth.yaml --record
6 - kubectl -n mmm-worth-dev get svc | grep -q mmm-worth 6 + kubectl -n mmm-suplus-dev get svc | grep -q mmm-worth
7 if [ "$?" == "0" ];then 7 if [ "$?" == "0" ];then
8 echo "mmm-worth service install success!" 8 echo "mmm-worth service install success!"
9 else 9 else
10 echo "mmm-worth service install fail!" 10 echo "mmm-worth service install fail!"
11 fi 11 fi
12 - kubectl -n mmm-worth-dev get pods | grep -q mmm-worth 12 + kubectl -n mmm-suplus-dev get pods | grep -q mmm-worth
13 if [ "$?" == "0" ];then 13 if [ "$?" == "0" ];then
14 echo "mmm-worth deployment install success!" 14 echo "mmm-worth deployment install success!"
15 else 15 else
@@ -17,24 +17,24 @@ if [ "$?" == "1" ];then @@ -17,24 +17,24 @@ if [ "$?" == "1" ];then
17 fi 17 fi
18 else 18 else
19 kubectl delete -f /tmp/dev/mmm-worth/mmm-worth.yaml 19 kubectl delete -f /tmp/dev/mmm-worth/mmm-worth.yaml
20 - kubectl -n mmm-worth-dev get svc | grep -q mmm-worth 20 + kubectl -n mmm-suplus-dev get svc | grep -q mmm-worth
21 while [ "$?" == "0" ] 21 while [ "$?" == "0" ]
22 do 22 do
23 - kubectl -n mmm-worth-dev get svc | grep -q mmm-worth 23 + kubectl -n mmm-suplus-dev get svc | grep -q mmm-worth
24 done 24 done
25 - kubectl -n mmm-worth-dev get pods | grep -q mmm-worth 25 + kubectl -n mmm-suplus-dev get pods | grep -q mmm-worth
26 while [ "$?" == "0" ] 26 while [ "$?" == "0" ]
27 do 27 do
28 - kubectl -n mmm-worth-dev get pods | grep -q mmm-worth 28 + kubectl -n mmm-suplus-dev get pods | grep -q mmm-worth
29 done 29 done
30 kubectl create -f /tmp/dev/mmm-worth/mmm-worth.yaml --record 30 kubectl create -f /tmp/dev/mmm-worth/mmm-worth.yaml --record
31 - kubectl -n mmm-worth-dev get svc | grep -q mmm-worth 31 + kubectl -n mmm-suplus-dev get svc | grep -q mmm-worth
32 if [ "$?" == "0" ];then 32 if [ "$?" == "0" ];then
33 echo "mmm-worth service update success!" 33 echo "mmm-worth service update success!"
34 else 34 else
35 echo "mmm-worth service update fail!" 35 echo "mmm-worth service update fail!"
36 fi 36 fi
37 - kubectl -n mmm-worth-dev get pods | grep -q mmm-worth 37 + kubectl -n mmm-suplus-dev get pods | grep -q mmm-worth
38 if [ "$?" == "0" ];then 38 if [ "$?" == "0" ];then
39 echo "mmm-worth deployment update success!" 39 echo "mmm-worth deployment update success!"
40 else 40 else
@@ -2,7 +2,7 @@ apiVersion: v1 @@ -2,7 +2,7 @@ apiVersion: v1
2 kind: Service 2 kind: Service
3 metadata: 3 metadata:
4 name: mmm-worth 4 name: mmm-worth
5 - namespace: mmm-worth-dev 5 + namespace: mmm-suplus-dev
6 labels: 6 labels:
7 k8s-app: mmm-worth 7 k8s-app: mmm-worth
8 spec: 8 spec:
@@ -17,7 +17,7 @@ apiVersion: extensions/v1beta1 @@ -17,7 +17,7 @@ apiVersion: extensions/v1beta1
17 kind: Deployment 17 kind: Deployment
18 metadata: 18 metadata:
19 name: mmm-worth 19 name: mmm-worth
20 - namespace: mmm-worth-dev 20 + namespace: mmm-suplus-dev
21 labels: 21 labels:
22 k8s-app: mmm-worth 22 k8s-app: mmm-worth
23 spec: 23 spec:
@@ -53,7 +53,7 @@ spec: @@ -53,7 +53,7 @@ spec:
53 name: accesslogs 53 name: accesslogs
54 env: 54 env:
55 - name: POSTGRESQL_DB_NAME 55 - name: POSTGRESQL_DB_NAME
56 - value: "mmm-worth" 56 + value: "mmmworth"
57 - name: POSTGRESQL_USER 57 - name: POSTGRESQL_USER
58 value: "postgres" 58 value: "postgres"
59 - name: POSTGRESQL_PASSWORD 59 - name: POSTGRESQL_PASSWORD
@@ -68,6 +68,8 @@ spec: @@ -68,6 +68,8 @@ spec:
68 value: "1" 68 value: "1"
69 - name: ERROR_BASE_CODE_MULTIPLE 69 - name: ERROR_BASE_CODE_MULTIPLE
70 value: "1000" 70 value: "1000"
  71 + - name: ABILITY_SERVICE_HOST
  72 + value: "https://ability-dev.fjmaimaimai.com"
71 volumes: 73 volumes:
72 - name: accesslogs 74 - name: accesslogs
73 emptyDir: {} 75 emptyDir: {}
  1 +#!/bin/bash
  2 +export PATH=/root/local/bin:$PATH
  3 +kubectl -n mmm-suplus-test get pods | grep -q mmm-worth
  4 +if [ "$?" == "1" ];then
  5 + kubectl create -f /tmp/test/mmm-worth/mmm-worth.yaml --record
  6 + kubectl -n mmm-suplus-test get svc | grep -q mmm-worth
  7 + if [ "$?" == "0" ];then
  8 + echo "mmm-worth service install success!"
  9 + else
  10 + echo "mmm-worth service install fail!"
  11 + fi
  12 + kubectl -n mmm-suplus-test get pods | grep -q mmm-worth
  13 + if [ "$?" == "0" ];then
  14 + echo "mmm-worth deployment install success!"
  15 + else
  16 + echo "mmm-worth deployment install fail!"
  17 + fi
  18 +else
  19 + kubectl delete -f /tmp/test/mmm-worth/mmm-worth.yaml
  20 + kubectl -n mmm-suplus-test get svc | grep -q mmm-worth
  21 + while [ "$?" == "0" ]
  22 + do
  23 + kubectl -n mmm-suplus-test get svc | grep -q mmm-worth
  24 + done
  25 + kubectl -n mmm-suplus-test get pods | grep -q mmm-worth
  26 + while [ "$?" == "0" ]
  27 + do
  28 + kubectl -n mmm-suplus-test get pods | grep -q mmm-worth
  29 + done
  30 + kubectl create -f /tmp/test/mmm-worth/mmm-worth.yaml --record
  31 + kubectl -n mmm-suplus-test get svc | grep -q mmm-worth
  32 + if [ "$?" == "0" ];then
  33 + echo "mmm-worth service update success!"
  34 + else
  35 + echo "mmm-worth service update fail!"
  36 + fi
  37 + kubectl -n mmm-suplus-test get pods | grep -q mmm-worth
  38 + if [ "$?" == "0" ];then
  39 + echo "mmm-worth deployment update success!"
  40 + else
  41 + echo "mmm-worth deployment update fail!"
  42 + fi
  43 +fi
  1 +apiVersion: v1
  2 +kind: Service
  3 +metadata:
  4 + name: mmm-worth
  5 + namespace: mmm-suplus-test
  6 + labels:
  7 + k8s-app: mmm-worth
  8 +spec:
  9 + ports:
  10 + - name: "http"
  11 + port: 80
  12 + targetPort: 8082
  13 + selector:
  14 + k8s-app: mmm-worth
  15 +---
  16 +apiVersion: extensions/v1beta1
  17 +kind: Deployment
  18 +metadata:
  19 + name: mmm-worth
  20 + namespace: mmm-suplus-test
  21 + labels:
  22 + k8s-app: mmm-worth
  23 +spec:
  24 + replicas: 1
  25 + template:
  26 + metadata:
  27 + labels:
  28 + k8s-app: mmm-worth
  29 + spec:
  30 + affinity:
  31 + nodeAffinity:
  32 + preferredDuringSchedulingIgnoredDuringExecution:
  33 + - preference: {}
  34 + weight: 100
  35 + requiredDuringSchedulingIgnoredDuringExecution:
  36 + nodeSelectorTerms:
  37 + - matchExpressions:
  38 + - key: kubernetes.io/hostname
  39 + operator: In
  40 + values:
  41 + - cn-hangzhou.i-bp1djh1xn7taumbue1ze
  42 + - cn-hangzhou.i-bp1djh1xn7taumbue1zd
  43 + - cn-hangzhou.i-bp1euf5u1ph9kbhtndhb
  44 + - cn-hangzhou.i-bp1hyp5oips9cdwxxgxy
  45 + containers:
  46 + - name: mmm-worth
  47 + image: 192.168.0.243:5000/mmm/mmm-worth:test
  48 + imagePullPolicy: Always
  49 + ports:
  50 + - containerPort: 8082
  51 + volumeMounts:
  52 + - mountPath: /opt/logs
  53 + name: accesslogs
  54 + env:
  55 + - name: POSTGRESQL_DB_NAME
  56 + value: "mmmworthtest"
  57 + - name: POSTGRESQL_USER
  58 + value: "postgres"
  59 + - name: POSTGRESQL_PASSWORD
  60 + value: "postgres_15432"
  61 + - name: POSTGRESQL_HOST
  62 + value: "101.37.68.23"
  63 + - name: POSTGRESQL_PORT
  64 + value: "15432"
  65 + - name: LOG_LEVEL
  66 + value: "debug"
  67 + - name: ERROR_BASE_CODE
  68 + value: "1"
  69 + - name: ERROR_BASE_CODE_MULTIPLE
  70 + value: "1000"
  71 + - name: ABILITY_SERVICE_HOST
  72 + value: "https://ability-test.fjmaimaimai.com"
  73 + volumes:
  74 + - name: accesslogs
  75 + emptyDir: {}
@@ -18,6 +18,153 @@ @@ -18,6 +18,153 @@
18 "application/xml" 18 "application/xml"
19 ], 19 ],
20 "paths": { 20 "paths": {
  21 + "/config/bid-time-matchs": {
  22 + "get": {
  23 + "tags": [
  24 + "config"
  25 + ],
  26 + "summary": "返回竞标时间字典列表(1全部,2已截止,3未截止)",
  27 + "description": "返回竞标时间字典列表(1全部,2已截止,3未截止)",
  28 + "operationId": "config#listBidTimeMatch",
  29 + "responses": {
  30 + "200": {
  31 + "description": "OK response.",
  32 + "schema": {
  33 + "$ref": "#/definitions/ConfigListBidTimeMatchResponseBody"
  34 + }
  35 + }
  36 + },
  37 + "schemes": [
  38 + "http"
  39 + ]
  40 + }
  41 + },
  42 + "/config/customer-values": {
  43 + "get": {
  44 + "tags": [
  45 + "config"
  46 + ],
  47 + "summary": "返回客户价值字典列表",
  48 + "description": "返回客户价值字典列表",
  49 + "operationId": "config#listCustomerValue",
  50 + "responses": {
  51 + "200": {
  52 + "description": "OK response.",
  53 + "schema": {
  54 + "$ref": "#/definitions/ConfigListCustomerValueResponseBody"
  55 + }
  56 + }
  57 + },
  58 + "schemes": [
  59 + "http"
  60 + ]
  61 + }
  62 + },
  63 + "/config/employee-permissions": {
  64 + "get": {
  65 + "tags": [
  66 + "config"
  67 + ],
  68 + "summary": "返回员工权限字典列表(1任务管理,2素币管理,3成员管理)",
  69 + "description": "返回员工权限字典列表(1任务管理,2素币管理,3成员管理)",
  70 + "operationId": "config#listEmployeePermission",
  71 + "responses": {
  72 + "200": {
  73 + "description": "OK response.",
  74 + "schema": {
  75 + "$ref": "#/definitions/ConfigListEmployeePermissionResponseBody"
  76 + }
  77 + }
  78 + },
  79 + "schemes": [
  80 + "http"
  81 + ]
  82 + }
  83 + },
  84 + "/config/reference-resource-types": {
  85 + "get": {
  86 + "tags": [
  87 + "config"
  88 + ],
  89 + "summary": "返回任务引用资源类型字典列表",
  90 + "description": "返回任务引用资源类型字典列表",
  91 + "operationId": "config#listReferenceResourceType",
  92 + "responses": {
  93 + "200": {
  94 + "description": "OK response.",
  95 + "schema": {
  96 + "$ref": "#/definitions/ConfigListReferenceResourceTypeResponseBody"
  97 + }
  98 + }
  99 + },
  100 + "schemes": [
  101 + "http"
  102 + ]
  103 + }
  104 + },
  105 + "/config/task-natures": {
  106 + "get": {
  107 + "tags": [
  108 + "config"
  109 + ],
  110 + "summary": "返回任务性质字典列表",
  111 + "description": "返回任务性质字典列表",
  112 + "operationId": "config#listTaskNature",
  113 + "responses": {
  114 + "200": {
  115 + "description": "OK response.",
  116 + "schema": {
  117 + "$ref": "#/definitions/ConfigListTaskNatureResponseBody"
  118 + }
  119 + }
  120 + },
  121 + "schemes": [
  122 + "http"
  123 + ]
  124 + }
  125 + },
  126 + "/config/task-statuses": {
  127 + "get": {
  128 + "tags": [
  129 + "config"
  130 + ],
  131 + "summary": "返回任务状态字典列表",
  132 + "description": "返回任务状态字典列表",
  133 + "operationId": "config#listTaskStatus",
  134 + "responses": {
  135 + "200": {
  136 + "description": "OK response.",
  137 + "schema": {
  138 + "$ref": "#/definitions/ConfigListTaskStatusResponseBody"
  139 + }
  140 + }
  141 + },
  142 + "schemes": [
  143 + "http"
  144 + ]
  145 + }
  146 + },
  147 + "/config/task-types": {
  148 + "get": {
  149 + "tags": [
  150 + "config"
  151 + ],
  152 + "summary": "返回任务类型字典列表",
  153 + "description": "返回任务类型字典列表",
  154 + "operationId": "config#listTaskType",
  155 + "responses": {
  156 + "200": {
  157 + "description": "OK response.",
  158 + "schema": {
  159 + "$ref": "#/definitions/ConfigListTaskTypeResponseBody"
  160 + }
  161 + }
  162 + },
  163 + "schemes": [
  164 + "http"
  165 + ]
  166 + }
  167 + },
21 "/employees": { 168 "/employees": {
22 "get": { 169 "get": {
23 "tags": [ 170 "tags": [
@@ -28,6 +175,20 @@ @@ -28,6 +175,20 @@
28 "operationId": "employee#listEmployee", 175 "operationId": "employee#listEmployee",
29 "parameters": [ 176 "parameters": [
30 { 177 {
  178 + "name": "companyId",
  179 + "in": "query",
  180 + "description": "公司ID",
  181 + "required": false,
  182 + "type": "integer"
  183 + },
  184 + {
  185 + "name": "employeeNameMatch",
  186 + "in": "query",
  187 + "description": "员工姓名匹配",
  188 + "required": false,
  189 + "type": "string"
  190 + },
  191 + {
31 "name": "offset", 192 "name": "offset",
32 "in": "query", 193 "in": "query",
33 "description": "查询偏离量", 194 "description": "查询偏离量",
@@ -178,107 +339,20 @@ @@ -178,107 +339,20 @@
178 ] 339 ]
179 } 340 }
180 }, 341 },
181 - "/tasks": { 342 + "/off-task-records/{offTaskRecordId}": {
182 "get": { 343 "get": {
183 "tags": [ 344 "tags": [
184 - "task" 345 + "offTaskRecord"
185 ], 346 ],
186 - "summary": "返回任务列表",  
187 - "description": "返回任务列表",  
188 - "operationId": "task#listTask", 347 + "summary": "返回关闭任务记录",
  348 + "description": "返回关闭任务记录",
  349 + "operationId": "offTaskRecord#getOffTaskRecord",
189 "parameters": [ 350 "parameters": [
190 { 351 {
191 - "name": "companyId",  
192 - "in": "query",  
193 - "description": "公司ID",  
194 - "required": false,  
195 - "type": "integer"  
196 - },  
197 - {  
198 - "name": "sponsor",  
199 - "in": "query",  
200 - "description": "任务发起者",  
201 - "required": false,  
202 - "type": "integer",  
203 - "format": "int64"  
204 - },  
205 - {  
206 - "name": "taskContentMatch",  
207 - "in": "query",  
208 - "description": "任务内容匹配",  
209 - "required": false,  
210 - "type": "string"  
211 - },  
212 - {  
213 - "name": "taskType",  
214 - "in": "query",  
215 - "description": "任务类型",  
216 - "required": false,  
217 - "type": "integer"  
218 - },  
219 - {  
220 - "name": "taskStatus",  
221 - "in": "query",  
222 - "description": "任务状态",  
223 - "required": false,  
224 - "type": "integer"  
225 - },  
226 - {  
227 - "name": "customerValue",  
228 - "in": "query",  
229 - "description": "客户价值",  
230 - "required": false,  
231 - "type": "string"  
232 - },  
233 - {  
234 - "name": "taskNature",  
235 - "in": "query",  
236 - "description": "任务性质",  
237 - "required": false,  
238 - "type": "string"  
239 - },  
240 - {  
241 - "name": "isRewardTake",  
242 - "in": "query",  
243 - "description": "是否悬赏任务",  
244 - "required": false,  
245 - "type": "boolean"  
246 - },  
247 - {  
248 - "name": "bidTimeMatch",  
249 - "in": "query",  
250 - "description": "竞标时间(1全部,2已截止,3未截止)",  
251 - "required": false,  
252 - "type": "integer"  
253 - },  
254 - {  
255 - "name": "receiver",  
256 - "in": "query",  
257 - "description": "任务领取人",  
258 - "required": false,  
259 - "type": "integer",  
260 - "format": "int64"  
261 - },  
262 - {  
263 - "name": "participator",  
264 - "in": "query",  
265 - "description": "任务参与者",  
266 - "required": false,  
267 - "type": "integer",  
268 - "format": "int64"  
269 - },  
270 - {  
271 - "name": "offset",  
272 - "in": "query",  
273 - "description": "查询偏离量",  
274 - "required": false,  
275 - "type": "integer"  
276 - },  
277 - {  
278 - "name": "limit",  
279 - "in": "query",  
280 - "description": "查询限制",  
281 - "required": false, 352 + "name": "offTaskRecordId",
  353 + "in": "path",
  354 + "description": "关闭任务记录ID",
  355 + "required": true,
282 "type": "integer" 356 "type": "integer"
283 } 357 }
284 ], 358 ],
@@ -286,28 +360,30 @@ @@ -286,28 +360,30 @@
286 "200": { 360 "200": {
287 "description": "OK response.", 361 "description": "OK response.",
288 "schema": { 362 "schema": {
289 - "$ref": "#/definitions/TaskListTaskResponseBody" 363 + "$ref": "#/definitions/OffTaskRecordGetOffTaskRecordResponseBody"
290 } 364 }
291 } 365 }
292 }, 366 },
293 "schemes": [ 367 "schemes": [
294 "http" 368 "http"
295 ] 369 ]
  370 + }
296 }, 371 },
  372 + "/off-task-records/search-off-task-record": {
297 "post": { 373 "post": {
298 "tags": [ 374 "tags": [
299 - "task" 375 + "offTaskRecord"
300 ], 376 ],
301 - "summary": "创建新任务",  
302 - "description": "创建新任务",  
303 - "operationId": "task#createTask", 377 + "summary": "搜索关闭任务记录",
  378 + "description": "搜索关闭任务记录",
  379 + "operationId": "offTaskRecord#searchOffTaskRecord",
304 "parameters": [ 380 "parameters": [
305 { 381 {
306 - "name": "CreateTaskRequestBody", 382 + "name": "SearchOffTaskRecordRequestBody",
307 "in": "body", 383 "in": "body",
308 "required": true, 384 "required": true,
309 "schema": { 385 "schema": {
310 - "$ref": "#/definitions/TaskCreateTaskRequestBody" 386 + "$ref": "#/definitions/OffTaskRecordSearchOffTaskRecordRequestBody"
311 } 387 }
312 } 388 }
313 ], 389 ],
@@ -315,7 +391,7 @@ @@ -315,7 +391,7 @@
315 "200": { 391 "200": {
316 "description": "OK response.", 392 "description": "OK response.",
317 "schema": { 393 "schema": {
318 - "$ref": "#/definitions/TaskCreateTaskResponseBody" 394 + "$ref": "#/definitions/OffTaskRecordSearchOffTaskRecordResponseBody"
319 } 395 }
320 } 396 }
321 }, 397 },
@@ -324,56 +400,52 @@ @@ -324,56 +400,52 @@
324 ] 400 ]
325 } 401 }
326 }, 402 },
327 - "/tasks/{taskId}": {  
328 - "get": { 403 + "/statistics/person-su-money": {
  404 + "post": {
329 "tags": [ 405 "tags": [
330 - "task" 406 + "statistics"
331 ], 407 ],
332 - "summary": "返回任务",  
333 - "description": "返回任务",  
334 - "operationId": "task#getTask", 408 + "summary": "获取个人素币统计",
  409 + "description": "获取个人素币统计",
  410 + "operationId": "statistics#personSuMoneyStatistics",
335 "parameters": [ 411 "parameters": [
336 { 412 {
337 - "name": "taskId",  
338 - "in": "path",  
339 - "description": "任务ID", 413 + "name": "PersonSuMoneyStatisticsRequestBody",
  414 + "in": "body",
340 "required": true, 415 "required": true,
341 - "type": "integer" 416 + "schema": {
  417 + "$ref": "#/definitions/StatisticsPersonSuMoneyStatisticsRequestBody"
  418 + }
342 } 419 }
343 ], 420 ],
344 "responses": { 421 "responses": {
345 "200": { 422 "200": {
346 "description": "OK response.", 423 "description": "OK response.",
347 "schema": { 424 "schema": {
348 - "$ref": "#/definitions/TaskGetTaskResponseBody" 425 + "$ref": "#/definitions/StatisticsPersonSuMoneyStatisticsResponseBody"
349 } 426 }
350 } 427 }
351 }, 428 },
352 "schemes": [ 429 "schemes": [
353 "http" 430 "http"
354 ] 431 ]
  432 + }
355 }, 433 },
356 - "put": { 434 + "/statistics/person-task": {
  435 + "post": {
357 "tags": [ 436 "tags": [
358 - "task" 437 + "statistics"
359 ], 438 ],
360 - "summary": "更新任务",  
361 - "description": "更新任务",  
362 - "operationId": "task#updateTask", 439 + "summary": "获取个人任务统计",
  440 + "description": "获取个人任务统计",
  441 + "operationId": "statistics#personTaskStatistics",
363 "parameters": [ 442 "parameters": [
364 { 443 {
365 - "name": "taskId",  
366 - "in": "path",  
367 - "description": "任务ID",  
368 - "required": true,  
369 - "type": "integer"  
370 - },  
371 - {  
372 - "name": "UpdateTaskRequestBody", 444 + "name": "PersonTaskStatisticsRequestBody",
373 "in": "body", 445 "in": "body",
374 "required": true, 446 "required": true,
375 "schema": { 447 "schema": {
376 - "$ref": "#/definitions/TaskUpdateTaskRequestBody" 448 + "$ref": "#/definitions/StatisticsPersonTaskStatisticsRequestBody"
377 } 449 }
378 } 450 }
379 ], 451 ],
@@ -381,35 +453,38 @@ @@ -381,35 +453,38 @@
381 "200": { 453 "200": {
382 "description": "OK response.", 454 "description": "OK response.",
383 "schema": { 455 "schema": {
384 - "$ref": "#/definitions/TaskUpdateTaskResponseBody" 456 + "$ref": "#/definitions/StatisticsPersonTaskStatisticsResponseBody"
385 } 457 }
386 } 458 }
387 }, 459 },
388 "schemes": [ 460 "schemes": [
389 "http" 461 "http"
390 ] 462 ]
  463 + }
391 }, 464 },
392 - "delete": { 465 + "/statistics/system-task": {
  466 + "post": {
393 "tags": [ 467 "tags": [
394 - "task" 468 + "statistics"
395 ], 469 ],
396 - "summary": "移除任务",  
397 - "description": "移除任务",  
398 - "operationId": "task#removeTask", 470 + "summary": "获取系统任务统计",
  471 + "description": "获取系统任务统计",
  472 + "operationId": "statistics#systemTaskStatistics",
399 "parameters": [ 473 "parameters": [
400 { 474 {
401 - "name": "taskId",  
402 - "in": "path",  
403 - "description": "任务ID", 475 + "name": "SystemTaskStatisticsRequestBody",
  476 + "in": "body",
404 "required": true, 477 "required": true,
405 - "type": "integer" 478 + "schema": {
  479 + "$ref": "#/definitions/StatisticsSystemTaskStatisticsRequestBody"
  480 + }
406 } 481 }
407 ], 482 ],
408 "responses": { 483 "responses": {
409 "200": { 484 "200": {
410 "description": "OK response.", 485 "description": "OK response.",
411 "schema": { 486 "schema": {
412 - "$ref": "#/definitions/TaskRemoveTaskResponseBody" 487 + "$ref": "#/definitions/StatisticsSystemTaskStatisticsResponseBody"
413 } 488 }
414 } 489 }
415 }, 490 },
@@ -418,28 +493,21 @@ @@ -418,28 +493,21 @@
418 ] 493 ]
419 } 494 }
420 }, 495 },
421 - "/tasks/{taskId}/acceptance": { 496 + "/su-money/exchange": {
422 "post": { 497 "post": {
423 "tags": [ 498 "tags": [
424 - "task" 499 + "suMoney"
425 ], 500 ],
426 - "summary": "验收任务",  
427 - "description": "验收任务",  
428 - "operationId": "task#acceptanceTask", 501 + "summary": "素币兑换",
  502 + "description": "素币兑换",
  503 + "operationId": "suMoney#exchangeSuMoney",
429 "parameters": [ 504 "parameters": [
430 { 505 {
431 - "name": "taskId",  
432 - "in": "path",  
433 - "description": "任务ID",  
434 - "required": true,  
435 - "type": "integer"  
436 - },  
437 - {  
438 - "name": "AcceptanceTaskRequestBody", 506 + "name": "ExchangeSuMoneyRequestBody",
439 "in": "body", 507 "in": "body",
440 "required": true, 508 "required": true,
441 "schema": { 509 "schema": {
442 - "$ref": "#/definitions/TaskAcceptanceTaskRequestBody" 510 + "$ref": "#/definitions/SuMoneyExchangeSuMoneyRequestBody"
443 } 511 }
444 } 512 }
445 ], 513 ],
@@ -447,7 +515,7 @@ @@ -447,7 +515,7 @@
447 "200": { 515 "200": {
448 "description": "OK response.", 516 "description": "OK response.",
449 "schema": { 517 "schema": {
450 - "$ref": "#/definitions/TaskAcceptanceTaskResponseBody" 518 + "$ref": "#/definitions/SuMoneyExchangeSuMoneyResponseBody"
451 } 519 }
452 } 520 }
453 }, 521 },
@@ -456,28 +524,21 @@ @@ -456,28 +524,21 @@
456 ] 524 ]
457 } 525 }
458 }, 526 },
459 - "/tasks/{taskId}/apply-complete": { 527 + "/su-money/search-su-money-transaction-record": {
460 "post": { 528 "post": {
461 "tags": [ 529 "tags": [
462 - "task" 530 + "suMoney"
463 ], 531 ],
464 - "summary": "申请完成任务",  
465 - "description": "申请完成任务",  
466 - "operationId": "task#applyCompleteTask", 532 + "summary": "搜索素币事务记录",
  533 + "description": "搜索素币事务记录",
  534 + "operationId": "suMoney#searchSuMoneyTransactionRecord",
467 "parameters": [ 535 "parameters": [
468 { 536 {
469 - "name": "taskId",  
470 - "in": "path",  
471 - "description": "任务ID",  
472 - "required": true,  
473 - "type": "integer"  
474 - },  
475 - {  
476 - "name": "ApplyCompleteTaskRequestBody", 537 + "name": "SearchSuMoneyTransactionRecordRequestBody",
477 "in": "body", 538 "in": "body",
478 "required": true, 539 "required": true,
479 "schema": { 540 "schema": {
480 - "$ref": "#/definitions/TaskApplyCompleteTaskRequestBody" 541 + "$ref": "#/definitions/SuMoneySearchSuMoneyTransactionRecordRequestBody"
481 } 542 }
482 } 543 }
483 ], 544 ],
@@ -485,7 +546,7 @@ @@ -485,7 +546,7 @@
485 "200": { 546 "200": {
486 "description": "OK response.", 547 "description": "OK response.",
487 "schema": { 548 "schema": {
488 - "$ref": "#/definitions/TaskApplyCompleteTaskResponseBody" 549 + "$ref": "#/definitions/SuMoneySearchSuMoneyTransactionRecordResponseBody"
489 } 550 }
490 } 551 }
491 }, 552 },
@@ -494,28 +555,21 @@ @@ -494,28 +555,21 @@
494 ] 555 ]
495 } 556 }
496 }, 557 },
497 - "/tasks/{taskId}/bid": { 558 + "/su-money/su-money-transaction-record-statistics": {
498 "post": { 559 "post": {
499 "tags": [ 560 "tags": [
500 - "task" 561 + "suMoney"
501 ], 562 ],
502 - "summary": "对任务进行竞标",  
503 - "description": "对任务进行竞标",  
504 - "operationId": "task#bidTask", 563 + "summary": "素币事务记录统计",
  564 + "description": "素币事务记录统计",
  565 + "operationId": "suMoney#suMoneyTransactionRecordStatistics",
505 "parameters": [ 566 "parameters": [
506 { 567 {
507 - "name": "taskId",  
508 - "in": "path",  
509 - "description": "任务ID",  
510 - "required": true,  
511 - "type": "integer"  
512 - },  
513 - {  
514 - "name": "BidTaskRequestBody", 568 + "name": "SuMoneyTransactionRecordStatisticsRequestBody",
515 "in": "body", 569 "in": "body",
516 "required": true, 570 "required": true,
517 "schema": { 571 "schema": {
518 - "$ref": "#/definitions/TaskBidTaskRequestBody" 572 + "$ref": "#/definitions/SuMoneySuMoneyTransactionRecordStatisticsRequestBody"
519 } 573 }
520 } 574 }
521 ], 575 ],
@@ -523,7 +577,7 @@ @@ -523,7 +577,7 @@
523 "200": { 577 "200": {
524 "description": "OK response.", 578 "description": "OK response.",
525 "schema": { 579 "schema": {
526 - "$ref": "#/definitions/TaskBidTaskResponseBody" 580 + "$ref": "#/definitions/SuMoneySuMoneyTransactionRecordStatisticsResponseBody"
527 } 581 }
528 } 582 }
529 }, 583 },
@@ -532,28 +586,170 @@ @@ -532,28 +586,170 @@
532 ] 586 ]
533 } 587 }
534 }, 588 },
535 - "/tasks/{taskId}/choose-successful-bidder": {  
536 - "post": { 589 + "/su-money/su-money-transaction-records/{suMoneyTransactionRecordId}": {
  590 + "get": {
537 "tags": [ 591 "tags": [
538 - "task" 592 + "suMoney"
539 ], 593 ],
540 - "summary": "选择竞标任务的中标人",  
541 - "description": "选择竞标任务的中标人",  
542 - "operationId": "task#chooseSuccessfulBidder", 594 + "summary": "返回素币事务记录",
  595 + "description": "返回素币事务记录",
  596 + "operationId": "suMoney#getSuMoneyTransactionRecord",
543 "parameters": [ 597 "parameters": [
544 { 598 {
545 - "name": "taskId", 599 + "name": "suMoneyTransactionRecordId",
546 "in": "path", 600 "in": "path",
547 - "description": "任务ID", 601 + "description": "素币事务记录ID",
548 "required": true, 602 "required": true,
549 "type": "integer" 603 "type": "integer"
  604 + }
  605 + ],
  606 + "responses": {
  607 + "200": {
  608 + "description": "OK response.",
  609 + "schema": {
  610 + "$ref": "#/definitions/SuMoneyGetSuMoneyTransactionRecordResponseBody"
  611 + }
  612 + }
  613 + },
  614 + "schemes": [
  615 + "http"
  616 + ]
  617 + }
550 }, 618 },
  619 + "/tasks": {
  620 + "get": {
  621 + "tags": [
  622 + "task"
  623 + ],
  624 + "summary": "返回任务列表",
  625 + "description": "返回任务列表",
  626 + "operationId": "task#listTask",
  627 + "parameters": [
551 { 628 {
552 - "name": "ChooseSuccessfulBidderRequestBody", 629 + "name": "companyId",
  630 + "in": "query",
  631 + "description": "公司ID",
  632 + "required": false,
  633 + "type": "integer"
  634 + },
  635 + {
  636 + "name": "sponsor",
  637 + "in": "query",
  638 + "description": "任务发起者UID",
  639 + "required": false,
  640 + "type": "integer",
  641 + "format": "int64"
  642 + },
  643 + {
  644 + "name": "taskContentMatch",
  645 + "in": "query",
  646 + "description": "任务内容匹配",
  647 + "required": false,
  648 + "type": "string"
  649 + },
  650 + {
  651 + "name": "taskType",
  652 + "in": "query",
  653 + "description": "任务类型",
  654 + "required": false,
  655 + "type": "integer"
  656 + },
  657 + {
  658 + "name": "taskStatus",
  659 + "in": "query",
  660 + "description": "任务状态",
  661 + "required": false,
  662 + "type": "integer"
  663 + },
  664 + {
  665 + "name": "customerValue",
  666 + "in": "query",
  667 + "description": "客户价值",
  668 + "required": false,
  669 + "type": "array",
  670 + "items": {
  671 + "type": "string"
  672 + },
  673 + "collectionFormat": "multi"
  674 + },
  675 + {
  676 + "name": "taskNature",
  677 + "in": "query",
  678 + "description": "任务性质",
  679 + "required": false,
  680 + "type": "string"
  681 + },
  682 + {
  683 + "name": "isRewardTake",
  684 + "in": "query",
  685 + "description": "是否悬赏任务",
  686 + "required": false,
  687 + "type": "boolean"
  688 + },
  689 + {
  690 + "name": "bidTimeMatch",
  691 + "in": "query",
  692 + "description": "竞标时间(1全部,2已截止,3未截止)",
  693 + "required": false,
  694 + "type": "integer"
  695 + },
  696 + {
  697 + "name": "receiver",
  698 + "in": "query",
  699 + "description": "任务领取人UID",
  700 + "required": false,
  701 + "type": "integer",
  702 + "format": "int64"
  703 + },
  704 + {
  705 + "name": "participator",
  706 + "in": "query",
  707 + "description": "任务参与者UID",
  708 + "required": false,
  709 + "type": "integer",
  710 + "format": "int64"
  711 + },
  712 + {
  713 + "name": "offset",
  714 + "in": "query",
  715 + "description": "查询偏离量",
  716 + "required": false,
  717 + "type": "integer"
  718 + },
  719 + {
  720 + "name": "limit",
  721 + "in": "query",
  722 + "description": "查询限制",
  723 + "required": false,
  724 + "type": "integer"
  725 + }
  726 + ],
  727 + "responses": {
  728 + "200": {
  729 + "description": "OK response.",
  730 + "schema": {
  731 + "$ref": "#/definitions/TaskListTaskResponseBody"
  732 + }
  733 + }
  734 + },
  735 + "schemes": [
  736 + "http"
  737 + ]
  738 + },
  739 + "post": {
  740 + "tags": [
  741 + "task"
  742 + ],
  743 + "summary": "创建新任务",
  744 + "description": "创建新任务",
  745 + "operationId": "task#createTask",
  746 + "parameters": [
  747 + {
  748 + "name": "CreateTaskRequestBody",
553 "in": "body", 749 "in": "body",
554 "required": true, 750 "required": true,
555 "schema": { 751 "schema": {
556 - "$ref": "#/definitions/TaskChooseSuccessfulBidderRequestBody" 752 + "$ref": "#/definitions/TaskCreateTaskRequestBody"
557 } 753 }
558 } 754 }
559 ], 755 ],
@@ -561,7 +757,7 @@ @@ -561,7 +757,7 @@
561 "200": { 757 "200": {
562 "description": "OK response.", 758 "description": "OK response.",
563 "schema": { 759 "schema": {
564 - "$ref": "#/definitions/TaskChooseSuccessfulBidderResponseBody" 760 + "$ref": "#/definitions/TaskCreateTaskResponseBody"
565 } 761 }
566 } 762 }
567 }, 763 },
@@ -570,14 +766,14 @@ @@ -570,14 +766,14 @@
570 ] 766 ]
571 } 767 }
572 }, 768 },
573 - "/tasks/{taskId}/dff": {  
574 - "post": { 769 + "/tasks/{taskId}": {
  770 + "get": {
575 "tags": [ 771 "tags": [
576 "task" 772 "task"
577 ], 773 ],
578 - "summary": "关闭任务",  
579 - "description": "关闭任务",  
580 - "operationId": "task#offTask", 774 + "summary": "返回任务",
  775 + "description": "返回任务",
  776 + "operationId": "task#getTask",
581 "parameters": [ 777 "parameters": [
582 { 778 {
583 "name": "taskId", 779 "name": "taskId",
@@ -585,37 +781,27 @@ @@ -585,37 +781,27 @@
585 "description": "任务ID", 781 "description": "任务ID",
586 "required": true, 782 "required": true,
587 "type": "integer" 783 "type": "integer"
588 - },  
589 - {  
590 - "name": "OffTaskRequestBody",  
591 - "in": "body",  
592 - "required": true,  
593 - "schema": {  
594 - "$ref": "#/definitions/TaskOffTaskRequestBody"  
595 - }  
596 } 784 }
597 ], 785 ],
598 "responses": { 786 "responses": {
599 "200": { 787 "200": {
600 "description": "OK response.", 788 "description": "OK response.",
601 "schema": { 789 "schema": {
602 - "$ref": "#/definitions/TaskOffTaskResponseBody" 790 + "$ref": "#/definitions/TaskGetTaskResponseBody"
603 } 791 }
604 } 792 }
605 }, 793 },
606 "schemes": [ 794 "schemes": [
607 "http" 795 "http"
608 ] 796 ]
609 - }  
610 }, 797 },
611 - "/tasks/{taskId}/release": {  
612 - "post": { 798 + "put": {
613 "tags": [ 799 "tags": [
614 "task" 800 "task"
615 ], 801 ],
616 - "summary": "发布任务",  
617 - "description": "发布任务",  
618 - "operationId": "task#releaseTask", 802 + "summary": "更新任务",
  803 + "description": "更新任务",
  804 + "operationId": "task#updateTask",
619 "parameters": [ 805 "parameters": [
620 { 806 {
621 "name": "taskId", 807 "name": "taskId",
@@ -625,11 +811,11 @@ @@ -625,11 +811,11 @@
625 "type": "integer" 811 "type": "integer"
626 }, 812 },
627 { 813 {
628 - "name": "ReleaseTaskRequestBody", 814 + "name": "UpdateTaskRequestBody",
629 "in": "body", 815 "in": "body",
630 "required": true, 816 "required": true,
631 "schema": { 817 "schema": {
632 - "$ref": "#/definitions/TaskReleaseTaskRequestBody" 818 + "$ref": "#/definitions/TaskUpdateTaskRequestBody"
633 } 819 }
634 } 820 }
635 ], 821 ],
@@ -637,23 +823,241 @@ @@ -637,23 +823,241 @@
637 "200": { 823 "200": {
638 "description": "OK response.", 824 "description": "OK response.",
639 "schema": { 825 "schema": {
640 - "$ref": "#/definitions/TaskReleaseTaskResponseBody" 826 + "$ref": "#/definitions/TaskUpdateTaskResponseBody"
641 } 827 }
642 } 828 }
643 }, 829 },
644 "schemes": [ 830 "schemes": [
645 "http" 831 "http"
646 ] 832 ]
647 - }  
648 }, 833 },
649 - "/tasks/{taskId}/rob": {  
650 - "post": { 834 + "delete": {
651 "tags": [ 835 "tags": [
652 "task" 836 "task"
653 ], 837 ],
654 - "summary": "对任务进行抢单",  
655 - "description": "对任务进行抢单",  
656 - "operationId": "task#robTask", 838 + "summary": "移除任务",
  839 + "description": "移除任务",
  840 + "operationId": "task#removeTask",
  841 + "parameters": [
  842 + {
  843 + "name": "taskId",
  844 + "in": "path",
  845 + "description": "任务ID",
  846 + "required": true,
  847 + "type": "integer"
  848 + }
  849 + ],
  850 + "responses": {
  851 + "200": {
  852 + "description": "OK response.",
  853 + "schema": {
  854 + "$ref": "#/definitions/TaskRemoveTaskResponseBody"
  855 + }
  856 + }
  857 + },
  858 + "schemes": [
  859 + "http"
  860 + ]
  861 + }
  862 + },
  863 + "/tasks/{taskId}/acceptance": {
  864 + "post": {
  865 + "tags": [
  866 + "task"
  867 + ],
  868 + "summary": "验收任务",
  869 + "description": "验收任务",
  870 + "operationId": "task#acceptanceTask",
  871 + "parameters": [
  872 + {
  873 + "name": "taskId",
  874 + "in": "path",
  875 + "description": "任务ID",
  876 + "required": true,
  877 + "type": "integer"
  878 + },
  879 + {
  880 + "name": "AcceptanceTaskRequestBody",
  881 + "in": "body",
  882 + "required": true,
  883 + "schema": {
  884 + "$ref": "#/definitions/TaskAcceptanceTaskRequestBody"
  885 + }
  886 + }
  887 + ],
  888 + "responses": {
  889 + "200": {
  890 + "description": "OK response.",
  891 + "schema": {
  892 + "$ref": "#/definitions/TaskAcceptanceTaskResponseBody"
  893 + }
  894 + }
  895 + },
  896 + "schemes": [
  897 + "http"
  898 + ]
  899 + }
  900 + },
  901 + "/tasks/{taskId}/apply-complete": {
  902 + "post": {
  903 + "tags": [
  904 + "task"
  905 + ],
  906 + "summary": "申请完成任务",
  907 + "description": "申请完成任务",
  908 + "operationId": "task#applyCompleteTask",
  909 + "parameters": [
  910 + {
  911 + "name": "taskId",
  912 + "in": "path",
  913 + "description": "任务ID",
  914 + "required": true,
  915 + "type": "integer"
  916 + },
  917 + {
  918 + "name": "ApplyCompleteTaskRequestBody",
  919 + "in": "body",
  920 + "required": true,
  921 + "schema": {
  922 + "$ref": "#/definitions/TaskApplyCompleteTaskRequestBody"
  923 + }
  924 + }
  925 + ],
  926 + "responses": {
  927 + "200": {
  928 + "description": "OK response.",
  929 + "schema": {
  930 + "$ref": "#/definitions/TaskApplyCompleteTaskResponseBody"
  931 + }
  932 + }
  933 + },
  934 + "schemes": [
  935 + "http"
  936 + ]
  937 + }
  938 + },
  939 + "/tasks/{taskId}/bid": {
  940 + "post": {
  941 + "tags": [
  942 + "task"
  943 + ],
  944 + "summary": "对任务进行竞标",
  945 + "description": "对任务进行竞标",
  946 + "operationId": "task#bidTask",
  947 + "parameters": [
  948 + {
  949 + "name": "taskId",
  950 + "in": "path",
  951 + "description": "任务ID",
  952 + "required": true,
  953 + "type": "integer"
  954 + },
  955 + {
  956 + "name": "BidTaskRequestBody",
  957 + "in": "body",
  958 + "required": true,
  959 + "schema": {
  960 + "$ref": "#/definitions/TaskBidTaskRequestBody"
  961 + }
  962 + }
  963 + ],
  964 + "responses": {
  965 + "200": {
  966 + "description": "OK response.",
  967 + "schema": {
  968 + "$ref": "#/definitions/TaskBidTaskResponseBody"
  969 + }
  970 + }
  971 + },
  972 + "schemes": [
  973 + "http"
  974 + ]
  975 + }
  976 + },
  977 + "/tasks/{taskId}/choose-successful-bidder": {
  978 + "post": {
  979 + "tags": [
  980 + "task"
  981 + ],
  982 + "summary": "选择竞标任务的中标人",
  983 + "description": "选择竞标任务的中标人",
  984 + "operationId": "task#chooseSuccessfulBidder",
  985 + "parameters": [
  986 + {
  987 + "name": "taskId",
  988 + "in": "path",
  989 + "description": "任务ID",
  990 + "required": true,
  991 + "type": "integer"
  992 + },
  993 + {
  994 + "name": "ChooseSuccessfulBidderRequestBody",
  995 + "in": "body",
  996 + "required": true,
  997 + "schema": {
  998 + "$ref": "#/definitions/TaskChooseSuccessfulBidderRequestBody"
  999 + }
  1000 + }
  1001 + ],
  1002 + "responses": {
  1003 + "200": {
  1004 + "description": "OK response.",
  1005 + "schema": {
  1006 + "$ref": "#/definitions/TaskChooseSuccessfulBidderResponseBody"
  1007 + }
  1008 + }
  1009 + },
  1010 + "schemes": [
  1011 + "http"
  1012 + ]
  1013 + }
  1014 + },
  1015 + "/tasks/{taskId}/dff": {
  1016 + "post": {
  1017 + "tags": [
  1018 + "task"
  1019 + ],
  1020 + "summary": "关闭任务",
  1021 + "description": "关闭任务",
  1022 + "operationId": "task#offTask",
  1023 + "parameters": [
  1024 + {
  1025 + "name": "taskId",
  1026 + "in": "path",
  1027 + "description": "任务ID",
  1028 + "required": true,
  1029 + "type": "integer"
  1030 + },
  1031 + {
  1032 + "name": "OffTaskRequestBody",
  1033 + "in": "body",
  1034 + "required": true,
  1035 + "schema": {
  1036 + "$ref": "#/definitions/TaskOffTaskRequestBody"
  1037 + }
  1038 + }
  1039 + ],
  1040 + "responses": {
  1041 + "200": {
  1042 + "description": "OK response.",
  1043 + "schema": {
  1044 + "$ref": "#/definitions/TaskOffTaskResponseBody"
  1045 + }
  1046 + }
  1047 + },
  1048 + "schemes": [
  1049 + "http"
  1050 + ]
  1051 + }
  1052 + },
  1053 + "/tasks/{taskId}/release": {
  1054 + "post": {
  1055 + "tags": [
  1056 + "task"
  1057 + ],
  1058 + "summary": "发布任务",
  1059 + "description": "发布任务",
  1060 + "operationId": "task#releaseTask",
657 "parameters": [ 1061 "parameters": [
658 { 1062 {
659 "name": "taskId", 1063 "name": "taskId",
@@ -662,146 +1066,615 @@ @@ -662,146 +1066,615 @@
662 "required": true, 1066 "required": true,
663 "type": "integer" 1067 "type": "integer"
664 }, 1068 },
665 - {  
666 - "name": "RobTaskRequestBody",  
667 - "in": "body",  
668 - "required": true,  
669 - "schema": {  
670 - "$ref": "#/definitions/TaskRobTaskRequestBody" 1069 + {
  1070 + "name": "ReleaseTaskRequestBody",
  1071 + "in": "body",
  1072 + "required": true,
  1073 + "schema": {
  1074 + "$ref": "#/definitions/TaskReleaseTaskRequestBody"
  1075 + }
  1076 + }
  1077 + ],
  1078 + "responses": {
  1079 + "200": {
  1080 + "description": "OK response.",
  1081 + "schema": {
  1082 + "$ref": "#/definitions/TaskReleaseTaskResponseBody"
  1083 + }
  1084 + }
  1085 + },
  1086 + "schemes": [
  1087 + "http"
  1088 + ]
  1089 + }
  1090 + },
  1091 + "/tasks/{taskId}/rob": {
  1092 + "post": {
  1093 + "tags": [
  1094 + "task"
  1095 + ],
  1096 + "summary": "对任务进行抢单",
  1097 + "description": "对任务进行抢单",
  1098 + "operationId": "task#robTask",
  1099 + "parameters": [
  1100 + {
  1101 + "name": "taskId",
  1102 + "in": "path",
  1103 + "description": "任务ID",
  1104 + "required": true,
  1105 + "type": "integer"
  1106 + },
  1107 + {
  1108 + "name": "RobTaskRequestBody",
  1109 + "in": "body",
  1110 + "required": true,
  1111 + "schema": {
  1112 + "$ref": "#/definitions/TaskRobTaskRequestBody"
  1113 + }
  1114 + }
  1115 + ],
  1116 + "responses": {
  1117 + "200": {
  1118 + "description": "OK response.",
  1119 + "schema": {
  1120 + "$ref": "#/definitions/TaskRobTaskResponseBody"
  1121 + }
  1122 + }
  1123 + },
  1124 + "schemes": [
  1125 + "http"
  1126 + ]
  1127 + }
  1128 + },
  1129 + "/tasks/search": {
  1130 + "post": {
  1131 + "tags": [
  1132 + "task"
  1133 + ],
  1134 + "summary": "搜索任务",
  1135 + "description": "搜索任务",
  1136 + "operationId": "task#searchTask",
  1137 + "parameters": [
  1138 + {
  1139 + "name": "SearchTaskRequestBody",
  1140 + "in": "body",
  1141 + "required": true,
  1142 + "schema": {
  1143 + "$ref": "#/definitions/TaskSearchTaskRequestBody"
  1144 + }
  1145 + }
  1146 + ],
  1147 + "responses": {
  1148 + "200": {
  1149 + "description": "OK response.",
  1150 + "schema": {
  1151 + "$ref": "#/definitions/TaskSearchTaskResponseBody"
  1152 + }
  1153 + }
  1154 + },
  1155 + "schemes": [
  1156 + "http"
  1157 + ]
  1158 + }
  1159 + },
  1160 + "/tasks/search-off-task-record": {
  1161 + "post": {
  1162 + "tags": [
  1163 + "task"
  1164 + ],
  1165 + "summary": "搜索关闭任务记录",
  1166 + "description": "搜索关闭任务记录",
  1167 + "operationId": "task#searchOffTaskRecord",
  1168 + "parameters": [
  1169 + {
  1170 + "name": "SearchOffTaskRecordRequestBody",
  1171 + "in": "body",
  1172 + "required": true,
  1173 + "schema": {
  1174 + "$ref": "#/definitions/TaskSearchOffTaskRecordRequestBody"
  1175 + }
  1176 + }
  1177 + ],
  1178 + "responses": {
  1179 + "200": {
  1180 + "description": "OK response.",
  1181 + "schema": {
  1182 + "$ref": "#/definitions/TaskSearchOffTaskRecordResponseBody"
  1183 + }
  1184 + }
  1185 + },
  1186 + "schemes": [
  1187 + "http"
  1188 + ]
  1189 + }
  1190 + }
  1191 + },
  1192 + "definitions": {
  1193 + "ConfigListBidTimeMatchResponseBody": {
  1194 + "title": "Mediatype identifier: ConfigListBidTimeMatchResponseBody",
  1195 + "type": "object",
  1196 + "properties": {
  1197 + "bidTimeMatchs": {
  1198 + "type": "array",
  1199 + "items": {
  1200 + "$ref": "#/definitions/configResponseBody"
  1201 + }
  1202 + }
  1203 + }
  1204 + },
  1205 + "ConfigListCustomerValueResponseBody": {
  1206 + "title": "Mediatype identifier: ConfigListCustomerValueResponseBody",
  1207 + "type": "object",
  1208 + "properties": {
  1209 + "customerValues": {
  1210 + "type": "array",
  1211 + "items": {
  1212 + "$ref": "#/definitions/configResponseBody"
  1213 + }
  1214 + }
  1215 + }
  1216 + },
  1217 + "ConfigListEmployeePermissionResponseBody": {
  1218 + "title": "Mediatype identifier: ConfigListEmployeePermissionResponseBody",
  1219 + "type": "object",
  1220 + "properties": {
  1221 + "employeePermissions": {
  1222 + "type": "array",
  1223 + "items": {
  1224 + "$ref": "#/definitions/configResponseBody"
  1225 + }
  1226 + }
  1227 + }
  1228 + },
  1229 + "ConfigListReferenceResourceTypeResponseBody": {
  1230 + "title": "Mediatype identifier: ConfigListReferenceResourceTypeResponseBody",
  1231 + "type": "object",
  1232 + "properties": {
  1233 + "referenceResourceTypes": {
  1234 + "type": "array",
  1235 + "items": {
  1236 + "$ref": "#/definitions/configResponseBody"
  1237 + }
  1238 + }
  1239 + }
  1240 + },
  1241 + "ConfigListTaskNatureResponseBody": {
  1242 + "title": "Mediatype identifier: ConfigListTaskNatureResponseBody",
  1243 + "type": "object",
  1244 + "properties": {
  1245 + "taskNatures": {
  1246 + "type": "array",
  1247 + "items": {
  1248 + "$ref": "#/definitions/configResponseBody"
  1249 + }
  1250 + }
  1251 + }
  1252 + },
  1253 + "ConfigListTaskStatusResponseBody": {
  1254 + "title": "Mediatype identifier: ConfigListTaskStatusResponseBody",
  1255 + "type": "object",
  1256 + "properties": {
  1257 + "taskStatuses": {
  1258 + "type": "array",
  1259 + "items": {
  1260 + "$ref": "#/definitions/configResponseBody"
  1261 + }
  1262 + }
  1263 + }
  1264 + },
  1265 + "ConfigListTaskTypeResponseBody": {
  1266 + "title": "Mediatype identifier: ConfigListTaskTypeResponseBody",
  1267 + "type": "object",
  1268 + "properties": {
  1269 + "taskTypes": {
  1270 + "type": "array",
  1271 + "items": {
  1272 + "$ref": "#/definitions/configResponseBody"
  1273 + }
  1274 + }
  1275 + }
  1276 + },
  1277 + "EmployeeCreateEmployeeRequestBody": {
  1278 + "title": "EmployeeCreateEmployeeRequestBody",
  1279 + "type": "object",
  1280 + "properties": {
  1281 + "employeeAccount": {
  1282 + "type": "string",
  1283 + "description": "员工账号"
  1284 + },
  1285 + "employeeAvatarUrl": {
  1286 + "type": "string",
  1287 + "description": "员工头像URL"
  1288 + },
  1289 + "employeeName": {
  1290 + "type": "string",
  1291 + "description": "员工姓名"
  1292 + },
  1293 + "uid": {
  1294 + "type": "integer",
  1295 + "description": "统一用户UID",
  1296 + "required": [
  1297 + "uid"
  1298 + ]
  1299 + }
  1300 + }
  1301 + },
  1302 + "EmployeeCreateEmployeeResponseBody": {
  1303 + "title": "Mediatype identifier: EmployeeCreateEmployeeResponseBody",
  1304 + "type": "object",
  1305 + "properties": {
  1306 + "employee": {
  1307 + "$ref": "#/definitions/employeeResponseBody"
  1308 + }
  1309 + }
  1310 + },
  1311 + "EmployeeGetEmployeeResponseBody": {
  1312 + "title": "Mediatype identifier: EmployeeGetEmployeeResponseBody",
  1313 + "type": "object",
  1314 + "properties": {
  1315 + "employee": {
  1316 + "$ref": "#/definitions/employeeResponseBody"
  1317 + }
  1318 + }
  1319 + },
  1320 + "EmployeeListEmployeeResponseBody": {
  1321 + "title": "Mediatype identifier: EmployeeListEmployeeResponseBody",
  1322 + "type": "object",
  1323 + "properties": {
  1324 + "count": {
  1325 + "type": "integer",
  1326 + "description": "结果总数",
  1327 + "format": "int64"
  1328 + },
  1329 + "employees": {
  1330 + "type": "array",
  1331 + "items": {
  1332 + "$ref": "#/definitions/employeeResponseBody"
  1333 + }
  1334 + }
  1335 + }
  1336 + },
  1337 + "EmployeeRemoveEmployeeResponseBody": {
  1338 + "title": "Mediatype identifier: EmployeeRemoveEmployeeResponseBody",
  1339 + "type": "object",
  1340 + "properties": {
  1341 + "employee": {
  1342 + "$ref": "#/definitions/employeeResponseBody"
  1343 + }
  1344 + }
  1345 + },
  1346 + "EmployeeUpdateEmployeeRequestBody": {
  1347 + "title": "EmployeeUpdateEmployeeRequestBody",
  1348 + "type": "object",
  1349 + "properties": {
  1350 + "employeeAccount": {
  1351 + "type": "string",
  1352 + "description": "员工账号"
  1353 + },
  1354 + "employeeAvatarUrl": {
  1355 + "type": "string",
  1356 + "description": "员工头像URL"
  1357 + },
  1358 + "employeeName": {
  1359 + "type": "string",
  1360 + "description": "员工姓名"
  1361 + },
  1362 + "permissions": {
  1363 + "type": "array",
  1364 + "items": {
  1365 + "type": "integer",
  1366 + "format": "int64"
  1367 + },
  1368 + "description": "员工权限集合"
  1369 + }
  1370 + }
  1371 + },
  1372 + "EmployeeUpdateEmployeeResponseBody": {
  1373 + "title": "Mediatype identifier: EmployeeUpdateEmployeeResponseBody",
  1374 + "type": "object",
  1375 + "properties": {
  1376 + "employee": {
  1377 + "$ref": "#/definitions/employeeResponseBody"
  1378 + }
  1379 + }
  1380 + },
  1381 + "OffTaskRecordGetOffTaskRecordResponseBody": {
  1382 + "title": "Mediatype identifier: OffTaskRecordGetOffTaskRecordResponseBody",
  1383 + "type": "object",
  1384 + "properties": {
  1385 + "offTaskRecord": {
  1386 + "$ref": "#/definitions/offTaskRecordResponseBody"
  1387 + }
  1388 + }
  1389 + },
  1390 + "OffTaskRecordSearchOffTaskRecordRequestBody": {
  1391 + "title": "OffTaskRecordSearchOffTaskRecordRequestBody",
  1392 + "type": "object",
  1393 + "properties": {
  1394 + "companyId": {
  1395 + "type": "integer",
  1396 + "description": "公司ID",
  1397 + "required": [
  1398 + "companyId"
  1399 + ]
  1400 + },
  1401 + "customerValue": {
  1402 + "type": "array",
  1403 + "items": {
  1404 + "type": "string"
  1405 + },
  1406 + "description": "客户价值"
  1407 + },
  1408 + "limit": {
  1409 + "type": "integer",
  1410 + "description": "查询限制",
  1411 + "format": "int64"
  1412 + },
  1413 + "offEndTime": {
  1414 + "type": "string",
  1415 + "description": "关闭任务时间区间-截止时间",
  1416 + "format": "datetime"
  1417 + },
  1418 + "offStartTime": {
  1419 + "type": "string",
  1420 + "description": "关闭任务时间区间-开始时间",
  1421 + "format": "datetime"
  1422 + },
  1423 + "offset": {
  1424 + "type": "integer",
  1425 + "description": "查询偏离量",
  1426 + "format": "int64"
  1427 + },
  1428 + "taskContentMatch": {
  1429 + "type": "string",
  1430 + "description": "任务内容匹配"
  1431 + },
  1432 + "taskNature": {
  1433 + "type": "string",
  1434 + "description": "任务性质"
  1435 + },
  1436 + "taskType": {
  1437 + "type": "integer",
  1438 + "description": "任务类型",
  1439 + "format": "int64"
  1440 + }
  1441 + }
  1442 + },
  1443 + "OffTaskRecordSearchOffTaskRecordResponseBody": {
  1444 + "title": "Mediatype identifier: OffTaskRecordSearchOffTaskRecordResponseBody",
  1445 + "type": "object",
  1446 + "properties": {
  1447 + "count": {
  1448 + "type": "integer",
  1449 + "description": "结果总数",
  1450 + "format": "int64"
  1451 + },
  1452 + "offTaskRecords": {
  1453 + "type": "array",
  1454 + "items": {
  1455 + "$ref": "#/definitions/offTaskRecordResponseBody"
  1456 + }
  1457 + }
  1458 + }
  1459 + },
  1460 + "StatisticsPersonSuMoneyStatisticsRequestBody": {
  1461 + "title": "StatisticsPersonSuMoneyStatisticsRequestBody",
  1462 + "type": "object",
  1463 + "properties": {
  1464 + "uid": {
  1465 + "type": "integer",
  1466 + "description": "统一用户UID",
  1467 + "required": [
  1468 + "uid"
  1469 + ]
671 } 1470 }
672 } 1471 }
673 - ],  
674 - "responses": {  
675 - "200": {  
676 - "description": "OK response.",  
677 - "schema": {  
678 - "$ref": "#/definitions/TaskRobTaskResponseBody" 1472 + },
  1473 + "StatisticsPersonSuMoneyStatisticsResponseBody": {
  1474 + "title": "Mediatype identifier: StatisticsPersonSuMoneyStatisticsResponseBody",
  1475 + "type": "object",
  1476 + "properties": {
  1477 + "personSuMoneyStatistics": {
  1478 + "$ref": "#/definitions/personSuMoneyStatisticsResponseBody"
679 } 1479 }
680 } 1480 }
681 }, 1481 },
682 - "schemes": [  
683 - "http" 1482 + "StatisticsPersonTaskStatisticsRequestBody": {
  1483 + "title": "StatisticsPersonTaskStatisticsRequestBody",
  1484 + "type": "object",
  1485 + "properties": {
  1486 + "uid": {
  1487 + "type": "integer",
  1488 + "description": "统一用户UID",
  1489 + "required": [
  1490 + "uid"
684 ] 1491 ]
685 } 1492 }
  1493 + }
686 }, 1494 },
687 - "/tasks/search": {  
688 - "post": {  
689 - "tags": [  
690 - "task"  
691 - ],  
692 - "summary": "搜索任务",  
693 - "description": "搜索任务",  
694 - "operationId": "task#searchTask",  
695 - "parameters": [  
696 - {  
697 - "name": "SearchTaskRequestBody",  
698 - "in": "body",  
699 - "required": true,  
700 - "schema": {  
701 - "$ref": "#/definitions/TaskSearchTaskRequestBody" 1495 + "StatisticsPersonTaskStatisticsResponseBody": {
  1496 + "title": "Mediatype identifier: StatisticsPersonTaskStatisticsResponseBody",
  1497 + "type": "object",
  1498 + "properties": {
  1499 + "personTaskStatistics": {
  1500 + "$ref": "#/definitions/personTaskStatisticsResponseBody"
702 } 1501 }
703 } 1502 }
704 - ],  
705 - "responses": {  
706 - "200": {  
707 - "description": "OK response.",  
708 - "schema": {  
709 - "$ref": "#/definitions/TaskSearchTaskResponseBody" 1503 + },
  1504 + "StatisticsSystemTaskStatisticsRequestBody": {
  1505 + "title": "StatisticsSystemTaskStatisticsRequestBody",
  1506 + "type": "object",
  1507 + "properties": {
  1508 + "companyId": {
  1509 + "type": "integer",
  1510 + "description": "公司ID",
  1511 + "required": [
  1512 + "companyId"
  1513 + ]
710 } 1514 }
711 } 1515 }
712 }, 1516 },
713 - "schemes": [  
714 - "http"  
715 - ] 1517 + "StatisticsSystemTaskStatisticsResponseBody": {
  1518 + "title": "Mediatype identifier: StatisticsSystemTaskStatisticsResponseBody",
  1519 + "type": "object",
  1520 + "properties": {
  1521 + "systemTaskStatistics": {
  1522 + "$ref": "#/definitions/systemTaskStatisticsResponseBody"
716 } 1523 }
717 } 1524 }
718 }, 1525 },
719 - "definitions": {  
720 - "EmployeeCreateEmployeeRequestBody": {  
721 - "title": "EmployeeCreateEmployeeRequestBody", 1526 + "SuMoneyExchangeSuMoneyRequestBody": {
  1527 + "title": "SuMoneyExchangeSuMoneyRequestBody",
722 "type": "object", 1528 "type": "object",
723 "properties": { 1529 "properties": {
724 - "employeeAccount": { 1530 + "exchangeDescription": {
725 "type": "string", 1531 "type": "string",
726 - "description": "员工账号" 1532 + "description": "兑换描述",
  1533 + "required": [
  1534 + "exchangeDescription"
  1535 + ]
727 }, 1536 },
728 - "employeeName": {  
729 - "type": "string",  
730 - "description": "员工姓名" 1537 + "operator": {
  1538 + "type": "integer",
  1539 + "description": "操作人UID",
  1540 + "format": "int64"
  1541 + },
  1542 + "suMoney": {
  1543 + "type": "number",
  1544 + "description": "素币值",
  1545 + "required": [
  1546 + "suMoney"
  1547 + ]
731 }, 1548 },
732 "uid": { 1549 "uid": {
733 "type": "integer", 1550 "type": "integer",
734 - "description": "统一用户UID", 1551 + "description": "兑换人UID",
735 "required": [ 1552 "required": [
736 "uid" 1553 "uid"
737 ] 1554 ]
738 } 1555 }
739 } 1556 }
740 }, 1557 },
741 - "EmployeeCreateEmployeeResponseBody": {  
742 - "title": "Mediatype identifier: EmployeeCreateEmployeeResponseBody", 1558 + "SuMoneyExchangeSuMoneyResponseBody": {
  1559 + "title": "Mediatype identifier: SuMoneyExchangeSuMoneyResponseBody",
743 "type": "object", 1560 "type": "object",
744 "properties": { 1561 "properties": {
745 - "employee": {  
746 - "$ref": "#/definitions/employeeResponseBody" 1562 + "suMoneyTransactionRecord": {
  1563 + "$ref": "#/definitions/suMoneyTransactionRecordResponseBody"
747 } 1564 }
748 } 1565 }
749 }, 1566 },
750 - "EmployeeGetEmployeeResponseBody": {  
751 - "title": "Mediatype identifier: EmployeeGetEmployeeResponseBody", 1567 + "SuMoneyGetSuMoneyTransactionRecordResponseBody": {
  1568 + "title": "Mediatype identifier: SuMoneyGetSuMoneyTransactionRecordResponseBody",
752 "type": "object", 1569 "type": "object",
753 "properties": { 1570 "properties": {
754 - "employee": {  
755 - "$ref": "#/definitions/employeeResponseBody" 1571 + "suMoneyTransactionRecord": {
  1572 + "$ref": "#/definitions/suMoneyTransactionRecordResponseBody"
756 } 1573 }
757 } 1574 }
758 }, 1575 },
759 - "EmployeeListEmployeeResponseBody": {  
760 - "title": "Mediatype identifier: EmployeeListEmployeeResponseBody", 1576 + "SuMoneySearchSuMoneyTransactionRecordRequestBody": {
  1577 + "title": "SuMoneySearchSuMoneyTransactionRecordRequestBody",
761 "type": "object", 1578 "type": "object",
762 "properties": { 1579 "properties": {
763 - "count": { 1580 + "limit": {
764 "type": "integer", 1581 "type": "integer",
765 - "description": "结果总数", 1582 + "description": "查询限制",
766 "format": "int64" 1583 "format": "int64"
767 }, 1584 },
768 - "employees": {  
769 - "type": "array",  
770 - "items": {  
771 - "$ref": "#/definitions/employeeResponseBody"  
772 - } 1585 + "offset": {
  1586 + "type": "integer",
  1587 + "description": "查询偏离量",
  1588 + "format": "int64"
  1589 + },
  1590 + "operator": {
  1591 + "type": "integer",
  1592 + "description": "操作人UID",
  1593 + "format": "int64"
  1594 + },
  1595 + "recordType": {
  1596 + "type": "integer",
  1597 + "description": "记录类型(1兑换,2任务奖励)",
  1598 + "required": [
  1599 + "recordType"
  1600 + ]
  1601 + },
  1602 + "transactionEndTime": {
  1603 + "type": "string",
  1604 + "description": "事务时间区间-截止时间",
  1605 + "format": "datetime"
  1606 + },
  1607 + "transactionStartTime": {
  1608 + "type": "string",
  1609 + "description": "事务时间区间-开始时间",
  1610 + "format": "datetime"
  1611 + },
  1612 + "uid": {
  1613 + "type": "integer",
  1614 + "description": "统一用户UID",
  1615 + "required": [
  1616 + "uid"
  1617 + ]
773 } 1618 }
774 } 1619 }
775 }, 1620 },
776 - "EmployeeRemoveEmployeeResponseBody": {  
777 - "title": "Mediatype identifier: EmployeeRemoveEmployeeResponseBody", 1621 + "SuMoneySearchSuMoneyTransactionRecordResponseBody": {
  1622 + "title": "Mediatype identifier: SuMoneySearchSuMoneyTransactionRecordResponseBody",
778 "type": "object", 1623 "type": "object",
779 "properties": { 1624 "properties": {
780 - "employee": {  
781 - "$ref": "#/definitions/employeeResponseBody" 1625 + "count": {
  1626 + "type": "integer",
  1627 + "description": "结果总数",
  1628 + "format": "int64"
  1629 + },
  1630 + "suMoneyTransactionRecords": {
  1631 + "type": "array",
  1632 + "items": {
  1633 + "$ref": "#/definitions/suMoneyTransactionRecordResponseBody"
  1634 + }
782 } 1635 }
783 } 1636 }
784 }, 1637 },
785 - "EmployeeUpdateEmployeeRequestBody": {  
786 - "title": "EmployeeUpdateEmployeeRequestBody", 1638 + "SuMoneySuMoneyTransactionRecordStatisticsRequestBody": {
  1639 + "title": "SuMoneySuMoneyTransactionRecordStatisticsRequestBody",
787 "type": "object", 1640 "type": "object",
788 "properties": { 1641 "properties": {
789 - "employeeAccount": { 1642 + "transactionEndTime": {
790 "type": "string", 1643 "type": "string",
791 - "description": "员工账号" 1644 + "description": "事务时间区间-截止时间",
  1645 + "format": "datetime"
792 }, 1646 },
793 - "employeeName": { 1647 + "transactionStartTime": {
794 "type": "string", 1648 "type": "string",
795 - "description": "员工姓名" 1649 + "description": "事务时间区间-开始时间",
  1650 + "format": "datetime"
  1651 + },
  1652 + "uid": {
  1653 + "type": "integer",
  1654 + "description": "统一用户UID",
  1655 + "required": [
  1656 + "uid"
  1657 + ]
796 } 1658 }
797 } 1659 }
798 }, 1660 },
799 - "EmployeeUpdateEmployeeResponseBody": {  
800 - "title": "Mediatype identifier: EmployeeUpdateEmployeeResponseBody", 1661 + "SuMoneySuMoneyTransactionRecordStatisticsResponseBody": {
  1662 + "title": "Mediatype identifier: SuMoneySuMoneyTransactionRecordStatisticsResponseBody",
801 "type": "object", 1663 "type": "object",
802 "properties": { 1664 "properties": {
803 - "employee": {  
804 - "$ref": "#/definitions/employeeResponseBody" 1665 + "expendSuMoney": {
  1666 + "type": "number",
  1667 + "description": "支出素币",
  1668 + "required": [
  1669 + "expendSuMoney"
  1670 + ]
  1671 + },
  1672 + "incomeSuMoney": {
  1673 + "type": "number",
  1674 + "description": "收入素币",
  1675 + "required": [
  1676 + "incomeSuMoney"
  1677 + ]
805 } 1678 }
806 } 1679 }
807 }, 1680 },
@@ -824,6 +1697,13 @@ @@ -824,6 +1697,13 @@
824 }, 1697 },
825 "description": "任务参与者UID列表" 1698 "description": "任务参与者UID列表"
826 }, 1699 },
  1700 + "referenceResourceScore": {
  1701 + "type": "array",
  1702 + "items": {
  1703 + "$ref": "#/definitions/referenceResourceItemRequestBody"
  1704 + },
  1705 + "description": "引用资源解决分"
  1706 + },
827 "solvePictureUrls": { 1707 "solvePictureUrls": {
828 "type": "array", 1708 "type": "array",
829 "items": { 1709 "items": {
@@ -950,6 +1830,13 @@ @@ -950,6 +1830,13 @@
950 "description": "竞标开始时间", 1830 "description": "竞标开始时间",
951 "format": "datetime" 1831 "format": "datetime"
952 }, 1832 },
  1833 + "companyId": {
  1834 + "type": "integer",
  1835 + "description": "公司ID",
  1836 + "required": [
  1837 + "companyId"
  1838 + ]
  1839 + },
953 "customerValue": { 1840 "customerValue": {
954 "type": "array", 1841 "type": "array",
955 "items": { 1842 "items": {
@@ -1133,6 +2020,76 @@ @@ -1133,6 +2020,76 @@
1133 } 2020 }
1134 } 2021 }
1135 }, 2022 },
  2023 + "TaskSearchOffTaskRecordRequestBody": {
  2024 + "title": "TaskSearchOffTaskRecordRequestBody",
  2025 + "type": "object",
  2026 + "properties": {
  2027 + "companyId": {
  2028 + "type": "integer",
  2029 + "description": "公司ID",
  2030 + "required": [
  2031 + "companyId"
  2032 + ]
  2033 + },
  2034 + "customerValue": {
  2035 + "type": "array",
  2036 + "items": {
  2037 + "type": "string"
  2038 + },
  2039 + "description": "客户价值"
  2040 + },
  2041 + "limit": {
  2042 + "type": "integer",
  2043 + "description": "查询限制",
  2044 + "format": "int64"
  2045 + },
  2046 + "offEndTime": {
  2047 + "type": "string",
  2048 + "description": "关闭任务时间区间-截止时间",
  2049 + "format": "datetime"
  2050 + },
  2051 + "offStartTime": {
  2052 + "type": "string",
  2053 + "description": "关闭任务时间区间-开始时间",
  2054 + "format": "datetime"
  2055 + },
  2056 + "offset": {
  2057 + "type": "integer",
  2058 + "description": "查询偏离量",
  2059 + "format": "int64"
  2060 + },
  2061 + "taskContentMatch": {
  2062 + "type": "string",
  2063 + "description": "任务内容匹配"
  2064 + },
  2065 + "taskNature": {
  2066 + "type": "string",
  2067 + "description": "任务性质"
  2068 + },
  2069 + "taskType": {
  2070 + "type": "integer",
  2071 + "description": "任务类型",
  2072 + "format": "int64"
  2073 + }
  2074 + }
  2075 + },
  2076 + "TaskSearchOffTaskRecordResponseBody": {
  2077 + "title": "Mediatype identifier: TaskSearchOffTaskRecordResponseBody",
  2078 + "type": "object",
  2079 + "properties": {
  2080 + "count": {
  2081 + "type": "integer",
  2082 + "description": "结果总数",
  2083 + "format": "int64"
  2084 + },
  2085 + "offTaskRecords": {
  2086 + "type": "array",
  2087 + "items": {
  2088 + "$ref": "#/definitions/offTaskRecordResponseBody"
  2089 + }
  2090 + }
  2091 + }
  2092 + },
1136 "TaskSearchTaskRequestBody": { 2093 "TaskSearchTaskRequestBody": {
1137 "title": "TaskSearchTaskRequestBody", 2094 "title": "TaskSearchTaskRequestBody",
1138 "type": "object", 2095 "type": "object",
@@ -1142,6 +2099,11 @@ @@ -1142,6 +2099,11 @@
1142 "description": "竞标时间(1全部,2已截止,3未截止)", 2099 "description": "竞标时间(1全部,2已截止,3未截止)",
1143 "format": "int64" 2100 "format": "int64"
1144 }, 2101 },
  2102 + "bidder": {
  2103 + "type": "integer",
  2104 + "description": "竞标参与者UID",
  2105 + "format": "int64"
  2106 + },
1145 "companyId": { 2107 "companyId": {
1146 "type": "integer", 2108 "type": "integer",
1147 "description": "公司ID", 2109 "description": "公司ID",
@@ -1150,9 +2112,20 @@ @@ -1150,9 +2112,20 @@
1150 ] 2112 ]
1151 }, 2113 },
1152 "customerValue": { 2114 "customerValue": {
1153 - "type": "string", 2115 + "type": "array",
  2116 + "items": {
  2117 + "type": "string"
  2118 + },
1154 "description": "客户价值" 2119 "description": "客户价值"
1155 }, 2120 },
  2121 + "isFilterCloseStatus": {
  2122 + "type": "boolean",
  2123 + "description": "是否过滤关闭状态任务"
  2124 + },
  2125 + "isFilterUnReleasedStatus": {
  2126 + "type": "boolean",
  2127 + "description": "是否过滤待发布状态任务"
  2128 + },
1156 "isRewardTake": { 2129 "isRewardTake": {
1157 "type": "boolean", 2130 "type": "boolean",
1158 "description": "是否悬赏任务" 2131 "description": "是否悬赏任务"
@@ -1169,17 +2142,17 @@ @@ -1169,17 +2142,17 @@
1169 }, 2142 },
1170 "participator": { 2143 "participator": {
1171 "type": "integer", 2144 "type": "integer",
1172 - "description": "任务参与者", 2145 + "description": "任务参与者UID",
1173 "format": "int64" 2146 "format": "int64"
1174 }, 2147 },
1175 "receiver": { 2148 "receiver": {
1176 "type": "integer", 2149 "type": "integer",
1177 - "description": "任务领取人", 2150 + "description": "任务领取人UID",
1178 "format": "int64" 2151 "format": "int64"
1179 }, 2152 },
1180 "sponsor": { 2153 "sponsor": {
1181 "type": "integer", 2154 "type": "integer",
1182 - "description": "任务发起者", 2155 + "description": "任务发起者UID",
1183 "format": "int64" 2156 "format": "int64"
1184 }, 2157 },
1185 "taskContentMatch": { 2158 "taskContentMatch": {
@@ -1341,6 +2314,27 @@ @@ -1341,6 +2314,27 @@
1341 }, 2314 },
1342 "description": "竞标人员信息" 2315 "description": "竞标人员信息"
1343 }, 2316 },
  2317 + "configResponseBody": {
  2318 + "title": "configResponseBody",
  2319 + "type": "object",
  2320 + "properties": {
  2321 + "id": {
  2322 + "type": "integer",
  2323 + "description": "ID",
  2324 + "required": [
  2325 + "id"
  2326 + ]
  2327 + },
  2328 + "name": {
  2329 + "type": "string",
  2330 + "description": "名称",
  2331 + "required": [
  2332 + "name"
  2333 + ]
  2334 + }
  2335 + },
  2336 + "description": "配置字典"
  2337 + },
1344 "employeeInfoRequestBody": { 2338 "employeeInfoRequestBody": {
1345 "title": "employeeInfoRequestBody", 2339 "title": "employeeInfoRequestBody",
1346 "type": "object", 2340 "type": "object",
@@ -1349,6 +2343,10 @@ @@ -1349,6 +2343,10 @@
1349 "type": "string", 2343 "type": "string",
1350 "description": "员工账号" 2344 "description": "员工账号"
1351 }, 2345 },
  2346 + "employeeAvatarUrl": {
  2347 + "type": "string",
  2348 + "description": "员工头像URL"
  2349 + },
1352 "employeeName": { 2350 "employeeName": {
1353 "type": "string", 2351 "type": "string",
1354 "description": "员工姓名", 2352 "description": "员工姓名",
@@ -1374,6 +2372,10 @@ @@ -1374,6 +2372,10 @@
1374 "type": "string", 2372 "type": "string",
1375 "description": "员工账号" 2373 "description": "员工账号"
1376 }, 2374 },
  2375 + "employeeAvatarUrl": {
  2376 + "type": "string",
  2377 + "description": "员工头像URL"
  2378 + },
1377 "employeeName": { 2379 "employeeName": {
1378 "type": "string", 2380 "type": "string",
1379 "description": "员工姓名", 2381 "description": "员工姓名",
@@ -1412,6 +2414,17 @@ @@ -1412,6 +2414,17 @@
1412 "employeeInfo": { 2414 "employeeInfo": {
1413 "$ref": "#/definitions/employeeInfoResponseBody" 2415 "$ref": "#/definitions/employeeInfoResponseBody"
1414 }, 2416 },
  2417 + "permissions": {
  2418 + "type": "array",
  2419 + "items": {
  2420 + "type": "integer",
  2421 + "format": "int64"
  2422 + },
  2423 + "description": "员工权限集合",
  2424 + "required": [
  2425 + "permissions"
  2426 + ]
  2427 + },
1415 "status": { 2428 "status": {
1416 "type": "integer", 2429 "type": "integer",
1417 "description": "员工状态(启用或者禁用)", 2430 "description": "员工状态(启用或者禁用)",
@@ -1427,10 +2440,161 @@ @@ -1427,10 +2440,161 @@
1427 }, 2440 },
1428 "description": "员工" 2441 "description": "员工"
1429 }, 2442 },
  2443 + "offTaskRecordResponseBody": {
  2444 + "title": "offTaskRecordResponseBody",
  2445 + "type": "object",
  2446 + "properties": {
  2447 + "createTime": {
  2448 + "type": "string",
  2449 + "description": "创建时间",
  2450 + "required": [
  2451 + "createTime"
  2452 + ]
  2453 + },
  2454 + "offReason": {
  2455 + "type": "string",
  2456 + "description": "关闭理由",
  2457 + "required": [
  2458 + "offReason"
  2459 + ]
  2460 + },
  2461 + "offTaskRecordId": {
  2462 + "type": "integer",
  2463 + "description": "关闭任务记录ID",
  2464 + "required": [
  2465 + "offTaskRecordId"
  2466 + ]
  2467 + },
  2468 + "operator": {
  2469 + "$ref": "#/definitions/employeeInfoResponseBody"
  2470 + },
  2471 + "task": {
  2472 + "$ref": "#/definitions/taskResponseBody"
  2473 + }
  2474 + },
  2475 + "description": "关闭任务记录"
  2476 + },
  2477 + "personSuMoneyStatisticsResponseBody": {
  2478 + "title": "personSuMoneyStatisticsResponseBody",
  2479 + "type": "object",
  2480 + "properties": {
  2481 + "currentSuMoney": {
  2482 + "type": "number",
  2483 + "description": "当前素币",
  2484 + "required": [
  2485 + "currentSuMoney"
  2486 + ]
  2487 + },
  2488 + "incomeSuMoneyOfYesterday": {
  2489 + "type": "number",
  2490 + "description": "昨日收益",
  2491 + "required": [
  2492 + "incomeSuMoneyOfYesterday"
  2493 + ]
  2494 + }
  2495 + },
  2496 + "description": "个人素币统计"
  2497 + },
  2498 + "personTaskStatisticsResponseBody": {
  2499 + "title": "personTaskStatisticsResponseBody",
  2500 + "type": "object",
  2501 + "properties": {
  2502 + "bidAsParticipator": {
  2503 + "type": "integer",
  2504 + "description": "个人参与的竞标中任务",
  2505 + "required": [
  2506 + "bidAsParticipator"
  2507 + ]
  2508 + },
  2509 + "completedAsParticipator": {
  2510 + "type": "integer",
  2511 + "description": "个人参与的已完成任务",
  2512 + "required": [
  2513 + "completedAsParticipator"
  2514 + ]
  2515 + },
  2516 + "completedAsReceiver": {
  2517 + "type": "integer",
  2518 + "description": "个人领取的已完成任务",
  2519 + "required": [
  2520 + "completedAsReceiver"
  2521 + ]
  2522 + },
  2523 + "completedAsSponsor": {
  2524 + "type": "integer",
  2525 + "description": "个人发起的已完成任务",
  2526 + "required": [
  2527 + "completedAsSponsor"
  2528 + ]
  2529 + },
  2530 + "unAcceptanceAsReceiver": {
  2531 + "type": "integer",
  2532 + "description": "个人领取的待验收任务",
  2533 + "required": [
  2534 + "unAcceptanceAsReceiver"
  2535 + ]
  2536 + },
  2537 + "unAcceptanceAsSponsor": {
  2538 + "type": "integer",
  2539 + "description": "个人发起的待验收任务",
  2540 + "required": [
  2541 + "unAcceptanceAsSponsor"
  2542 + ]
  2543 + },
  2544 + "unClaimedAsSponsor": {
  2545 + "type": "integer",
  2546 + "description": "个人发起的待领取任务",
  2547 + "required": [
  2548 + "unClaimedAsSponsor"
  2549 + ]
  2550 + },
  2551 + "unReleasedAsSponsor": {
  2552 + "type": "integer",
  2553 + "description": "个人发起的待发布任务",
  2554 + "required": [
  2555 + "unReleasedAsSponsor"
  2556 + ]
  2557 + },
  2558 + "underwayAsReceiver": {
  2559 + "type": "integer",
  2560 + "description": "个人领取的进行中任务",
  2561 + "required": [
  2562 + "underwayAsReceiver"
  2563 + ]
  2564 + },
  2565 + "underwayAsSponsor": {
  2566 + "type": "integer",
  2567 + "description": "个人发起的进行中任务",
  2568 + "required": [
  2569 + "underwayAsSponsor"
  2570 + ]
  2571 + }
  2572 + },
  2573 + "description": "个人任务统计"
  2574 + },
1430 "referenceResourceItemRequestBody": { 2575 "referenceResourceItemRequestBody": {
1431 "title": "referenceResourceItemRequestBody", 2576 "title": "referenceResourceItemRequestBody",
1432 "type": "object", 2577 "type": "object",
1433 "properties": { 2578 "properties": {
  2579 + "content": {
  2580 + "type": "string",
  2581 + "description": "内容",
  2582 + "required": [
  2583 + "content"
  2584 + ]
  2585 + },
  2586 + "issueScore": {
  2587 + "type": "number",
  2588 + "description": "问题总分",
  2589 + "format": "double"
  2590 + },
  2591 + "referenceResourceId": {
  2592 + "type": "integer",
  2593 + "description": "引用资源ID",
  2594 + "required": [
  2595 + "referenceResourceId"
  2596 + ]
  2597 + },
1434 "serialNumber": { 2598 "serialNumber": {
1435 "type": "integer", 2599 "type": "integer",
1436 "description": "编号", 2600 "description": "编号",
@@ -1438,6 +2602,13 @@ @@ -1438,6 +2602,13 @@
1438 "serialNumber" 2602 "serialNumber"
1439 ] 2603 ]
1440 }, 2604 },
  2605 + "solveScore": {
  2606 + "type": "array",
  2607 + "items": {
  2608 + "$ref": "#/definitions/solveScoreItemRequestBody"
  2609 + },
  2610 + "description": "解决评分明细"
  2611 + },
1441 "title": { 2612 "title": {
1442 "type": "string", 2613 "type": "string",
1443 "description": "标题", 2614 "description": "标题",
@@ -1452,6 +2623,25 @@ @@ -1452,6 +2623,25 @@
1452 "title": "referenceResourceItemResponseBody", 2623 "title": "referenceResourceItemResponseBody",
1453 "type": "object", 2624 "type": "object",
1454 "properties": { 2625 "properties": {
  2626 + "content": {
  2627 + "type": "string",
  2628 + "description": "内容",
  2629 + "required": [
  2630 + "content"
  2631 + ]
  2632 + },
  2633 + "issueScore": {
  2634 + "type": "number",
  2635 + "description": "问题总分",
  2636 + "format": "double"
  2637 + },
  2638 + "referenceResourceId": {
  2639 + "type": "integer",
  2640 + "description": "引用资源ID",
  2641 + "required": [
  2642 + "referenceResourceId"
  2643 + ]
  2644 + },
1455 "serialNumber": { 2645 "serialNumber": {
1456 "type": "integer", 2646 "type": "integer",
1457 "description": "编号", 2647 "description": "编号",
@@ -1459,6 +2649,13 @@ @@ -1459,6 +2649,13 @@
1459 "serialNumber" 2649 "serialNumber"
1460 ] 2650 ]
1461 }, 2651 },
  2652 + "solveScore": {
  2653 + "type": "array",
  2654 + "items": {
  2655 + "$ref": "#/definitions/solveScoreItemResponseBody"
  2656 + },
  2657 + "description": "解决评分明细"
  2658 + },
1462 "title": { 2659 "title": {
1463 "type": "string", 2660 "type": "string",
1464 "description": "标题", 2661 "description": "标题",
@@ -1534,6 +2731,147 @@ @@ -1534,6 +2731,147 @@
1534 }, 2731 },
1535 "description": "抢单任务信息" 2732 "description": "抢单任务信息"
1536 }, 2733 },
  2734 + "solveScoreItemRequestBody": {
  2735 + "title": "solveScoreItemRequestBody",
  2736 + "type": "object",
  2737 + "properties": {
  2738 + "contributor": {
  2739 + "$ref": "#/definitions/employeeInfoRequestBody"
  2740 + },
  2741 + "isReceiver": {
  2742 + "type": "boolean",
  2743 + "description": "是否领取人",
  2744 + "required": [
  2745 + "isReceiver"
  2746 + ]
  2747 + },
  2748 + "percentage": {
  2749 + "type": "integer",
  2750 + "description": "解决占比",
  2751 + "required": [
  2752 + "percentage"
  2753 + ]
  2754 + },
  2755 + "score": {
  2756 + "type": "number",
  2757 + "description": "解决评分",
  2758 + "required": [
  2759 + "score"
  2760 + ]
  2761 + }
  2762 + },
  2763 + "description": "解决评分项"
  2764 + },
  2765 + "solveScoreItemResponseBody": {
  2766 + "title": "solveScoreItemResponseBody",
  2767 + "type": "object",
  2768 + "properties": {
  2769 + "contributor": {
  2770 + "$ref": "#/definitions/employeeInfoResponseBody"
  2771 + },
  2772 + "isReceiver": {
  2773 + "type": "boolean",
  2774 + "description": "是否领取人",
  2775 + "required": [
  2776 + "isReceiver"
  2777 + ]
  2778 + },
  2779 + "percentage": {
  2780 + "type": "integer",
  2781 + "description": "解决占比",
  2782 + "required": [
  2783 + "percentage"
  2784 + ]
  2785 + },
  2786 + "score": {
  2787 + "type": "number",
  2788 + "description": "解决评分",
  2789 + "required": [
  2790 + "score"
  2791 + ]
  2792 + }
  2793 + },
  2794 + "description": "解决评分项"
  2795 + },
  2796 + "suMoneyTransactionRecordResponseBody": {
  2797 + "title": "suMoneyTransactionRecordResponseBody",
  2798 + "type": "object",
  2799 + "properties": {
  2800 + "createTime": {
  2801 + "type": "string",
  2802 + "description": "创建时间",
  2803 + "required": [
  2804 + "createTime"
  2805 + ]
  2806 + },
  2807 + "employee": {
  2808 + "$ref": "#/definitions/employeeInfoResponseBody"
  2809 + },
  2810 + "operator": {
  2811 + "$ref": "#/definitions/employeeInfoResponseBody"
  2812 + },
  2813 + "recordDescription": {
  2814 + "type": "string",
  2815 + "description": "素币事务记录描述",
  2816 + "required": [
  2817 + "recordDescription"
  2818 + ]
  2819 + },
  2820 + "recordType": {
  2821 + "type": "integer",
  2822 + "description": "记录类型(1兑换,2任务奖励)",
  2823 + "required": [
  2824 + "recordType"
  2825 + ]
  2826 + },
  2827 + "suMoney": {
  2828 + "type": "number",
  2829 + "description": "事务素币值",
  2830 + "required": [
  2831 + "suMoney"
  2832 + ]
  2833 + },
  2834 + "suMoneyBeforeTransaction": {
  2835 + "type": "number",
  2836 + "description": "事务处理前素币值",
  2837 + "required": [
  2838 + "suMoneyBeforeTransaction"
  2839 + ]
  2840 + },
  2841 + "suMoneyTransactionRecordId": {
  2842 + "type": "integer",
  2843 + "description": "素币事务记录ID",
  2844 + "required": [
  2845 + "suMoneyTransactionRecordId"
  2846 + ]
  2847 + }
  2848 + },
  2849 + "description": "素币事务记录"
  2850 + },
  2851 + "systemTaskStatisticsResponseBody": {
  2852 + "title": "systemTaskStatisticsResponseBody",
  2853 + "type": "object",
  2854 + "properties": {
  2855 + "completed": {
  2856 + "type": "integer",
  2857 + "description": "系统已完成任务",
  2858 + "format": "int64"
  2859 + },
  2860 + "released": {
  2861 + "type": "integer",
  2862 + "description": "系统已发布任务",
  2863 + "required": [
  2864 + "released"
  2865 + ]
  2866 + },
  2867 + "underway": {
  2868 + "type": "integer",
  2869 + "description": "系统进行中任务",
  2870 + "format": "int64"
  2871 + }
  2872 + },
  2873 + "description": "系统任务统计"
  2874 + },
1537 "taskPercentageItemRequestBody": { 2875 "taskPercentageItemRequestBody": {
1538 "title": "taskPercentageItemRequestBody", 2876 "title": "taskPercentageItemRequestBody",
1539 "type": "object", 2877 "type": "object",
@@ -1541,12 +2879,26 @@ @@ -1541,12 +2879,26 @@
1541 "contributor": { 2879 "contributor": {
1542 "$ref": "#/definitions/employeeInfoRequestBody" 2880 "$ref": "#/definitions/employeeInfoRequestBody"
1543 }, 2881 },
  2882 + "isReceiver": {
  2883 + "type": "boolean",
  2884 + "description": "是否领取人",
  2885 + "required": [
  2886 + "isReceiver"
  2887 + ]
  2888 + },
1544 "percentage": { 2889 "percentage": {
1545 "type": "integer", 2890 "type": "integer",
1546 "description": "任务贡献占比", 2891 "description": "任务贡献占比",
1547 "required": [ 2892 "required": [
1548 "percentage" 2893 "percentage"
1549 ] 2894 ]
  2895 + },
  2896 + "suMoney": {
  2897 + "type": "number",
  2898 + "description": "分配到的奖励素币",
  2899 + "required": [
  2900 + "suMoney"
  2901 + ]
1550 } 2902 }
1551 }, 2903 },
1552 "description": "任务贡献占比项" 2904 "description": "任务贡献占比项"
@@ -1558,12 +2910,26 @@ @@ -1558,12 +2910,26 @@
1558 "contributor": { 2910 "contributor": {
1559 "$ref": "#/definitions/employeeInfoResponseBody" 2911 "$ref": "#/definitions/employeeInfoResponseBody"
1560 }, 2912 },
  2913 + "isReceiver": {
  2914 + "type": "boolean",
  2915 + "description": "是否领取人",
  2916 + "required": [
  2917 + "isReceiver"
  2918 + ]
  2919 + },
1561 "percentage": { 2920 "percentage": {
1562 "type": "integer", 2921 "type": "integer",
1563 "description": "任务贡献占比", 2922 "description": "任务贡献占比",
1564 "required": [ 2923 "required": [
1565 "percentage" 2924 "percentage"
1566 ] 2925 ]
  2926 + },
  2927 + "suMoney": {
  2928 + "type": "number",
  2929 + "description": "分配到的奖励素币",
  2930 + "required": [
  2931 + "suMoney"
  2932 + ]
1567 } 2933 }
1568 }, 2934 },
1569 "description": "任务贡献占比项" 2935 "description": "任务贡献占比项"
@@ -5,7 +5,6 @@ info: @@ -5,7 +5,6 @@ info:
5 contact: 5 contact:
6 name: linmadan 6 name: linmadan
7 email: 772181827@qq.com 7 email: 772181827@qq.com
8 - home: www.madannet.com  
9 version: 0.0.1 8 version: 0.0.1
10 consumes: 9 consumes:
11 - application/json 10 - application/json
@@ -14,6 +13,104 @@ produces: @@ -14,6 +13,104 @@ produces:
14 - application/json 13 - application/json
15 - application/xml 14 - application/xml
16 paths: 15 paths:
  16 + /config/bid-time-matchs:
  17 + get:
  18 + tags:
  19 + - config
  20 + summary: 返回竞标时间字典列表(1全部,2已截止,3未截止)
  21 + description: 返回竞标时间字典列表(1全部,2已截止,3未截止)
  22 + operationId: config#listBidTimeMatch
  23 + responses:
  24 + "200":
  25 + description: OK response.
  26 + schema:
  27 + $ref: '#/definitions/ConfigListBidTimeMatchResponseBody'
  28 + schemes:
  29 + - http
  30 + /config/customer-values:
  31 + get:
  32 + tags:
  33 + - config
  34 + summary: 返回客户价值字典列表
  35 + description: 返回客户价值字典列表
  36 + operationId: config#listCustomerValue
  37 + responses:
  38 + "200":
  39 + description: OK response.
  40 + schema:
  41 + $ref: '#/definitions/ConfigListCustomerValueResponseBody'
  42 + schemes:
  43 + - http
  44 + /config/employee-permissions:
  45 + get:
  46 + tags:
  47 + - config
  48 + summary: 返回员工权限字典列表(1任务管理,2素币管理,3成员管理)
  49 + description: 返回员工权限字典列表(1任务管理,2素币管理,3成员管理)
  50 + operationId: config#listEmployeePermission
  51 + responses:
  52 + "200":
  53 + description: OK response.
  54 + schema:
  55 + $ref: '#/definitions/ConfigListEmployeePermissionResponseBody'
  56 + schemes:
  57 + - http
  58 + /config/reference-resource-types:
  59 + get:
  60 + tags:
  61 + - config
  62 + summary: 返回任务引用资源类型字典列表
  63 + description: 返回任务引用资源类型字典列表
  64 + operationId: config#listReferenceResourceType
  65 + responses:
  66 + "200":
  67 + description: OK response.
  68 + schema:
  69 + $ref: '#/definitions/ConfigListReferenceResourceTypeResponseBody'
  70 + schemes:
  71 + - http
  72 + /config/task-natures:
  73 + get:
  74 + tags:
  75 + - config
  76 + summary: 返回任务性质字典列表
  77 + description: 返回任务性质字典列表
  78 + operationId: config#listTaskNature
  79 + responses:
  80 + "200":
  81 + description: OK response.
  82 + schema:
  83 + $ref: '#/definitions/ConfigListTaskNatureResponseBody'
  84 + schemes:
  85 + - http
  86 + /config/task-statuses:
  87 + get:
  88 + tags:
  89 + - config
  90 + summary: 返回任务状态字典列表
  91 + description: 返回任务状态字典列表
  92 + operationId: config#listTaskStatus
  93 + responses:
  94 + "200":
  95 + description: OK response.
  96 + schema:
  97 + $ref: '#/definitions/ConfigListTaskStatusResponseBody'
  98 + schemes:
  99 + - http
  100 + /config/task-types:
  101 + get:
  102 + tags:
  103 + - config
  104 + summary: 返回任务类型字典列表
  105 + description: 返回任务类型字典列表
  106 + operationId: config#listTaskType
  107 + responses:
  108 + "200":
  109 + description: OK response.
  110 + schema:
  111 + $ref: '#/definitions/ConfigListTaskTypeResponseBody'
  112 + schemes:
  113 + - http
17 /employees: 114 /employees:
18 get: 115 get:
19 tags: 116 tags:
@@ -22,6 +119,16 @@ paths: @@ -22,6 +119,16 @@ paths:
22 description: 返回员工列表 119 description: 返回员工列表
23 operationId: employee#listEmployee 120 operationId: employee#listEmployee
24 parameters: 121 parameters:
  122 + - name: companyId
  123 + in: query
  124 + description: 公司ID
  125 + required: false
  126 + type: integer
  127 + - name: employeeNameMatch
  128 + in: query
  129 + description: 员工姓名匹配
  130 + required: false
  131 + type: string
25 - name: offset 132 - name: offset
26 in: query 133 in: query
27 description: 查询偏离量 134 description: 查询偏离量
@@ -121,6 +228,186 @@ paths: @@ -121,6 +228,186 @@ paths:
121 $ref: '#/definitions/EmployeeRemoveEmployeeResponseBody' 228 $ref: '#/definitions/EmployeeRemoveEmployeeResponseBody'
122 schemes: 229 schemes:
123 - http 230 - http
  231 + /off-task-records/{offTaskRecordId}:
  232 + get:
  233 + tags:
  234 + - offTaskRecord
  235 + summary: 返回关闭任务记录
  236 + description: 返回关闭任务记录
  237 + operationId: offTaskRecord#getOffTaskRecord
  238 + parameters:
  239 + - name: offTaskRecordId
  240 + in: path
  241 + description: 关闭任务记录ID
  242 + required: true
  243 + type: integer
  244 + responses:
  245 + "200":
  246 + description: OK response.
  247 + schema:
  248 + $ref: '#/definitions/OffTaskRecordGetOffTaskRecordResponseBody'
  249 + schemes:
  250 + - http
  251 + /off-task-records/search-off-task-record:
  252 + post:
  253 + tags:
  254 + - offTaskRecord
  255 + summary: 搜索关闭任务记录
  256 + description: 搜索关闭任务记录
  257 + operationId: offTaskRecord#searchOffTaskRecord
  258 + parameters:
  259 + - name: SearchOffTaskRecordRequestBody
  260 + in: body
  261 + required: true
  262 + schema:
  263 + $ref: '#/definitions/OffTaskRecordSearchOffTaskRecordRequestBody'
  264 + responses:
  265 + "200":
  266 + description: OK response.
  267 + schema:
  268 + $ref: '#/definitions/OffTaskRecordSearchOffTaskRecordResponseBody'
  269 + schemes:
  270 + - http
  271 + /statistics/person-su-money:
  272 + post:
  273 + tags:
  274 + - statistics
  275 + summary: 获取个人素币统计
  276 + description: 获取个人素币统计
  277 + operationId: statistics#personSuMoneyStatistics
  278 + parameters:
  279 + - name: PersonSuMoneyStatisticsRequestBody
  280 + in: body
  281 + required: true
  282 + schema:
  283 + $ref: '#/definitions/StatisticsPersonSuMoneyStatisticsRequestBody'
  284 + responses:
  285 + "200":
  286 + description: OK response.
  287 + schema:
  288 + $ref: '#/definitions/StatisticsPersonSuMoneyStatisticsResponseBody'
  289 + schemes:
  290 + - http
  291 + /statistics/person-task:
  292 + post:
  293 + tags:
  294 + - statistics
  295 + summary: 获取个人任务统计
  296 + description: 获取个人任务统计
  297 + operationId: statistics#personTaskStatistics
  298 + parameters:
  299 + - name: PersonTaskStatisticsRequestBody
  300 + in: body
  301 + required: true
  302 + schema:
  303 + $ref: '#/definitions/StatisticsPersonTaskStatisticsRequestBody'
  304 + responses:
  305 + "200":
  306 + description: OK response.
  307 + schema:
  308 + $ref: '#/definitions/StatisticsPersonTaskStatisticsResponseBody'
  309 + schemes:
  310 + - http
  311 + /statistics/system-task:
  312 + post:
  313 + tags:
  314 + - statistics
  315 + summary: 获取系统任务统计
  316 + description: 获取系统任务统计
  317 + operationId: statistics#systemTaskStatistics
  318 + parameters:
  319 + - name: SystemTaskStatisticsRequestBody
  320 + in: body
  321 + required: true
  322 + schema:
  323 + $ref: '#/definitions/StatisticsSystemTaskStatisticsRequestBody'
  324 + responses:
  325 + "200":
  326 + description: OK response.
  327 + schema:
  328 + $ref: '#/definitions/StatisticsSystemTaskStatisticsResponseBody'
  329 + schemes:
  330 + - http
  331 + /su-money/exchange:
  332 + post:
  333 + tags:
  334 + - suMoney
  335 + summary: 素币兑换
  336 + description: 素币兑换
  337 + operationId: suMoney#exchangeSuMoney
  338 + parameters:
  339 + - name: ExchangeSuMoneyRequestBody
  340 + in: body
  341 + required: true
  342 + schema:
  343 + $ref: '#/definitions/SuMoneyExchangeSuMoneyRequestBody'
  344 + responses:
  345 + "200":
  346 + description: OK response.
  347 + schema:
  348 + $ref: '#/definitions/SuMoneyExchangeSuMoneyResponseBody'
  349 + schemes:
  350 + - http
  351 + /su-money/search-su-money-transaction-record:
  352 + post:
  353 + tags:
  354 + - suMoney
  355 + summary: 搜索素币事务记录
  356 + description: 搜索素币事务记录
  357 + operationId: suMoney#searchSuMoneyTransactionRecord
  358 + parameters:
  359 + - name: SearchSuMoneyTransactionRecordRequestBody
  360 + in: body
  361 + required: true
  362 + schema:
  363 + $ref: '#/definitions/SuMoneySearchSuMoneyTransactionRecordRequestBody'
  364 + responses:
  365 + "200":
  366 + description: OK response.
  367 + schema:
  368 + $ref: '#/definitions/SuMoneySearchSuMoneyTransactionRecordResponseBody'
  369 + schemes:
  370 + - http
  371 + /su-money/su-money-transaction-record-statistics:
  372 + post:
  373 + tags:
  374 + - suMoney
  375 + summary: 素币事务记录统计
  376 + description: 素币事务记录统计
  377 + operationId: suMoney#suMoneyTransactionRecordStatistics
  378 + parameters:
  379 + - name: SuMoneyTransactionRecordStatisticsRequestBody
  380 + in: body
  381 + required: true
  382 + schema:
  383 + $ref: '#/definitions/SuMoneySuMoneyTransactionRecordStatisticsRequestBody'
  384 + responses:
  385 + "200":
  386 + description: OK response.
  387 + schema:
  388 + $ref: '#/definitions/SuMoneySuMoneyTransactionRecordStatisticsResponseBody'
  389 + schemes:
  390 + - http
  391 + /su-money/su-money-transaction-records/{suMoneyTransactionRecordId}:
  392 + get:
  393 + tags:
  394 + - suMoney
  395 + summary: 返回素币事务记录
  396 + description: 返回素币事务记录
  397 + operationId: suMoney#getSuMoneyTransactionRecord
  398 + parameters:
  399 + - name: suMoneyTransactionRecordId
  400 + in: path
  401 + description: 素币事务记录ID
  402 + required: true
  403 + type: integer
  404 + responses:
  405 + "200":
  406 + description: OK response.
  407 + schema:
  408 + $ref: '#/definitions/SuMoneyGetSuMoneyTransactionRecordResponseBody'
  409 + schemes:
  410 + - http
124 /tasks: 411 /tasks:
125 get: 412 get:
126 tags: 413 tags:
@@ -136,7 +423,7 @@ paths: @@ -136,7 +423,7 @@ paths:
136 type: integer 423 type: integer
137 - name: sponsor 424 - name: sponsor
138 in: query 425 in: query
139 - description: 任务发起者 426 + description: 任务发起者UID
140 required: false 427 required: false
141 type: integer 428 type: integer
142 format: int64 429 format: int64
@@ -159,7 +446,10 @@ paths: @@ -159,7 +446,10 @@ paths:
159 in: query 446 in: query
160 description: 客户价值 447 description: 客户价值
161 required: false 448 required: false
  449 + type: array
  450 + items:
162 type: string 451 type: string
  452 + collectionFormat: multi
163 - name: taskNature 453 - name: taskNature
164 in: query 454 in: query
165 description: 任务性质 455 description: 任务性质
@@ -177,13 +467,13 @@ paths: @@ -177,13 +467,13 @@ paths:
177 type: integer 467 type: integer
178 - name: receiver 468 - name: receiver
179 in: query 469 in: query
180 - description: 任务领取人 470 + description: 任务领取人UID
181 required: false 471 required: false
182 type: integer 472 type: integer
183 format: int64 473 format: int64
184 - name: participator 474 - name: participator
185 in: query 475 in: query
186 - description: 任务参与者 476 + description: 任务参与者UID
187 required: false 477 required: false
188 type: integer 478 type: integer
189 format: int64 479 format: int64
@@ -481,68 +771,371 @@ paths: @@ -481,68 +771,371 @@ paths:
481 $ref: '#/definitions/TaskSearchTaskResponseBody' 771 $ref: '#/definitions/TaskSearchTaskResponseBody'
482 schemes: 772 schemes:
483 - http 773 - http
  774 + /tasks/search-off-task-record:
  775 + post:
  776 + tags:
  777 + - task
  778 + summary: 搜索关闭任务记录
  779 + description: 搜索关闭任务记录
  780 + operationId: task#searchOffTaskRecord
  781 + parameters:
  782 + - name: SearchOffTaskRecordRequestBody
  783 + in: body
  784 + required: true
  785 + schema:
  786 + $ref: '#/definitions/TaskSearchOffTaskRecordRequestBody'
  787 + responses:
  788 + "200":
  789 + description: OK response.
  790 + schema:
  791 + $ref: '#/definitions/TaskSearchOffTaskRecordResponseBody'
  792 + schemes:
  793 + - http
484 definitions: 794 definitions:
  795 + ConfigListBidTimeMatchResponseBody:
  796 + title: 'Mediatype identifier: ConfigListBidTimeMatchResponseBody'
  797 + type: object
  798 + properties:
  799 + bidTimeMatchs:
  800 + type: array
  801 + items:
  802 + $ref: '#/definitions/configResponseBody'
  803 + ConfigListCustomerValueResponseBody:
  804 + title: 'Mediatype identifier: ConfigListCustomerValueResponseBody'
  805 + type: object
  806 + properties:
  807 + customerValues:
  808 + type: array
  809 + items:
  810 + $ref: '#/definitions/configResponseBody'
  811 + ConfigListEmployeePermissionResponseBody:
  812 + title: 'Mediatype identifier: ConfigListEmployeePermissionResponseBody'
  813 + type: object
  814 + properties:
  815 + employeePermissions:
  816 + type: array
  817 + items:
  818 + $ref: '#/definitions/configResponseBody'
  819 + ConfigListReferenceResourceTypeResponseBody:
  820 + title: 'Mediatype identifier: ConfigListReferenceResourceTypeResponseBody'
  821 + type: object
  822 + properties:
  823 + referenceResourceTypes:
  824 + type: array
  825 + items:
  826 + $ref: '#/definitions/configResponseBody'
  827 + ConfigListTaskNatureResponseBody:
  828 + title: 'Mediatype identifier: ConfigListTaskNatureResponseBody'
  829 + type: object
  830 + properties:
  831 + taskNatures:
  832 + type: array
  833 + items:
  834 + $ref: '#/definitions/configResponseBody'
  835 + ConfigListTaskStatusResponseBody:
  836 + title: 'Mediatype identifier: ConfigListTaskStatusResponseBody'
  837 + type: object
  838 + properties:
  839 + taskStatuses:
  840 + type: array
  841 + items:
  842 + $ref: '#/definitions/configResponseBody'
  843 + ConfigListTaskTypeResponseBody:
  844 + title: 'Mediatype identifier: ConfigListTaskTypeResponseBody'
  845 + type: object
  846 + properties:
  847 + taskTypes:
  848 + type: array
  849 + items:
  850 + $ref: '#/definitions/configResponseBody'
485 EmployeeCreateEmployeeRequestBody: 851 EmployeeCreateEmployeeRequestBody:
486 title: EmployeeCreateEmployeeRequestBody 852 title: EmployeeCreateEmployeeRequestBody
487 type: object 853 type: object
488 properties: 854 properties:
489 employeeAccount: 855 employeeAccount:
490 type: string 856 type: string
491 - description: 员工账号  
492 - employeeName: 857 + description: 员工账号
  858 + employeeAvatarUrl:
  859 + type: string
  860 + description: 员工头像URL
  861 + employeeName:
  862 + type: string
  863 + description: 员工姓名
  864 + uid:
  865 + type: integer
  866 + description: 统一用户UID
  867 + required:
  868 + - uid
  869 + EmployeeCreateEmployeeResponseBody:
  870 + title: 'Mediatype identifier: EmployeeCreateEmployeeResponseBody'
  871 + type: object
  872 + properties:
  873 + employee:
  874 + $ref: '#/definitions/employeeResponseBody'
  875 + EmployeeGetEmployeeResponseBody:
  876 + title: 'Mediatype identifier: EmployeeGetEmployeeResponseBody'
  877 + type: object
  878 + properties:
  879 + employee:
  880 + $ref: '#/definitions/employeeResponseBody'
  881 + EmployeeListEmployeeResponseBody:
  882 + title: 'Mediatype identifier: EmployeeListEmployeeResponseBody'
  883 + type: object
  884 + properties:
  885 + count:
  886 + type: integer
  887 + description: 结果总数
  888 + format: int64
  889 + employees:
  890 + type: array
  891 + items:
  892 + $ref: '#/definitions/employeeResponseBody'
  893 + EmployeeRemoveEmployeeResponseBody:
  894 + title: 'Mediatype identifier: EmployeeRemoveEmployeeResponseBody'
  895 + type: object
  896 + properties:
  897 + employee:
  898 + $ref: '#/definitions/employeeResponseBody'
  899 + EmployeeUpdateEmployeeRequestBody:
  900 + title: EmployeeUpdateEmployeeRequestBody
  901 + type: object
  902 + properties:
  903 + employeeAccount:
  904 + type: string
  905 + description: 员工账号
  906 + employeeAvatarUrl:
  907 + type: string
  908 + description: 员工头像URL
  909 + employeeName:
  910 + type: string
  911 + description: 员工姓名
  912 + permissions:
  913 + type: array
  914 + items:
  915 + type: integer
  916 + format: int64
  917 + description: 员工权限集合
  918 + EmployeeUpdateEmployeeResponseBody:
  919 + title: 'Mediatype identifier: EmployeeUpdateEmployeeResponseBody'
  920 + type: object
  921 + properties:
  922 + employee:
  923 + $ref: '#/definitions/employeeResponseBody'
  924 + OffTaskRecordGetOffTaskRecordResponseBody:
  925 + title: 'Mediatype identifier: OffTaskRecordGetOffTaskRecordResponseBody'
  926 + type: object
  927 + properties:
  928 + offTaskRecord:
  929 + $ref: '#/definitions/offTaskRecordResponseBody'
  930 + OffTaskRecordSearchOffTaskRecordRequestBody:
  931 + title: OffTaskRecordSearchOffTaskRecordRequestBody
  932 + type: object
  933 + properties:
  934 + companyId:
  935 + type: integer
  936 + description: 公司ID
  937 + required:
  938 + - companyId
  939 + customerValue:
  940 + type: array
  941 + items:
  942 + type: string
  943 + description: 客户价值
  944 + limit:
  945 + type: integer
  946 + description: 查询限制
  947 + format: int64
  948 + offEndTime:
  949 + type: string
  950 + description: 关闭任务时间区间-截止时间
  951 + format: datetime
  952 + offStartTime:
  953 + type: string
  954 + description: 关闭任务时间区间-开始时间
  955 + format: datetime
  956 + offset:
  957 + type: integer
  958 + description: 查询偏离量
  959 + format: int64
  960 + taskContentMatch:
  961 + type: string
  962 + description: 任务内容匹配
  963 + taskNature:
  964 + type: string
  965 + description: 任务性质
  966 + taskType:
  967 + type: integer
  968 + description: 任务类型
  969 + format: int64
  970 + OffTaskRecordSearchOffTaskRecordResponseBody:
  971 + title: 'Mediatype identifier: OffTaskRecordSearchOffTaskRecordResponseBody'
  972 + type: object
  973 + properties:
  974 + count:
  975 + type: integer
  976 + description: 结果总数
  977 + format: int64
  978 + offTaskRecords:
  979 + type: array
  980 + items:
  981 + $ref: '#/definitions/offTaskRecordResponseBody'
  982 + StatisticsPersonSuMoneyStatisticsRequestBody:
  983 + title: StatisticsPersonSuMoneyStatisticsRequestBody
  984 + type: object
  985 + properties:
  986 + uid:
  987 + type: integer
  988 + description: 统一用户UID
  989 + required:
  990 + - uid
  991 + StatisticsPersonSuMoneyStatisticsResponseBody:
  992 + title: 'Mediatype identifier: StatisticsPersonSuMoneyStatisticsResponseBody'
  993 + type: object
  994 + properties:
  995 + personSuMoneyStatistics:
  996 + $ref: '#/definitions/personSuMoneyStatisticsResponseBody'
  997 + StatisticsPersonTaskStatisticsRequestBody:
  998 + title: StatisticsPersonTaskStatisticsRequestBody
  999 + type: object
  1000 + properties:
  1001 + uid:
  1002 + type: integer
  1003 + description: 统一用户UID
  1004 + required:
  1005 + - uid
  1006 + StatisticsPersonTaskStatisticsResponseBody:
  1007 + title: 'Mediatype identifier: StatisticsPersonTaskStatisticsResponseBody'
  1008 + type: object
  1009 + properties:
  1010 + personTaskStatistics:
  1011 + $ref: '#/definitions/personTaskStatisticsResponseBody'
  1012 + StatisticsSystemTaskStatisticsRequestBody:
  1013 + title: StatisticsSystemTaskStatisticsRequestBody
  1014 + type: object
  1015 + properties:
  1016 + companyId:
  1017 + type: integer
  1018 + description: 公司ID
  1019 + required:
  1020 + - companyId
  1021 + StatisticsSystemTaskStatisticsResponseBody:
  1022 + title: 'Mediatype identifier: StatisticsSystemTaskStatisticsResponseBody'
  1023 + type: object
  1024 + properties:
  1025 + systemTaskStatistics:
  1026 + $ref: '#/definitions/systemTaskStatisticsResponseBody'
  1027 + SuMoneyExchangeSuMoneyRequestBody:
  1028 + title: SuMoneyExchangeSuMoneyRequestBody
  1029 + type: object
  1030 + properties:
  1031 + exchangeDescription:
  1032 + type: string
  1033 + description: 兑换描述
  1034 + required:
  1035 + - exchangeDescription
  1036 + operator:
  1037 + type: integer
  1038 + description: 操作人UID
  1039 + format: int64
  1040 + suMoney:
  1041 + type: number
  1042 + description: 素币值
  1043 + required:
  1044 + - suMoney
  1045 + uid:
  1046 + type: integer
  1047 + description: 兑换人UID
  1048 + required:
  1049 + - uid
  1050 + SuMoneyExchangeSuMoneyResponseBody:
  1051 + title: 'Mediatype identifier: SuMoneyExchangeSuMoneyResponseBody'
  1052 + type: object
  1053 + properties:
  1054 + suMoneyTransactionRecord:
  1055 + $ref: '#/definitions/suMoneyTransactionRecordResponseBody'
  1056 + SuMoneyGetSuMoneyTransactionRecordResponseBody:
  1057 + title: 'Mediatype identifier: SuMoneyGetSuMoneyTransactionRecordResponseBody'
  1058 + type: object
  1059 + properties:
  1060 + suMoneyTransactionRecord:
  1061 + $ref: '#/definitions/suMoneyTransactionRecordResponseBody'
  1062 + SuMoneySearchSuMoneyTransactionRecordRequestBody:
  1063 + title: SuMoneySearchSuMoneyTransactionRecordRequestBody
  1064 + type: object
  1065 + properties:
  1066 + limit:
  1067 + type: integer
  1068 + description: 查询限制
  1069 + format: int64
  1070 + offset:
  1071 + type: integer
  1072 + description: 查询偏离量
  1073 + format: int64
  1074 + operator:
  1075 + type: integer
  1076 + description: 操作人UID
  1077 + format: int64
  1078 + recordType:
  1079 + type: integer
  1080 + description: 记录类型(1兑换,2任务奖励)
  1081 + required:
  1082 + - recordType
  1083 + transactionEndTime:
  1084 + type: string
  1085 + description: 事务时间区间-截止时间
  1086 + format: datetime
  1087 + transactionStartTime:
493 type: string 1088 type: string
494 - description: 员工姓名 1089 + description: 事务时间区间-开始时间
  1090 + format: datetime
495 uid: 1091 uid:
496 type: integer 1092 type: integer
497 description: 统一用户UID 1093 description: 统一用户UID
498 required: 1094 required:
499 - uid 1095 - uid
500 - EmployeeCreateEmployeeResponseBody:  
501 - title: 'Mediatype identifier: EmployeeCreateEmployeeResponseBody'  
502 - type: object  
503 - properties:  
504 - employee:  
505 - $ref: '#/definitions/employeeResponseBody'  
506 - EmployeeGetEmployeeResponseBody:  
507 - title: 'Mediatype identifier: EmployeeGetEmployeeResponseBody'  
508 - type: object  
509 - properties:  
510 - employee:  
511 - $ref: '#/definitions/employeeResponseBody'  
512 - EmployeeListEmployeeResponseBody:  
513 - title: 'Mediatype identifier: EmployeeListEmployeeResponseBody' 1096 + SuMoneySearchSuMoneyTransactionRecordResponseBody:
  1097 + title: 'Mediatype identifier: SuMoneySearchSuMoneyTransactionRecordResponseBody'
514 type: object 1098 type: object
515 properties: 1099 properties:
516 count: 1100 count:
517 type: integer 1101 type: integer
518 description: 结果总数 1102 description: 结果总数
519 format: int64 1103 format: int64
520 - employees: 1104 + suMoneyTransactionRecords:
521 type: array 1105 type: array
522 items: 1106 items:
523 - $ref: '#/definitions/employeeResponseBody'  
524 - EmployeeRemoveEmployeeResponseBody:  
525 - title: 'Mediatype identifier: EmployeeRemoveEmployeeResponseBody'  
526 - type: object  
527 - properties:  
528 - employee:  
529 - $ref: '#/definitions/employeeResponseBody'  
530 - EmployeeUpdateEmployeeRequestBody:  
531 - title: EmployeeUpdateEmployeeRequestBody 1107 + $ref: '#/definitions/suMoneyTransactionRecordResponseBody'
  1108 + SuMoneySuMoneyTransactionRecordStatisticsRequestBody:
  1109 + title: SuMoneySuMoneyTransactionRecordStatisticsRequestBody
532 type: object 1110 type: object
533 properties: 1111 properties:
534 - employeeAccount: 1112 + transactionEndTime:
535 type: string 1113 type: string
536 - description: 员工账号  
537 - employeeName: 1114 + description: 事务时间区间-截止时间
  1115 + format: datetime
  1116 + transactionStartTime:
538 type: string 1117 type: string
539 - description: 员工姓名  
540 - EmployeeUpdateEmployeeResponseBody:  
541 - title: 'Mediatype identifier: EmployeeUpdateEmployeeResponseBody' 1118 + description: 事务时间区间-开始时间
  1119 + format: datetime
  1120 + uid:
  1121 + type: integer
  1122 + description: 统一用户UID
  1123 + required:
  1124 + - uid
  1125 + SuMoneySuMoneyTransactionRecordStatisticsResponseBody:
  1126 + title: 'Mediatype identifier: SuMoneySuMoneyTransactionRecordStatisticsResponseBody'
542 type: object 1127 type: object
543 properties: 1128 properties:
544 - employee:  
545 - $ref: '#/definitions/employeeResponseBody' 1129 + expendSuMoney:
  1130 + type: number
  1131 + description: 支出素币
  1132 + required:
  1133 + - expendSuMoney
  1134 + incomeSuMoney:
  1135 + type: number
  1136 + description: 收入素币
  1137 + required:
  1138 + - incomeSuMoney
546 TaskAcceptanceTaskRequestBody: 1139 TaskAcceptanceTaskRequestBody:
547 title: TaskAcceptanceTaskRequestBody 1140 title: TaskAcceptanceTaskRequestBody
548 type: object 1141 type: object
@@ -558,6 +1151,11 @@ definitions: @@ -558,6 +1151,11 @@ definitions:
558 type: integer 1151 type: integer
559 format: int64 1152 format: int64
560 description: 任务参与者UID列表 1153 description: 任务参与者UID列表
  1154 + referenceResourceScore:
  1155 + type: array
  1156 + items:
  1157 + $ref: '#/definitions/referenceResourceItemRequestBody'
  1158 + description: 引用资源解决分
561 solvePictureUrls: 1159 solvePictureUrls:
562 type: array 1160 type: array
563 items: 1161 items:
@@ -646,6 +1244,11 @@ definitions: @@ -646,6 +1244,11 @@ definitions:
646 type: string 1244 type: string
647 description: 竞标开始时间 1245 description: 竞标开始时间
648 format: datetime 1246 format: datetime
  1247 + companyId:
  1248 + type: integer
  1249 + description: 公司ID
  1250 + required:
  1251 + - companyId
649 customerValue: 1252 customerValue:
650 type: array 1253 type: array
651 items: 1254 items:
@@ -772,6 +1375,58 @@ definitions: @@ -772,6 +1375,58 @@ definitions:
772 properties: 1375 properties:
773 task: 1376 task:
774 $ref: '#/definitions/taskResponseBody' 1377 $ref: '#/definitions/taskResponseBody'
  1378 + TaskSearchOffTaskRecordRequestBody:
  1379 + title: TaskSearchOffTaskRecordRequestBody
  1380 + type: object
  1381 + properties:
  1382 + companyId:
  1383 + type: integer
  1384 + description: 公司ID
  1385 + required:
  1386 + - companyId
  1387 + customerValue:
  1388 + type: array
  1389 + items:
  1390 + type: string
  1391 + description: 客户价值
  1392 + limit:
  1393 + type: integer
  1394 + description: 查询限制
  1395 + format: int64
  1396 + offEndTime:
  1397 + type: string
  1398 + description: 关闭任务时间区间-截止时间
  1399 + format: datetime
  1400 + offStartTime:
  1401 + type: string
  1402 + description: 关闭任务时间区间-开始时间
  1403 + format: datetime
  1404 + offset:
  1405 + type: integer
  1406 + description: 查询偏离量
  1407 + format: int64
  1408 + taskContentMatch:
  1409 + type: string
  1410 + description: 任务内容匹配
  1411 + taskNature:
  1412 + type: string
  1413 + description: 任务性质
  1414 + taskType:
  1415 + type: integer
  1416 + description: 任务类型
  1417 + format: int64
  1418 + TaskSearchOffTaskRecordResponseBody:
  1419 + title: 'Mediatype identifier: TaskSearchOffTaskRecordResponseBody'
  1420 + type: object
  1421 + properties:
  1422 + count:
  1423 + type: integer
  1424 + description: 结果总数
  1425 + format: int64
  1426 + offTaskRecords:
  1427 + type: array
  1428 + items:
  1429 + $ref: '#/definitions/offTaskRecordResponseBody'
775 TaskSearchTaskRequestBody: 1430 TaskSearchTaskRequestBody:
776 title: TaskSearchTaskRequestBody 1431 title: TaskSearchTaskRequestBody
777 type: object 1432 type: object
@@ -780,14 +1435,26 @@ definitions: @@ -780,14 +1435,26 @@ definitions:
780 type: integer 1435 type: integer
781 description: 竞标时间(1全部,2已截止,3未截止) 1436 description: 竞标时间(1全部,2已截止,3未截止)
782 format: int64 1437 format: int64
  1438 + bidder:
  1439 + type: integer
  1440 + description: 竞标参与者UID
  1441 + format: int64
783 companyId: 1442 companyId:
784 type: integer 1443 type: integer
785 description: 公司ID 1444 description: 公司ID
786 required: 1445 required:
787 - companyId 1446 - companyId
788 customerValue: 1447 customerValue:
  1448 + type: array
  1449 + items:
789 type: string 1450 type: string
790 description: 客户价值 1451 description: 客户价值
  1452 + isFilterCloseStatus:
  1453 + type: boolean
  1454 + description: 是否过滤关闭状态任务
  1455 + isFilterUnReleasedStatus:
  1456 + type: boolean
  1457 + description: 是否过滤待发布状态任务
791 isRewardTake: 1458 isRewardTake:
792 type: boolean 1459 type: boolean
793 description: 是否悬赏任务 1460 description: 是否悬赏任务
@@ -801,15 +1468,15 @@ definitions: @@ -801,15 +1468,15 @@ definitions:
801 format: int64 1468 format: int64
802 participator: 1469 participator:
803 type: integer 1470 type: integer
804 - description: 任务参与者 1471 + description: 任务参与者UID
805 format: int64 1472 format: int64
806 receiver: 1473 receiver:
807 type: integer 1474 type: integer
808 - description: 任务领取人 1475 + description: 任务领取人UID
809 format: int64 1476 format: int64
810 sponsor: 1477 sponsor:
811 type: integer 1478 type: integer
812 - description: 任务发起者 1479 + description: 任务发起者UID
813 format: int64 1480 format: int64
814 taskContentMatch: 1481 taskContentMatch:
815 type: string 1482 type: string
@@ -925,6 +1592,21 @@ definitions: @@ -925,6 +1592,21 @@ definitions:
925 bidder: 1592 bidder:
926 $ref: '#/definitions/employeeInfoResponseBody' 1593 $ref: '#/definitions/employeeInfoResponseBody'
927 description: 竞标人员信息 1594 description: 竞标人员信息
  1595 + configResponseBody:
  1596 + title: configResponseBody
  1597 + type: object
  1598 + properties:
  1599 + id:
  1600 + type: integer
  1601 + description: ID
  1602 + required:
  1603 + - id
  1604 + name:
  1605 + type: string
  1606 + description: 名称
  1607 + required:
  1608 + - name
  1609 + description: 配置字典
928 employeeInfoRequestBody: 1610 employeeInfoRequestBody:
929 title: employeeInfoRequestBody 1611 title: employeeInfoRequestBody
930 type: object 1612 type: object
@@ -932,6 +1614,9 @@ definitions: @@ -932,6 +1614,9 @@ definitions:
932 employeeAccount: 1614 employeeAccount:
933 type: string 1615 type: string
934 description: 员工账号 1616 description: 员工账号
  1617 + employeeAvatarUrl:
  1618 + type: string
  1619 + description: 员工头像URL
935 employeeName: 1620 employeeName:
936 type: string 1621 type: string
937 description: 员工姓名 1622 description: 员工姓名
@@ -950,6 +1635,9 @@ definitions: @@ -950,6 +1635,9 @@ definitions:
950 employeeAccount: 1635 employeeAccount:
951 type: string 1636 type: string
952 description: 员工账号 1637 description: 员工账号
  1638 + employeeAvatarUrl:
  1639 + type: string
  1640 + description: 员工头像URL
953 employeeName: 1641 employeeName:
954 type: string 1642 type: string
955 description: 员工姓名 1643 description: 员工姓名
@@ -977,6 +1665,14 @@ definitions: @@ -977,6 +1665,14 @@ definitions:
977 - employeeId 1665 - employeeId
978 employeeInfo: 1666 employeeInfo:
979 $ref: '#/definitions/employeeInfoResponseBody' 1667 $ref: '#/definitions/employeeInfoResponseBody'
  1668 + permissions:
  1669 + type: array
  1670 + items:
  1671 + type: integer
  1672 + format: int64
  1673 + description: 员工权限集合
  1674 + required:
  1675 + - permissions
980 status: 1676 status:
981 type: integer 1677 type: integer
982 description: 员工状态(启用或者禁用) 1678 description: 员工状态(启用或者禁用)
@@ -987,15 +1683,128 @@ definitions: @@ -987,15 +1683,128 @@ definitions:
987 required: 1683 required:
988 - suMoney 1684 - suMoney
989 description: 员工 1685 description: 员工
  1686 + offTaskRecordResponseBody:
  1687 + title: offTaskRecordResponseBody
  1688 + type: object
  1689 + properties:
  1690 + createTime:
  1691 + type: string
  1692 + description: 创建时间
  1693 + required:
  1694 + - createTime
  1695 + offReason:
  1696 + type: string
  1697 + description: 关闭理由
  1698 + required:
  1699 + - offReason
  1700 + offTaskRecordId:
  1701 + type: integer
  1702 + description: 关闭任务记录ID
  1703 + required:
  1704 + - offTaskRecordId
  1705 + operator:
  1706 + $ref: '#/definitions/employeeInfoResponseBody'
  1707 + task:
  1708 + $ref: '#/definitions/taskResponseBody'
  1709 + description: 关闭任务记录
  1710 + personSuMoneyStatisticsResponseBody:
  1711 + title: personSuMoneyStatisticsResponseBody
  1712 + type: object
  1713 + properties:
  1714 + currentSuMoney:
  1715 + type: number
  1716 + description: 当前素币
  1717 + required:
  1718 + - currentSuMoney
  1719 + incomeSuMoneyOfYesterday:
  1720 + type: number
  1721 + description: 昨日收益
  1722 + required:
  1723 + - incomeSuMoneyOfYesterday
  1724 + description: 个人素币统计
  1725 + personTaskStatisticsResponseBody:
  1726 + title: personTaskStatisticsResponseBody
  1727 + type: object
  1728 + properties:
  1729 + bidAsParticipator:
  1730 + type: integer
  1731 + description: 个人参与的竞标中任务
  1732 + required:
  1733 + - bidAsParticipator
  1734 + completedAsParticipator:
  1735 + type: integer
  1736 + description: 个人参与的已完成任务
  1737 + required:
  1738 + - completedAsParticipator
  1739 + completedAsReceiver:
  1740 + type: integer
  1741 + description: 个人领取的已完成任务
  1742 + required:
  1743 + - completedAsReceiver
  1744 + completedAsSponsor:
  1745 + type: integer
  1746 + description: 个人发起的已完成任务
  1747 + required:
  1748 + - completedAsSponsor
  1749 + unAcceptanceAsReceiver:
  1750 + type: integer
  1751 + description: 个人领取的待验收任务
  1752 + required:
  1753 + - unAcceptanceAsReceiver
  1754 + unAcceptanceAsSponsor:
  1755 + type: integer
  1756 + description: 个人发起的待验收任务
  1757 + required:
  1758 + - unAcceptanceAsSponsor
  1759 + unClaimedAsSponsor:
  1760 + type: integer
  1761 + description: 个人发起的待领取任务
  1762 + required:
  1763 + - unClaimedAsSponsor
  1764 + unReleasedAsSponsor:
  1765 + type: integer
  1766 + description: 个人发起的待发布任务
  1767 + required:
  1768 + - unReleasedAsSponsor
  1769 + underwayAsReceiver:
  1770 + type: integer
  1771 + description: 个人领取的进行中任务
  1772 + required:
  1773 + - underwayAsReceiver
  1774 + underwayAsSponsor:
  1775 + type: integer
  1776 + description: 个人发起的进行中任务
  1777 + required:
  1778 + - underwayAsSponsor
  1779 + description: 个人任务统计
990 referenceResourceItemRequestBody: 1780 referenceResourceItemRequestBody:
991 title: referenceResourceItemRequestBody 1781 title: referenceResourceItemRequestBody
992 type: object 1782 type: object
993 properties: 1783 properties:
  1784 + content:
  1785 + type: string
  1786 + description: 内容
  1787 + required:
  1788 + - content
  1789 + issueScore:
  1790 + type: number
  1791 + description: 问题总分
  1792 + format: double
  1793 + referenceResourceId:
  1794 + type: integer
  1795 + description: 引用资源ID
  1796 + required:
  1797 + - referenceResourceId
994 serialNumber: 1798 serialNumber:
995 type: integer 1799 type: integer
996 description: 编号 1800 description: 编号
997 required: 1801 required:
998 - serialNumber 1802 - serialNumber
  1803 + solveScore:
  1804 + type: array
  1805 + items:
  1806 + $ref: '#/definitions/solveScoreItemRequestBody'
  1807 + description: 解决评分明细
999 title: 1808 title:
1000 type: string 1809 type: string
1001 description: 标题 1810 description: 标题
@@ -1006,11 +1815,30 @@ definitions: @@ -1006,11 +1815,30 @@ definitions:
1006 title: referenceResourceItemResponseBody 1815 title: referenceResourceItemResponseBody
1007 type: object 1816 type: object
1008 properties: 1817 properties:
  1818 + content:
  1819 + type: string
  1820 + description: 内容
  1821 + required:
  1822 + - content
  1823 + issueScore:
  1824 + type: number
  1825 + description: 问题总分
  1826 + format: double
  1827 + referenceResourceId:
  1828 + type: integer
  1829 + description: 引用资源ID
  1830 + required:
  1831 + - referenceResourceId
1009 serialNumber: 1832 serialNumber:
1010 type: integer 1833 type: integer
1011 description: 编号 1834 description: 编号
1012 required: 1835 required:
1013 - serialNumber 1836 - serialNumber
  1837 + solveScore:
  1838 + type: array
  1839 + items:
  1840 + $ref: '#/definitions/solveScoreItemResponseBody'
  1841 + description: 解决评分明细
1014 title: 1842 title:
1015 type: string 1843 type: string
1016 description: 标题 1844 description: 标题
@@ -1063,17 +1891,128 @@ definitions: @@ -1063,17 +1891,128 @@ definitions:
1063 receiver: 1891 receiver:
1064 $ref: '#/definitions/employeeInfoResponseBody' 1892 $ref: '#/definitions/employeeInfoResponseBody'
1065 description: 抢单任务信息 1893 description: 抢单任务信息
  1894 + solveScoreItemRequestBody:
  1895 + title: solveScoreItemRequestBody
  1896 + type: object
  1897 + properties:
  1898 + contributor:
  1899 + $ref: '#/definitions/employeeInfoRequestBody'
  1900 + isReceiver:
  1901 + type: boolean
  1902 + description: 是否领取人
  1903 + required:
  1904 + - isReceiver
  1905 + percentage:
  1906 + type: integer
  1907 + description: 解决占比
  1908 + required:
  1909 + - percentage
  1910 + score:
  1911 + type: number
  1912 + description: 解决评分
  1913 + required:
  1914 + - score
  1915 + description: 解决评分项
  1916 + solveScoreItemResponseBody:
  1917 + title: solveScoreItemResponseBody
  1918 + type: object
  1919 + properties:
  1920 + contributor:
  1921 + $ref: '#/definitions/employeeInfoResponseBody'
  1922 + isReceiver:
  1923 + type: boolean
  1924 + description: 是否领取人
  1925 + required:
  1926 + - isReceiver
  1927 + percentage:
  1928 + type: integer
  1929 + description: 解决占比
  1930 + required:
  1931 + - percentage
  1932 + score:
  1933 + type: number
  1934 + description: 解决评分
  1935 + required:
  1936 + - score
  1937 + description: 解决评分项
  1938 + suMoneyTransactionRecordResponseBody:
  1939 + title: suMoneyTransactionRecordResponseBody
  1940 + type: object
  1941 + properties:
  1942 + createTime:
  1943 + type: string
  1944 + description: 创建时间
  1945 + required:
  1946 + - createTime
  1947 + employee:
  1948 + $ref: '#/definitions/employeeInfoResponseBody'
  1949 + operator:
  1950 + $ref: '#/definitions/employeeInfoResponseBody'
  1951 + recordDescription:
  1952 + type: string
  1953 + description: 素币事务记录描述
  1954 + required:
  1955 + - recordDescription
  1956 + recordType:
  1957 + type: integer
  1958 + description: 记录类型(1兑换,2任务奖励)
  1959 + required:
  1960 + - recordType
  1961 + suMoney:
  1962 + type: number
  1963 + description: 事务素币值
  1964 + required:
  1965 + - suMoney
  1966 + suMoneyBeforeTransaction:
  1967 + type: number
  1968 + description: 事务处理前素币值
  1969 + required:
  1970 + - suMoneyBeforeTransaction
  1971 + suMoneyTransactionRecordId:
  1972 + type: integer
  1973 + description: 素币事务记录ID
  1974 + required:
  1975 + - suMoneyTransactionRecordId
  1976 + description: 素币事务记录
  1977 + systemTaskStatisticsResponseBody:
  1978 + title: systemTaskStatisticsResponseBody
  1979 + type: object
  1980 + properties:
  1981 + completed:
  1982 + type: integer
  1983 + description: 系统已完成任务
  1984 + format: int64
  1985 + released:
  1986 + type: integer
  1987 + description: 系统已发布任务
  1988 + required:
  1989 + - released
  1990 + underway:
  1991 + type: integer
  1992 + description: 系统进行中任务
  1993 + format: int64
  1994 + description: 系统任务统计
1066 taskPercentageItemRequestBody: 1995 taskPercentageItemRequestBody:
1067 title: taskPercentageItemRequestBody 1996 title: taskPercentageItemRequestBody
1068 type: object 1997 type: object
1069 properties: 1998 properties:
1070 contributor: 1999 contributor:
1071 $ref: '#/definitions/employeeInfoRequestBody' 2000 $ref: '#/definitions/employeeInfoRequestBody'
  2001 + isReceiver:
  2002 + type: boolean
  2003 + description: 是否领取人
  2004 + required:
  2005 + - isReceiver
1072 percentage: 2006 percentage:
1073 type: integer 2007 type: integer
1074 description: 任务贡献占比 2008 description: 任务贡献占比
1075 required: 2009 required:
1076 - percentage 2010 - percentage
  2011 + suMoney:
  2012 + type: number
  2013 + description: 分配到的奖励素币
  2014 + required:
  2015 + - suMoney
1077 description: 任务贡献占比项 2016 description: 任务贡献占比项
1078 taskPercentageItemResponseBody: 2017 taskPercentageItemResponseBody:
1079 title: taskPercentageItemResponseBody 2018 title: taskPercentageItemResponseBody
@@ -1081,11 +2020,21 @@ definitions: @@ -1081,11 +2020,21 @@ definitions:
1081 properties: 2020 properties:
1082 contributor: 2021 contributor:
1083 $ref: '#/definitions/employeeInfoResponseBody' 2022 $ref: '#/definitions/employeeInfoResponseBody'
  2023 + isReceiver:
  2024 + type: boolean
  2025 + description: 是否领取人
  2026 + required:
  2027 + - isReceiver
1084 percentage: 2028 percentage:
1085 type: integer 2029 type: integer
1086 description: 任务贡献占比 2030 description: 任务贡献占比
1087 required: 2031 required:
1088 - percentage 2032 - percentage
  2033 + suMoney:
  2034 + type: number
  2035 + description: 分配到的奖励素币
  2036 + required:
  2037 + - suMoney
1089 description: 任务贡献占比项 2038 description: 任务贡献占比项
1090 taskResponseBody: 2039 taskResponseBody:
1091 title: taskResponseBody 2040 title: taskResponseBody
  1 +package query
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type ListBidTimeMatchQuery struct {
  10 +}
  11 +
  12 +func (listBidTimeMatchQuery *ListBidTimeMatchQuery) ValidateQuery() error {
  13 + valid := validation.Validation{}
  14 + b, err := valid.Valid(listBidTimeMatchQuery)
  15 + if err != nil {
  16 + return err
  17 + }
  18 + if !b {
  19 + for _, validErr := range valid.Errors {
  20 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  21 + }
  22 + }
  23 + return nil
  24 +}
  1 +package query
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type ListCustomerValueQuery struct {
  10 +}
  11 +
  12 +func (listCustomerValueQuery *ListCustomerValueQuery) ValidateQuery() error {
  13 + valid := validation.Validation{}
  14 + b, err := valid.Valid(listCustomerValueQuery)
  15 + if err != nil {
  16 + return err
  17 + }
  18 + if !b {
  19 + for _, validErr := range valid.Errors {
  20 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  21 + }
  22 + }
  23 + return nil
  24 +}
  1 +package query
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type ListEmployeePermissionQuery struct {
  10 +}
  11 +
  12 +func (listEmployeePermissionQuery *ListEmployeePermissionQuery) ValidateQuery() error {
  13 + valid := validation.Validation{}
  14 + b, err := valid.Valid(listEmployeePermissionQuery)
  15 + if err != nil {
  16 + return err
  17 + }
  18 + if !b {
  19 + for _, validErr := range valid.Errors {
  20 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  21 + }
  22 + }
  23 + return nil
  24 +}
  1 +package query
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type ListReferenceResourceTypeQuery struct {
  10 +}
  11 +
  12 +func (listReferenceResourceTypeQuery *ListReferenceResourceTypeQuery) ValidateQuery() error {
  13 + valid := validation.Validation{}
  14 + b, err := valid.Valid(listReferenceResourceTypeQuery)
  15 + if err != nil {
  16 + return err
  17 + }
  18 + if !b {
  19 + for _, validErr := range valid.Errors {
  20 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  21 + }
  22 + }
  23 + return nil
  24 +}
  1 +package query
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type ListTaskNatureQuery struct {
  10 +}
  11 +
  12 +func (listTaskNatureQuery *ListTaskNatureQuery) ValidateQuery() error {
  13 + valid := validation.Validation{}
  14 + b, err := valid.Valid(listTaskNatureQuery)
  15 + if err != nil {
  16 + return err
  17 + }
  18 + if !b {
  19 + for _, validErr := range valid.Errors {
  20 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  21 + }
  22 + }
  23 + return nil
  24 +}
  1 +package query
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type ListTaskStatusQuery struct {
  10 +}
  11 +
  12 +func (listTaskStatusQuery *ListTaskStatusQuery) ValidateQuery() error {
  13 + valid := validation.Validation{}
  14 + b, err := valid.Valid(listTaskStatusQuery)
  15 + if err != nil {
  16 + return err
  17 + }
  18 + if !b {
  19 + for _, validErr := range valid.Errors {
  20 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  21 + }
  22 + }
  23 + return nil
  24 +}
  1 +package query
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type ListTaskTypeQuery struct {
  10 +}
  11 +
  12 +func (listTaskTypeQuery *ListTaskTypeQuery) ValidateQuery() error {
  13 + valid := validation.Validation{}
  14 + b, err := valid.Valid(listTaskTypeQuery)
  15 + if err != nil {
  16 + return err
  17 + }
  18 + if !b {
  19 + for _, validErr := range valid.Errors {
  20 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  21 + }
  22 + }
  23 + return nil
  24 +}
  1 +package service
  2 +
  3 +import (
  4 + "github.com/linmadan/egglib-go/core/application"
  5 + "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/application/config/query"
  6 +)
  7 +
  8 +// 配置服务
  9 +type ConfigService struct {
  10 +}
  11 +
  12 +// 返回任务状态列表
  13 +func (configService *ConfigService) ListTaskStatus(listTaskStatusQuery *query.ListTaskStatusQuery) (interface{}, error) {
  14 + if err := listTaskStatusQuery.ValidateQuery(); err != nil {
  15 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  16 + }
  17 + taskStatusMap := map[int]string{
  18 + 1: "待发布",
  19 + 2: "待领取",
  20 + 3: "进行中",
  21 + 4: "待验收",
  22 + 5: "已完成",
  23 + }
  24 + var list []map[string]interface{}
  25 + for key, value := range taskStatusMap {
  26 + list = append(list, map[string]interface{}{
  27 + "id": key,
  28 + "name": value,
  29 + })
  30 + }
  31 + return map[string]interface{}{
  32 + "taskStatuses": list,
  33 + }, nil
  34 +}
  35 +
  36 +// 返回任务类型列表
  37 +func (configService *ConfigService) ListTaskType(listTaskTypeQuery *query.ListTaskTypeQuery) (interface{}, error) {
  38 + if err := listTaskTypeQuery.ValidateQuery(); err != nil {
  39 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  40 + }
  41 + taskTypeMap := map[int]string{
  42 + 1: "抢单任务",
  43 + 2: "竞标任务",
  44 + }
  45 + var list []map[string]interface{}
  46 + for key, value := range taskTypeMap {
  47 + list = append(list, map[string]interface{}{
  48 + "id": key,
  49 + "name": value,
  50 + })
  51 + }
  52 + return map[string]interface{}{
  53 + "taskTypes": list,
  54 + }, nil
  55 +}
  56 +
  57 +// 返回任务性质列表
  58 +func (configService *ConfigService) ListTaskNature(listTaskNatureQuery *query.ListTaskNatureQuery) (interface{}, error) {
  59 + if err := listTaskNatureQuery.ValidateQuery(); err != nil {
  60 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  61 + }
  62 + taskNatureMap := map[int]string{
  63 + 1: "点",
  64 + 2: "线",
  65 + 3: "面",
  66 + 4: "链",
  67 + 5: "网",
  68 + }
  69 + var list []map[string]interface{}
  70 + for key, value := range taskNatureMap {
  71 + list = append(list, map[string]interface{}{
  72 + "id": key,
  73 + "name": value,
  74 + })
  75 + }
  76 + return map[string]interface{}{
  77 + "taskNatures": list,
  78 + }, nil
  79 +}
  80 +
  81 +// 返回客户价值列表
  82 +func (configService *ConfigService) ListCustomerValue(listCustomerValueQuery *query.ListCustomerValueQuery) (interface{}, error) {
  83 + if err := listCustomerValueQuery.ValidateQuery(); err != nil {
  84 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  85 + }
  86 + customerValueMap := map[int]string{
  87 + 1: "口味",
  88 + 2: "口感",
  89 + 3: "色泽",
  90 + 4: "卖相",
  91 + 5: "包装",
  92 + 6: "储存",
  93 + 7: "运输",
  94 + 8: "价格",
  95 + 9: "应用",
  96 + 10: "便利",
  97 + 11: "交期",
  98 + 12: "数量",
  99 + 13: "账期",
  100 + 14: "品质",
  101 + 15: "新鲜度",
  102 + 16: "推广",
  103 + 17: "规格",
  104 + 18: "人情关系",
  105 + 19: "商务服务",
  106 + 20: "售后服务",
  107 + 21: "新品",
  108 + 22: "品牌",
  109 + 23: "合同",
  110 + }
  111 + var list []map[string]interface{}
  112 + for key, value := range customerValueMap {
  113 + list = append(list, map[string]interface{}{
  114 + "id": key,
  115 + "name": value,
  116 + })
  117 + }
  118 + return map[string]interface{}{
  119 + "customerValues": list,
  120 + }, nil
  121 +}
  122 +
  123 +// 返回任务引用资源类型字典列表
  124 +func (configService *ConfigService) ListReferenceResourceType(listReferenceResourceTypeQuery *query.ListReferenceResourceTypeQuery) (interface{}, error) {
  125 + if err := listReferenceResourceTypeQuery.ValidateQuery(); err != nil {
  126 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  127 + }
  128 + referenceResourceTypeMap := map[int]string{
  129 + 1: "问题",
  130 + //2: "机会",
  131 + }
  132 + var list []map[string]interface{}
  133 + for key, value := range referenceResourceTypeMap {
  134 + list = append(list, map[string]interface{}{
  135 + "id": key,
  136 + "name": value,
  137 + })
  138 + }
  139 + return map[string]interface{}{
  140 + "referenceResourceTypes": list,
  141 + }, nil
  142 +}
  143 +
  144 +// 返回竞标时间字典列表(1全部,2已截止,3未截止)
  145 +func (configService *ConfigService) ListBidTimeMatch(listBidTimeMatchQuery *query.ListBidTimeMatchQuery) (interface{}, error) {
  146 + if err := listBidTimeMatchQuery.ValidateQuery(); err != nil {
  147 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  148 + }
  149 + bidTimeMatchMap := map[int]string{
  150 + 1: "全部",
  151 + 2: "已截止",
  152 + 3: "未截止",
  153 + }
  154 + var list []map[string]interface{}
  155 + for key, value := range bidTimeMatchMap {
  156 + list = append(list, map[string]interface{}{
  157 + "id": key,
  158 + "name": value,
  159 + })
  160 + }
  161 + return map[string]interface{}{
  162 + "bidTimeMatchs": list,
  163 + }, nil
  164 +}
  165 +
  166 +// 返回员工权限字典列表(1任务管理,2素币管理,3成员管理)
  167 +func (configService *ConfigService) ListEmployeePermission(listEmployeePermissionQuery *query.ListEmployeePermissionQuery) (interface{}, error) {
  168 + if err := listEmployeePermissionQuery.ValidateQuery(); err != nil {
  169 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  170 + }
  171 + employeePermissionMap := map[int]string{
  172 + 1: "任务管理",
  173 + 2: "素币管理",
  174 + 3: "成员管理",
  175 + }
  176 + var list []map[string]interface{}
  177 + for key, value := range employeePermissionMap {
  178 + list = append(list, map[string]interface{}{
  179 + "id": key,
  180 + "name": value,
  181 + })
  182 + }
  183 + return map[string]interface{}{
  184 + "employeePermissions": list,
  185 + }, nil
  186 +}
  187 +
  188 +func NewConfigService(options map[string]interface{}) *ConfigService {
  189 + newConfigService := &ConfigService{}
  190 + return newConfigService
  191 +}
@@ -2,15 +2,19 @@ package command @@ -2,15 +2,19 @@ package command
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
  5 +
5 "github.com/astaxie/beego/validation" 6 "github.com/astaxie/beego/validation"
6 ) 7 )
7 8
8 type CreateEmployeeCommand struct { 9 type CreateEmployeeCommand struct {
  10 + // 统一用户UID
9 Uid int64 `json:"uid" valid:"Required"` 11 Uid int64 `json:"uid" valid:"Required"`
10 // 员工姓名 12 // 员工姓名
11 - EmployeeName string `json:"employeeName" valid:"Required"` 13 + EmployeeName string `json:"employeeName,omitempty"`
12 // 员工账号 14 // 员工账号
13 - EmployeeAccount string `json:"employeeAccount" valid:"Required"` 15 + EmployeeAccount string `json:"employeeAccount,omitempty"`
  16 + // 员工头像URL
  17 + EmployeeAvatarUrl string `json:"employeeAvatarUrl,omitempty"`
14 } 18 }
15 19
16 func (createEmployeeCommand *CreateEmployeeCommand) ValidateCommand() error { 20 func (createEmployeeCommand *CreateEmployeeCommand) ValidateCommand() error {
@@ -2,6 +2,7 @@ package command @@ -2,6 +2,7 @@ package command
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
  5 +
5 "github.com/astaxie/beego/validation" 6 "github.com/astaxie/beego/validation"
6 ) 7 )
7 8
@@ -2,6 +2,7 @@ package command @@ -2,6 +2,7 @@ package command
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
  5 +
5 "github.com/astaxie/beego/validation" 6 "github.com/astaxie/beego/validation"
6 ) 7 )
7 8
@@ -12,6 +13,10 @@ type UpdateEmployeeCommand struct { @@ -12,6 +13,10 @@ type UpdateEmployeeCommand struct {
12 EmployeeName string `json:"employeeName,omitempty"` 13 EmployeeName string `json:"employeeName,omitempty"`
13 // 员工账号 14 // 员工账号
14 EmployeeAccount string `json:"employeeAccount,omitempty"` 15 EmployeeAccount string `json:"employeeAccount,omitempty"`
  16 + // 员工头像URL
  17 + EmployeeAvatarUrl string `json:"employeeAvatarUrl,omitempty"`
  18 + // 员工权限集合
  19 + Permissions []int `json:"permissions,omitempty"`
15 } 20 }
16 21
17 func (updateEmployeeCommand *UpdateEmployeeCommand) ValidateCommand() error { 22 func (updateEmployeeCommand *UpdateEmployeeCommand) ValidateCommand() error {
@@ -2,6 +2,7 @@ package query @@ -2,6 +2,7 @@ package query
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
  5 +
5 "github.com/astaxie/beego/validation" 6 "github.com/astaxie/beego/validation"
6 ) 7 )
7 8
@@ -2,10 +2,15 @@ package query @@ -2,10 +2,15 @@ package query
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
  5 +
5 "github.com/astaxie/beego/validation" 6 "github.com/astaxie/beego/validation"
6 ) 7 )
7 8
8 type ListEmployeeQuery struct { 9 type ListEmployeeQuery struct {
  10 + // 公司ID
  11 + CompanyId int64 `json:"companyId" valid:"Required"`
  12 + // 员工姓名匹配
  13 + EmployeeNameMatch string `json:"employeeNameMatch,omitempty"`
9 // 查询偏离量 14 // 查询偏离量
10 Offset int `json:"offset,omitempty"` 15 Offset int `json:"offset,omitempty"`
11 // 查询限制 16 // 查询限制
  1 +package subscriber
  2 +
  3 +import (
  4 + "fmt"
  5 + "github.com/linmadan/egglib-go/core/domain"
  6 + "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/application/factory"
  7 + "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/domain/event"
  8 +)
  9 +
  10 +type AbilityServiceSubscriber struct {
  11 +}
  12 +
  13 +func (subscriber *AbilityServiceSubscriber) HandleEvent(domainEvent domain.DomainEvent) error {
  14 + abilityServiceGateway, err := factory.CreateAbilityServiceGateway(nil)
  15 + if err != nil {
  16 + return err
  17 + }
  18 + switch domainEvent.EventType() {
  19 + case event.TASK_RELEASED_EVENT:
  20 + taskReleasedEvent := domainEvent.(*event.TaskReleased)
  21 + var serials []int64
  22 + for _, referenceResourceItem := range taskReleasedEvent.ReferenceResource.ReferenceResourceItems {
  23 + serials = append(serials, referenceResourceItem.SerialNumber)
  24 + }
  25 + data, err := abilityServiceGateway.CommitQuestionQuotes(taskReleasedEvent.Sponsor.Uid, taskReleasedEvent.TaskId, serials)
  26 + if err != nil {
  27 + fmt.Println(err.Error())
  28 + return err
  29 + }
  30 + fmt.Println(data)
  31 + break
  32 + case event.TASK_CLOSED_EVENT:
  33 + taskClosedEvent := domainEvent.(*event.TaskClosed)
  34 + var referenceResourceIds []int64
  35 + for _, referenceResourceItem := range taskClosedEvent.ReferenceResource.ReferenceResourceItems {
  36 + referenceResourceIds = append(referenceResourceIds, referenceResourceItem.ReferenceResourceId)
  37 + }
  38 + data, err := abilityServiceGateway.CloseTaskCallback(taskClosedEvent.TaskId, referenceResourceIds)
  39 + if err != nil {
  40 + fmt.Println(err.Error())
  41 + return err
  42 + }
  43 + fmt.Println(data)
  44 + break
  45 + case event.TASK_ROBED_EVENT:
  46 + taskRobedEvent := domainEvent.(*event.TaskRobed)
  47 + var referenceResourceIds []int64
  48 + for _, referenceResourceItem := range taskRobedEvent.ReferenceResource.ReferenceResourceItems {
  49 + referenceResourceIds = append(referenceResourceIds, referenceResourceItem.ReferenceResourceId)
  50 + }
  51 + data, err := abilityServiceGateway.ReceiverTaskCallback(taskRobedEvent.RobInfo.Receiver.Uid, taskRobedEvent.TaskId, referenceResourceIds, taskRobedEvent.RobInfo.Receiver.Uid, taskRobedEvent.RobInfo.ReceiveTime)
  52 + if err != nil {
  53 + fmt.Println(err.Error())
  54 + return err
  55 + }
  56 + fmt.Println(data)
  57 + break
  58 + case event.TASK_BIDDED_EVENT:
  59 + taskBiddedEvent := domainEvent.(*event.TaskBidded)
  60 + var referenceResourceIds []int64
  61 + for _, referenceResourceItem := range taskBiddedEvent.ReferenceResource.ReferenceResourceItems {
  62 + referenceResourceIds = append(referenceResourceIds, referenceResourceItem.ReferenceResourceId)
  63 + }
  64 + data, err := abilityServiceGateway.ReceiverTaskCallback(taskBiddedEvent.BidInfo.SuccessfulBidder.Uid, taskBiddedEvent.TaskId, referenceResourceIds, taskBiddedEvent.Operator.Uid, taskBiddedEvent.BidInfo.WinBidTime)
  65 + if err != nil {
  66 + fmt.Println(err.Error())
  67 + return err
  68 + }
  69 + fmt.Println(data)
  70 + break
  71 + case event.TASK_ACCEPTANCED_EVENT:
  72 + taskAcceptancedEvent := domainEvent.(*event.TaskAcceptanced)
  73 + if taskAcceptancedEvent.ReferenceResource != nil {
  74 + var solveUid int64
  75 + var scoreSolve float64
  76 + var partners []map[string]interface{}
  77 + for _, referenceResourceItem := range taskAcceptancedEvent.ReferenceResource.ReferenceResourceItems {
  78 + for _, solveScore := range referenceResourceItem.SolveScore {
  79 + if solveScore.IsReceiver {
  80 + solveUid = solveScore.Contributor.Uid
  81 + scoreSolve = solveScore.Score
  82 + } else {
  83 + partners = append(partners, map[string]interface{}{
  84 + "uid": solveScore.Contributor.Uid,
  85 + "scoreSolution": solveScore.Score,
  86 + })
  87 + }
  88 + }
  89 + data, err := abilityServiceGateway.CommitQuestionSolution(referenceResourceItem.ReferenceResourceId, taskAcceptancedEvent.Sponsor.Uid, solveUid, taskAcceptancedEvent.SolveReport, scoreSolve, taskAcceptancedEvent.SolvePictureUrls, partners)
  90 + if err != nil {
  91 + return err
  92 + }
  93 + fmt.Println(data)
  94 + }
  95 + }
  96 + break
  97 + }
  98 + return nil
  99 +}
  100 +
  101 +func (subscriber *AbilityServiceSubscriber) SubscribedToEventTypes() []string {
  102 + return [] string{
  103 + event.TASK_RELEASED_EVENT,
  104 + event.TASK_ACCEPTANCED_EVENT,
  105 + event.TASK_CLOSED_EVENT,
  106 + event.TASK_ROBED_EVENT,
  107 + event.TASK_BIDDED_EVENT,
  108 + }
  109 +}
@@ -12,3 +12,11 @@ func CreateTaskDao(options map[string]interface{}) (*dao.TaskDao, error) { @@ -12,3 +12,11 @@ func CreateTaskDao(options map[string]interface{}) (*dao.TaskDao, error) {
12 } 12 }
13 return dao.NewTaskDao(transactionContext) 13 return dao.NewTaskDao(transactionContext)
14 } 14 }
  15 +
  16 +func CreateEmployeeDao(options map[string]interface{}) (*dao.EmployeeDao, error) {
  17 + var transactionContext *pg.TransactionContext
  18 + if value, ok := options["transactionContext"]; ok {
  19 + transactionContext = value.(*pg.TransactionContext)
  20 + }
  21 + return dao.NewEmployeeDao(transactionContext)
  22 +}
@@ -53,3 +53,19 @@ func CreateApplyCompleteTaskService(options map[string]interface{}) (service.App @@ -53,3 +53,19 @@ func CreateApplyCompleteTaskService(options map[string]interface{}) (service.App
53 } 53 }
54 return domainService.NewApplyCompleteTaskService(transactionContext) 54 return domainService.NewApplyCompleteTaskService(transactionContext)
55 } 55 }
  56 +
  57 +func CreateAcceptanceTaskService(options map[string]interface{}) (service.AcceptanceTaskService, error) {
  58 + var transactionContext *pgTransaction.TransactionContext
  59 + if value, ok := options["transactionContext"]; ok {
  60 + transactionContext = value.(*pgTransaction.TransactionContext)
  61 + }
  62 + return domainService.NewAcceptanceTaskService(transactionContext)
  63 +}
  64 +
  65 +func CreateExchangeSuMoneyService(options map[string]interface{}) (service.ExchangeSuMoneyService, error) {
  66 + var transactionContext *pgTransaction.TransactionContext
  67 + if value, ok := options["transactionContext"]; ok {
  68 + transactionContext = value.(*pgTransaction.TransactionContext)
  69 + }
  70 + return domainService.NewExchangeSuMoneyService(transactionContext)
  71 +}
@@ -29,3 +29,11 @@ func CreateOffTaskRecordRepository(options map[string]interface{}) (domain.OffTa @@ -29,3 +29,11 @@ func CreateOffTaskRecordRepository(options map[string]interface{}) (domain.OffTa
29 } 29 }
30 return repository.NewOffTaskRecordRepository(transactionContext) 30 return repository.NewOffTaskRecordRepository(transactionContext)
31 } 31 }
  32 +
  33 +func CreateSuMoneyTransactionRecordRepository(options map[string]interface{}) (domain.SuMoneyTransactionRecordRepository, error) {
  34 + var transactionContext *pg.TransactionContext
  35 + if value, ok := options["transactionContext"]; ok {
  36 + transactionContext = value.(*pg.TransactionContext)
  37 + }
  38 + return repository.NewSuMoneyTransactionRecordRepository(transactionContext)
  39 +}
  1 +package factory
  2 +
  3 +import serviceGateway "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/service_gateway"
  4 +
  5 +func CreateAbilityServiceGateway(options map[string]interface{}) (serviceGateway.AbilityServiceGateway, error) {
  6 + return serviceGateway.NewHttplibAbilityServiceGateway(), nil
  7 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type PersonSuMoneyStatisticsCommand struct {
  10 + // 统一用户UID
  11 + Uid int64 `json:"uid" valid:"Required"`
  12 +}
  13 +
  14 +func (personSuMoneyStatisticsCommand *PersonSuMoneyStatisticsCommand) ValidateCommand() error {
  15 + valid := validation.Validation{}
  16 + b, err := valid.Valid(personSuMoneyStatisticsCommand)
  17 + if err != nil {
  18 + return err
  19 + }
  20 + if !b {
  21 + for _, validErr := range valid.Errors {
  22 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  23 + }
  24 + }
  25 + return nil
  26 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type PersonTaskStatisticsCommand struct {
  10 + // 统一用户UID
  11 + Uid int64 `json:"uid" valid:"Required"`
  12 +}
  13 +
  14 +func (personTaskStatisticsCommand *PersonTaskStatisticsCommand) ValidateCommand() error {
  15 + valid := validation.Validation{}
  16 + b, err := valid.Valid(personTaskStatisticsCommand)
  17 + if err != nil {
  18 + return err
  19 + }
  20 + if !b {
  21 + for _, validErr := range valid.Errors {
  22 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  23 + }
  24 + }
  25 + return nil
  26 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type SystemTaskStatisticsCommand struct {
  10 + // 公司ID
  11 + CompanyId int64 `json:"companyId" valid:"Required"`
  12 +}
  13 +
  14 +func (systemTaskStatisticsCommand *SystemTaskStatisticsCommand) ValidateCommand() error {
  15 + valid := validation.Validation{}
  16 + b, err := valid.Valid(systemTaskStatisticsCommand)
  17 + if err != nil {
  18 + return err
  19 + }
  20 + if !b {
  21 + for _, validErr := range valid.Errors {
  22 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  23 + }
  24 + }
  25 + return nil
  26 +}
  1 +package service
  2 +
  3 +import (
  4 + "github.com/linmadan/egglib-go/core/application"
  5 + "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/application/factory"
  6 + "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/application/statistics/command"
  7 + "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/domain"
  8 + "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/dao"
  9 +)
  10 +
  11 +// 数据统计服务
  12 +type StatisticsService struct {
  13 +}
  14 +
  15 +// 获取系统任务统计
  16 +func (statisticsService *StatisticsService) SystemTaskStatistics(systemTaskStatisticsCommand *command.SystemTaskStatisticsCommand) (interface{}, error) {
  17 + if err := systemTaskStatisticsCommand.ValidateCommand(); err != nil {
  18 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  19 + }
  20 + transactionContext, err := factory.CreateTransactionContext(nil)
  21 + if err != nil {
  22 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  23 + }
  24 + if err := transactionContext.StartTransaction(); err != nil {
  25 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  26 + }
  27 + defer func() {
  28 + transactionContext.RollbackTransaction()
  29 + }()
  30 + var taskDao *dao.TaskDao
  31 + if value, err := factory.CreateTaskDao(map[string]interface{}{
  32 + "transactionContext": transactionContext,
  33 + }); err != nil {
  34 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  35 + } else {
  36 + taskDao = value
  37 + }
  38 + if systemTaskStatistics, err := taskDao.CalculateSystemTask(systemTaskStatisticsCommand.CompanyId); err != nil {
  39 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  40 + } else {
  41 + if err := transactionContext.CommitTransaction(); err != nil {
  42 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  43 + }
  44 + return systemTaskStatistics, nil
  45 + }
  46 +}
  47 +
  48 +// 获取个人任务统计
  49 +func (statisticsService *StatisticsService) PersonTaskStatistics(personTaskStatisticsCommand *command.PersonTaskStatisticsCommand) (interface{}, error) {
  50 + if err := personTaskStatisticsCommand.ValidateCommand(); err != nil {
  51 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  52 + }
  53 + transactionContext, err := factory.CreateTransactionContext(nil)
  54 + if err != nil {
  55 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  56 + }
  57 + if err := transactionContext.StartTransaction(); err != nil {
  58 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  59 + }
  60 + defer func() {
  61 + transactionContext.RollbackTransaction()
  62 + }()
  63 + var taskDao *dao.TaskDao
  64 + if value, err := factory.CreateTaskDao(map[string]interface{}{
  65 + "transactionContext": transactionContext,
  66 + }); err != nil {
  67 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  68 + } else {
  69 + taskDao = value
  70 + }
  71 + var employeeRepository domain.EmployeeRepository
  72 + if value, err := factory.CreateEmployeeRepository(map[string]interface{}{
  73 + "transactionContext": transactionContext,
  74 + }); err != nil {
  75 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  76 + } else {
  77 + employeeRepository = value
  78 + }
  79 + employee, err := employeeRepository.FindOne(map[string]interface{}{
  80 + "uid": personTaskStatisticsCommand.Uid,
  81 + })
  82 + if err != nil {
  83 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  84 + }
  85 + if employee == nil {
  86 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "无效的企业员工")
  87 + }
  88 + if personTaskStatistics, err := taskDao.CalculatePersonTask(personTaskStatisticsCommand.Uid); err != nil {
  89 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  90 + } else {
  91 + if err := transactionContext.CommitTransaction(); err != nil {
  92 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  93 + }
  94 + return personTaskStatistics, nil
  95 + }
  96 +}
  97 +
  98 +// 获取个人素币统计
  99 +func (statisticsService *StatisticsService) PersonSuMoneyStatistics(personSuMoneyStatisticsCommand *command.PersonSuMoneyStatisticsCommand) (interface{}, error) {
  100 + if err := personSuMoneyStatisticsCommand.ValidateCommand(); err != nil {
  101 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  102 + }
  103 + transactionContext, err := factory.CreateTransactionContext(nil)
  104 + if err != nil {
  105 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  106 + }
  107 + if err := transactionContext.StartTransaction(); err != nil {
  108 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  109 + }
  110 + defer func() {
  111 + transactionContext.RollbackTransaction()
  112 + }()
  113 + var employeeDao *dao.EmployeeDao
  114 + if value, err := factory.CreateEmployeeDao(map[string]interface{}{
  115 + "transactionContext": transactionContext,
  116 + }); err != nil {
  117 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  118 + } else {
  119 + employeeDao = value
  120 + }
  121 + var employeeRepository domain.EmployeeRepository
  122 + if value, err := factory.CreateEmployeeRepository(map[string]interface{}{
  123 + "transactionContext": transactionContext,
  124 + }); err != nil {
  125 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  126 + } else {
  127 + employeeRepository = value
  128 + }
  129 + employee, err := employeeRepository.FindOne(map[string]interface{}{
  130 + "uid": personSuMoneyStatisticsCommand.Uid,
  131 + })
  132 + if err != nil {
  133 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  134 + }
  135 + if employee == nil {
  136 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "无效的企业员工")
  137 + }
  138 + if personSuMoneyStatistics, err := employeeDao.CalculatePersonSuMoney(personSuMoneyStatisticsCommand.Uid); err != nil {
  139 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  140 + } else {
  141 + if err := transactionContext.CommitTransaction(); err != nil {
  142 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  143 + }
  144 + personSuMoneyStatistics["currentSuMoney"] = employee.SuMoney
  145 + return personSuMoneyStatistics, nil
  146 + }
  147 +}
  148 +
  149 +func NewStatisticsService(options map[string]interface{}) *StatisticsService {
  150 + newStatisticsService := &StatisticsService{}
  151 + return newStatisticsService
  152 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type ExchangeSuMoneyCommand struct {
  10 + // 兑换人UID
  11 + Uid int64 `json:"uid" valid:"Required"`
  12 + // 素币值
  13 + SuMoney float64 `json:"suMoney" valid:"Required"`
  14 + // 操作人UID
  15 + Operator int64 `json:"operator,omitempty"`
  16 + // 兑换描述
  17 + ExchangeDescription string `json:"exchangeDescription" valid:"Required"`
  18 +}
  19 +
  20 +func (exchangeSuMoneyCommand *ExchangeSuMoneyCommand) ValidateCommand() error {
  21 + valid := validation.Validation{}
  22 + b, err := valid.Valid(exchangeSuMoneyCommand)
  23 + if err != nil {
  24 + return err
  25 + }
  26 + if !b {
  27 + for _, validErr := range valid.Errors {
  28 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  29 + }
  30 + }
  31 + return nil
  32 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 + "time"
  6 +
  7 + "github.com/astaxie/beego/validation"
  8 +)
  9 +
  10 +type SearchSuMoneyTransactionRecordCommand struct {
  11 + // 统一用户UID
  12 + Uid int64 `json:"uid" valid:"Required"`
  13 + // 记录类型(1兑换,2任务奖励)
  14 + RecordType int `json:"recordType,omitempty"`
  15 + // 操作人UID
  16 + // 事务时间区间-开始时间
  17 + TransactionStartTime time.Time `json:"transactionStartTime,omitempty"`
  18 + // 事务时间区间-截止时间
  19 + TransactionEndTime time.Time `json:"transactionEndTime,omitempty"`
  20 + Operator int64 `json:"operator,omitempty"`
  21 + // 查询偏离量
  22 + Offset int `json:"offset,omitempty"`
  23 + // 查询限制
  24 + Limit int `json:"limit,omitempty"`
  25 +}
  26 +
  27 +func (searchSuMoneyTransactionRecordCommand *SearchSuMoneyTransactionRecordCommand) ValidateCommand() error {
  28 + valid := validation.Validation{}
  29 + b, err := valid.Valid(searchSuMoneyTransactionRecordCommand)
  30 + if err != nil {
  31 + return err
  32 + }
  33 + if !b {
  34 + for _, validErr := range valid.Errors {
  35 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  36 + }
  37 + }
  38 + return nil
  39 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 + "time"
  6 +
  7 + "github.com/astaxie/beego/validation"
  8 +)
  9 +
  10 +type SuMoneyTransactionRecordStatisticsCommand struct {
  11 + // 统一用户UID
  12 + Uid int64 `json:"uid" valid:"Required"`
  13 + // 事务时间区间-开始时间
  14 + TransactionStartTime time.Time `json:"transactionStartTime,omitempty"`
  15 + // 事务时间区间-截止时间
  16 + TransactionEndTime time.Time `json:"transactionEndTime,omitempty"`
  17 +}
  18 +
  19 +func (suMoneyTransactionRecordStatisticsCommand *SuMoneyTransactionRecordStatisticsCommand) ValidateCommand() error {
  20 + valid := validation.Validation{}
  21 + b, err := valid.Valid(suMoneyTransactionRecordStatisticsCommand)
  22 + if err != nil {
  23 + return err
  24 + }
  25 + if !b {
  26 + for _, validErr := range valid.Errors {
  27 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  28 + }
  29 + }
  30 + return nil
  31 +}
  1 +package query
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type GetSuMoneyTransactionRecordQuery struct {
  10 + // 素币事务记录ID
  11 + SuMoneyTransactionRecordId int64 `json:"suMoneyTransactionRecordId" valid:"Required"`
  12 +}
  13 +
  14 +func (getSuMoneyTransactionRecordQuery *GetSuMoneyTransactionRecordQuery) ValidateQuery() error {
  15 + valid := validation.Validation{}
  16 + b, err := valid.Valid(getSuMoneyTransactionRecordQuery)
  17 + if err != nil {
  18 + return err
  19 + }
  20 + if !b {
  21 + for _, validErr := range valid.Errors {
  22 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  23 + }
  24 + }
  25 + return nil
  26 +}