作者 linmadan

重构素币功能,添加统计项

此 diff 太大无法显示。
1 -swagger: "2.0"  
2 -info:  
3 - title: ""  
4 - description: 买买买价值系统  
5 - contact:  
6 - name: linmadan  
7 - email: 772181827@qq.com  
8 - version: 0.0.1  
9 -consumes:  
10 - - application/json  
11 - - application/xml  
12 -produces:  
13 - - application/json  
14 - - application/xml  
15 -paths:  
16 - /api/business/index:  
17 - post:  
18 - tags:  
19 - - unifiedUserCenter  
20 - summary: 同步企业员工回调  
21 - description: 同步企业员工回调  
22 - operationId: unifiedUserCenter#syncEmployeeCallback  
23 - parameters:  
24 - - name: SyncEmployeeCallbackRequestBody  
25 - in: body  
26 - required: true  
27 - schema:  
28 - $ref: '#/definitions/UnifiedUserCenterSyncEmployeeCallbackRequestBody'  
29 - responses:  
30 - "200":  
31 - description: OK response.  
32 - schema:  
33 - $ref: '#/definitions/UnifiedUserCenterSyncEmployeeCallbackResponseBody'  
34 - schemes:  
35 - - http  
36 - /config/bid-time-matchs:  
37 - get:  
38 - tags:  
39 - - config  
40 - summary: 返回竞标时间字典列表(1全部,2已截止,3未截止)  
41 - description: 返回竞标时间字典列表(1全部,2已截止,3未截止)  
42 - operationId: config#listBidTimeMatch  
43 - responses:  
44 - "200":  
45 - description: OK response.  
46 - schema:  
47 - $ref: '#/definitions/ConfigListBidTimeMatchResponseBody'  
48 - schemes:  
49 - - http  
50 - /config/customer-values:  
51 - get:  
52 - tags:  
53 - - config  
54 - summary: 返回客户价值字典列表  
55 - description: 返回客户价值字典列表  
56 - operationId: config#listCustomerValue  
57 - responses:  
58 - "200":  
59 - description: OK response.  
60 - schema:  
61 - $ref: '#/definitions/ConfigListCustomerValueResponseBody'  
62 - schemes:  
63 - - http  
64 - /config/employee-permissions:  
65 - get:  
66 - tags:  
67 - - config  
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 - schemes:  
77 - - http  
78 - /config/reference-resource-types:  
79 - get:  
80 - tags:  
81 - - config  
82 - summary: 返回任务引用资源类型字典列表  
83 - description: 返回任务引用资源类型字典列表  
84 - operationId: config#listReferenceResourceType  
85 - responses:  
86 - "200":  
87 - description: OK response.  
88 - schema:  
89 - $ref: '#/definitions/ConfigListReferenceResourceTypeResponseBody'  
90 - schemes:  
91 - - http  
92 - /config/task-natures:  
93 - get:  
94 - tags:  
95 - - config  
96 - summary: 返回任务性质字典列表  
97 - description: 返回任务性质字典列表  
98 - operationId: config#listTaskNature  
99 - responses:  
100 - "200":  
101 - description: OK response.  
102 - schema:  
103 - $ref: '#/definitions/ConfigListTaskNatureResponseBody'  
104 - schemes:  
105 - - http  
106 - /config/task-statuses:  
107 - get:  
108 - tags:  
109 - - config  
110 - summary: 返回任务状态字典列表  
111 - description: 返回任务状态字典列表  
112 - operationId: config#listTaskStatus  
113 - responses:  
114 - "200":  
115 - description: OK response.  
116 - schema:  
117 - $ref: '#/definitions/ConfigListTaskStatusResponseBody'  
118 - schemes:  
119 - - http  
120 - /config/task-types:  
121 - get:  
122 - tags:  
123 - - config  
124 - summary: 返回任务类型字典列表  
125 - description: 返回任务类型字典列表  
126 - operationId: config#listTaskType  
127 - responses:  
128 - "200":  
129 - description: OK response.  
130 - schema:  
131 - $ref: '#/definitions/ConfigListTaskTypeResponseBody'  
132 - schemes:  
133 - - http  
134 - /customer-values:  
135 - get:  
136 - tags:  
137 - - customerValue  
138 - summary: 返回客户价值列表  
139 - description: 返回客户价值列表  
140 - operationId: customerValue#listCustomerValue  
141 - parameters:  
142 - - name: companyId  
143 - in: query  
144 - description: 公司ID  
145 - required: false  
146 - type: integer  
147 - - name: customerValueName  
148 - in: query  
149 - description: 客户价值名称  
150 - required: false  
151 - type: string  
152 - - name: customerValueNameMatch  
153 - in: query  
154 - description: 客户价值名称匹配  
155 - required: false  
156 - type: string  
157 - - name: offset  
158 - in: query  
159 - description: 查询偏离量  
160 - required: false  
161 - type: integer  
162 - - name: limit  
163 - in: query  
164 - description: 查询限制  
165 - required: false  
166 - type: integer  
167 - responses:  
168 - "200":  
169 - description: OK response.  
170 - schema:  
171 - $ref: '#/definitions/CustomerValueListCustomerValueResponseBody'  
172 - schemes:  
173 - - http  
174 - post:  
175 - tags:  
176 - - customerValue  
177 - summary: 创建客户价值  
178 - description: 创建客户价值  
179 - operationId: customerValue#createCustomerValue  
180 - parameters:  
181 - - name: CreateCustomerValueRequestBody  
182 - in: body  
183 - required: true  
184 - schema:  
185 - $ref: '#/definitions/CustomerValueCreateCustomerValueRequestBody'  
186 - responses:  
187 - "200":  
188 - description: OK response.  
189 - schema:  
190 - $ref: '#/definitions/CustomerValueCreateCustomerValueResponseBody'  
191 - schemes:  
192 - - http  
193 - /customer-values/{customerValueId}:  
194 - get:  
195 - tags:  
196 - - customerValue  
197 - summary: 返回客户价值  
198 - description: 返回客户价值  
199 - operationId: customerValue#getCustomerValue  
200 - parameters:  
201 - - name: customerValueId  
202 - in: path  
203 - description: 客户价值ID  
204 - required: true  
205 - type: integer  
206 - responses:  
207 - "200":  
208 - description: OK response.  
209 - schema:  
210 - $ref: '#/definitions/CustomerValueGetCustomerValueResponseBody'  
211 - schemes:  
212 - - http  
213 - put:  
214 - tags:  
215 - - customerValue  
216 - summary: 更新客户价值  
217 - description: 更新客户价值  
218 - operationId: customerValue#updateCustomerValue  
219 - parameters:  
220 - - name: customerValueId  
221 - in: path  
222 - description: 客户价值ID  
223 - required: true  
224 - type: integer  
225 - - name: UpdateCustomerValueRequestBody  
226 - in: body  
227 - required: true  
228 - schema:  
229 - $ref: '#/definitions/CustomerValueUpdateCustomerValueRequestBody'  
230 - responses:  
231 - "200":  
232 - description: OK response.  
233 - schema:  
234 - $ref: '#/definitions/CustomerValueUpdateCustomerValueResponseBody'  
235 - schemes:  
236 - - http  
237 - delete:  
238 - tags:  
239 - - customerValue  
240 - summary: 移除客户价值  
241 - description: 移除客户价值  
242 - operationId: customerValue#removeCustomerValue  
243 - parameters:  
244 - - name: customerValueId  
245 - in: path  
246 - description: 客户价值ID  
247 - required: true  
248 - type: integer  
249 - responses:  
250 - "200":  
251 - description: OK response.  
252 - schema:  
253 - $ref: '#/definitions/CustomerValueRemoveCustomerValueResponseBody'  
254 - schemes:  
255 - - http  
256 - /employees:  
257 - get:  
258 - tags:  
259 - - employee  
260 - summary: 返回员工列表  
261 - description: 返回员工列表  
262 - operationId: employee#listEmployee  
263 - parameters:  
264 - - name: companyId  
265 - in: query  
266 - description: 公司ID  
267 - required: false  
268 - type: integer  
269 - - name: employeeNameMatch  
270 - in: query  
271 - description: 员工姓名匹配  
272 - required: false  
273 - type: string  
274 - - name: offset  
275 - in: query  
276 - description: 查询偏离量  
277 - required: false  
278 - type: integer  
279 - - name: limit  
280 - in: query  
281 - description: 查询限制  
282 - required: false  
283 - type: integer  
284 - responses:  
285 - "200":  
286 - description: OK response.  
287 - schema:  
288 - $ref: '#/definitions/EmployeeListEmployeeResponseBody'  
289 - schemes:  
290 - - http  
291 - post:  
292 - tags:  
293 - - employee  
294 - summary: 创建新员工  
295 - description: 创建新员工  
296 - operationId: employee#createEmployee  
297 - parameters:  
298 - - name: CreateEmployeeRequestBody  
299 - in: body  
300 - required: true  
301 - schema:  
302 - $ref: '#/definitions/EmployeeCreateEmployeeRequestBody'  
303 - responses:  
304 - "200":  
305 - description: OK response.  
306 - schema:  
307 - $ref: '#/definitions/EmployeeCreateEmployeeResponseBody'  
308 - schemes:  
309 - - http  
310 - /employees/{uid}:  
311 - get:  
312 - tags:  
313 - - employee  
314 - summary: 返回员工  
315 - description: 返回员工  
316 - operationId: employee#getEmployee  
317 - parameters:  
318 - - name: uid  
319 - in: path  
320 - description: 统一用户UID  
321 - required: true  
322 - type: integer  
323 - responses:  
324 - "200":  
325 - description: OK response.  
326 - schema:  
327 - $ref: '#/definitions/EmployeeGetEmployeeResponseBody'  
328 - schemes:  
329 - - http  
330 - put:  
331 - tags:  
332 - - employee  
333 - summary: 更新员工  
334 - description: 更新员工  
335 - operationId: employee#updateEmployee  
336 - parameters:  
337 - - name: uid  
338 - in: path  
339 - description: 统一用户UID  
340 - required: true  
341 - type: integer  
342 - - name: UpdateEmployeeRequestBody  
343 - in: body  
344 - required: true  
345 - schema:  
346 - $ref: '#/definitions/EmployeeUpdateEmployeeRequestBody'  
347 - responses:  
348 - "200":  
349 - description: OK response.  
350 - schema:  
351 - $ref: '#/definitions/EmployeeUpdateEmployeeResponseBody'  
352 - schemes:  
353 - - http  
354 - delete:  
355 - tags:  
356 - - employee  
357 - summary: 移除员工  
358 - description: 移除员工  
359 - operationId: employee#removeEmployee  
360 - parameters:  
361 - - name: uid  
362 - in: path  
363 - description: 统一用户UID  
364 - required: true  
365 - type: integer  
366 - responses:  
367 - "200":  
368 - description: OK response.  
369 - schema:  
370 - $ref: '#/definitions/EmployeeRemoveEmployeeResponseBody'  
371 - schemes:  
372 - - http  
373 - /notifications:  
374 - get:  
375 - tags:  
376 - - notification  
377 - summary: 返回发送出的通知列表  
378 - description: 返回发送出的通知列表  
379 - operationId: notification#listSentNotification  
380 - parameters:  
381 - - name: receiverId  
382 - in: query  
383 - description: 通知接收者Uid  
384 - required: false  
385 - type: integer  
386 - - name: notificationType  
387 - in: query  
388 - description: 通知类型  
389 - required: false  
390 - type: integer  
391 - - name: offset  
392 - in: query  
393 - description: 查询偏离量  
394 - required: false  
395 - type: integer  
396 - - name: limit  
397 - in: query  
398 - description: 查询限制  
399 - required: false  
400 - type: integer  
401 - responses:  
402 - "200":  
403 - description: OK response.  
404 - schema:  
405 - $ref: '#/definitions/NotificationListSentNotificationResponseBody'  
406 - schemes:  
407 - - http  
408 - /notifications/read:  
409 - post:  
410 - tags:  
411 - - notification  
412 - summary: 读取发送出的通知  
413 - description: 读取发送出的通知  
414 - operationId: notification#readSentNotification  
415 - parameters:  
416 - - name: ReadSentNotificationRequestBody  
417 - in: body  
418 - required: true  
419 - schema:  
420 - $ref: '#/definitions/NotificationReadSentNotificationRequestBody'  
421 - responses:  
422 - "200":  
423 - description: OK response.  
424 - schema:  
425 - $ref: '#/definitions/NotificationReadSentNotificationResponseBody'  
426 - schemes:  
427 - - http  
428 - /notifications/read-all:  
429 - post:  
430 - tags:  
431 - - notification  
432 - summary: 读取全部为读取的发送出的通知  
433 - description: 读取全部为读取的发送出的通知  
434 - operationId: notification#readAllUnReadSentNotification  
435 - parameters:  
436 - - name: ReadAllUnReadSentNotificationRequestBody  
437 - in: body  
438 - required: true  
439 - schema:  
440 - $ref: '#/definitions/NotificationReadAllUnReadSentNotificationRequestBody'  
441 - responses:  
442 - "200":  
443 - description: OK response.  
444 - schema:  
445 - $ref: '#/definitions/NotificationReadAllUnReadSentNotificationResponseBody'  
446 - schemes:  
447 - - http  
448 - /off-task-records/{offTaskRecordId}:  
449 - get:  
450 - tags:  
451 - - offTaskRecord  
452 - summary: 返回关闭任务记录  
453 - description: 返回关闭任务记录  
454 - operationId: offTaskRecord#getOffTaskRecord  
455 - parameters:  
456 - - name: offTaskRecordId  
457 - in: path  
458 - description: 关闭任务记录ID  
459 - required: true  
460 - type: integer  
461 - responses:  
462 - "200":  
463 - description: OK response.  
464 - schema:  
465 - $ref: '#/definitions/OffTaskRecordGetOffTaskRecordResponseBody'  
466 - schemes:  
467 - - http  
468 - /off-task-records/search-off-task-record:  
469 - post:  
470 - tags:  
471 - - offTaskRecord  
472 - summary: 搜索关闭任务记录  
473 - description: 搜索关闭任务记录  
474 - operationId: offTaskRecord#searchOffTaskRecord  
475 - parameters:  
476 - - name: SearchOffTaskRecordRequestBody  
477 - in: body  
478 - required: true  
479 - schema:  
480 - $ref: '#/definitions/OffTaskRecordSearchOffTaskRecordRequestBody'  
481 - responses:  
482 - "200":  
483 - description: OK response.  
484 - schema:  
485 - $ref: '#/definitions/OffTaskRecordSearchOffTaskRecordResponseBody'  
486 - schemes:  
487 - - http  
488 - /project-belongs:  
489 - get:  
490 - tags:  
491 - - projectBelong  
492 - summary: 返回项目归属列表  
493 - description: 返回项目归属列表  
494 - operationId: projectBelong#listProjectBelong  
495 - parameters:  
496 - - name: companyId  
497 - in: query  
498 - description: 公司ID  
499 - required: false  
500 - type: integer  
501 - - name: projectBelongName  
502 - in: query  
503 - description: 项目归属名称  
504 - required: false  
505 - type: string  
506 - - name: projectBelongNameMatch  
507 - in: query  
508 - description: 项目归属名称匹配  
509 - required: false  
510 - type: string  
511 - - name: offset  
512 - in: query  
513 - description: 查询偏离量  
514 - required: false  
515 - type: integer  
516 - - name: limit  
517 - in: query  
518 - description: 查询限制  
519 - required: false  
520 - type: integer  
521 - responses:  
522 - "200":  
523 - description: OK response.  
524 - schema:  
525 - $ref: '#/definitions/ProjectBelongListProjectBelongResponseBody'  
526 - schemes:  
527 - - http  
528 - post:  
529 - tags:  
530 - - projectBelong  
531 - summary: 创建项目归属  
532 - description: 创建项目归属  
533 - operationId: projectBelong#createProjectBelong  
534 - parameters:  
535 - - name: CreateProjectBelongRequestBody  
536 - in: body  
537 - required: true  
538 - schema:  
539 - $ref: '#/definitions/ProjectBelongCreateProjectBelongRequestBody'  
540 - responses:  
541 - "200":  
542 - description: OK response.  
543 - schema:  
544 - $ref: '#/definitions/ProjectBelongCreateProjectBelongResponseBody'  
545 - schemes:  
546 - - http  
547 - /project-belongs/{projectBelongId}:  
548 - get:  
549 - tags:  
550 - - projectBelong  
551 - summary: 返回项目归属  
552 - description: 返回项目归属  
553 - operationId: projectBelong#getProjectBelong  
554 - parameters:  
555 - - name: projectBelongId  
556 - in: path  
557 - description: 项目归属ID  
558 - required: true  
559 - type: integer  
560 - responses:  
561 - "200":  
562 - description: OK response.  
563 - schema:  
564 - $ref: '#/definitions/ProjectBelongGetProjectBelongResponseBody'  
565 - schemes:  
566 - - http  
567 - put:  
568 - tags:  
569 - - projectBelong  
570 - summary: 更新项目归属  
571 - description: 更新项目归属  
572 - operationId: projectBelong#updateProjectBelong  
573 - parameters:  
574 - - name: projectBelongId  
575 - in: path  
576 - description: 项目归属ID  
577 - required: true  
578 - type: integer  
579 - - name: UpdateProjectBelongRequestBody  
580 - in: body  
581 - required: true  
582 - schema:  
583 - $ref: '#/definitions/ProjectBelongUpdateProjectBelongRequestBody'  
584 - responses:  
585 - "200":  
586 - description: OK response.  
587 - schema:  
588 - $ref: '#/definitions/ProjectBelongUpdateProjectBelongResponseBody'  
589 - schemes:  
590 - - http  
591 - delete:  
592 - tags:  
593 - - projectBelong  
594 - summary: 移除项目归属  
595 - description: 移除项目归属  
596 - operationId: projectBelong#removeProjectBelong  
597 - parameters:  
598 - - name: projectBelongId  
599 - in: path  
600 - description: 项目归属ID  
601 - required: true  
602 - type: integer  
603 - responses:  
604 - "200":  
605 - description: OK response.  
606 - schema:  
607 - $ref: '#/definitions/ProjectBelongRemoveProjectBelongResponseBody'  
608 - schemes:  
609 - - http  
610 - /reject-task-records/{rejectTaskRecordId}:  
611 - get:  
612 - tags:  
613 - - rejectTaskRecord  
614 - summary: 返回关闭任务记录  
615 - description: 返回关闭任务记录  
616 - operationId: rejectTaskRecord#getRejectTaskRecord  
617 - parameters:  
618 - - name: rejectTaskRecordId  
619 - in: path  
620 - description: 关闭任务记录ID  
621 - required: true  
622 - type: integer  
623 - responses:  
624 - "200":  
625 - description: OK response.  
626 - schema:  
627 - $ref: '#/definitions/RejectTaskRecordGetRejectTaskRecordResponseBody'  
628 - schemes:  
629 - - http  
630 - /reject-task-records/search-reject-task-record:  
631 - post:  
632 - tags:  
633 - - rejectTaskRecord  
634 - summary: 搜索驳回任务记录  
635 - description: 搜索驳回任务记录  
636 - operationId: rejectTaskRecord#searchRejectTaskRecord  
637 - parameters:  
638 - - name: SearchRejectTaskRecordRequestBody  
639 - in: body  
640 - required: true  
641 - schema:  
642 - $ref: '#/definitions/RejectTaskRecordSearchRejectTaskRecordRequestBody'  
643 - responses:  
644 - "200":  
645 - description: OK response.  
646 - schema:  
647 - $ref: '#/definitions/RejectTaskRecordSearchRejectTaskRecordResponseBody'  
648 - schemes:  
649 - - http  
650 - /statistics/person-su-money:  
651 - post:  
652 - tags:  
653 - - statistics  
654 - summary: 获取个人素币统计  
655 - description: 获取个人素币统计  
656 - operationId: statistics#personSuMoneyStatistics  
657 - parameters:  
658 - - name: PersonSuMoneyStatisticsRequestBody  
659 - in: body  
660 - required: true  
661 - schema:  
662 - $ref: '#/definitions/StatisticsPersonSuMoneyStatisticsRequestBody'  
663 - responses:  
664 - "200":  
665 - description: OK response.  
666 - schema:  
667 - $ref: '#/definitions/StatisticsPersonSuMoneyStatisticsResponseBody'  
668 - schemes:  
669 - - http  
670 - /statistics/person-task:  
671 - post:  
672 - tags:  
673 - - statistics  
674 - summary: 获取个人任务统计  
675 - description: 获取个人任务统计  
676 - operationId: statistics#personTaskStatistics  
677 - parameters:  
678 - - name: PersonTaskStatisticsRequestBody  
679 - in: body  
680 - required: true  
681 - schema:  
682 - $ref: '#/definitions/StatisticsPersonTaskStatisticsRequestBody'  
683 - responses:  
684 - "200":  
685 - description: OK response.  
686 - schema:  
687 - $ref: '#/definitions/StatisticsPersonTaskStatisticsResponseBody'  
688 - schemes:  
689 - - http  
690 - /statistics/system-task:  
691 - post:  
692 - tags:  
693 - - statistics  
694 - summary: 获取系统任务统计  
695 - description: 获取系统任务统计  
696 - operationId: statistics#systemTaskStatistics  
697 - parameters:  
698 - - name: SystemTaskStatisticsRequestBody  
699 - in: body  
700 - required: true  
701 - schema:  
702 - $ref: '#/definitions/StatisticsSystemTaskStatisticsRequestBody'  
703 - responses:  
704 - "200":  
705 - description: OK response.  
706 - schema:  
707 - $ref: '#/definitions/StatisticsSystemTaskStatisticsResponseBody'  
708 - schemes:  
709 - - http  
710 - /su-money/exchange:  
711 - post:  
712 - tags:  
713 - - suMoney  
714 - summary: 素币兑换  
715 - description: 素币兑换  
716 - operationId: suMoney#exchangeSuMoney  
717 - parameters:  
718 - - name: ExchangeSuMoneyRequestBody  
719 - in: body  
720 - required: true  
721 - schema:  
722 - $ref: '#/definitions/SuMoneyExchangeSuMoneyRequestBody'  
723 - responses:  
724 - "200":  
725 - description: OK response.  
726 - schema:  
727 - $ref: '#/definitions/SuMoneyExchangeSuMoneyResponseBody'  
728 - schemes:  
729 - - http  
730 - /su-money/search-su-money-transaction-record:  
731 - post:  
732 - tags:  
733 - - suMoney  
734 - summary: 搜索素币事务记录  
735 - description: 搜索素币事务记录  
736 - operationId: suMoney#searchSuMoneyTransactionRecord  
737 - parameters:  
738 - - name: SearchSuMoneyTransactionRecordRequestBody  
739 - in: body  
740 - required: true  
741 - schema:  
742 - $ref: '#/definitions/SuMoneySearchSuMoneyTransactionRecordRequestBody'  
743 - responses:  
744 - "200":  
745 - description: OK response.  
746 - schema:  
747 - $ref: '#/definitions/SuMoneySearchSuMoneyTransactionRecordResponseBody'  
748 - schemes:  
749 - - http  
750 - /su-money/su-money-transaction-record-statistics:  
751 - post:  
752 - tags:  
753 - - suMoney  
754 - summary: 素币事务记录统计  
755 - description: 素币事务记录统计  
756 - operationId: suMoney#suMoneyTransactionRecordStatistics  
757 - parameters:  
758 - - name: SuMoneyTransactionRecordStatisticsRequestBody  
759 - in: body  
760 - required: true  
761 - schema:  
762 - $ref: '#/definitions/SuMoneySuMoneyTransactionRecordStatisticsRequestBody'  
763 - responses:  
764 - "200":  
765 - description: OK response.  
766 - schema:  
767 - $ref: '#/definitions/SuMoneySuMoneyTransactionRecordStatisticsResponseBody'  
768 - schemes:  
769 - - http  
770 - /su-money/su-money-transaction-records/{suMoneyTransactionRecordId}:  
771 - get:  
772 - tags:  
773 - - suMoney  
774 - summary: 返回素币事务记录  
775 - description: 返回素币事务记录  
776 - operationId: suMoney#getSuMoneyTransactionRecord  
777 - parameters:  
778 - - name: suMoneyTransactionRecordId  
779 - in: path  
780 - description: 素币事务记录ID  
781 - required: true  
782 - type: integer  
783 - responses:  
784 - "200":  
785 - description: OK response.  
786 - schema:  
787 - $ref: '#/definitions/SuMoneyGetSuMoneyTransactionRecordResponseBody'  
788 - schemes:  
789 - - http  
790 - /task-natures:  
791 - get:  
792 - tags:  
793 - - taskNature  
794 - summary: 返回任务性质列表  
795 - description: 返回任务性质列表  
796 - operationId: taskNature#listTaskNature  
797 - parameters:  
798 - - name: companyId  
799 - in: query  
800 - description: 公司ID  
801 - required: false  
802 - type: integer  
803 - - name: taskNatureName  
804 - in: query  
805 - description: 任务性质名称  
806 - required: false  
807 - type: string  
808 - - name: taskNatureNameMatch  
809 - in: query  
810 - description: 任务性质名称匹配  
811 - required: false  
812 - type: string  
813 - - name: offset  
814 - in: query  
815 - description: 查询偏离量  
816 - required: false  
817 - type: integer  
818 - - name: limit  
819 - in: query  
820 - description: 查询限制  
821 - required: false  
822 - type: integer  
823 - responses:  
824 - "200":  
825 - description: OK response.  
826 - schema:  
827 - $ref: '#/definitions/TaskNatureListTaskNatureResponseBody'  
828 - schemes:  
829 - - http  
830 - post:  
831 - tags:  
832 - - taskNature  
833 - summary: 创建任务性质  
834 - description: 创建任务性质  
835 - operationId: taskNature#createTaskNature  
836 - parameters:  
837 - - name: CreateTaskNatureRequestBody  
838 - in: body  
839 - required: true  
840 - schema:  
841 - $ref: '#/definitions/TaskNatureCreateTaskNatureRequestBody'  
842 - responses:  
843 - "200":  
844 - description: OK response.  
845 - schema:  
846 - $ref: '#/definitions/TaskNatureCreateTaskNatureResponseBody'  
847 - schemes:  
848 - - http  
849 - /task-natures/{taskNatureId}:  
850 - get:  
851 - tags:  
852 - - taskNature  
853 - summary: 返回任务性质  
854 - description: 返回任务性质  
855 - operationId: taskNature#getTaskNature  
856 - parameters:  
857 - - name: taskNatureId  
858 - in: path  
859 - description: 任务性质ID  
860 - required: true  
861 - type: integer  
862 - responses:  
863 - "200":  
864 - description: OK response.  
865 - schema:  
866 - $ref: '#/definitions/TaskNatureGetTaskNatureResponseBody'  
867 - schemes:  
868 - - http  
869 - put:  
870 - tags:  
871 - - taskNature  
872 - summary: 更新任务性质  
873 - description: 更新任务性质  
874 - operationId: taskNature#updateTaskNature  
875 - parameters:  
876 - - name: taskNatureId  
877 - in: path  
878 - description: 任务性质ID  
879 - required: true  
880 - type: integer  
881 - - name: UpdateTaskNatureRequestBody  
882 - in: body  
883 - required: true  
884 - schema:  
885 - $ref: '#/definitions/TaskNatureUpdateTaskNatureRequestBody'  
886 - responses:  
887 - "200":  
888 - description: OK response.  
889 - schema:  
890 - $ref: '#/definitions/TaskNatureUpdateTaskNatureResponseBody'  
891 - schemes:  
892 - - http  
893 - delete:  
894 - tags:  
895 - - taskNature  
896 - summary: 移除任务性质  
897 - description: 移除任务性质  
898 - operationId: taskNature#removeTaskNature  
899 - parameters:  
900 - - name: taskNatureId  
901 - in: path  
902 - description: 任务性质ID  
903 - required: true  
904 - type: integer  
905 - responses:  
906 - "200":  
907 - description: OK response.  
908 - schema:  
909 - $ref: '#/definitions/TaskNatureRemoveTaskNatureResponseBody'  
910 - schemes:  
911 - - http  
912 - /tasks:  
913 - get:  
914 - tags:  
915 - - task  
916 - summary: 返回任务列表  
917 - description: 返回任务列表  
918 - operationId: task#listTask  
919 - parameters:  
920 - - name: companyId  
921 - in: query  
922 - description: 公司ID  
923 - required: false  
924 - type: integer  
925 - - name: sponsor  
926 - in: query  
927 - description: 任务发起者UID  
928 - required: false  
929 - type: integer  
930 - format: int64  
931 - - name: taskContentMatch  
932 - in: query  
933 - description: 任务内容匹配  
934 - required: false  
935 - type: string  
936 - - name: taskType  
937 - in: query  
938 - description: 任务类型  
939 - required: false  
940 - type: integer  
941 - - name: taskStatus  
942 - in: query  
943 - description: 任务状态  
944 - required: false  
945 - type: integer  
946 - - name: customerValue  
947 - in: query  
948 - description: 客户价值  
949 - required: false  
950 - type: array  
951 - items:  
952 - type: string  
953 - collectionFormat: multi  
954 - - name: taskNature  
955 - in: query  
956 - description: 任务性质  
957 - required: false  
958 - type: string  
959 - - name: isRewardTake  
960 - in: query  
961 - description: 是否悬赏任务  
962 - required: false  
963 - type: boolean  
964 - - name: bidTimeMatch  
965 - in: query  
966 - description: 竞标时间(1全部,2已截止,3未截止)  
967 - required: false  
968 - type: integer  
969 - - name: receiver  
970 - in: query  
971 - description: 任务领取人UID  
972 - required: false  
973 - type: integer  
974 - format: int64  
975 - - name: participator  
976 - in: query  
977 - description: 任务参与者UID  
978 - required: false  
979 - type: integer  
980 - format: int64  
981 - - name: offset  
982 - in: query  
983 - description: 查询偏离量  
984 - required: false  
985 - type: integer  
986 - - name: limit  
987 - in: query  
988 - description: 查询限制  
989 - required: false  
990 - type: integer  
991 - responses:  
992 - "200":  
993 - description: OK response.  
994 - schema:  
995 - $ref: '#/definitions/TaskListTaskResponseBody'  
996 - schemes:  
997 - - http  
998 - post:  
999 - tags:  
1000 - - task  
1001 - summary: 创建新任务  
1002 - description: 创建新任务  
1003 - operationId: task#createTask  
1004 - parameters:  
1005 - - name: CreateTaskRequestBody  
1006 - in: body  
1007 - required: true  
1008 - schema:  
1009 - $ref: '#/definitions/TaskCreateTaskRequestBody'  
1010 - responses:  
1011 - "200":  
1012 - description: OK response.  
1013 - schema:  
1014 - $ref: '#/definitions/TaskCreateTaskResponseBody'  
1015 - schemes:  
1016 - - http  
1017 - /tasks/{taskId}:  
1018 - get:  
1019 - tags:  
1020 - - task  
1021 - summary: 返回任务  
1022 - description: 返回任务  
1023 - operationId: task#getTask  
1024 - parameters:  
1025 - - name: taskId  
1026 - in: path  
1027 - description: 任务ID  
1028 - required: true  
1029 - type: integer  
1030 - responses:  
1031 - "200":  
1032 - description: OK response.  
1033 - schema:  
1034 - $ref: '#/definitions/TaskGetTaskResponseBody'  
1035 - schemes:  
1036 - - http  
1037 - put:  
1038 - tags:  
1039 - - task  
1040 - summary: 更新任务  
1041 - description: 更新任务  
1042 - operationId: task#updateTask  
1043 - parameters:  
1044 - - name: taskId  
1045 - in: path  
1046 - description: 任务ID  
1047 - required: true  
1048 - type: integer  
1049 - - name: UpdateTaskRequestBody  
1050 - in: body  
1051 - required: true  
1052 - schema:  
1053 - $ref: '#/definitions/TaskUpdateTaskRequestBody'  
1054 - responses:  
1055 - "200":  
1056 - description: OK response.  
1057 - schema:  
1058 - $ref: '#/definitions/TaskUpdateTaskResponseBody'  
1059 - schemes:  
1060 - - http  
1061 - delete:  
1062 - tags:  
1063 - - task  
1064 - summary: 移除任务  
1065 - description: 移除任务  
1066 - operationId: task#removeTask  
1067 - parameters:  
1068 - - name: taskId  
1069 - in: path  
1070 - description: 任务ID  
1071 - required: true  
1072 - type: integer  
1073 - responses:  
1074 - "200":  
1075 - description: OK response.  
1076 - schema:  
1077 - $ref: '#/definitions/TaskRemoveTaskResponseBody'  
1078 - schemes:  
1079 - - http  
1080 - /tasks/{taskId}/acceptance:  
1081 - post:  
1082 - tags:  
1083 - - task  
1084 - summary: 验收任务  
1085 - description: 验收任务  
1086 - operationId: task#acceptanceTask  
1087 - parameters:  
1088 - - name: taskId  
1089 - in: path  
1090 - description: 任务ID  
1091 - required: true  
1092 - type: integer  
1093 - - name: AcceptanceTaskRequestBody  
1094 - in: body  
1095 - required: true  
1096 - schema:  
1097 - $ref: '#/definitions/TaskAcceptanceTaskRequestBody'  
1098 - responses:  
1099 - "200":  
1100 - description: OK response.  
1101 - schema:  
1102 - $ref: '#/definitions/TaskAcceptanceTaskResponseBody'  
1103 - schemes:  
1104 - - http  
1105 - /tasks/{taskId}/apply-complete:  
1106 - post:  
1107 - tags:  
1108 - - task  
1109 - summary: 申请完成任务  
1110 - description: 申请完成任务  
1111 - operationId: task#applyCompleteTask  
1112 - parameters:  
1113 - - name: taskId  
1114 - in: path  
1115 - description: 任务ID  
1116 - required: true  
1117 - type: integer  
1118 - - name: ApplyCompleteTaskRequestBody  
1119 - in: body  
1120 - required: true  
1121 - schema:  
1122 - $ref: '#/definitions/TaskApplyCompleteTaskRequestBody'  
1123 - responses:  
1124 - "200":  
1125 - description: OK response.  
1126 - schema:  
1127 - $ref: '#/definitions/TaskApplyCompleteTaskResponseBody'  
1128 - schemes:  
1129 - - http  
1130 - /tasks/{taskId}/bid:  
1131 - post:  
1132 - tags:  
1133 - - task  
1134 - summary: 对任务进行竞标  
1135 - description: 对任务进行竞标  
1136 - operationId: task#bidTask  
1137 - parameters:  
1138 - - name: taskId  
1139 - in: path  
1140 - description: 任务ID  
1141 - required: true  
1142 - type: integer  
1143 - - name: BidTaskRequestBody  
1144 - in: body  
1145 - required: true  
1146 - schema:  
1147 - $ref: '#/definitions/TaskBidTaskRequestBody'  
1148 - responses:  
1149 - "200":  
1150 - description: OK response.  
1151 - schema:  
1152 - $ref: '#/definitions/TaskBidTaskResponseBody'  
1153 - schemes:  
1154 - - http  
1155 - /tasks/{taskId}/choose-successful-bidder:  
1156 - post:  
1157 - tags:  
1158 - - task  
1159 - summary: 选择竞标任务的中标人  
1160 - description: 选择竞标任务的中标人  
1161 - operationId: task#chooseSuccessfulBidder  
1162 - parameters:  
1163 - - name: taskId  
1164 - in: path  
1165 - description: 任务ID  
1166 - required: true  
1167 - type: integer  
1168 - - name: ChooseSuccessfulBidderRequestBody  
1169 - in: body  
1170 - required: true  
1171 - schema:  
1172 - $ref: '#/definitions/TaskChooseSuccessfulBidderRequestBody'  
1173 - responses:  
1174 - "200":  
1175 - description: OK response.  
1176 - schema:  
1177 - $ref: '#/definitions/TaskChooseSuccessfulBidderResponseBody'  
1178 - schemes:  
1179 - - http  
1180 - /tasks/{taskId}/dff:  
1181 - post:  
1182 - tags:  
1183 - - task  
1184 - summary: 关闭任务  
1185 - description: 关闭任务  
1186 - operationId: task#offTask  
1187 - parameters:  
1188 - - name: taskId  
1189 - in: path  
1190 - description: 任务ID  
1191 - required: true  
1192 - type: integer  
1193 - - name: OffTaskRequestBody  
1194 - in: body  
1195 - required: true  
1196 - schema:  
1197 - $ref: '#/definitions/TaskOffTaskRequestBody'  
1198 - responses:  
1199 - "200":  
1200 - description: OK response.  
1201 - schema:  
1202 - $ref: '#/definitions/TaskOffTaskResponseBody'  
1203 - schemes:  
1204 - - http  
1205 - /tasks/{taskId}/release:  
1206 - post:  
1207 - tags:  
1208 - - task  
1209 - summary: 发布任务  
1210 - description: 发布任务  
1211 - operationId: task#releaseTask  
1212 - parameters:  
1213 - - name: taskId  
1214 - in: path  
1215 - description: 任务ID  
1216 - required: true  
1217 - type: integer  
1218 - - name: ReleaseTaskRequestBody  
1219 - in: body  
1220 - required: true  
1221 - schema:  
1222 - $ref: '#/definitions/TaskReleaseTaskRequestBody'  
1223 - responses:  
1224 - "200":  
1225 - description: OK response.  
1226 - schema:  
1227 - $ref: '#/definitions/TaskReleaseTaskResponseBody'  
1228 - schemes:  
1229 - - http  
1230 - /tasks/{taskId}/rob:  
1231 - post:  
1232 - tags:  
1233 - - task  
1234 - summary: 对任务进行抢单  
1235 - description: 对任务进行抢单  
1236 - operationId: task#robTask  
1237 - parameters:  
1238 - - name: taskId  
1239 - in: path  
1240 - description: 任务ID  
1241 - required: true  
1242 - type: integer  
1243 - - name: RobTaskRequestBody  
1244 - in: body  
1245 - required: true  
1246 - schema:  
1247 - $ref: '#/definitions/TaskRobTaskRequestBody'  
1248 - responses:  
1249 - "200":  
1250 - description: OK response.  
1251 - schema:  
1252 - $ref: '#/definitions/TaskRobTaskResponseBody'  
1253 - schemes:  
1254 - - http  
1255 - /tasks/search:  
1256 - post:  
1257 - tags:  
1258 - - task  
1259 - summary: 搜索任务  
1260 - description: 搜索任务  
1261 - operationId: task#searchTask  
1262 - parameters:  
1263 - - name: SearchTaskRequestBody  
1264 - in: body  
1265 - required: true  
1266 - schema:  
1267 - $ref: '#/definitions/TaskSearchTaskRequestBody'  
1268 - responses:  
1269 - "200":  
1270 - description: OK response.  
1271 - schema:  
1272 - $ref: '#/definitions/TaskSearchTaskResponseBody'  
1273 - schemes:  
1274 - - http  
1275 - /tasks/search-off-task-record:  
1276 - post:  
1277 - tags:  
1278 - - task  
1279 - summary: 搜索关闭任务记录  
1280 - description: 搜索关闭任务记录  
1281 - operationId: task#searchOffTaskRecord  
1282 - parameters:  
1283 - - name: SearchOffTaskRecordRequestBody  
1284 - in: body  
1285 - required: true  
1286 - schema:  
1287 - $ref: '#/definitions/TaskSearchOffTaskRecordRequestBody'  
1288 - responses:  
1289 - "200":  
1290 - description: OK response.  
1291 - schema:  
1292 - $ref: '#/definitions/TaskSearchOffTaskRecordResponseBody'  
1293 - schemes:  
1294 - - http  
1295 -definitions:  
1296 - ConfigListBidTimeMatchResponseBody:  
1297 - title: 'Mediatype identifier: ConfigListBidTimeMatchResponseBody'  
1298 - type: object  
1299 - properties:  
1300 - bidTimeMatchs:  
1301 - type: array  
1302 - items:  
1303 - $ref: '#/definitions/configResponseBody'  
1304 - ConfigListCustomerValueResponseBody:  
1305 - title: 'Mediatype identifier: ConfigListCustomerValueResponseBody'  
1306 - type: object  
1307 - properties:  
1308 - customerValues:  
1309 - type: array  
1310 - items:  
1311 - $ref: '#/definitions/configResponseBody'  
1312 - ConfigListEmployeePermissionResponseBody:  
1313 - title: 'Mediatype identifier: ConfigListEmployeePermissionResponseBody'  
1314 - type: object  
1315 - properties:  
1316 - employeePermissions:  
1317 - type: array  
1318 - items:  
1319 - $ref: '#/definitions/configResponseBody'  
1320 - ConfigListReferenceResourceTypeResponseBody:  
1321 - title: 'Mediatype identifier: ConfigListReferenceResourceTypeResponseBody'  
1322 - type: object  
1323 - properties:  
1324 - referenceResourceTypes:  
1325 - type: array  
1326 - items:  
1327 - $ref: '#/definitions/configResponseBody'  
1328 - ConfigListTaskNatureResponseBody:  
1329 - title: 'Mediatype identifier: ConfigListTaskNatureResponseBody'  
1330 - type: object  
1331 - properties:  
1332 - taskNatures:  
1333 - type: array  
1334 - items:  
1335 - $ref: '#/definitions/configResponseBody'  
1336 - ConfigListTaskStatusResponseBody:  
1337 - title: 'Mediatype identifier: ConfigListTaskStatusResponseBody'  
1338 - type: object  
1339 - properties:  
1340 - taskStatuses:  
1341 - type: array  
1342 - items:  
1343 - $ref: '#/definitions/configResponseBody'  
1344 - ConfigListTaskTypeResponseBody:  
1345 - title: 'Mediatype identifier: ConfigListTaskTypeResponseBody'  
1346 - type: object  
1347 - properties:  
1348 - taskTypes:  
1349 - type: array  
1350 - items:  
1351 - $ref: '#/definitions/configResponseBody'  
1352 - CustomerValueCreateCustomerValueRequestBody:  
1353 - title: CustomerValueCreateCustomerValueRequestBody  
1354 - type: object  
1355 - properties:  
1356 - companyId:  
1357 - type: integer  
1358 - description: 公司ID  
1359 - required:  
1360 - - companyId  
1361 - customerValueName:  
1362 - type: string  
1363 - description: 客户价值名称  
1364 - required:  
1365 - - customerValueName  
1366 - CustomerValueCreateCustomerValueResponseBody:  
1367 - title: 'Mediatype identifier: CustomerValueCreateCustomerValueResponseBody'  
1368 - type: object  
1369 - properties:  
1370 - customerValue:  
1371 - $ref: '#/definitions/customerValueResponseBody'  
1372 - CustomerValueGetCustomerValueResponseBody:  
1373 - title: 'Mediatype identifier: CustomerValueGetCustomerValueResponseBody'  
1374 - type: object  
1375 - properties:  
1376 - customerValue:  
1377 - $ref: '#/definitions/customerValueResponseBody'  
1378 - CustomerValueListCustomerValueResponseBody:  
1379 - title: 'Mediatype identifier: CustomerValueListCustomerValueResponseBody'  
1380 - type: object  
1381 - properties:  
1382 - count:  
1383 - type: integer  
1384 - description: 结果总数  
1385 - format: int64  
1386 - customerValues:  
1387 - type: array  
1388 - items:  
1389 - $ref: '#/definitions/customerValueResponseBody'  
1390 - CustomerValueRemoveCustomerValueResponseBody:  
1391 - title: 'Mediatype identifier: CustomerValueRemoveCustomerValueResponseBody'  
1392 - type: object  
1393 - properties:  
1394 - customerValue:  
1395 - $ref: '#/definitions/customerValueResponseBody'  
1396 - CustomerValueUpdateCustomerValueRequestBody:  
1397 - title: CustomerValueUpdateCustomerValueRequestBody  
1398 - type: object  
1399 - properties:  
1400 - customerValueName:  
1401 - type: string  
1402 - description: 客户价值名称  
1403 - CustomerValueUpdateCustomerValueResponseBody:  
1404 - title: 'Mediatype identifier: CustomerValueUpdateCustomerValueResponseBody'  
1405 - type: object  
1406 - properties:  
1407 - customerValue:  
1408 - $ref: '#/definitions/customerValueResponseBody'  
1409 - EmployeeCreateEmployeeRequestBody:  
1410 - title: EmployeeCreateEmployeeRequestBody  
1411 - type: object  
1412 - properties:  
1413 - employeeAccount:  
1414 - type: string  
1415 - description: 员工账号  
1416 - employeeAvatarUrl:  
1417 - type: string  
1418 - description: 员工头像URL  
1419 - employeeName:  
1420 - type: string  
1421 - description: 员工姓名  
1422 - uid:  
1423 - type: integer  
1424 - description: 统一用户UID  
1425 - required:  
1426 - - uid  
1427 - EmployeeCreateEmployeeResponseBody:  
1428 - title: 'Mediatype identifier: EmployeeCreateEmployeeResponseBody'  
1429 - type: object  
1430 - properties:  
1431 - employee:  
1432 - $ref: '#/definitions/employeeResponseBody'  
1433 - EmployeeGetEmployeeResponseBody:  
1434 - title: 'Mediatype identifier: EmployeeGetEmployeeResponseBody'  
1435 - type: object  
1436 - properties:  
1437 - employee:  
1438 - $ref: '#/definitions/employeeResponseBody'  
1439 - EmployeeListEmployeeResponseBody:  
1440 - title: 'Mediatype identifier: EmployeeListEmployeeResponseBody'  
1441 - type: object  
1442 - properties:  
1443 - count:  
1444 - type: integer  
1445 - description: 结果总数  
1446 - format: int64  
1447 - employees:  
1448 - type: array  
1449 - items:  
1450 - $ref: '#/definitions/employeeResponseBody'  
1451 - EmployeeRemoveEmployeeResponseBody:  
1452 - title: 'Mediatype identifier: EmployeeRemoveEmployeeResponseBody'  
1453 - type: object  
1454 - properties:  
1455 - employee:  
1456 - $ref: '#/definitions/employeeResponseBody'  
1457 - EmployeeUpdateEmployeeRequestBody:  
1458 - title: EmployeeUpdateEmployeeRequestBody  
1459 - type: object  
1460 - properties:  
1461 - employeeAccount:  
1462 - type: string  
1463 - description: 员工账号  
1464 - employeeAvatarUrl:  
1465 - type: string  
1466 - description: 员工头像URL  
1467 - employeeName:  
1468 - type: string  
1469 - description: 员工姓名  
1470 - permissions:  
1471 - type: array  
1472 - items:  
1473 - type: integer  
1474 - format: int64  
1475 - description: 员工权限集合  
1476 - EmployeeUpdateEmployeeResponseBody:  
1477 - title: 'Mediatype identifier: EmployeeUpdateEmployeeResponseBody'  
1478 - type: object  
1479 - properties:  
1480 - employee:  
1481 - $ref: '#/definitions/employeeResponseBody'  
1482 - NotificationListSentNotificationResponseBody:  
1483 - title: 'Mediatype identifier: NotificationListSentNotificationResponseBody'  
1484 - type: object  
1485 - properties:  
1486 - count:  
1487 - type: integer  
1488 - description: 结果总数  
1489 - format: int64  
1490 - sentNotifications:  
1491 - type: array  
1492 - items:  
1493 - $ref: '#/definitions/sentNotificationResponseBody'  
1494 - NotificationReadAllUnReadSentNotificationRequestBody:  
1495 - title: NotificationReadAllUnReadSentNotificationRequestBody  
1496 - type: object  
1497 - properties:  
1498 - receiverId:  
1499 - type: integer  
1500 - description: 通知接收者Uid  
1501 - required:  
1502 - - receiverId  
1503 - NotificationReadAllUnReadSentNotificationResponseBody:  
1504 - title: 'Mediatype identifier: NotificationReadAllUnReadSentNotificationResponseBody'  
1505 - type: object  
1506 - properties:  
1507 - readCount:  
1508 - type: integer  
1509 - description: 读取消息数  
1510 - format: int64  
1511 - NotificationReadSentNotificationRequestBody:  
1512 - title: NotificationReadSentNotificationRequestBody  
1513 - type: object  
1514 - properties:  
1515 - sentNotificationId:  
1516 - type: integer  
1517 - description: 发送出的通知ID  
1518 - required:  
1519 - - sentNotificationId  
1520 - NotificationReadSentNotificationResponseBody:  
1521 - title: 'Mediatype identifier: NotificationReadSentNotificationResponseBody'  
1522 - type: object  
1523 - properties:  
1524 - sentNotification:  
1525 - $ref: '#/definitions/sentNotificationResponseBody'  
1526 - OffTaskRecordGetOffTaskRecordResponseBody:  
1527 - title: 'Mediatype identifier: OffTaskRecordGetOffTaskRecordResponseBody'  
1528 - type: object  
1529 - properties:  
1530 - offTaskRecord:  
1531 - $ref: '#/definitions/offTaskRecordResponseBody'  
1532 - OffTaskRecordSearchOffTaskRecordRequestBody:  
1533 - title: OffTaskRecordSearchOffTaskRecordRequestBody  
1534 - type: object  
1535 - properties:  
1536 - companyId:  
1537 - type: integer  
1538 - description: 公司ID  
1539 - required:  
1540 - - companyId  
1541 - customerValue:  
1542 - type: array  
1543 - items:  
1544 - type: string  
1545 - description: 客户价值  
1546 - limit:  
1547 - type: integer  
1548 - description: 查询限制  
1549 - format: int64  
1550 - offEndTime:  
1551 - type: string  
1552 - description: 关闭任务时间区间-截止时间  
1553 - format: datetime  
1554 - offStartTime:  
1555 - type: string  
1556 - description: 关闭任务时间区间-开始时间  
1557 - format: datetime  
1558 - offset:  
1559 - type: integer  
1560 - description: 查询偏离量  
1561 - format: int64  
1562 - taskContentMatch:  
1563 - type: string  
1564 - description: 任务内容匹配  
1565 - taskNature:  
1566 - type: string  
1567 - description: 任务性质  
1568 - taskType:  
1569 - type: integer  
1570 - description: 任务类型  
1571 - format: int64  
1572 - OffTaskRecordSearchOffTaskRecordResponseBody:  
1573 - title: 'Mediatype identifier: OffTaskRecordSearchOffTaskRecordResponseBody'  
1574 - type: object  
1575 - properties:  
1576 - count:  
1577 - type: integer  
1578 - description: 结果总数  
1579 - format: int64  
1580 - offTaskRecords:  
1581 - type: array  
1582 - items:  
1583 - $ref: '#/definitions/offTaskRecordResponseBody'  
1584 - ProjectBelongCreateProjectBelongRequestBody:  
1585 - title: ProjectBelongCreateProjectBelongRequestBody  
1586 - type: object  
1587 - properties:  
1588 - companyId:  
1589 - type: integer  
1590 - description: 公司ID  
1591 - required:  
1592 - - companyId  
1593 - projectBelongName:  
1594 - type: string  
1595 - description: 项目归属名称  
1596 - required:  
1597 - - projectBelongName  
1598 - ProjectBelongCreateProjectBelongResponseBody:  
1599 - title: 'Mediatype identifier: ProjectBelongCreateProjectBelongResponseBody'  
1600 - type: object  
1601 - properties:  
1602 - projectBelong:  
1603 - $ref: '#/definitions/projectBelongResponseBody'  
1604 - ProjectBelongGetProjectBelongResponseBody:  
1605 - title: 'Mediatype identifier: ProjectBelongGetProjectBelongResponseBody'  
1606 - type: object  
1607 - properties:  
1608 - projectBelong:  
1609 - $ref: '#/definitions/projectBelongResponseBody'  
1610 - ProjectBelongListProjectBelongResponseBody:  
1611 - title: 'Mediatype identifier: ProjectBelongListProjectBelongResponseBody'  
1612 - type: object  
1613 - properties:  
1614 - count:  
1615 - type: integer  
1616 - description: 结果总数  
1617 - format: int64  
1618 - projectBelongs:  
1619 - type: array  
1620 - items:  
1621 - $ref: '#/definitions/projectBelongResponseBody'  
1622 - ProjectBelongRemoveProjectBelongResponseBody:  
1623 - title: 'Mediatype identifier: ProjectBelongRemoveProjectBelongResponseBody'  
1624 - type: object  
1625 - properties:  
1626 - projectBelong:  
1627 - $ref: '#/definitions/projectBelongResponseBody'  
1628 - ProjectBelongUpdateProjectBelongRequestBody:  
1629 - title: ProjectBelongUpdateProjectBelongRequestBody  
1630 - type: object  
1631 - properties:  
1632 - projectBelongName:  
1633 - type: string  
1634 - description: 项目归属名称  
1635 - ProjectBelongUpdateProjectBelongResponseBody:  
1636 - title: 'Mediatype identifier: ProjectBelongUpdateProjectBelongResponseBody'  
1637 - type: object  
1638 - properties:  
1639 - projectBelong:  
1640 - $ref: '#/definitions/projectBelongResponseBody'  
1641 - RejectTaskRecordGetRejectTaskRecordResponseBody:  
1642 - title: 'Mediatype identifier: RejectTaskRecordGetRejectTaskRecordResponseBody'  
1643 - type: object  
1644 - properties:  
1645 - rejectTaskRecord:  
1646 - $ref: '#/definitions/rejectTaskRecordResponseBody'  
1647 - RejectTaskRecordSearchRejectTaskRecordRequestBody:  
1648 - title: RejectTaskRecordSearchRejectTaskRecordRequestBody  
1649 - type: object  
1650 - properties:  
1651 - companyId:  
1652 - type: integer  
1653 - description: 公司ID  
1654 - required:  
1655 - - companyId  
1656 - customerValue:  
1657 - type: array  
1658 - items:  
1659 - type: integer  
1660 - format: int64  
1661 - description: 客户价值  
1662 - limit:  
1663 - type: integer  
1664 - description: 查询限制  
1665 - format: int64  
1666 - offset:  
1667 - type: integer  
1668 - description: 查询偏离量  
1669 - format: int64  
1670 - rejectEndTime:  
1671 - type: string  
1672 - description: 驳回任务时间区间-截止时间  
1673 - format: datetime  
1674 - rejectStartTime:  
1675 - type: string  
1676 - description: 驳回任务时间区间-开始时间  
1677 - format: datetime  
1678 - taskContentMatch:  
1679 - type: string  
1680 - description: 任务内容匹配  
1681 - taskNature:  
1682 - type: integer  
1683 - description: 任务性质  
1684 - format: int64  
1685 - taskType:  
1686 - type: integer  
1687 - description: 任务类型  
1688 - format: int64  
1689 - RejectTaskRecordSearchRejectTaskRecordResponseBody:  
1690 - title: 'Mediatype identifier: RejectTaskRecordSearchRejectTaskRecordResponseBody'  
1691 - type: object  
1692 - properties:  
1693 - count:  
1694 - type: integer  
1695 - description: 结果总数  
1696 - format: int64  
1697 - rejectTaskRecords:  
1698 - type: array  
1699 - items:  
1700 - $ref: '#/definitions/rejectTaskRecordResponseBody'  
1701 - StatisticsPersonSuMoneyStatisticsRequestBody:  
1702 - title: StatisticsPersonSuMoneyStatisticsRequestBody  
1703 - type: object  
1704 - properties:  
1705 - uid:  
1706 - type: integer  
1707 - description: 统一用户UID  
1708 - required:  
1709 - - uid  
1710 - StatisticsPersonSuMoneyStatisticsResponseBody:  
1711 - title: 'Mediatype identifier: StatisticsPersonSuMoneyStatisticsResponseBody'  
1712 - type: object  
1713 - properties:  
1714 - currentSuMoney:  
1715 - type: number  
1716 - description: 当前素币数  
1717 - format: double  
1718 - incomeSuMoney:  
1719 - type: number  
1720 - description: 任务奖励素币总数  
1721 - format: double  
1722 - incomeSuMoneyOfYesterday:  
1723 - type: number  
1724 - description: 昨日任务奖励素币数  
1725 - format: double  
1726 - StatisticsPersonTaskStatisticsRequestBody:  
1727 - title: StatisticsPersonTaskStatisticsRequestBody  
1728 - type: object  
1729 - properties:  
1730 - uid:  
1731 - type: integer  
1732 - description: 统一用户UID  
1733 - required:  
1734 - - uid  
1735 - StatisticsPersonTaskStatisticsResponseBody:  
1736 - title: 'Mediatype identifier: StatisticsPersonTaskStatisticsResponseBody'  
1737 - type: object  
1738 - properties:  
1739 - personTaskStatistics:  
1740 - $ref: '#/definitions/personTaskStatisticsResponseBody'  
1741 - StatisticsSystemTaskStatisticsRequestBody:  
1742 - title: StatisticsSystemTaskStatisticsRequestBody  
1743 - type: object  
1744 - properties:  
1745 - companyId:  
1746 - type: integer  
1747 - description: 公司ID  
1748 - required:  
1749 - - companyId  
1750 - StatisticsSystemTaskStatisticsResponseBody:  
1751 - title: 'Mediatype identifier: StatisticsSystemTaskStatisticsResponseBody'  
1752 - type: object  
1753 - properties:  
1754 - completed:  
1755 - type: integer  
1756 - description: 已完成的任务数  
1757 - format: int64  
1758 - released:  
1759 - type: integer  
1760 - description: 发布的任务数  
1761 - format: int64  
1762 - underway:  
1763 - type: integer  
1764 - description: 进行中的任务数  
1765 - format: int64  
1766 - SuMoneyExchangeSuMoneyRequestBody:  
1767 - title: SuMoneyExchangeSuMoneyRequestBody  
1768 - type: object  
1769 - properties:  
1770 - exchangeDescription:  
1771 - type: string  
1772 - description: 兑换描述  
1773 - required:  
1774 - - exchangeDescription  
1775 - operator:  
1776 - type: integer  
1777 - description: 操作人UID  
1778 - format: int64  
1779 - suMoney:  
1780 - type: number  
1781 - description: 素币值  
1782 - required:  
1783 - - suMoney  
1784 - uid:  
1785 - type: integer  
1786 - description: 兑换人UID  
1787 - required:  
1788 - - uid  
1789 - SuMoneyExchangeSuMoneyResponseBody:  
1790 - title: 'Mediatype identifier: SuMoneyExchangeSuMoneyResponseBody'  
1791 - type: object  
1792 - properties:  
1793 - suMoneyTransactionRecord:  
1794 - $ref: '#/definitions/suMoneyTransactionRecordResponseBody'  
1795 - SuMoneyGetSuMoneyTransactionRecordResponseBody:  
1796 - title: 'Mediatype identifier: SuMoneyGetSuMoneyTransactionRecordResponseBody'  
1797 - type: object  
1798 - properties:  
1799 - suMoneyTransactionRecord:  
1800 - $ref: '#/definitions/suMoneyTransactionRecordResponseBody'  
1801 - SuMoneySearchSuMoneyTransactionRecordRequestBody:  
1802 - title: SuMoneySearchSuMoneyTransactionRecordRequestBody  
1803 - type: object  
1804 - properties:  
1805 - limit:  
1806 - type: integer  
1807 - description: 查询限制  
1808 - format: int64  
1809 - offset:  
1810 - type: integer  
1811 - description: 查询偏离量  
1812 - format: int64  
1813 - operator:  
1814 - type: integer  
1815 - description: 操作人UID  
1816 - format: int64  
1817 - recordType:  
1818 - type: integer  
1819 - description: 记录类型(1兑换,2任务奖励,3增加,4扣除)  
1820 - required:  
1821 - - recordType  
1822 - transactionEndTime:  
1823 - type: string  
1824 - description: 事务时间区间-截止时间  
1825 - format: datetime  
1826 - transactionStartTime:  
1827 - type: string  
1828 - description: 事务时间区间-开始时间  
1829 - format: datetime  
1830 - uid:  
1831 - type: integer  
1832 - description: 统一用户UID  
1833 - required:  
1834 - - uid  
1835 - SuMoneySearchSuMoneyTransactionRecordResponseBody:  
1836 - title: 'Mediatype identifier: SuMoneySearchSuMoneyTransactionRecordResponseBody'  
1837 - type: object  
1838 - properties:  
1839 - count:  
1840 - type: integer  
1841 - description: 结果总数  
1842 - format: int64  
1843 - suMoneyTransactionRecords:  
1844 - type: array  
1845 - items:  
1846 - $ref: '#/definitions/suMoneyTransactionRecordResponseBody'  
1847 - SuMoneySuMoneyTransactionRecordStatisticsRequestBody:  
1848 - title: SuMoneySuMoneyTransactionRecordStatisticsRequestBody  
1849 - type: object  
1850 - properties:  
1851 - transactionEndTime:  
1852 - type: string  
1853 - description: 事务时间区间-截止时间  
1854 - format: datetime  
1855 - transactionStartTime:  
1856 - type: string  
1857 - description: 事务时间区间-开始时间  
1858 - format: datetime  
1859 - uid:  
1860 - type: integer  
1861 - description: 统一用户UID  
1862 - required:  
1863 - - uid  
1864 - SuMoneySuMoneyTransactionRecordStatisticsResponseBody:  
1865 - title: 'Mediatype identifier: SuMoneySuMoneyTransactionRecordStatisticsResponseBody'  
1866 - type: object  
1867 - properties:  
1868 - expendSuMoney:  
1869 - type: number  
1870 - description: 支出素币  
1871 - required:  
1872 - - expendSuMoney  
1873 - incomeSuMoney:  
1874 - type: number  
1875 - description: 收入素币  
1876 - required:  
1877 - - incomeSuMoney  
1878 - TaskAcceptanceTaskRequestBody:  
1879 - title: TaskAcceptanceTaskRequestBody  
1880 - type: object  
1881 - properties:  
1882 - operator:  
1883 - type: integer  
1884 - description: 操作人uid  
1885 - required:  
1886 - - operator  
1887 - participators:  
1888 - type: array  
1889 - items:  
1890 - type: integer  
1891 - format: int64  
1892 - description: 任务参与者UID列表  
1893 - referenceResourceScore:  
1894 - type: array  
1895 - items:  
1896 - $ref: '#/definitions/referenceResourceItemRequestBody'  
1897 - description: 引用资源解决分  
1898 - solvePictureUrls:  
1899 - type: array  
1900 - items:  
1901 - type: string  
1902 - description: 解决图片URL列表  
1903 - solveReport:  
1904 - type: string  
1905 - description: 解决报告  
1906 - taskPercentage:  
1907 - type: array  
1908 - items:  
1909 - $ref: '#/definitions/taskPercentageItemRequestBody'  
1910 - description: 任务贡献占比  
1911 - required:  
1912 - - taskPercentage  
1913 - TaskAcceptanceTaskResponseBody:  
1914 - title: 'Mediatype identifier: TaskAcceptanceTaskResponseBody'  
1915 - type: object  
1916 - properties:  
1917 - task:  
1918 - $ref: '#/definitions/taskResponseBody'  
1919 - TaskApplyCompleteTaskRequestBody:  
1920 - title: TaskApplyCompleteTaskRequestBody  
1921 - type: object  
1922 - properties:  
1923 - receiver:  
1924 - type: integer  
1925 - description: 领取人或者中标人uid  
1926 - required:  
1927 - - receiver  
1928 - TaskApplyCompleteTaskResponseBody:  
1929 - title: 'Mediatype identifier: TaskApplyCompleteTaskResponseBody'  
1930 - type: object  
1931 - properties:  
1932 - task:  
1933 - $ref: '#/definitions/taskResponseBody'  
1934 - TaskBidTaskRequestBody:  
1935 - title: TaskBidTaskRequestBody  
1936 - type: object  
1937 - properties:  
1938 - bidder:  
1939 - type: integer  
1940 - description: 竞标人uid  
1941 - required:  
1942 - - bidder  
1943 - TaskBidTaskResponseBody:  
1944 - title: 'Mediatype identifier: TaskBidTaskResponseBody'  
1945 - type: object  
1946 - properties:  
1947 - task:  
1948 - $ref: '#/definitions/taskResponseBody'  
1949 - TaskChooseSuccessfulBidderRequestBody:  
1950 - title: TaskChooseSuccessfulBidderRequestBody  
1951 - type: object  
1952 - properties:  
1953 - operator:  
1954 - type: integer  
1955 - description: 操作人uid  
1956 - required:  
1957 - - operator  
1958 - successfulBidder:  
1959 - type: integer  
1960 - description: 中标者uid  
1961 - required:  
1962 - - successfulBidder  
1963 - TaskChooseSuccessfulBidderResponseBody:  
1964 - title: 'Mediatype identifier: TaskChooseSuccessfulBidderResponseBody'  
1965 - type: object  
1966 - properties:  
1967 - task:  
1968 - $ref: '#/definitions/taskResponseBody'  
1969 - TaskCreateTaskRequestBody:  
1970 - title: TaskCreateTaskRequestBody  
1971 - type: object  
1972 - properties:  
1973 - acceptanceStandard:  
1974 - type: string  
1975 - description: 验收标准  
1976 - required:  
1977 - - acceptanceStandard  
1978 - bidEndTime:  
1979 - type: string  
1980 - description: 竞标结束时间  
1981 - format: datetime  
1982 - bidStartTime:  
1983 - type: string  
1984 - description: 竞标开始时间  
1985 - format: datetime  
1986 - companyId:  
1987 - type: integer  
1988 - description: 公司ID  
1989 - required:  
1990 - - companyId  
1991 - customerValue:  
1992 - type: array  
1993 - items:  
1994 - type: string  
1995 - description: 客户价值列表  
1996 - required:  
1997 - - customerValue  
1998 - isRewardTake:  
1999 - type: boolean  
2000 - description: 是否悬赏任务  
2001 - referenceResource:  
2002 - $ref: '#/definitions/referenceResourceRequestBody'  
2003 - sponsor:  
2004 - type: integer  
2005 - description: 任务发起者uid  
2006 - required:  
2007 - - sponsor  
2008 - suMoney:  
2009 - type: number  
2010 - description: 奖励素币  
2011 - format: double  
2012 - taskDescription:  
2013 - type: string  
2014 - description: 任务描述  
2015 - required:  
2016 - - taskDescription  
2017 - taskName:  
2018 - type: string  
2019 - description: 任务名称  
2020 - required:  
2021 - - taskName  
2022 - taskNature:  
2023 - type: string  
2024 - description: 任务性质  
2025 - required:  
2026 - - taskNature  
2027 - taskPictureUrls:  
2028 - type: array  
2029 - items:  
2030 - type: string  
2031 - description: 任务图片URL列表  
2032 - taskType:  
2033 - type: integer  
2034 - description: 任务类型  
2035 - required:  
2036 - - taskType  
2037 - TaskCreateTaskResponseBody:  
2038 - title: 'Mediatype identifier: TaskCreateTaskResponseBody'  
2039 - type: object  
2040 - properties:  
2041 - task:  
2042 - $ref: '#/definitions/taskResponseBody'  
2043 - TaskGetTaskResponseBody:  
2044 - title: 'Mediatype identifier: TaskGetTaskResponseBody'  
2045 - type: object  
2046 - properties:  
2047 - task:  
2048 - $ref: '#/definitions/taskResponseBody'  
2049 - TaskListTaskResponseBody:  
2050 - title: 'Mediatype identifier: TaskListTaskResponseBody'  
2051 - type: object  
2052 - properties:  
2053 - count:  
2054 - type: integer  
2055 - description: 结果总数  
2056 - format: int64  
2057 - tasks:  
2058 - type: array  
2059 - items:  
2060 - $ref: '#/definitions/taskResponseBody'  
2061 - TaskNatureCreateTaskNatureRequestBody:  
2062 - title: TaskNatureCreateTaskNatureRequestBody  
2063 - type: object  
2064 - properties:  
2065 - companyId:  
2066 - type: integer  
2067 - description: 公司ID  
2068 - required:  
2069 - - companyId  
2070 - taskNatureName:  
2071 - type: string  
2072 - description: 任务性质名称  
2073 - required:  
2074 - - taskNatureName  
2075 - TaskNatureCreateTaskNatureResponseBody:  
2076 - title: 'Mediatype identifier: TaskNatureCreateTaskNatureResponseBody'  
2077 - type: object  
2078 - properties:  
2079 - taskNature:  
2080 - $ref: '#/definitions/taskNatureResponseBody'  
2081 - TaskNatureGetTaskNatureResponseBody:  
2082 - title: 'Mediatype identifier: TaskNatureGetTaskNatureResponseBody'  
2083 - type: object  
2084 - properties:  
2085 - taskNature:  
2086 - $ref: '#/definitions/taskNatureResponseBody'  
2087 - TaskNatureListTaskNatureResponseBody:  
2088 - title: 'Mediatype identifier: TaskNatureListTaskNatureResponseBody'  
2089 - type: object  
2090 - properties:  
2091 - count:  
2092 - type: integer  
2093 - description: 结果总数  
2094 - format: int64  
2095 - taskNatures:  
2096 - type: array  
2097 - items:  
2098 - $ref: '#/definitions/taskNatureResponseBody'  
2099 - TaskNatureRemoveTaskNatureResponseBody:  
2100 - title: 'Mediatype identifier: TaskNatureRemoveTaskNatureResponseBody'  
2101 - type: object  
2102 - properties:  
2103 - taskNature:  
2104 - $ref: '#/definitions/taskNatureResponseBody'  
2105 - TaskNatureUpdateTaskNatureRequestBody:  
2106 - title: TaskNatureUpdateTaskNatureRequestBody  
2107 - type: object  
2108 - properties:  
2109 - taskNatureName:  
2110 - type: string  
2111 - description: 任务性质名称  
2112 - TaskNatureUpdateTaskNatureResponseBody:  
2113 - title: 'Mediatype identifier: TaskNatureUpdateTaskNatureResponseBody'  
2114 - type: object  
2115 - properties:  
2116 - taskNature:  
2117 - $ref: '#/definitions/taskNatureResponseBody'  
2118 - TaskOffTaskRequestBody:  
2119 - title: TaskOffTaskRequestBody  
2120 - type: object  
2121 - properties:  
2122 - offReason:  
2123 - type: string  
2124 - description: 关闭理由  
2125 - required:  
2126 - - offReason  
2127 - operator:  
2128 - type: integer  
2129 - description: 操作人uid  
2130 - required:  
2131 - - operator  
2132 - TaskOffTaskResponseBody:  
2133 - title: 'Mediatype identifier: TaskOffTaskResponseBody'  
2134 - type: object  
2135 - properties:  
2136 - task:  
2137 - $ref: '#/definitions/taskResponseBody'  
2138 - TaskReleaseTaskRequestBody:  
2139 - title: TaskReleaseTaskRequestBody  
2140 - type: object  
2141 - properties:  
2142 - operator:  
2143 - type: integer  
2144 - description: 操作人uid  
2145 - required:  
2146 - - operator  
2147 - TaskReleaseTaskResponseBody:  
2148 - title: 'Mediatype identifier: TaskReleaseTaskResponseBody'  
2149 - type: object  
2150 - properties:  
2151 - task:  
2152 - $ref: '#/definitions/taskResponseBody'  
2153 - TaskRemoveTaskResponseBody:  
2154 - title: 'Mediatype identifier: TaskRemoveTaskResponseBody'  
2155 - type: object  
2156 - properties:  
2157 - task:  
2158 - $ref: '#/definitions/taskResponseBody'  
2159 - TaskRobTaskRequestBody:  
2160 - title: TaskRobTaskRequestBody  
2161 - type: object  
2162 - properties:  
2163 - receiver:  
2164 - type: integer  
2165 - description: 领取人uid  
2166 - required:  
2167 - - receiver  
2168 - TaskRobTaskResponseBody:  
2169 - title: 'Mediatype identifier: TaskRobTaskResponseBody'  
2170 - type: object  
2171 - properties:  
2172 - task:  
2173 - $ref: '#/definitions/taskResponseBody'  
2174 - TaskSearchOffTaskRecordRequestBody:  
2175 - title: TaskSearchOffTaskRecordRequestBody  
2176 - type: object  
2177 - properties:  
2178 - companyId:  
2179 - type: integer  
2180 - description: 公司ID  
2181 - required:  
2182 - - companyId  
2183 - customerValue:  
2184 - type: array  
2185 - items:  
2186 - type: string  
2187 - description: 客户价值  
2188 - limit:  
2189 - type: integer  
2190 - description: 查询限制  
2191 - format: int64  
2192 - offEndTime:  
2193 - type: string  
2194 - description: 关闭任务时间区间-截止时间  
2195 - format: datetime  
2196 - offStartTime:  
2197 - type: string  
2198 - description: 关闭任务时间区间-开始时间  
2199 - format: datetime  
2200 - offset:  
2201 - type: integer  
2202 - description: 查询偏离量  
2203 - format: int64  
2204 - taskContentMatch:  
2205 - type: string  
2206 - description: 任务内容匹配  
2207 - taskNature:  
2208 - type: string  
2209 - description: 任务性质  
2210 - taskType:  
2211 - type: integer  
2212 - description: 任务类型  
2213 - format: int64  
2214 - TaskSearchOffTaskRecordResponseBody:  
2215 - title: 'Mediatype identifier: TaskSearchOffTaskRecordResponseBody'  
2216 - type: object  
2217 - properties:  
2218 - count:  
2219 - type: integer  
2220 - description: 结果总数  
2221 - format: int64  
2222 - offTaskRecords:  
2223 - type: array  
2224 - items:  
2225 - $ref: '#/definitions/offTaskRecordResponseBody'  
2226 - TaskSearchTaskRequestBody:  
2227 - title: TaskSearchTaskRequestBody  
2228 - type: object  
2229 - properties:  
2230 - bidTimeMatch:  
2231 - type: integer  
2232 - description: 竞标时间(1全部,2已截止,3未截止)  
2233 - format: int64  
2234 - bidder:  
2235 - type: integer  
2236 - description: 竞标参与者UID  
2237 - format: int64  
2238 - companyId:  
2239 - type: integer  
2240 - description: 公司ID  
2241 - required:  
2242 - - companyId  
2243 - customerValue:  
2244 - type: array  
2245 - items:  
2246 - type: string  
2247 - description: 客户价值  
2248 - isFilterCloseStatus:  
2249 - type: boolean  
2250 - description: 是否过滤关闭状态任务  
2251 - isFilterUnReleasedStatus:  
2252 - type: boolean  
2253 - description: 是否过滤待发布状态任务  
2254 - isRewardTake:  
2255 - type: boolean  
2256 - description: 是否悬赏任务  
2257 - limit:  
2258 - type: integer  
2259 - description: 查询限制  
2260 - format: int64  
2261 - offset:  
2262 - type: integer  
2263 - description: 查询偏离量  
2264 - format: int64  
2265 - participator:  
2266 - type: integer  
2267 - description: 任务参与者UID  
2268 - format: int64  
2269 - receiver:  
2270 - type: integer  
2271 - description: 任务领取人UID  
2272 - format: int64  
2273 - sortByAcceptanceTime:  
2274 - type: string  
2275 - description: 按验收方验收时间排序(ASC,DESC)  
2276 - sortByCompleteTime:  
2277 - type: string  
2278 - description: 按完成任务操作时间排序(ASC,DESC)  
2279 - sortByCreateTime:  
2280 - type: string  
2281 - description: 按创建任务时间排序(ASC,DESC)  
2282 - sortByReceiveTime:  
2283 - type: string  
2284 - description: 按领取任务时间排序(ASC,DESC)  
2285 - sortByReleaseTime:  
2286 - type: string  
2287 - description: 按发布任务时间排序(ASC,DESC)  
2288 - sponsor:  
2289 - type: integer  
2290 - description: 任务发起者UID  
2291 - format: int64  
2292 - taskContentMatch:  
2293 - type: string  
2294 - description: 任务内容匹配  
2295 - taskNature:  
2296 - type: string  
2297 - description: 任务性质  
2298 - taskStatus:  
2299 - type: integer  
2300 - description: 任务状态  
2301 - format: int64  
2302 - taskType:  
2303 - type: integer  
2304 - description: 任务类型  
2305 - format: int64  
2306 - TaskSearchTaskResponseBody:  
2307 - title: 'Mediatype identifier: TaskSearchTaskResponseBody'  
2308 - type: object  
2309 - properties:  
2310 - count:  
2311 - type: integer  
2312 - description: 结果总数  
2313 - format: int64  
2314 - tasks:  
2315 - type: array  
2316 - items:  
2317 - $ref: '#/definitions/taskResponseBody'  
2318 - TaskUpdateTaskRequestBody:  
2319 - title: TaskUpdateTaskRequestBody  
2320 - type: object  
2321 - properties:  
2322 - acceptanceStandard:  
2323 - type: string  
2324 - description: 验收标准  
2325 - bidEndTime:  
2326 - type: string  
2327 - description: 竞标结束时间  
2328 - format: datetime  
2329 - bidStartTime:  
2330 - type: string  
2331 - description: 竞标开始时间  
2332 - format: datetime  
2333 - customerValue:  
2334 - type: array  
2335 - items:  
2336 - type: string  
2337 - description: 客户价值列表  
2338 - isRewardTake:  
2339 - type: boolean  
2340 - description: 是否悬赏任务  
2341 - referenceResource:  
2342 - $ref: '#/definitions/referenceResourceRequestBody'  
2343 - suMoney:  
2344 - type: number  
2345 - description: 奖励素币  
2346 - format: double  
2347 - taskDescription:  
2348 - type: string  
2349 - description: 任务描述  
2350 - taskName:  
2351 - type: string  
2352 - description: 任务名称  
2353 - taskNature:  
2354 - type: string  
2355 - description: 任务性质  
2356 - taskPictureUrls:  
2357 - type: array  
2358 - items:  
2359 - type: string  
2360 - description: 任务图片URL列表  
2361 - TaskUpdateTaskResponseBody:  
2362 - title: 'Mediatype identifier: TaskUpdateTaskResponseBody'  
2363 - type: object  
2364 - properties:  
2365 - task:  
2366 - $ref: '#/definitions/taskResponseBody'  
2367 - UnifiedUserCenterSyncEmployeeCallbackRequestBody:  
2368 - title: UnifiedUserCenterSyncEmployeeCallbackRequestBody  
2369 - type: object  
2370 - properties:  
2371 - action:  
2372 - type: string  
2373 - description: add:添加,edit:编辑,delete删除,batchDelete:批量删除,setCompanyCharge:更改公司主管,batchForbid:批量禁用用户,batchRemove:批量更改用户部门,changeAdmin换管理员  
2374 - required:  
2375 - - action  
2376 - data:  
2377 - type: string  
2378 - description: 具体的对象JSON数据  
2379 - required:  
2380 - - data  
2381 - module:  
2382 - type: string  
2383 - description: position:职位,department:部门,employee:员工,company:公司,profile员工档案  
2384 - required:  
2385 - - module  
2386 - UnifiedUserCenterSyncEmployeeCallbackResponseBody:  
2387 - title: 'Mediatype identifier: UnifiedUserCenterSyncEmployeeCallbackResponseBody'  
2388 - type: object  
2389 - properties:  
2390 - employee:  
2391 - $ref: '#/definitions/employeeResponseBody'  
2392 - bidInfoResponseBody:  
2393 - title: bidInfoResponseBody  
2394 - type: object  
2395 - properties:  
2396 - bidEndTime:  
2397 - type: string  
2398 - description: 竞标结束时间  
2399 - required:  
2400 - - bidEndTime  
2401 - bidStartTime:  
2402 - type: string  
2403 - description: 竞标开始时间  
2404 - required:  
2405 - - bidStartTime  
2406 - bidderInfos:  
2407 - type: array  
2408 - items:  
2409 - $ref: '#/definitions/bidderInfoResponseBody'  
2410 - description: 竞标人员列表  
2411 - successfulBidder:  
2412 - $ref: '#/definitions/employeeInfoResponseBody'  
2413 - winBidTime:  
2414 - type: string  
2415 - description: 中标时间  
2416 - required:  
2417 - - winBidTime  
2418 - description: 竞标任务信息  
2419 - bidderInfoResponseBody:  
2420 - title: bidderInfoResponseBody  
2421 - type: object  
2422 - properties:  
2423 - bidTime:  
2424 - type: string  
2425 - description: 竞标时间  
2426 - required:  
2427 - - bidTime  
2428 - bidder:  
2429 - $ref: '#/definitions/employeeInfoResponseBody'  
2430 - description: 竞标人员信息  
2431 - configResponseBody:  
2432 - title: configResponseBody  
2433 - type: object  
2434 - properties:  
2435 - id:  
2436 - type: integer  
2437 - description: ID  
2438 - required:  
2439 - - id  
2440 - name:  
2441 - type: string  
2442 - description: 名称  
2443 - required:  
2444 - - name  
2445 - description: 配置字典  
2446 - customerValueResponseBody:  
2447 - title: customerValueResponseBody  
2448 - type: object  
2449 - properties:  
2450 - companyId:  
2451 - type: integer  
2452 - description: 公司ID  
2453 - required:  
2454 - - companyId  
2455 - customerValueId:  
2456 - type: integer  
2457 - description: 客户价值ID  
2458 - required:  
2459 - - customerValueId  
2460 - customerValueName:  
2461 - type: string  
2462 - description: 客户价值名称  
2463 - required:  
2464 - - customerValueName  
2465 - description: 客户价值  
2466 - employeeInfoRequestBody:  
2467 - title: employeeInfoRequestBody  
2468 - type: object  
2469 - properties:  
2470 - employeeAccount:  
2471 - type: string  
2472 - description: 员工账号  
2473 - employeeAvatarUrl:  
2474 - type: string  
2475 - description: 员工头像URL  
2476 - employeeName:  
2477 - type: string  
2478 - description: 员工姓名  
2479 - required:  
2480 - - employeeName  
2481 - isPrincipal:  
2482 - type: boolean  
2483 - description: 是否公司负责人  
2484 - uid:  
2485 - type: integer  
2486 - description: 统一用户UID  
2487 - required:  
2488 - - uid  
2489 - description: 员工信息  
2490 - employeeInfoResponseBody:  
2491 - title: employeeInfoResponseBody  
2492 - type: object  
2493 - properties:  
2494 - employeeAccount:  
2495 - type: string  
2496 - description: 员工账号  
2497 - employeeAvatarUrl:  
2498 - type: string  
2499 - description: 员工头像URL  
2500 - employeeName:  
2501 - type: string  
2502 - description: 员工姓名  
2503 - required:  
2504 - - employeeName  
2505 - isPrincipal:  
2506 - type: boolean  
2507 - description: 是否公司负责人  
2508 - uid:  
2509 - type: integer  
2510 - description: 统一用户UID  
2511 - required:  
2512 - - uid  
2513 - description: 员工信息  
2514 - employeeResponseBody:  
2515 - title: employeeResponseBody  
2516 - type: object  
2517 - properties:  
2518 - companyId:  
2519 - type: integer  
2520 - description: 公司ID  
2521 - required:  
2522 - - companyId  
2523 - employeeId:  
2524 - type: integer  
2525 - description: 员工ID  
2526 - required:  
2527 - - employeeId  
2528 - employeeInfo:  
2529 - $ref: '#/definitions/employeeInfoResponseBody'  
2530 - permissions:  
2531 - type: array  
2532 - items:  
2533 - type: integer  
2534 - format: int64  
2535 - description: 员工权限集合  
2536 - required:  
2537 - - permissions  
2538 - status:  
2539 - type: integer  
2540 - description: 员工状态(启用或者禁用)  
2541 - format: int64  
2542 - suMoney:  
2543 - type: number  
2544 - description: 当前素币  
2545 - required:  
2546 - - suMoney  
2547 - description: 员工  
2548 - notificationResponseBody:  
2549 - title: notificationResponseBody  
2550 - type: object  
2551 - properties:  
2552 - externalResource:  
2553 - type: string  
2554 - description: 外部资源引用  
2555 - required:  
2556 - - externalResource  
2557 - notificationContent:  
2558 - type: string  
2559 - description: 通知内容  
2560 - required:  
2561 - - notificationContent  
2562 - notificationId:  
2563 - type: integer  
2564 - description: 通知ID  
2565 - required:  
2566 - - notificationId  
2567 - notificationTime:  
2568 - type: string  
2569 - description: 通知时间  
2570 - required:  
2571 - - notificationTime  
2572 - notificationTitle:  
2573 - type: string  
2574 - description: 通知标题  
2575 - required:  
2576 - - notificationTitle  
2577 - notificationType:  
2578 - type: integer  
2579 - description: 通知类型  
2580 - required:  
2581 - - notificationType  
2582 - description: 通知  
2583 - offTaskRecordResponseBody:  
2584 - title: offTaskRecordResponseBody  
2585 - type: object  
2586 - properties:  
2587 - createTime:  
2588 - type: string  
2589 - description: 创建时间  
2590 - required:  
2591 - - createTime  
2592 - offReason:  
2593 - type: string  
2594 - description: 关闭理由  
2595 - required:  
2596 - - offReason  
2597 - offTaskRecordId:  
2598 - type: integer  
2599 - description: 关闭任务记录ID  
2600 - required:  
2601 - - offTaskRecordId  
2602 - operator:  
2603 - $ref: '#/definitions/employeeInfoResponseBody'  
2604 - task:  
2605 - $ref: '#/definitions/taskResponseBody'  
2606 - description: 关闭任务记录  
2607 - personTaskStatisticsResponseBody:  
2608 - title: personTaskStatisticsResponseBody  
2609 - type: object  
2610 - properties:  
2611 - bidAsParticipator:  
2612 - type: integer  
2613 - description: 个人参与的竞标中任务  
2614 - required:  
2615 - - bidAsParticipator  
2616 - completedAsParticipator:  
2617 - type: integer  
2618 - description: 个人参与的已完成任务  
2619 - required:  
2620 - - completedAsParticipator  
2621 - completedAsReceiver:  
2622 - type: integer  
2623 - description: 个人领取的已完成任务  
2624 - required:  
2625 - - completedAsReceiver  
2626 - completedAsSponsor:  
2627 - type: integer  
2628 - description: 个人发起的已完成任务  
2629 - required:  
2630 - - completedAsSponsor  
2631 - unAcceptanceAsReceiver:  
2632 - type: integer  
2633 - description: 个人领取的待验收任务  
2634 - required:  
2635 - - unAcceptanceAsReceiver  
2636 - unAcceptanceAsSponsor:  
2637 - type: integer  
2638 - description: 个人发起的待验收任务  
2639 - required:  
2640 - - unAcceptanceAsSponsor  
2641 - unClaimedAsSponsor:  
2642 - type: integer  
2643 - description: 个人发起的待领取任务  
2644 - required:  
2645 - - unClaimedAsSponsor  
2646 - unReleasedAsSponsor:  
2647 - type: integer  
2648 - description: 个人发起的待发布任务  
2649 - required:  
2650 - - unReleasedAsSponsor  
2651 - underwayAsReceiver:  
2652 - type: integer  
2653 - description: 个人领取的进行中任务  
2654 - required:  
2655 - - underwayAsReceiver  
2656 - underwayAsSponsor:  
2657 - type: integer  
2658 - description: 个人发起的进行中任务  
2659 - required:  
2660 - - underwayAsSponsor  
2661 - description: 个人任务统计  
2662 - projectBelongResponseBody:  
2663 - title: projectBelongResponseBody  
2664 - type: object  
2665 - properties:  
2666 - companyId:  
2667 - type: integer  
2668 - description: 公司ID  
2669 - required:  
2670 - - companyId  
2671 - projectBelongId:  
2672 - type: integer  
2673 - description: 项目归属ID  
2674 - required:  
2675 - - projectBelongId  
2676 - projectBelongName:  
2677 - type: string  
2678 - description: 项目归属名称  
2679 - required:  
2680 - - projectBelongName  
2681 - description: 项目归属  
2682 - referenceResourceItemRequestBody:  
2683 - title: referenceResourceItemRequestBody  
2684 - type: object  
2685 - properties:  
2686 - content:  
2687 - type: string  
2688 - description: 内容  
2689 - required:  
2690 - - content  
2691 - issueScore:  
2692 - type: number  
2693 - description: 问题总分  
2694 - format: double  
2695 - referenceResourceId:  
2696 - type: integer  
2697 - description: 引用资源ID  
2698 - required:  
2699 - - referenceResourceId  
2700 - serialNumber:  
2701 - type: integer  
2702 - description: 编号  
2703 - required:  
2704 - - serialNumber  
2705 - solveScore:  
2706 - type: array  
2707 - items:  
2708 - $ref: '#/definitions/solveScoreItemRequestBody'  
2709 - description: 解决评分明细  
2710 - title:  
2711 - type: string  
2712 - description: 标题  
2713 - required:  
2714 - - title  
2715 - description: 引用资源项  
2716 - referenceResourceItemResponseBody:  
2717 - title: referenceResourceItemResponseBody  
2718 - type: object  
2719 - properties:  
2720 - content:  
2721 - type: string  
2722 - description: 内容  
2723 - required:  
2724 - - content  
2725 - issueScore:  
2726 - type: number  
2727 - description: 问题总分  
2728 - format: double  
2729 - referenceResourceId:  
2730 - type: integer  
2731 - description: 引用资源ID  
2732 - required:  
2733 - - referenceResourceId  
2734 - serialNumber:  
2735 - type: integer  
2736 - description: 编号  
2737 - required:  
2738 - - serialNumber  
2739 - solveScore:  
2740 - type: array  
2741 - items:  
2742 - $ref: '#/definitions/solveScoreItemResponseBody'  
2743 - description: 解决评分明细  
2744 - title:  
2745 - type: string  
2746 - description: 标题  
2747 - required:  
2748 - - title  
2749 - description: 引用资源项  
2750 - referenceResourceRequestBody:  
2751 - title: referenceResourceRequestBody  
2752 - type: object  
2753 - properties:  
2754 - referenceResourceItems:  
2755 - type: array  
2756 - items:  
2757 - $ref: '#/definitions/referenceResourceItemRequestBody'  
2758 - description: 引用资源项列表  
2759 - required:  
2760 - - referenceResourceItems  
2761 - referenceResourceType:  
2762 - type: integer  
2763 - description: 引用类型  
2764 - required:  
2765 - - referenceResourceType  
2766 - description: 引用资源  
2767 - referenceResourceResponseBody:  
2768 - title: referenceResourceResponseBody  
2769 - type: object  
2770 - properties:  
2771 - referenceResourceItems:  
2772 - type: array  
2773 - items:  
2774 - $ref: '#/definitions/referenceResourceItemResponseBody'  
2775 - description: 引用资源项列表  
2776 - required:  
2777 - - referenceResourceItems  
2778 - referenceResourceType:  
2779 - type: integer  
2780 - description: 引用类型  
2781 - required:  
2782 - - referenceResourceType  
2783 - description: 引用资源  
2784 - rejectTaskRecordResponseBody:  
2785 - title: rejectTaskRecordResponseBody  
2786 - type: object  
2787 - properties:  
2788 - createTime:  
2789 - type: string  
2790 - description: 创建时间  
2791 - required:  
2792 - - createTime  
2793 - operator:  
2794 - $ref: '#/definitions/employeeInfoResponseBody'  
2795 - rejectReason:  
2796 - type: string  
2797 - description: 驳回理由  
2798 - required:  
2799 - - rejectReason  
2800 - rejectTaskRecordId:  
2801 - type: integer  
2802 - description: 驳回任务记录ID  
2803 - required:  
2804 - - rejectTaskRecordId  
2805 - task:  
2806 - $ref: '#/definitions/taskResponseBody'  
2807 - description: 驳回任务记录  
2808 - robInfoResponseBody:  
2809 - title: robInfoResponseBody  
2810 - type: object  
2811 - properties:  
2812 - receiveTime:  
2813 - type: string  
2814 - description: 领取时间  
2815 - required:  
2816 - - receiveTime  
2817 - receiver:  
2818 - $ref: '#/definitions/employeeInfoResponseBody'  
2819 - description: 抢单任务信息  
2820 - sentNotificationResponseBody:  
2821 - title: sentNotificationResponseBody  
2822 - type: object  
2823 - properties:  
2824 - isRead:  
2825 - type: boolean  
2826 - description: 是否已读  
2827 - required:  
2828 - - isRead  
2829 - notification:  
2830 - $ref: '#/definitions/notificationResponseBody'  
2831 - readTime:  
2832 - type: string  
2833 - description: 通知读取时间  
2834 - required:  
2835 - - readTime  
2836 - receiver:  
2837 - $ref: '#/definitions/employeeInfoResponseBody'  
2838 - sentNotificationId:  
2839 - type: integer  
2840 - description: 发送出的通知ID  
2841 - required:  
2842 - - sentNotificationId  
2843 - description: 发送出的通知  
2844 - solveScoreItemRequestBody:  
2845 - title: solveScoreItemRequestBody  
2846 - type: object  
2847 - properties:  
2848 - contributor:  
2849 - $ref: '#/definitions/employeeInfoRequestBody'  
2850 - isReceiver:  
2851 - type: boolean  
2852 - description: 是否领取人  
2853 - required:  
2854 - - isReceiver  
2855 - percentage:  
2856 - type: integer  
2857 - description: 解决占比  
2858 - required:  
2859 - - percentage  
2860 - score:  
2861 - type: number  
2862 - description: 解决评分  
2863 - required:  
2864 - - score  
2865 - description: 解决评分项  
2866 - solveScoreItemResponseBody:  
2867 - title: solveScoreItemResponseBody  
2868 - type: object  
2869 - properties:  
2870 - contributor:  
2871 - $ref: '#/definitions/employeeInfoResponseBody'  
2872 - isReceiver:  
2873 - type: boolean  
2874 - description: 是否领取人  
2875 - required:  
2876 - - isReceiver  
2877 - percentage:  
2878 - type: integer  
2879 - description: 解决占比  
2880 - required:  
2881 - - percentage  
2882 - score:  
2883 - type: number  
2884 - description: 解决评分  
2885 - required:  
2886 - - score  
2887 - description: 解决评分项  
2888 - suMoneyTransactionRecordResponseBody:  
2889 - title: suMoneyTransactionRecordResponseBody  
2890 - type: object  
2891 - properties:  
2892 - createTime:  
2893 - type: string  
2894 - description: 创建时间  
2895 - required:  
2896 - - createTime  
2897 - employee:  
2898 - $ref: '#/definitions/employeeInfoResponseBody'  
2899 - operator:  
2900 - $ref: '#/definitions/employeeInfoResponseBody'  
2901 - recordDescription:  
2902 - type: string  
2903 - description: 素币事务记录描述  
2904 - required:  
2905 - - recordDescription  
2906 - recordType:  
2907 - type: integer  
2908 - description: 记录类型(1兑换,2任务奖励,3增加,4扣除)  
2909 - required:  
2910 - - recordType  
2911 - suMoney:  
2912 - type: number  
2913 - description: 事务素币值  
2914 - required:  
2915 - - suMoney  
2916 - suMoneyBeforeTransaction:  
2917 - type: number  
2918 - description: 事务处理前素币值  
2919 - required:  
2920 - - suMoneyBeforeTransaction  
2921 - suMoneyTransactionRecordId:  
2922 - type: integer  
2923 - description: 素币事务记录ID  
2924 - required:  
2925 - - suMoneyTransactionRecordId  
2926 - description: 素币事务记录  
2927 - taskNatureResponseBody:  
2928 - title: taskNatureResponseBody  
2929 - type: object  
2930 - properties:  
2931 - companyId:  
2932 - type: integer  
2933 - description: 公司ID  
2934 - required:  
2935 - - companyId  
2936 - taskNatureId:  
2937 - type: integer  
2938 - description: 任务性质ID  
2939 - required:  
2940 - - taskNatureId  
2941 - taskNatureName:  
2942 - type: string  
2943 - description: 任务性质名称  
2944 - required:  
2945 - - taskNatureName  
2946 - description: 任务性质  
2947 - taskPercentageItemRequestBody:  
2948 - title: taskPercentageItemRequestBody  
2949 - type: object  
2950 - properties:  
2951 - contributor:  
2952 - $ref: '#/definitions/employeeInfoRequestBody'  
2953 - isReceiver:  
2954 - type: boolean  
2955 - description: 是否领取人  
2956 - required:  
2957 - - isReceiver  
2958 - percentage:  
2959 - type: integer  
2960 - description: 任务贡献占比  
2961 - required:  
2962 - - percentage  
2963 - suMoney:  
2964 - type: number  
2965 - description: 分配到的奖励素币  
2966 - required:  
2967 - - suMoney  
2968 - description: 任务贡献占比项  
2969 - taskPercentageItemResponseBody:  
2970 - title: taskPercentageItemResponseBody  
2971 - type: object  
2972 - properties:  
2973 - contributor:  
2974 - $ref: '#/definitions/employeeInfoResponseBody'  
2975 - isReceiver:  
2976 - type: boolean  
2977 - description: 是否领取人  
2978 - required:  
2979 - - isReceiver  
2980 - percentage:  
2981 - type: integer  
2982 - description: 任务贡献占比  
2983 - required:  
2984 - - percentage  
2985 - suMoney:  
2986 - type: number  
2987 - description: 分配到的奖励素币  
2988 - required:  
2989 - - suMoney  
2990 - description: 任务贡献占比项  
2991 - taskResponseBody:  
2992 - title: taskResponseBody  
2993 - type: object  
2994 - properties:  
2995 - acceptanceStandard:  
2996 - type: string  
2997 - description: 验收标准  
2998 - required:  
2999 - - acceptanceStandard  
3000 - acceptanceTime:  
3001 - type: string  
3002 - description: 验收方验收时间  
3003 - format: datetime  
3004 - bidInfo:  
3005 - $ref: '#/definitions/bidInfoResponseBody'  
3006 - companyId:  
3007 - type: integer  
3008 - description: 公司ID  
3009 - required:  
3010 - - companyId  
3011 - completeTime:  
3012 - type: string  
3013 - description: 完成任务操作时间  
3014 - format: datetime  
3015 - createTime:  
3016 - type: string  
3017 - description: 创建时间  
3018 - required:  
3019 - - createTime  
3020 - customerValues:  
3021 - type: array  
3022 - items:  
3023 - type: integer  
3024 - format: int64  
3025 - description: 客户价值列表  
3026 - required:  
3027 - - customerValues  
3028 - isRewardTake:  
3029 - type: boolean  
3030 - description: 是否悬赏任务  
3031 - participators:  
3032 - type: array  
3033 - items:  
3034 - $ref: '#/definitions/employeeInfoResponseBody'  
3035 - description: 任务参与者列表  
3036 - projectBelong:  
3037 - type: array  
3038 - items:  
3039 - type: integer  
3040 - format: int64  
3041 - description: 项目归属  
3042 - required:  
3043 - - projectBelong  
3044 - receiveTime:  
3045 - type: string  
3046 - description: 领取任务时间  
3047 - format: datetime  
3048 - referenceResource:  
3049 - $ref: '#/definitions/referenceResourceResponseBody'  
3050 - releaseTime:  
3051 - type: string  
3052 - description: 发布任务时间  
3053 - format: datetime  
3054 - robInfo:  
3055 - $ref: '#/definitions/robInfoResponseBody'  
3056 - solvePictureUrls:  
3057 - type: array  
3058 - items:  
3059 - type: string  
3060 - description: 解决图片URL列表  
3061 - solveReport:  
3062 - type: string  
3063 - description: 解决报告  
3064 - sponsor:  
3065 - $ref: '#/definitions/employeeInfoResponseBody'  
3066 - suMoney:  
3067 - type: number  
3068 - description: 奖励素币  
3069 - required:  
3070 - - suMoney  
3071 - taskDescription:  
3072 - type: string  
3073 - description: 任务描述  
3074 - required:  
3075 - - taskDescription  
3076 - taskId:  
3077 - type: integer  
3078 - description: 任务ID  
3079 - required:  
3080 - - taskId  
3081 - taskName:  
3082 - type: string  
3083 - description: 任务名称  
3084 - required:  
3085 - - taskName  
3086 - taskNature:  
3087 - type: integer  
3088 - description: 任务性质  
3089 - required:  
3090 - - taskNature  
3091 - taskPercentage:  
3092 - type: array  
3093 - items:  
3094 - $ref: '#/definitions/taskPercentageItemResponseBody'  
3095 - description: 任务贡献占比  
3096 - taskPictureUrls:  
3097 - type: array  
3098 - items:  
3099 - type: string  
3100 - description: 任务图片URL列表  
3101 - taskStatus:  
3102 - type: integer  
3103 - description: 任务状态(1.待发布2.待领取3.进行中4.待验收5.已完成6.关闭7.待确认)  
3104 - required:  
3105 - - taskStatus  
3106 - taskType:  
3107 - type: integer  
3108 - description: 任务类型(1.抢单任务2.竞标任务3.指派任务)  
3109 - required:  
3110 - - taskType  
3111 - description: 任务  
@@ -20,6 +20,7 @@ func (configService *ConfigService) ListTaskStatus(listTaskStatusQuery *query.Li @@ -20,6 +20,7 @@ func (configService *ConfigService) ListTaskStatus(listTaskStatusQuery *query.Li
20 3: "进行中", 20 3: "进行中",
21 4: "待验收", 21 4: "待验收",
22 5: "已完成", 22 5: "已完成",
  23 + 7: "待确认",
23 } 24 }
24 var list []map[string]interface{} 25 var list []map[string]interface{}
25 for key, value := range taskStatusMap { 26 for key, value := range taskStatusMap {
@@ -41,6 +42,7 @@ func (configService *ConfigService) ListTaskType(listTaskTypeQuery *query.ListTa @@ -41,6 +42,7 @@ func (configService *ConfigService) ListTaskType(listTaskTypeQuery *query.ListTa
41 taskTypeMap := map[int]string{ 42 taskTypeMap := map[int]string{
42 1: "抢单任务", 43 1: "抢单任务",
43 2: "竞标任务", 44 2: "竞标任务",
  45 + 3: "指派任务",
44 } 46 }
45 var list []map[string]interface{} 47 var list []map[string]interface{}
46 for key, value := range taskTypeMap { 48 for key, value := range taskTypeMap {
@@ -172,6 +174,7 @@ func (configService *ConfigService) ListEmployeePermission(listEmployeePermissio @@ -172,6 +174,7 @@ func (configService *ConfigService) ListEmployeePermission(listEmployeePermissio
172 1: "任务管理", 174 1: "任务管理",
173 2: "素币管理", 175 2: "素币管理",
174 3: "成员管理", 176 3: "成员管理",
  177 + 4: "标签管理",
175 } 178 }
176 var list []map[string]interface{} 179 var list []map[string]interface{}
177 for key, value := range employeePermissionMap { 180 for key, value := range employeePermissionMap {
@@ -6,6 +6,14 @@ import ( @@ -6,6 +6,14 @@ import (
6 domainService "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/domain_service" 6 domainService "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/domain_service"
7 ) 7 )
8 8
  9 +func CreateOperationSuMoneyService(options map[string]interface{}) (service.OperationSuMoneyService, error) {
  10 + var transactionContext *pgTransaction.TransactionContext
  11 + if value, ok := options["transactionContext"]; ok {
  12 + transactionContext = value.(*pgTransaction.TransactionContext)
  13 + }
  14 + return domainService.NewOperationSuMoneyService(transactionContext)
  15 +}
  16 +
9 func CreateRejectTaskReceiverService(options map[string]interface{}) (service.RejectTaskReceiverService, error) { 17 func CreateRejectTaskReceiverService(options map[string]interface{}) (service.RejectTaskReceiverService, error) {
10 var transactionContext *pgTransaction.TransactionContext 18 var transactionContext *pgTransaction.TransactionContext
11 if value, ok := options["transactionContext"]; ok { 19 if value, ok := options["transactionContext"]; ok {
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/astaxie/beego/validation"
  7 +)
  8 +
  9 +type OperationSuMoneyCommand struct {
  10 + // 素币拥有者UID
  11 + Uid int64 `json:"uid" valid:"Required"`
  12 + // 操作类型(1增加,2扣除)
  13 + OperationType int `json:"operationType" valid:"Required"`
  14 + // 素币值
  15 + SuMoney float64 `json:"suMoney" valid:"Required"`
  16 + // 操作人UID
  17 + Operator int64 `json:"operator,omitempty"`
  18 + // 理由描述
  19 + OperationDescription string `json:"operationDescription" valid:"Required"`
  20 +}
  21 +
  22 +func (operationSuMoneyCommand *OperationSuMoneyCommand) ValidateCommand() error {
  23 + valid := validation.Validation{}
  24 + b, err := valid.Valid(operationSuMoneyCommand)
  25 + if err != nil {
  26 + return err
  27 + }
  28 + if !b {
  29 + for _, validErr := range valid.Errors {
  30 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  31 + }
  32 + }
  33 + return nil
  34 +}
@@ -15,6 +15,39 @@ import ( @@ -15,6 +15,39 @@ import (
15 type SuMoneyService struct { 15 type SuMoneyService struct {
16 } 16 }
17 17
  18 +// 操作素币
  19 +func (suMoneyService *SuMoneyService) OperationSuMoney(operationSuMoneyCommand *command.OperationSuMoneyCommand) (interface{}, error) {
  20 + if err := operationSuMoneyCommand.ValidateCommand(); err != nil {
  21 + return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  22 + }
  23 + transactionContext, err := factory.CreateTransactionContext(nil)
  24 + if err != nil {
  25 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  26 + }
  27 + if err := transactionContext.StartTransaction(); err != nil {
  28 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  29 + }
  30 + defer func() {
  31 + transactionContext.RollbackTransaction()
  32 + }()
  33 + var operationSuMoneyService service.OperationSuMoneyService
  34 + if value, err := factory.CreateOperationSuMoneyService(map[string]interface{}{
  35 + "transactionContext": transactionContext,
  36 + }); err != nil {
  37 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  38 + } else {
  39 + operationSuMoneyService = value
  40 + }
  41 + if task, err := operationSuMoneyService.Operation(operationSuMoneyCommand.Uid, operationSuMoneyCommand.Operator, operationSuMoneyCommand.SuMoney, operationSuMoneyCommand.OperationType, operationSuMoneyCommand.OperationDescription); err != nil {
  42 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
  43 + } else {
  44 + if err := transactionContext.CommitTransaction(); err != nil {
  45 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  46 + }
  47 + return task, nil
  48 + }
  49 +}
  50 +
18 // 返回素币事务记录 51 // 返回素币事务记录
19 func (suMoneyService *SuMoneyService) GetSuMoneyTransactionRecord(getSuMoneyTransactionRecordQuery *query.GetSuMoneyTransactionRecordQuery) (interface{}, error) { 52 func (suMoneyService *SuMoneyService) GetSuMoneyTransactionRecord(getSuMoneyTransactionRecordQuery *query.GetSuMoneyTransactionRecordQuery) (interface{}, error) {
20 if err := getSuMoneyTransactionRecordQuery.ValidateQuery(); err != nil { 53 if err := getSuMoneyTransactionRecordQuery.ValidateQuery(); err != nil {
1 -package domain  
2 -  
3 -// 个人任务统计  
4 -type PersonTaskStatistics struct {  
5 - // 个人领取的进行中任务  
6 - UnderwayAsReceiver int64 `json:"underwayAsReceiver"`  
7 - // 个人领取的待验收任务  
8 - UnAcceptanceAsReceiver int64 `json:"unAcceptanceAsReceiver"`  
9 - // 个人领取的已完成任务  
10 - CompletedAsReceiver int64 `json:"completedAsReceiver"`  
11 - // 个人发起的待发布任务  
12 - UnReleasedAsSponsor int64 `json:"unReleasedAsSponsor"`  
13 - // 个人发起的待领取任务  
14 - UnClaimedAsSponsor int64 `json:"unClaimedAsSponsor"`  
15 - // 个人发起的进行中任务  
16 - UnderwayAsSponsor int64 `json:"underwayAsSponsor"`  
17 - // 个人发起的待验收任务  
18 - UnAcceptanceAsSponsor int64 `json:"unAcceptanceAsSponsor"`  
19 - // 个人发起的已完成任务  
20 - CompletedAsSponsor int64 `json:"completedAsSponsor"`  
21 - // 个人参与的竞标中任务  
22 - BidAsParticipator int64 `json:"bidAsParticipator"`  
23 - // 个人参与的已完成任务  
24 - CompletedAsParticipator int64 `json:"completedAsParticipator"`  
25 -}  
  1 +package service
  2 +
  3 +import (
  4 + coreDomain "github.com/linmadan/egglib-go/core/domain"
  5 + "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/domain"
  6 +)
  7 +
  8 +type OperationSuMoneyService interface {
  9 + coreDomain.DomainEventPublisher
  10 + Operation(uid int64, operatorUid int64, suMoney float64, operationType int, recordDescription string) (*domain.SuMoneyTransactionRecord, error)
  11 +}
@@ -5,6 +5,8 @@ import "time" @@ -5,6 +5,8 @@ import "time"
5 const ( 5 const (
6 SU_MONEY_TRANSACTION_RECORD_TYPE_EXCHANGE = iota + 1 //兑换 6 SU_MONEY_TRANSACTION_RECORD_TYPE_EXCHANGE = iota + 1 //兑换
7 SU_MONEY_TRANSACTION_RECORD_TYPE_AWARD //任务奖励 7 SU_MONEY_TRANSACTION_RECORD_TYPE_AWARD //任务奖励
  8 + SU_MONEY_TRANSACTION_RECORD_TYPE_INCREASE //增加
  9 + SU_MONEY_TRANSACTION_RECORD_TYPE_DEDUCT //扣除
8 ) 10 )
9 11
10 // 素币事务记录 12 // 素币事务记录
@@ -17,6 +19,8 @@ type SuMoneyTransactionRecord struct { @@ -17,6 +19,8 @@ type SuMoneyTransactionRecord struct {
17 Employee *EmployeeInfo `json:"employee"` 19 Employee *EmployeeInfo `json:"employee"`
18 // 事务处理前素币值 20 // 事务处理前素币值
19 SuMoneyBeforeTransaction float64 `json:"suMoneyBeforeTransaction"` 21 SuMoneyBeforeTransaction float64 `json:"suMoneyBeforeTransaction"`
  22 + // 当前素币值
  23 + CurrentSuMoney float64 `json:"currentSuMoney"`
20 // 事务素币值 24 // 事务素币值
21 SuMoney float64 `json:"suMoney"` 25 SuMoney float64 `json:"suMoney"`
22 // 操作人 26 // 操作人
@@ -96,17 +96,63 @@ func (dao *TaskDao) CalculateSystemTask(companyId int64) (map[string]interface{} @@ -96,17 +96,63 @@ func (dao *TaskDao) CalculateSystemTask(companyId int64) (map[string]interface{}
96 }, nil 96 }, nil
97 } 97 }
98 98
99 -func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics, error) { 99 +func (dao *TaskDao) CalculatePersonTask(uid int64) (map[string]interface{}, error) {
  100 + var underwayAsAssignedPerson int64
  101 + var unAcceptanceAsAssignedPerson int64
  102 + var completedAsAssignedPerson int64
  103 + var unConfirmedAsReceiver int64
  104 + var underwayAsReceiver int64
  105 + var unAcceptanceAsReceiver int64
  106 + var completedAsReceiver int64
  107 + var unReleasedAsSponsor int64
  108 + var unClaimedAsSponsor int64
  109 + var unConfirmedAsSponsor int64
  110 + var underwayAsSponsor int64
  111 + var unAcceptanceAsSponsor int64
  112 + var completedAsSponsor int64
  113 + var bidAsParticipator int64
  114 + var completedAsParticipator int64
100 tx := dao.transactionContext.PgTx 115 tx := dao.transactionContext.PgTx
101 taskModel := new(models.Task) 116 taskModel := new(models.Task)
102 - personTaskStatistics := &domain.PersonTaskStatistics{} 117 + if count, err := tx.Model(taskModel).
  118 + Where(`task.assigned_person @> '{"uid":?}'`, uid).
  119 + Where("task.task_status = ? ", domain.TASK_STATUS_UNDERWAY).
  120 + Count(); err != nil {
  121 + return nil, err
  122 + } else {
  123 + underwayAsAssignedPerson = int64(count)
  124 + }
  125 + if count, err := tx.Model(taskModel).
  126 + Where(`task.assigned_person @> '{"uid":?}'`, uid).
  127 + Where("task.task_status = ? ", domain.TASK_STATUS_UNACCEPTANCE).
  128 + Count(); err != nil {
  129 + return nil, err
  130 + } else {
  131 + unAcceptanceAsAssignedPerson = int64(count)
  132 + }
  133 + if count, err := tx.Model(taskModel).
  134 + Where(`task.assigned_person @> '{"uid":?}'`, uid).
  135 + Where("task.task_status = ? ", domain.TASK_STATUS_COMPLETED).
  136 + Count(); err != nil {
  137 + return nil, err
  138 + } else {
  139 + completedAsAssignedPerson = int64(count)
  140 + }
  141 + if count, err := tx.Model(taskModel).
  142 + Where("task.receiver_uid = ?", uid).
  143 + Where("task.task_status = ? ", domain.TASK_STATUS_UNCONFIRMED).
  144 + Count(); err != nil {
  145 + return nil, err
  146 + } else {
  147 + unConfirmedAsReceiver = int64(count)
  148 + }
103 if count, err := tx.Model(taskModel). 149 if count, err := tx.Model(taskModel).
104 Where("task.receiver_uid = ?", uid). 150 Where("task.receiver_uid = ?", uid).
105 Where("task.task_status = ? ", domain.TASK_STATUS_UNDERWAY). 151 Where("task.task_status = ? ", domain.TASK_STATUS_UNDERWAY).
106 Count(); err != nil { 152 Count(); err != nil {
107 return nil, err 153 return nil, err
108 } else { 154 } else {
109 - personTaskStatistics.UnderwayAsReceiver = int64(count) 155 + underwayAsReceiver = int64(count)
110 } 156 }
111 if count, err := tx.Model(taskModel). 157 if count, err := tx.Model(taskModel).
112 Where("task.receiver_uid = ?", uid). 158 Where("task.receiver_uid = ?", uid).
@@ -114,7 +160,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics @@ -114,7 +160,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics
114 Count(); err != nil { 160 Count(); err != nil {
115 return nil, err 161 return nil, err
116 } else { 162 } else {
117 - personTaskStatistics.UnAcceptanceAsReceiver = int64(count) 163 + unAcceptanceAsReceiver = int64(count)
118 } 164 }
119 if count, err := tx.Model(taskModel). 165 if count, err := tx.Model(taskModel).
120 Where("task.receiver_uid = ?", uid). 166 Where("task.receiver_uid = ?", uid).
@@ -122,7 +168,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics @@ -122,7 +168,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics
122 Count(); err != nil { 168 Count(); err != nil {
123 return nil, err 169 return nil, err
124 } else { 170 } else {
125 - personTaskStatistics.CompletedAsReceiver = int64(count) 171 + completedAsReceiver = int64(count)
126 } 172 }
127 if count, err := tx.Model(taskModel). 173 if count, err := tx.Model(taskModel).
128 Where(`task.sponsor @> '{"uid":?}'`, uid). 174 Where(`task.sponsor @> '{"uid":?}'`, uid).
@@ -130,7 +176,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics @@ -130,7 +176,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics
130 Count(); err != nil { 176 Count(); err != nil {
131 return nil, err 177 return nil, err
132 } else { 178 } else {
133 - personTaskStatistics.UnReleasedAsSponsor = int64(count) 179 + unReleasedAsSponsor = int64(count)
134 } 180 }
135 if count, err := tx.Model(taskModel). 181 if count, err := tx.Model(taskModel).
136 Where(`task.sponsor @> '{"uid":?}'`, uid). 182 Where(`task.sponsor @> '{"uid":?}'`, uid).
@@ -138,7 +184,15 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics @@ -138,7 +184,15 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics
138 Count(); err != nil { 184 Count(); err != nil {
139 return nil, err 185 return nil, err
140 } else { 186 } else {
141 - personTaskStatistics.UnClaimedAsSponsor = int64(count) 187 + unClaimedAsSponsor = int64(count)
  188 + }
  189 + if count, err := tx.Model(taskModel).
  190 + Where(`task.sponsor @> '{"uid":?}'`, uid).
  191 + Where("task.task_status = ? ", domain.TASK_STATUS_UNCONFIRMED).
  192 + Count(); err != nil {
  193 + return nil, err
  194 + } else {
  195 + unConfirmedAsSponsor = int64(count)
142 } 196 }
143 if count, err := tx.Model(taskModel). 197 if count, err := tx.Model(taskModel).
144 Where(`task.sponsor @> '{"uid":?}'`, uid). 198 Where(`task.sponsor @> '{"uid":?}'`, uid).
@@ -146,7 +200,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics @@ -146,7 +200,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics
146 Count(); err != nil { 200 Count(); err != nil {
147 return nil, err 201 return nil, err
148 } else { 202 } else {
149 - personTaskStatistics.UnderwayAsSponsor = int64(count) 203 + underwayAsSponsor = int64(count)
150 } 204 }
151 if count, err := tx.Model(taskModel). 205 if count, err := tx.Model(taskModel).
152 Where(`task.sponsor @> '{"uid":?}'`, uid). 206 Where(`task.sponsor @> '{"uid":?}'`, uid).
@@ -154,7 +208,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics @@ -154,7 +208,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics
154 Count(); err != nil { 208 Count(); err != nil {
155 return nil, err 209 return nil, err
156 } else { 210 } else {
157 - personTaskStatistics.UnAcceptanceAsSponsor = int64(count) 211 + unAcceptanceAsSponsor = int64(count)
158 } 212 }
159 if count, err := tx.Model(taskModel). 213 if count, err := tx.Model(taskModel).
160 Where(`task.sponsor @> '{"uid":?}'`, uid). 214 Where(`task.sponsor @> '{"uid":?}'`, uid).
@@ -162,7 +216,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics @@ -162,7 +216,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics
162 Count(); err != nil { 216 Count(); err != nil {
163 return nil, err 217 return nil, err
164 } else { 218 } else {
165 - personTaskStatistics.CompletedAsSponsor = int64(count) 219 + completedAsSponsor = int64(count)
166 } 220 }
167 if count, err := tx.Model(taskModel).Join("JOIN bidder_infos AS bidder_info ON bidder_info.task_id = task.id"). 221 if count, err := tx.Model(taskModel).Join("JOIN bidder_infos AS bidder_info ON bidder_info.task_id = task.id").
168 Where(`bidder_info.bidder @> '{"uid":?}'`, uid). 222 Where(`bidder_info.bidder @> '{"uid":?}'`, uid).
@@ -170,7 +224,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics @@ -170,7 +224,7 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics
170 Count(); err != nil { 224 Count(); err != nil {
171 return nil, err 225 return nil, err
172 } else { 226 } else {
173 - personTaskStatistics.BidAsParticipator = int64(count) 227 + bidAsParticipator = int64(count)
174 } 228 }
175 if count, err := tx.Model(taskModel). 229 if count, err := tx.Model(taskModel).
176 Where(`task.participators @> '[{"uid":?}]'`, uid). 230 Where(`task.participators @> '[{"uid":?}]'`, uid).
@@ -178,9 +232,25 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics @@ -178,9 +232,25 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (*domain.PersonTaskStatistics
178 Count(); err != nil { 232 Count(); err != nil {
179 return nil, err 233 return nil, err
180 } else { 234 } else {
181 - personTaskStatistics.CompletedAsParticipator = int64(count) 235 + completedAsParticipator = int64(count)
182 } 236 }
183 - return personTaskStatistics, nil 237 + return map[string]interface{}{
  238 + "underwayAsAssignedPerson": underwayAsAssignedPerson,
  239 + "unAcceptanceAsAssignedPerson": unAcceptanceAsAssignedPerson,
  240 + "completedAsAssignedPerson": completedAsAssignedPerson,
  241 + "unConfirmedAsReceiver": unConfirmedAsReceiver,
  242 + "underwayAsReceiver": underwayAsReceiver,
  243 + "unAcceptanceAsReceiver": unAcceptanceAsReceiver,
  244 + "completedAsReceiver": completedAsReceiver,
  245 + "unReleasedAsSponsor": unReleasedAsSponsor,
  246 + "unClaimedAsSponsor": unClaimedAsSponsor,
  247 + "unConfirmedAsSponsor": unConfirmedAsSponsor,
  248 + "underwayAsSponsor": underwayAsSponsor,
  249 + "unAcceptanceAsSponsor": unAcceptanceAsSponsor,
  250 + "completedAsSponsor": completedAsSponsor,
  251 + "bidAsParticipator": bidAsParticipator,
  252 + "completedAsParticipator": completedAsParticipator,
  253 + }, nil
184 } 254 }
185 255
186 func NewTaskDao(transactionContext *pgTransaction.TransactionContext) (*TaskDao, error) { 256 func NewTaskDao(transactionContext *pgTransaction.TransactionContext) (*TaskDao, error) {
@@ -59,6 +59,7 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64 @@ -59,6 +59,7 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64
59 if task == nil { 59 if task == nil {
60 return nil, fmt.Errorf("无效的任务") 60 return nil, fmt.Errorf("无效的任务")
61 } 61 }
  62 + participatorMap := make(map[int64]*domain.Employee)
62 var participatorInfos []*domain.EmployeeInfo 63 var participatorInfos []*domain.EmployeeInfo
63 for _, participatorUid := range participators { 64 for _, participatorUid := range participators {
64 if participator, err := employeeRepository.FindOne(map[string]interface{}{ 65 if participator, err := employeeRepository.FindOne(map[string]interface{}{
@@ -69,6 +70,7 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64 @@ -69,6 +70,7 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64
69 if participator == nil { 70 if participator == nil {
70 return nil, fmt.Errorf("无效的参与人") 71 return nil, fmt.Errorf("无效的参与人")
71 } 72 }
  73 + participatorMap[participator.EmployeeInfo.Uid] = participator
72 participatorInfos = append(participatorInfos, participator.EmployeeInfo) 74 participatorInfos = append(participatorInfos, participator.EmployeeInfo)
73 } 75 }
74 } 76 }
@@ -83,13 +85,34 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64 @@ -83,13 +85,34 @@ func (service *AcceptanceTaskService) Acceptance(taskId int64, operatorUid int64
83 if task.TaskType == domain.TASK_TYPE_ROB { 85 if task.TaskType == domain.TASK_TYPE_ROB {
84 taskTypeName = "抢单任务" 86 taskTypeName = "抢单任务"
85 } 87 }
  88 + var employee *domain.Employee
  89 + if taskPercentageItem.IsReceiver {
  90 + receiver, err := employeeRepository.FindOne(map[string]interface{}{
  91 + "uid": taskPercentageItem.Contributor.Uid,
  92 + })
  93 + if err != nil {
  94 + return nil, err
  95 + }
  96 + if receiver == nil {
  97 + return nil, fmt.Errorf("无效的任务领取者")
  98 + }
  99 + employee = receiver
  100 + } else {
  101 + participator, ok := participatorMap[taskPercentageItem.Contributor.Uid]
  102 + if !ok {
  103 + return nil, fmt.Errorf("无效的参与人")
  104 + }
  105 + employee = participator
  106 + }
86 suMoneyTransactionRecord := &domain.SuMoneyTransactionRecord{ 107 suMoneyTransactionRecord := &domain.SuMoneyTransactionRecord{
87 - RecordType: domain.SU_MONEY_TRANSACTION_RECORD_TYPE_AWARD,  
88 - Employee: taskPercentageItem.Contributor,  
89 - SuMoney: taskPercentageItem.SuMoney,  
90 - Operator: operator.EmployeeInfo,  
91 - RecordDescription: fmt.Sprintf("%s-%s", taskTypeName, task.TaskName),  
92 - CreateTime: time.Now(), 108 + RecordType: domain.SU_MONEY_TRANSACTION_RECORD_TYPE_AWARD,
  109 + Employee: taskPercentageItem.Contributor,
  110 + SuMoneyBeforeTransaction: employee.SuMoney,
  111 + CurrentSuMoney: employee.SuMoney + taskPercentageItem.SuMoney,
  112 + SuMoney: taskPercentageItem.SuMoney,
  113 + Operator: operator.EmployeeInfo,
  114 + RecordDescription: fmt.Sprintf("%s-%s", taskTypeName, task.TaskName),
  115 + CreateTime: time.Now(),
93 } 116 }
94 if _, err := suMoneyTransactionRecordRepository.Save(suMoneyTransactionRecord); err != nil { 117 if _, err := suMoneyTransactionRecordRepository.Save(suMoneyTransactionRecord); err != nil {
95 return nil, err 118 return nil, err
@@ -59,6 +59,7 @@ func (service *ExchangeSuMoneyService) Exchange(uid int64, operatorUid int64, su @@ -59,6 +59,7 @@ func (service *ExchangeSuMoneyService) Exchange(uid int64, operatorUid int64, su
59 RecordType: domain.SU_MONEY_TRANSACTION_RECORD_TYPE_EXCHANGE, 59 RecordType: domain.SU_MONEY_TRANSACTION_RECORD_TYPE_EXCHANGE,
60 Employee: employee.EmployeeInfo, 60 Employee: employee.EmployeeInfo,
61 SuMoneyBeforeTransaction: employee.SuMoney, 61 SuMoneyBeforeTransaction: employee.SuMoney,
  62 + CurrentSuMoney: employee.SuMoney - suMoney,
62 SuMoney: suMoney, 63 SuMoney: suMoney,
63 Operator: operator.EmployeeInfo, 64 Operator: operator.EmployeeInfo,
64 RecordDescription: recordDescription, 65 RecordDescription: recordDescription,
  1 +package domain_service
  2 +
  3 +import (
  4 + "fmt"
  5 + coreDomain "github.com/linmadan/egglib-go/core/domain"
  6 + pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
  7 + "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/domain"
  8 + "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/dao"
  9 + "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/repository"
  10 + "time"
  11 +)
  12 +
  13 +type OperationSuMoneyService struct {
  14 + coreDomain.BaseEventPublisher
  15 + transactionContext *pgTransaction.TransactionContext
  16 +}
  17 +
  18 +func (service *OperationSuMoneyService) Operation(uid int64, operatorUid int64, suMoney float64, operationType int, recordDescription string) (*domain.SuMoneyTransactionRecord, error) {
  19 + var employeeRepository domain.EmployeeRepository
  20 + var suMoneyTransactionRecordRepository domain.SuMoneyTransactionRecordRepository
  21 + var employeeDao *dao.EmployeeDao
  22 + if repository, err := repository.NewEmployeeRepository(service.transactionContext); err != nil {
  23 + return nil, err
  24 + } else {
  25 + employeeRepository = repository
  26 + }
  27 + if repository, err := repository.NewSuMoneyTransactionRecordRepository(service.transactionContext); err != nil {
  28 + return nil, err
  29 + } else {
  30 + suMoneyTransactionRecordRepository = repository
  31 + }
  32 + if dao, err := dao.NewEmployeeDao(service.transactionContext); err != nil {
  33 + return nil, err
  34 + } else {
  35 + employeeDao = dao
  36 + }
  37 + employee, err := employeeRepository.FindOne(map[string]interface{}{
  38 + "uid": uid,
  39 + })
  40 + if err != nil {
  41 + return nil, err
  42 + }
  43 + if employee == nil {
  44 + return nil, fmt.Errorf("无效的企业员工")
  45 + }
  46 + operator, err := employeeRepository.FindOne(map[string]interface{}{
  47 + "uid": operatorUid,
  48 + })
  49 + if err != nil {
  50 + return nil, err
  51 + }
  52 + if operator == nil {
  53 + return nil, fmt.Errorf("无效的操作者")
  54 + }
  55 + if operationType == 2 && employee.SuMoney < suMoney {
  56 + return nil, fmt.Errorf("当前素币不足")
  57 + }
  58 + var recordType int
  59 + var transferSuMoney float64
  60 + if operationType == 1 {
  61 + recordType = domain.SU_MONEY_TRANSACTION_RECORD_TYPE_INCREASE
  62 + transferSuMoney = suMoney
  63 + }
  64 + if operationType == 2 {
  65 + recordType = domain.SU_MONEY_TRANSACTION_RECORD_TYPE_DEDUCT
  66 + transferSuMoney = 0 - suMoney
  67 + }
  68 + suMoneyTransactionRecord := &domain.SuMoneyTransactionRecord{
  69 + RecordType: recordType,
  70 + Employee: employee.EmployeeInfo,
  71 + SuMoneyBeforeTransaction: employee.SuMoney,
  72 + CurrentSuMoney: employee.SuMoney + transferSuMoney,
  73 + SuMoney: suMoney,
  74 + Operator: operator.EmployeeInfo,
  75 + RecordDescription: recordDescription,
  76 + CreateTime: time.Now(),
  77 + }
  78 + if err := employeeDao.TransferSuMoney(employee.EmployeeInfo.Uid, transferSuMoney); err != nil {
  79 + return nil, err
  80 + }
  81 + if suMoneyTransactionRecord, err := suMoneyTransactionRecordRepository.Save(suMoneyTransactionRecord); err != nil {
  82 + return nil, err
  83 + } else {
  84 + return suMoneyTransactionRecord, nil
  85 + }
  86 +}
  87 +
  88 +func NewOperationSuMoneyService(transactionContext *pgTransaction.TransactionContext) (*OperationSuMoneyService, error) {
  89 + if transactionContext == nil {
  90 + return nil, fmt.Errorf("transactionContext参数不能为nil")
  91 + } else {
  92 + return &OperationSuMoneyService{
  93 + transactionContext: transactionContext,
  94 + }, nil
  95 + }
  96 +}
@@ -15,6 +15,8 @@ type SuMoneyTransactionRecord struct { @@ -15,6 +15,8 @@ type SuMoneyTransactionRecord struct {
15 Employee *domain.EmployeeInfo 15 Employee *domain.EmployeeInfo
16 // 事务处理前素币值 16 // 事务处理前素币值
17 SuMoneyBeforeTransaction float64 17 SuMoneyBeforeTransaction float64
  18 + // 当前素币值
  19 + CurrentSuMoney float64
18 // 事务素币值 20 // 事务素币值
19 SuMoney float64 21 SuMoney float64
20 // 操作人 22 // 操作人
@@ -18,16 +18,16 @@ func (repository *SuMoneyTransactionRecordRepository) Save(suMoneyTransactionRec @@ -18,16 +18,16 @@ func (repository *SuMoneyTransactionRecordRepository) Save(suMoneyTransactionRec
18 tx := repository.transactionContext.PgTx 18 tx := repository.transactionContext.PgTx
19 if suMoneyTransactionRecord.Identify() == nil { 19 if suMoneyTransactionRecord.Identify() == nil {
20 if _, err := tx.QueryOne( 20 if _, err := tx.QueryOne(
21 - pg.Scan(&suMoneyTransactionRecord.SuMoneyTransactionRecordId, &suMoneyTransactionRecord.RecordType, &suMoneyTransactionRecord.Employee, &suMoneyTransactionRecord.SuMoneyBeforeTransaction, &suMoneyTransactionRecord.SuMoney, &suMoneyTransactionRecord.Operator, &suMoneyTransactionRecord.RecordDescription, &suMoneyTransactionRecord.CreateTime),  
22 - "INSERT INTO su_money_transaction_records (record_type, employee, su_money_before_transaction, su_money, operator, record_description, create_time) VALUES (?, ?, ?, ?, ?, ?, ?) RETURNING id, record_type, employee, su_money_before_transaction, su_money, operator, record_description, create_time",  
23 - suMoneyTransactionRecord.RecordType, suMoneyTransactionRecord.Employee, suMoneyTransactionRecord.SuMoneyBeforeTransaction, suMoneyTransactionRecord.SuMoney, suMoneyTransactionRecord.Operator, suMoneyTransactionRecord.RecordDescription, suMoneyTransactionRecord.CreateTime); err != nil { 21 + pg.Scan(&suMoneyTransactionRecord.SuMoneyTransactionRecordId, &suMoneyTransactionRecord.RecordType, &suMoneyTransactionRecord.Employee, &suMoneyTransactionRecord.SuMoneyBeforeTransaction, &suMoneyTransactionRecord.CurrentSuMoney, &suMoneyTransactionRecord.SuMoney, &suMoneyTransactionRecord.Operator, &suMoneyTransactionRecord.RecordDescription, &suMoneyTransactionRecord.CreateTime),
  22 + "INSERT INTO su_money_transaction_records (record_type, employee, su_money_before_transaction, current_su_money, su_money, operator, record_description, create_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?) RETURNING id, record_type, employee, su_money_before_transaction, current_su_money, su_money, operator, record_description, create_time",
  23 + suMoneyTransactionRecord.RecordType, suMoneyTransactionRecord.Employee, suMoneyTransactionRecord.SuMoneyBeforeTransaction, suMoneyTransactionRecord.CurrentSuMoney, suMoneyTransactionRecord.SuMoney, suMoneyTransactionRecord.Operator, suMoneyTransactionRecord.RecordDescription, suMoneyTransactionRecord.CreateTime); err != nil {
24 return suMoneyTransactionRecord, err 24 return suMoneyTransactionRecord, err
25 } 25 }
26 } else { 26 } else {
27 if _, err := tx.QueryOne( 27 if _, err := tx.QueryOne(
28 - pg.Scan(&suMoneyTransactionRecord.SuMoneyTransactionRecordId, &suMoneyTransactionRecord.RecordType, &suMoneyTransactionRecord.Employee, &suMoneyTransactionRecord.SuMoneyBeforeTransaction, &suMoneyTransactionRecord.SuMoney, &suMoneyTransactionRecord.Operator, &suMoneyTransactionRecord.RecordDescription, &suMoneyTransactionRecord.CreateTime),  
29 - "UPDATE su_money_transaction_records SET record_type=?, employee=?, su_money_before_transaction=?, su_money=?, operator=?, record_description=?, create_time=? WHERE id=? RETURNING id, record_type, employee, su_money, operator, record_description, create_time",  
30 - suMoneyTransactionRecord.RecordType, suMoneyTransactionRecord.Employee, suMoneyTransactionRecord.SuMoneyBeforeTransaction, suMoneyTransactionRecord.SuMoney, suMoneyTransactionRecord.Operator, suMoneyTransactionRecord.RecordDescription, suMoneyTransactionRecord.CreateTime, suMoneyTransactionRecord.SuMoneyTransactionRecordId); err != nil { 28 + pg.Scan(&suMoneyTransactionRecord.SuMoneyTransactionRecordId, &suMoneyTransactionRecord.RecordType, &suMoneyTransactionRecord.Employee, &suMoneyTransactionRecord.SuMoneyBeforeTransaction, &suMoneyTransactionRecord.CurrentSuMoney, &suMoneyTransactionRecord.SuMoney, &suMoneyTransactionRecord.Operator, &suMoneyTransactionRecord.RecordDescription, &suMoneyTransactionRecord.CreateTime),
  29 + "UPDATE su_money_transaction_records SET record_type=?, employee=?, su_money_before_transaction=?, current_su_money=?, su_money=?, operator=?, record_description=?, create_time=? WHERE id=? RETURNING id, record_type, employee, su_money_before_transaction, current_su_money, su_money, operator, record_description, create_time",
  30 + suMoneyTransactionRecord.RecordType, suMoneyTransactionRecord.Employee, suMoneyTransactionRecord.SuMoneyBeforeTransaction, suMoneyTransactionRecord.CurrentSuMoney, suMoneyTransactionRecord.SuMoney, suMoneyTransactionRecord.Operator, suMoneyTransactionRecord.RecordDescription, suMoneyTransactionRecord.CreateTime, suMoneyTransactionRecord.SuMoneyTransactionRecordId); err != nil {
31 return suMoneyTransactionRecord, err 31 return suMoneyTransactionRecord, err
32 } 32 }
33 } 33 }
@@ -117,6 +117,7 @@ func (repository *SuMoneyTransactionRecordRepository) transformPgModelToDomainMo @@ -117,6 +117,7 @@ func (repository *SuMoneyTransactionRecordRepository) transformPgModelToDomainMo
117 RecordType: suMoneyTransactionRecordModel.RecordType, 117 RecordType: suMoneyTransactionRecordModel.RecordType,
118 Employee: suMoneyTransactionRecordModel.Employee, 118 Employee: suMoneyTransactionRecordModel.Employee,
119 SuMoneyBeforeTransaction: suMoneyTransactionRecordModel.SuMoneyBeforeTransaction, 119 SuMoneyBeforeTransaction: suMoneyTransactionRecordModel.SuMoneyBeforeTransaction,
  120 + CurrentSuMoney: suMoneyTransactionRecordModel.CurrentSuMoney,
120 SuMoney: suMoneyTransactionRecordModel.SuMoney, 121 SuMoney: suMoneyTransactionRecordModel.SuMoney,
121 Operator: suMoneyTransactionRecordModel.Operator, 122 Operator: suMoneyTransactionRecordModel.Operator,
122 RecordDescription: suMoneyTransactionRecordModel.RecordDescription, 123 RecordDescription: suMoneyTransactionRecordModel.RecordDescription,
@@ -14,6 +14,21 @@ type SuMoneyController struct { @@ -14,6 +14,21 @@ type SuMoneyController struct {
14 beego.Controller 14 beego.Controller
15 } 15 }
16 16
  17 +func (controller *SuMoneyController) OperationSuMoney() {
  18 + suMoneyService := service.NewSuMoneyService(nil)
  19 + operationSuMoneyCommand := &command.OperationSuMoneyCommand{}
  20 + json.Unmarshal(controller.Ctx.Input.GetData("requestBody").([]byte), operationSuMoneyCommand)
  21 + data, err := suMoneyService.OperationSuMoney(operationSuMoneyCommand)
  22 + var response utils.JsonResponse
  23 + if err != nil {
  24 + response = utils.ResponseError(controller.Ctx, err)
  25 + } else {
  26 + response = utils.ResponseData(controller.Ctx, data)
  27 + }
  28 + controller.Data["json"] = response
  29 + controller.ServeJSON()
  30 +}
  31 +
17 func (controller *SuMoneyController) GetSuMoneyTransactionRecord() { 32 func (controller *SuMoneyController) GetSuMoneyTransactionRecord() {
18 suMoneyService := service.NewSuMoneyService(nil) 33 suMoneyService := service.NewSuMoneyService(nil)
19 getSuMoneyTransactionRecordQuery := &query.GetSuMoneyTransactionRecordQuery{} 34 getSuMoneyTransactionRecordQuery := &query.GetSuMoneyTransactionRecordQuery{}
@@ -6,6 +6,7 @@ import ( @@ -6,6 +6,7 @@ import (
6 ) 6 )
7 7
8 func init() { 8 func init() {
  9 + beego.Router("/su-money/operation", &controllers.SuMoneyController{}, "Post:OperationSuMoney")
9 beego.Router("/su-money/su-money-transaction-records/:suMoneyTransactionRecordId", &controllers.SuMoneyController{}, "Get:GetSuMoneyTransactionRecord") 10 beego.Router("/su-money/su-money-transaction-records/:suMoneyTransactionRecordId", &controllers.SuMoneyController{}, "Get:GetSuMoneyTransactionRecord")
10 beego.Router("/su-money/exchange", &controllers.SuMoneyController{}, "Post:ExchangeSuMoney") 11 beego.Router("/su-money/exchange", &controllers.SuMoneyController{}, "Post:ExchangeSuMoney")
11 beego.Router("/su-money/search-su-money-transaction-record", &controllers.SuMoneyController{}, "Post:SearchSuMoneyTransactionRecord") 12 beego.Router("/su-money/search-su-money-transaction-record", &controllers.SuMoneyController{}, "Post:SearchSuMoneyTransactionRecord")
@@ -17,10 +17,10 @@ var _ = Describe("获取个人任务统计", func() { @@ -17,10 +17,10 @@ var _ = Describe("获取个人任务统计", func() {
17 dayAfter, _ := time.ParseDuration("72h") 17 dayAfter, _ := time.ParseDuration("72h")
18 _, err := pG.DB.QueryOne( 18 _, err := pG.DB.QueryOne(
19 pg.Scan(), 19 pg.Scan(),
20 - "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, receiver_uid, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 20 + "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, receiver_uid, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
21 1, 101, "抢单任务1", 1, &domain.EmployeeInfo{ 21 1, 101, "抢单任务1", 1, &domain.EmployeeInfo{
22 Uid: 2499036607974745088, 22 Uid: 2499036607974745088,
23 - }, 2, "null", pg.Array([]string{"口感", "便利", "品牌", "售后服务"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, []*domain.EmployeeInfo{ 23 + }, 2, "null", 1, pg.Array([]int{1, 2, 3, 4}), 1, 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, []*domain.EmployeeInfo{
24 { 24 {
25 Uid: 2499036607974745077, 25 Uid: 2499036607974745077,
26 }, 26 },
@@ -31,31 +31,31 @@ var _ = Describe("获取个人任务统计", func() { @@ -31,31 +31,31 @@ var _ = Describe("获取个人任务统计", func() {
31 Expect(err).NotTo(HaveOccurred()) 31 Expect(err).NotTo(HaveOccurred())
32 _, err1 := pG.DB.QueryOne( 32 _, err1 := pG.DB.QueryOne(
33 pg.Scan(), 33 pg.Scan(),
34 - "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 34 + "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
35 2, 101, "抢单任务2", 1, &domain.EmployeeInfo{ 35 2, 101, "抢单任务2", 1, &domain.EmployeeInfo{
36 Uid: 2499036607974745088, 36 Uid: 2499036607974745088,
37 - }, 2, "null", pg.Array([]string{"口感", "便利", "品牌"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), false, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter)) 37 + }, 2, "null", 1, pg.Array([]int{1, 2, 3, 4}), 1, 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), false, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter))
38 Expect(err1).NotTo(HaveOccurred()) 38 Expect(err1).NotTo(HaveOccurred())
39 _, err2 := pG.DB.QueryOne( 39 _, err2 := pG.DB.QueryOne(
40 pg.Scan(), 40 pg.Scan(),
41 - "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 41 + "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
42 3, 102, "竞标任务1", 2, &domain.EmployeeInfo{ 42 3, 102, "竞标任务1", 2, &domain.EmployeeInfo{
43 Uid: 2499036607974745088, 43 Uid: 2499036607974745088,
44 - }, 1, "null", pg.Array([]string{"口感", "便利", "品牌"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter)) 44 + }, 1, "null", 1, pg.Array([]int{1, 2, 3, 4}), 1, 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter))
45 Expect(err2).NotTo(HaveOccurred()) 45 Expect(err2).NotTo(HaveOccurred())
46 _, err3 := pG.DB.QueryOne( 46 _, err3 := pG.DB.QueryOne(
47 pg.Scan(), 47 pg.Scan(),
48 - "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 48 + "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
49 4, 101, "竞标任务1", 2, &domain.EmployeeInfo{ 49 4, 101, "竞标任务1", 2, &domain.EmployeeInfo{
50 Uid: 2499036607974745099, 50 Uid: 2499036607974745099,
51 - }, 3, "null", pg.Array([]string{"口感", "便利", "品牌"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), false, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter)) 51 + }, 3, "null", 1, pg.Array([]int{1, 2, 3, 4}), 1, 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), false, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter))
52 Expect(err3).NotTo(HaveOccurred()) 52 Expect(err3).NotTo(HaveOccurred())
53 _, err4 := pG.DB.QueryOne( 53 _, err4 := pG.DB.QueryOne(
54 pg.Scan(), 54 pg.Scan(),
55 - "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, receiver_uid, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 55 + "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, receiver_uid, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
56 5, 303, "抢单任务1", 1, &domain.EmployeeInfo{ 56 5, 303, "抢单任务1", 1, &domain.EmployeeInfo{
57 Uid: 2499036607974745088, 57 Uid: 2499036607974745088,
58 - }, 6, "null", pg.Array([]string{"口感", "便利", "品牌", "售后服务"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, []*domain.EmployeeInfo{ 58 + }, 6, "null", 1, pg.Array([]int{1, 2, 3, 4}), 1, 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, []*domain.EmployeeInfo{
59 { 59 {
60 Uid: 2499036607974745077, 60 Uid: 2499036607974745077,
61 }, 61 },
@@ -17,10 +17,10 @@ var _ = Describe("获取系统任务统计", func() { @@ -17,10 +17,10 @@ var _ = Describe("获取系统任务统计", func() {
17 dayAfter, _ := time.ParseDuration("72h") 17 dayAfter, _ := time.ParseDuration("72h")
18 _, err := pG.DB.QueryOne( 18 _, err := pG.DB.QueryOne(
19 pg.Scan(), 19 pg.Scan(),
20 - "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, receiver_uid, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 20 + "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, receiver_uid, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
21 1, 101, "抢单任务1", 1, &domain.EmployeeInfo{ 21 1, 101, "抢单任务1", 1, &domain.EmployeeInfo{
22 Uid: 2499036607974745088, 22 Uid: 2499036607974745088,
23 - }, 2, "null", pg.Array([]string{"口感", "便利", "品牌", "售后服务"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, []*domain.EmployeeInfo{ 23 + }, 2, "null", 1, pg.Array([]int{1, 2, 3, 4}), 1, 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, []*domain.EmployeeInfo{
24 { 24 {
25 Uid: 2499036607974745077, 25 Uid: 2499036607974745077,
26 }, 26 },
@@ -31,31 +31,31 @@ var _ = Describe("获取系统任务统计", func() { @@ -31,31 +31,31 @@ var _ = Describe("获取系统任务统计", func() {
31 Expect(err).NotTo(HaveOccurred()) 31 Expect(err).NotTo(HaveOccurred())
32 _, err1 := pG.DB.QueryOne( 32 _, err1 := pG.DB.QueryOne(
33 pg.Scan(), 33 pg.Scan(),
34 - "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 34 + "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
35 2, 101, "抢单任务2", 1, &domain.EmployeeInfo{ 35 2, 101, "抢单任务2", 1, &domain.EmployeeInfo{
36 Uid: 2499036607974745088, 36 Uid: 2499036607974745088,
37 - }, 2, "null", pg.Array([]string{"口感", "便利", "品牌"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), false, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter)) 37 + }, 2, "null", 1, pg.Array([]int{1, 2, 3, 4}), 1, 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), false, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter))
38 Expect(err1).NotTo(HaveOccurred()) 38 Expect(err1).NotTo(HaveOccurred())
39 _, err2 := pG.DB.QueryOne( 39 _, err2 := pG.DB.QueryOne(
40 pg.Scan(), 40 pg.Scan(),
41 - "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 41 + "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
42 3, 102, "竞标任务1", 2, &domain.EmployeeInfo{ 42 3, 102, "竞标任务1", 2, &domain.EmployeeInfo{
43 Uid: 2499036607974745088, 43 Uid: 2499036607974745088,
44 - }, 1, "null", pg.Array([]string{"口感", "便利", "品牌"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter)) 44 + }, 1, "null", 1, pg.Array([]int{1, 2, 3, 4}), 1, 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter))
45 Expect(err2).NotTo(HaveOccurred()) 45 Expect(err2).NotTo(HaveOccurred())
46 _, err3 := pG.DB.QueryOne( 46 _, err3 := pG.DB.QueryOne(
47 pg.Scan(), 47 pg.Scan(),
48 - "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 48 + "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
49 4, 101, "竞标任务1", 2, &domain.EmployeeInfo{ 49 4, 101, "竞标任务1", 2, &domain.EmployeeInfo{
50 Uid: 2499036607974745099, 50 Uid: 2499036607974745099,
51 - }, 5, "null", pg.Array([]string{"口感", "便利", "品牌"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), false, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter)) 51 + }, 5, "null", 1, pg.Array([]int{1, 2, 3, 4}), 1, 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), false, "null", "null", "", pg.Array([]string{}), time.Now(), time.Now().Add(dayAfter))
52 Expect(err3).NotTo(HaveOccurred()) 52 Expect(err3).NotTo(HaveOccurred())
53 _, err4 := pG.DB.QueryOne( 53 _, err4 := pG.DB.QueryOne(
54 pg.Scan(), 54 pg.Scan(),
55 - "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, customer_value, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, receiver_uid, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 55 + "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, participators, task_percentage, solve_report, solve_picture_urls, receiver_uid, create_time, release_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
56 5, 303, "抢单任务1", 1, &domain.EmployeeInfo{ 56 5, 303, "抢单任务1", 1, &domain.EmployeeInfo{
57 Uid: 2499036607974745088, 57 Uid: 2499036607974745088,
58 - }, 6, "null", pg.Array([]string{"口感", "便利", "品牌", "售后服务"}), "面", 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, []*domain.EmployeeInfo{ 58 + }, 6, "null", 1, pg.Array([]int{1, 2, 3, 4}), 1, 1000.00, "验收标准1", "任务描述1", pg.Array([]string{}), true, []*domain.EmployeeInfo{
59 { 59 {
60 Uid: 2499036607974745077, 60 Uid: 2499036607974745077,
61 }, 61 },
  1 +package su_money
  2 +
  3 +import (
  4 + "net/http"
  5 +
  6 + "github.com/gavv/httpexpect"
  7 + "github.com/go-pg/pg"
  8 + . "github.com/onsi/ginkgo"
  9 + . "github.com/onsi/gomega"
  10 + pG "gitlab.fjmaimaimai.com/linmadan/mmm-worth/pkg/infrastructure/pg"
  11 +)
  12 +
  13 +var _ = Describe("操作素币", func() {
  14 + BeforeEach(func() {
  15 + _, err1 := pG.DB.QueryOne(
  16 + pg.Scan(),
  17 + "INSERT INTO employees (id, company_id, uid, employee_name, employee_account, su_money) VALUES (?, ?, ?, ?, ?, ?)",
  18 + 1, 101, 2499036607974745088, "testEmployeeName", "testEmployeeAccount", 100.00)
  19 + Expect(err1).NotTo(HaveOccurred())
  20 + _, err2 := pG.DB.QueryOne(
  21 + pg.Scan(),
  22 + "INSERT INTO employees (id, company_id, uid, employee_name, employee_account, su_money) VALUES (?, ?, ?, ?, ?, ?)",
  23 + 2, 101, 2499036607974745099, "testEmployeeName", "testEmployeeAccount", 0)
  24 + Expect(err2).NotTo(HaveOccurred())
  25 + })
  26 + Describe("操作素币", func() {
  27 + Context("操作人提交正确的数据操作素币", func() {
  28 + It("操作成功", func() {
  29 + httpExpect := httpexpect.New(GinkgoT(), server.URL)
  30 + body := map[string]interface{}{
  31 + "uid": 2499036607974745088,
  32 + "operationType": 1,
  33 + "suMoney": 50,
  34 + "operator": 2499036607974745099,
  35 + "operationDescription": "操作说明",
  36 + }
  37 + httpExpect.POST("/su-money/operation").
  38 + WithJSON(body).
  39 + Expect().
  40 + Status(http.StatusOK).
  41 + JSON().
  42 + Object().
  43 + ContainsKey("code").ValueEqual("code", 0).
  44 + ContainsKey("msg").ValueEqual("msg", "ok").
  45 + ContainsKey("data").Value("data").Object()
  46 + })
  47 + })
  48 + })
  49 + AfterEach(func() {
  50 + _, err := pG.DB.Exec("DELETE FROM employees WHERE true")
  51 + Expect(err).NotTo(HaveOccurred())
  52 + _, err1 := pG.DB.Exec("DELETE FROM su_money_transaction_records WHERE true")
  53 + Expect(err1).NotTo(HaveOccurred())
  54 + })
  55 +})