Browse Source

2.2归档

Ohio-HYF 1 year ago
parent
commit
c9dd5073bf
100 changed files with 4057 additions and 245 deletions
  1. 8 0
      .idea/.gitignore
  2. 8 0
      .idea/modules.xml
  3. 6 0
      .idea/vcs.xml
  4. 9 0
      .idea/youngee_mc_api.iml
  5. 28 0
      apiclient_key.pem
  6. 113 23
      app/api/youngee_talent_api/talent_auth_get_api.go
  7. 45 18
      app/api/youngee_talent_api/talent_auth_post_api.go
  8. 17 5
      app/api/youngee_talent_api/talent_get_api.go
  9. 1 2
      app/api/youngee_talent_api/talent_post_api.go
  10. 24 0
      app/dao/info_sectask_stage.go
  11. 24 0
      app/dao/info_youngee_strategy.go
  12. 3 1
      app/dao/internal/info_auto_task.go
  13. 59 0
      app/dao/internal/info_sectask_stage.go
  14. 77 0
      app/dao/internal/info_youngee_strategy.go
  15. 2 0
      app/dao/internal/project_photo.go
  16. 2 0
      app/dao/internal/youngee_platform_account_info.go
  17. 4 0
      app/dao/internal/youngee_talent_info.go
  18. 36 24
      app/dao/internal/youngee_task_info.go
  19. 79 0
      app/dao/internal/younggee_assignment_info.go
  20. 67 0
      app/dao/internal/younggee_sec_brief.go
  21. 67 0
      app/dao/internal/younggee_sec_example.go
  22. 115 0
      app/dao/internal/younggee_sec_task_info.go
  23. 119 0
      app/dao/internal/younggee_selection_info.go
  24. 1 1
      app/dao/internal/younggee_talent_bank.go
  25. 87 0
      app/dao/internal/younggee_talent_income.go
  26. 67 0
      app/dao/internal/younggee_talent_point_record.go
  27. 89 0
      app/dao/internal/younggee_talent_team.go
  28. 73 0
      app/dao/internal/younggee_team_reward_config.go
  29. 4 2
      app/dao/internal/younggee_withdraw_record.go
  30. 24 0
      app/dao/younggee_assignment_info.go
  31. 24 0
      app/dao/younggee_sec_brief.go
  32. 24 0
      app/dao/younggee_sec_example.go
  33. 24 0
      app/dao/younggee_sec_task_info.go
  34. 24 0
      app/dao/younggee_selection_info.go
  35. 24 0
      app/dao/younggee_talent_income.go
  36. 24 0
      app/dao/younggee_talent_point_record.go
  37. 24 0
      app/dao/younggee_talent_team.go
  38. 24 0
      app/dao/younggee_team_reward_config.go
  39. 219 16
      app/model/model.go
  40. 1 0
      app/model/youngee_talent_model/info_tables.go
  41. 1 0
      app/model/youngee_talent_model/project_detail.go
  42. 100 0
      app/model/youngee_talent_model/selection.go
  43. 36 0
      app/model/youngee_talent_model/selection_task.go
  44. 34 0
      app/model/youngee_talent_model/talent_income.go
  45. 40 19
      app/model/youngee_talent_model/talent_info.go
  46. 30 0
      app/model/youngee_talent_model/talent_team.go
  47. 10 10
      app/model/youngee_talent_model/task_income.go
  48. 26 16
      app/model/youngee_talent_model/task_info.go
  49. 394 0
      app/service/youngee_sectask_service/seletion_square.go
  50. 19 0
      app/service/youngee_sectask_service/talent_http_result.go
  51. 139 0
      app/service/youngee_sectask_service/work_space.go
  52. 7 2
      app/service/youngee_talent_service/info_tables.go
  53. 1 1
      app/service/youngee_talent_service/talent_bank.go
  54. 254 0
      app/service/youngee_talent_service/talent_income.go
  55. 64 0
      app/service/youngee_talent_service/talent_info.go
  56. 322 0
      app/service/youngee_talent_service/young_team.go
  57. 3 3
      app/service/youngee_task_service/project_info.go
  58. 19 0
      app/service/youngee_task_service/talent_http_result.go
  59. 1 1
      app/service/youngee_task_service/task_auto_time.go
  60. 1 1
      app/service/youngee_task_service/task_data.go
  61. 65 53
      app/service/youngee_task_service/task_income.go
  62. 79 42
      app/service/youngee_task_service/task_info.go
  63. 2 2
      app/service/youngee_task_service/task_link.go
  64. 1 1
      app/service/youngee_task_service/task_logistics.go
  65. 1 1
      app/service/youngee_task_service/task_script.go
  66. 1 1
      app/service/youngee_task_service/task_sketch.go
  67. 30 0
      app/system/assignment/assignment_api.go
  68. 35 0
      app/system/assignment/assignment_model.go
  69. 84 0
      app/system/assignment/assignment_service.go
  70. 13 0
      app/system/message/message_model.go
  71. 19 0
      app/system/message/message_service.go
  72. 26 0
      app/system/sectask/sectask_api.go
  73. 55 0
      app/system/sectask/sectask_model.go
  74. 104 0
      app/system/sectask/sectask_service.go
  75. 9 0
      app/system/sectasklog/sectasklog_model.go
  76. 19 0
      app/system/sectasklog/sectasklog_service.go
  77. 45 0
      app/system/selection/selction_model.go
  78. 25 0
      app/system/selection/selection_api.go
  79. 53 0
      app/system/selection/selection_service.go
  80. 28 0
      app/system/wxpay/apiclient_key.pem
  81. 25 0
      app/system/wxpay/wxpay_api.go
  82. 16 0
      app/system/wxpay/wxpay_model.go
  83. 107 0
      app/system/wxpay/wxpay_service.go
  84. 24 0
      app/utils/GetInfoFromSession.go
  85. 20 0
      app/utils/uuid.go
  86. BIN
      bin/v10.0.0/linux_amd64/youngmini_server
  87. BIN
      bin/v10.0.0/windows_amd64/youngmini_server.exe
  88. BIN
      bin/v2.1.0/linux_amd64/youngmini_server
  89. BIN
      bin/v2.1.0/windows_amd64/youngmini_server.exe
  90. BIN
      bin/v3.0.0/linux_amd64/youngmini_server
  91. BIN
      bin/v3.0.0/windows_amd64/youngmini_server.exe
  92. BIN
      bin/v3.0.1/linux_amd64/youngmini_server
  93. BIN
      bin/v3.0.1/windows_amd64/youngmini_server.exe
  94. BIN
      bin/v3.0.2/linux_amd64/youngmini_server
  95. BIN
      bin/v3.0.2/windows_amd64/youngmini_server.exe
  96. BIN
      bin/v3.2.0/linux_amd64/youngmini_server
  97. BIN
      bin/v3.2.0/windows_amd64/youngmini_server.exe
  98. BIN
      bin/v6.0.1/windows_amd64/youngmini_server.exe
  99. BIN
      bin/v6.0.4/linux_amd64/youngmini_server
  100. BIN
      bin/v6.0.4/windows_amd64/youngmini_server.exe

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/youngee_mc_api.iml" filepath="$PROJECT_DIR$/.idea/youngee_mc_api.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>

+ 9 - 0
.idea/youngee_mc_api.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="Go" enabled="true" />
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 28 - 0
apiclient_key.pem

@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDiS0mOMU85JaH1
+nRsOU57TfKP+3ma7TiEe2jQNHhF1UUW8i1+Hc1NeLe7dh29J5aEa/isu0RG2LHjY
+P73dzPkarAdhmW3ETsbBVazUw7RfhbPawR6EjBArRAojqHLXdSTFeDM6LtmwbWD2
+JEjiBKyTMtsbnap4ubLhR03huPn8V20Hbq3Zg+U8T4XtnK7jrac2SqkuybKheRX8
+OzaefU/nYbxKwyTqKCanAs96ZTFuEceW9Utoa4jb4bqdVVhbc2P5gyyssKfYkfDj
+Pdr2X3vg11qq7bhjQ+xLgUiWwXlqnKY0eHxvx0Zdh5PWdh0oYZtbuHrkPPJaf4zu
+Zkre9VnXAgMBAAECggEASPlaWP5Ru+4E0n29UdtpZm3VPMVff5tsVtSq4GgH3Ts+
+L9UKE1X/Vmmdk9au7recQmYgatKE0ah5t9KmWbZVxmIfZzvhB+MXeRU1zM7nhb5K
+B4srWjcIp8sjMeiKUCy4lO10J5kgHiLHl9iPoEM9m6JUwg0QAipwIvGpjdbm1paH
+esqCyZ2+fyTypO1mkpPOOB6caGwePE0Ppd/U5woPKPS0H5JnBdKPWBh/XYkBigOl
+fMRjJg9BDGPjxI1Rt+F6S359fgfXZJV1m74YVL9HxgfKi+WHdDTtj0094NBqizCg
+goeLZbz6aWYbOBmpFHrK8F2i/pYU658KLCtjjpvnQQKBgQD6JJGRqqF1OLVsjJ+E
++8ts8IdC+OBYY9YHgLw5D2aFUrtJre9Fiktj0hupXPm+01kmc+5OupR3O/L8jhM6
++NTe3fmIzNLk72GeZsiWFrZCN0fKjts421wwyhBrqW/qZN66a1kYA7fvr0ToRjL1
+jLhTqu0a8BGRyaxbqlebo/5FkQKBgQDnl8MYmJoYpJ36WK3Bd1j/9eczDmRXf4RW
+kZjIOeXBN4zHZsvlFtMtcaZAw3Z1KPbM4ncuKwl+pc7oNUfOAU/IOiBEiZR7zSYG
+D8g+UoXfZzv5mFQQBSagfY4Q0bigG1Zt/QPMoN5setiG6BJ+bwN7WfXNjRjyaXtZ
+ovUUniFU5wKBgQDrvu0mcL6MIG7zp7Brf3bf6+w+lRmylBzRo2VBDZ+chTUXooJ/
+cm/M2ubQ/lwtmThLAjWVI0jq+qftl+TNzleo12DmqcsUkfrZc5sVwL/ytfDGGU7I
+TgybusQxA1YDfR9gZ+1msZJ3pSJ3GjnKq93IlK2zlo+oa34yQd8hQzRP0QKBgQDQ
+5TkbNHq6g7HjoJ2KBocGyd2zVeX4bpMGKuouoNq2v86CBh0gFMiDEyItBKIS59JF
+2Hg78qHr1M+e8IBGNzSpnJSCfb6rNM55ZT7vyCvs6QdWCaq5kIvY86dzUFhCQqZh
+K3mD2A8Itn4cobQcyzHOz8RBlmXMMo0Ku0xpPoE+PQKBgEFcy2wvv/saKJ+3t2Cw
+4ckwskhsQ2CizlAlTCNmBzou+IYfcg3VxS7P0EA/ViUXHTOx1pjhS977FLqJxe08
+FU7a3mIzzehJA0VnsZC6lzCqSRxdE4bcEs9Opw+sJS7abJKRU2QeZSJEChqAMUhJ
+3oP15BVjOfW79TL/hp8fRZAt
+-----END PRIVATE KEY-----

+ 113 - 23
app/api/youngee_talent_api/talent_auth_get_api.go

@@ -1,7 +1,9 @@
 package youngeetalentapi
 
 import (
+	"youngmini_server/app/service/youngee_sectask_service"
 	"youngmini_server/app/service/youngee_talent_service"
+	"youngmini_server/app/service/youngee_task_service"
 
 	"github.com/gogf/gf/net/ghttp"
 )
@@ -12,7 +14,7 @@ type talentAuthGetApi struct{}
 
 // 获取单个项目详情
 func (*talentAuthGetApi) GetProjectDetail(r *ghttp.Request) {
-	res := youngee_talent_service.GetProjectDetail(r)
+	res := youngee_task_service.GetProjectDetail(r)
 
 	err := r.Response.WriteJson(res)
 	if err != nil {
@@ -40,8 +42,8 @@ func (*talentAuthGetApi) GetTalentAddress(r *ghttp.Request) {
 	}
 }
 
-// GetTalentDefaultAddress 获取单个达人收货地址详情
-// youngee_talent_delivery_address
+// GetTalentDefaultAddress 获取达人默认收货地址详情
+// youngee_talent_default_address
 func (*talentAuthGetApi) GetTalentDefaultAddress(r *ghttp.Request) {
 	res := youngee_talent_service.GetTalentDefaultAddress(r)
 	err := r.Response.WriteJson(res)
@@ -70,6 +72,7 @@ func (*talentAuthGetApi) GetTalentAccount(r *ghttp.Request) {
 	}
 }
 
+// 判断达人是否登录
 func (*talentAuthGetApi) IsLogin(r *ghttp.Request) {
 	res := youngee_talent_service.IsLogin(r)
 	err := r.Response.WriteJson(res)
@@ -78,31 +81,36 @@ func (*talentAuthGetApi) IsLogin(r *ghttp.Request) {
 	}
 }
 
+// 判断达人是否报名该任务
 func (*talentAuthGetApi) IsSignUpTask(r *ghttp.Request) {
-	res := youngee_talent_service.IsSignUpTask(r)
+	res := youngee_task_service.IsSignUpTask(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
 	}
 }
 
+// 返回所有任务的任务列表
 func (*talentAuthGetApi) GetTaskBriefList(r *ghttp.Request) {
-	res := youngee_talent_service.GetTaskBriefList(r)
+	res := youngee_task_service.GetTaskBriefList(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
 	}
 }
 
+// 返回指定任务阶段的任务列表
 func (*talentAuthGetApi) GetTaskExeList(r *ghttp.Request) {
-	res := youngee_talent_service.GetExeTaskBriefList(r)
+	res := youngee_task_service.GetExeTaskBriefList(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
 	}
 }
+
+// 获取任务数量
 func (*talentAuthGetApi) GetTaskExeNum(r *ghttp.Request) {
-	res := youngee_talent_service.GetExeTaskNum(r)
+	res := youngee_task_service.GetExeTaskNum(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -110,7 +118,7 @@ func (*talentAuthGetApi) GetTaskExeNum(r *ghttp.Request) {
 }
 
 func (*talentAuthGetApi) GetTaskNum(r *ghttp.Request) {
-	res := youngee_talent_service.GetTaskNum(r)
+	res := youngee_task_service.GetTaskNum(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -118,7 +126,7 @@ func (*talentAuthGetApi) GetTaskNum(r *ghttp.Request) {
 }
 
 func (*talentAuthGetApi) GetTaskDetail(r *ghttp.Request) {
-	res := youngee_talent_service.GetTaskDetail(r)
+	res := youngee_task_service.GetTaskDetail(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -126,7 +134,7 @@ func (*talentAuthGetApi) GetTaskDetail(r *ghttp.Request) {
 }
 
 func (*talentAuthGetApi) GetTaskLogisticsInfo(r *ghttp.Request) {
-	res := youngee_talent_service.GetTaskLogisticsInfo(r)
+	res := youngee_task_service.GetTaskLogisticsInfo(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -136,7 +144,7 @@ func (*talentAuthGetApi) GetTaskLogisticsInfo(r *ghttp.Request) {
 // GetTaskScript 获取任务脚本提交审阅记录
 // younggee_script_info
 func (*talentAuthGetApi) GetTaskScript(r *ghttp.Request) {
-	res := youngee_talent_service.GetTaskScript(r)
+	res := youngee_task_service.GetTaskScript(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -146,7 +154,7 @@ func (*talentAuthGetApi) GetTaskScript(r *ghttp.Request) {
 // SubmitTaskScript 提交任务脚本
 // younggee_script_info
 func (*talentAuthGetApi) SubmitTaskScript(r *ghttp.Request) {
-	res := youngee_talent_service.SubmitTaskScript(r)
+	res := youngee_task_service.SubmitTaskScript(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -156,7 +164,7 @@ func (*talentAuthGetApi) SubmitTaskScript(r *ghttp.Request) {
 // GetUnSubmitTaskScript 获取未提交的任务脚本
 // younggee_script_info
 func (*talentAuthGetApi) GetUnsubmitTaskScript(r *ghttp.Request) {
-	res := youngee_talent_service.GetUnSubmitTaskScript(r)
+	res := youngee_task_service.GetUnSubmitTaskScript(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -166,7 +174,7 @@ func (*talentAuthGetApi) GetUnsubmitTaskScript(r *ghttp.Request) {
 // GetTaskSketch 获取任务初稿提交审阅记录
 // younggee_sketch_info
 func (*talentAuthGetApi) GetTaskSketch(r *ghttp.Request) {
-	res := youngee_talent_service.GetTaskSketch(r)
+	res := youngee_task_service.GetTaskSketch(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -176,7 +184,7 @@ func (*talentAuthGetApi) GetTaskSketch(r *ghttp.Request) {
 // SubmitTaskSketch 提交任务初稿
 // younggee_sketch_info
 func (*talentAuthGetApi) SubmitTaskSketch(r *ghttp.Request) {
-	res := youngee_talent_service.SubmitTaskSketch(r)
+	res := youngee_task_service.SubmitTaskSketch(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -186,7 +194,7 @@ func (*talentAuthGetApi) SubmitTaskSketch(r *ghttp.Request) {
 // GetUnSubmitTaskSketch 获取未提交的任务初稿
 // younggee_sketch_info
 func (*talentAuthGetApi) GetUnsubmitTaskSketch(r *ghttp.Request) {
-	res := youngee_talent_service.GetUnSubmitTaskSketch(r)
+	res := youngee_task_service.GetUnSubmitTaskSketch(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -196,7 +204,7 @@ func (*talentAuthGetApi) GetUnsubmitTaskSketch(r *ghttp.Request) {
 // GetTaskData 获取任务数据提交审阅记录
 // younggee_data_info
 func (*talentAuthGetApi) GetTaskData(r *ghttp.Request) {
-	res := youngee_talent_service.GetTaskData(r)
+	res := youngee_task_service.GetTaskData(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -206,7 +214,7 @@ func (*talentAuthGetApi) GetTaskData(r *ghttp.Request) {
 // SubmitTaskData 提交任务数据
 // younggee_data_info
 func (*talentAuthGetApi) SubmitTaskData(r *ghttp.Request) {
-	res := youngee_talent_service.SubmitTaskData(r)
+	res := youngee_task_service.SubmitTaskData(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -216,7 +224,7 @@ func (*talentAuthGetApi) SubmitTaskData(r *ghttp.Request) {
 // GetUnSubmitTaskData 获取未提交的任务数据
 // younggee_data_info
 func (*talentAuthGetApi) GetUnsubmitTaskData(r *ghttp.Request) {
-	res := youngee_talent_service.GetUnSubmitTaskData(r)
+	res := youngee_task_service.GetUnSubmitTaskData(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -226,7 +234,7 @@ func (*talentAuthGetApi) GetUnsubmitTaskData(r *ghttp.Request) {
 // GetTaskLink 获取任务链接提交审阅记录
 // younggee_link_info
 func (*talentAuthGetApi) GetTaskLink(r *ghttp.Request) {
-	res := youngee_talent_service.GetTaskLink(r)
+	res := youngee_task_service.GetTaskLink(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -236,7 +244,7 @@ func (*talentAuthGetApi) GetTaskLink(r *ghttp.Request) {
 // SubmitTaskLink 提交任务链接
 // younggee_link_info
 func (*talentAuthGetApi) SubmitTaskLink(r *ghttp.Request) {
-	res := youngee_talent_service.SubmitTaskLink(r)
+	res := youngee_task_service.SubmitTaskLink(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -246,7 +254,7 @@ func (*talentAuthGetApi) SubmitTaskLink(r *ghttp.Request) {
 // GetUnSubmitTaskLink 获取未提交的任务链接
 // younggee_link_info
 func (*talentAuthGetApi) GetUnsubmitTaskLink(r *ghttp.Request) {
-	res := youngee_talent_service.GetUnSubmitTaskLink(r)
+	res := youngee_task_service.GetUnSubmitTaskLink(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -265,7 +273,7 @@ func (*talentAuthGetApi) GetTalentBankInfo(r *ghttp.Request) {
 
 // GetWithdrawTaskInfo 获取提现任务信息
 func (*talentAuthGetApi) GetWithdrawTaskInfo(r *ghttp.Request) {
-	res := youngee_talent_service.GetWithdrawTaskInfo(r)
+	res := youngee_task_service.GetWithdrawTaskInfo(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -295,3 +303,85 @@ func (*talentAuthGetApi) HasUnReadMessage(r *ghttp.Request) {
 		panic("write response error")
 	}
 }
+
+// 获取“我的”页面各类型数值
+func (*talentAuthGetApi) GetMyInfoNum(r *ghttp.Request) {
+	res := youngee_talent_service.GetMyInfoNum(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+// younge之团查询
+func (*talentAuthGetApi) GetYounggeeTeamList(r *ghttp.Request) {
+	res := youngee_talent_service.GetYounggeeTeamList(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+// younge之团进度查询
+func (*talentAuthGetApi) GetYounggeeTeamDetail(r *ghttp.Request) {
+	res := youngee_talent_service.GetYounggeeTeamDetail(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+// 积分明细查询
+func (*talentAuthGetApi) GetTalentPointInfo(r *ghttp.Request) {
+	res := youngee_talent_service.GetTalentPointInfo(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+// 获取单个选品项目详情
+func (*talentAuthGetApi) GetSelectionDetail(r *ghttp.Request) {
+	res := youngee_sectask_service.GetSelectionDetail(r)
+
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+// 查询执行中选品任务
+func (*talentAuthGetApi) GetExeSecTaskList(r *ghttp.Request) {
+	res := youngee_sectask_service.GetExeSecTaskList(r)
+
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+// 判断达人是否报名该任务
+func (*talentAuthGetApi) IsSignUpSecTask(r *ghttp.Request) {
+	res := youngee_sectask_service.IsSignUpSecTask(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+// 创建young之团
+func (*talentAuthGetApi) GetLeadYoungTeamId(r *ghttp.Request) {
+	res := youngee_talent_service.GetLeadYoungTeamId(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+func (*talentAuthGetApi) GetSecTaskDetail(r *ghttp.Request) {
+	res := youngee_sectask_service.GetSecTaskDetail(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}

+ 45 - 18
app/api/youngee_talent_api/talent_auth_post_api.go

@@ -1,9 +1,10 @@
 package youngeetalentapi
 
 import (
-	"youngmini_server/app/service/youngee_talent_service"
-
 	"github.com/gogf/gf/net/ghttp"
+	"youngmini_server/app/service/youngee_sectask_service"
+	"youngmini_server/app/service/youngee_talent_service"
+	"youngmini_server/app/service/youngee_task_service"
 )
 
 var TalentAuthPostApi = talentAuthPostApi{}
@@ -90,7 +91,7 @@ func (*talentAuthPostApi) UpdateTalentAccount(r *ghttp.Request) {
 }
 
 func (*talentAuthPostApi) SignUpTask(r *ghttp.Request) {
-	res := youngee_talent_service.SignUpTask(r)
+	res := youngee_task_service.SignUpTask(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -110,7 +111,7 @@ func (*talentAuthPostApi) AddTalentBank(r *ghttp.Request) {
 // AddTaskScript 添加脚本
 // younggee_script_info
 func (*talentAuthPostApi) AddTaskScript(r *ghttp.Request) {
-	res := youngee_talent_service.AddTaskScript(r)
+	res := youngee_task_service.AddTaskScript(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -120,7 +121,7 @@ func (*talentAuthPostApi) AddTaskScript(r *ghttp.Request) {
 // AddTaskSketch 添加初稿
 // younggee_sketch_info
 func (*talentAuthPostApi) AddTaskSketch(r *ghttp.Request) {
-	res := youngee_talent_service.AddTaskSketch(r)
+	res := youngee_task_service.AddTaskSketch(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -130,7 +131,7 @@ func (*talentAuthPostApi) AddTaskSketch(r *ghttp.Request) {
 // AddTaskLink 添加链接
 // younggee_link_info
 func (*talentAuthPostApi) AddTaskLink(r *ghttp.Request) {
-	res := youngee_talent_service.AddTaskLink(r)
+	res := youngee_task_service.AddTaskLink(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -140,16 +141,7 @@ func (*talentAuthPostApi) AddTaskLink(r *ghttp.Request) {
 // AddTaskData 添加数据
 // younggee_data_info
 func (*talentAuthPostApi) AddTaskData(r *ghttp.Request) {
-	res := youngee_talent_service.AddTaskData(r)
-	err := r.Response.WriteJson(res)
-	if err != nil {
-		panic("write response error")
-	}
-}
-
-// Withdraw 提现
-func (*talentAuthPostApi) Withdraw(r *ghttp.Request) {
-	res := youngee_talent_service.Withdraw(r)
+	res := youngee_task_service.AddTaskData(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -159,7 +151,7 @@ func (*talentAuthPostApi) Withdraw(r *ghttp.Request) {
 // UpdateLogisticsAddress 修改达人收货地址
 // youngee_task_info
 func (*talentAuthPostApi) UpdateLogisticsAddress(r *ghttp.Request) {
-	res := youngee_talent_service.OnUpdateLogisticsAddress(r)
+	res := youngee_task_service.OnUpdateLogisticsAddress(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
@@ -183,7 +175,42 @@ func (*talentAuthPostApi) DeleteMessage(r *ghttp.Request) {
 }
 
 func (*talentAuthPostApi) GetAutoTime(r *ghttp.Request) {
-	res := youngee_talent_service.GetAutoTime(r)
+	res := youngee_task_service.GetAutoTime(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+// 收益查询,支持模糊搜索
+func (*talentAuthPostApi) GetTalentIncomeInfo(r *ghttp.Request) {
+	res := youngee_talent_service.GetTalentIncomeInfo(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+// Withdraw 提现
+func (*talentAuthPostApi) Withdraw(r *ghttp.Request) {
+	res := youngee_talent_service.Withdraw(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+// 创建young之团
+func (*talentAuthPostApi) AddYoungTeam(r *ghttp.Request) {
+	res := youngee_talent_service.AddYoungTeam(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+func (*talentAuthPostApi) SignUpSecTask(r *ghttp.Request) {
+	res := youngee_sectask_service.SignUpSecTask(r)
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")

+ 17 - 5
app/api/youngee_talent_api/talent_get_api.go

@@ -1,7 +1,9 @@
 package youngeetalentapi
 
 import (
+	"youngmini_server/app/service/youngee_sectask_service"
 	"youngmini_server/app/service/youngee_talent_service"
+	"youngmini_server/app/service/youngee_task_service"
 
 	"github.com/gogf/gf/net/ghttp"
 )
@@ -11,9 +13,19 @@ var TalentGetApi = talentGetApi{}
 type talentGetApi struct {
 }
 
-// 获取任务列表
+// GetInfoTables 获取所有信息表
+func (*talentGetApi) GetInfoTables(r *ghttp.Request) {
+	res := youngee_talent_service.GetInfoTables()
+
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
+// 获取任务大厅展示列表
 func (*talentGetApi) GetProjectList(r *ghttp.Request) {
-	res := youngee_talent_service.GetProjectInfoList(r)
+	res := youngee_task_service.GetProjectInfoList(r)
 
 	err := r.Response.WriteJson(res)
 	if err != nil {
@@ -21,9 +33,9 @@ func (*talentGetApi) GetProjectList(r *ghttp.Request) {
 	}
 }
 
-// GetInfoTables 获取所有信息
-func (*talentGetApi) GetInfoTables(r *ghttp.Request) {
-	res := youngee_talent_service.GetInfoTables()
+// 获取选品任务广场展示列
+func (*talentGetApi) GetSelectionList(r *ghttp.Request) {
+	res := youngee_sectask_service.GetSelectionList(r)
 
 	err := r.Response.WriteJson(res)
 	if err != nil {

+ 1 - 2
app/api/youngee_talent_api/talent_post_api.go

@@ -1,9 +1,8 @@
 package youngeetalentapi
 
 import (
-	"youngmini_server/app/service/youngee_talent_service"
-
 	"github.com/gogf/gf/net/ghttp"
+	"youngmini_server/app/service/youngee_talent_service"
 )
 
 var TalentPostApi = talentPostApi{}

+ 24 - 0
app/dao/info_sectask_stage.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package dao
+
+import (
+	"youngmini_server/app/dao/internal"
+)
+
+// infoSectaskStageDao is the manager for logic model data accessing and custom defined data operations functions management.
+// You can define custom methods on it to extend its functionality as you wish.
+type infoSectaskStageDao struct {
+	*internal.InfoSectaskStageDao
+}
+
+var (
+	// InfoSectaskStage is globally public accessible object for table info_sectask_stage operations.
+	InfoSectaskStage = infoSectaskStageDao{
+		internal.NewInfoSectaskStageDao(),
+	}
+)
+
+// Fill with you ideas below.

+ 24 - 0
app/dao/info_youngee_strategy.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package dao
+
+import (
+	"youngmini_server/app/dao/internal"
+)
+
+// infoYoungeeStrategyDao is the manager for logic model data accessing and custom defined data operations functions management.
+// You can define custom methods on it to extend its functionality as you wish.
+type infoYoungeeStrategyDao struct {
+	*internal.InfoYoungeeStrategyDao
+}
+
+var (
+	// InfoYoungeeStrategy is globally public accessible object for table info_youngee_strategy operations.
+	InfoYoungeeStrategy = infoYoungeeStrategyDao{
+		internal.NewInfoYoungeeStrategyDao(),
+	}
+)
+
+// Fill with you ideas below.

+ 3 - 1
app/dao/internal/info_auto_task.go

@@ -26,12 +26,13 @@ type InfoAutoTaskColumns struct {
 	ReviewUnlimited   string // 不限形式的审稿处理
 	Postreview        string // 发布审核自动处理
 	CaseClose         string // 结案自动处理
-	Invalid           string // 失效自动处理
+	Invalid           string // 全流程项目失效自动处理
 	DraftDefaultInPic string // 图片初稿违约自动处理
 	DraftDefaultInMv  string // 视频初稿违约自动处理
 	ScriptDefault     string // 脚本违约自动处理
 	LinkBreach        string // 链接违约自动处理
 	CaseCloseDefault  string // 结案违约自动处理
+	Selectioninvalid  string // 选品项目失效自动处理
 }
 
 //  infoAutoTaskColumns holds the columns for table info_auto_task.
@@ -49,6 +50,7 @@ var infoAutoTaskColumns = InfoAutoTaskColumns{
 	ScriptDefault:     "script_default",
 	LinkBreach:        "link_breach",
 	CaseCloseDefault:  "case_close_default",
+	Selectioninvalid:  "selectioninvalid",
 }
 
 // NewInfoAutoTaskDao creates and returns a new DAO object for table data access.

+ 59 - 0
app/dao/internal/info_sectask_stage.go

@@ -0,0 +1,59 @@
+// ==========================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+)
+
+// InfoSectaskStageDao is the manager for logic model data accessing and custom defined data operations functions management.
+type InfoSectaskStageDao struct {
+	Table   string                  // Table is the underlying table name of the DAO.
+	Group   string                  // Group is the database configuration group name of current DAO.
+	Columns InfoSectaskStageColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
+}
+
+// InfoSectaskStageColumns defines and stores column names for table info_sectask_stage.
+type InfoSectaskStageColumns struct {
+	TaskStageId string // 选品任务阶段id
+	TaskStage   string // 选品任务阶段
+}
+
+//  infoSectaskStageColumns holds the columns for table info_sectask_stage.
+var infoSectaskStageColumns = InfoSectaskStageColumns{
+	TaskStageId: "task_stage_id",
+	TaskStage:   "task_stage",
+}
+
+// NewInfoSectaskStageDao creates and returns a new DAO object for table data access.
+func NewInfoSectaskStageDao() *InfoSectaskStageDao {
+	return &InfoSectaskStageDao{
+		Group:   "default",
+		Table:   "info_sectask_stage",
+		Columns: infoSectaskStageColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *InfoSectaskStageDao) DB() gdb.DB {
+	return g.DB(dao.Group)
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *InfoSectaskStageDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *InfoSectaskStageDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 77 - 0
app/dao/internal/info_youngee_strategy.go

@@ -0,0 +1,77 @@
+// ==========================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+)
+
+// InfoYoungeeStrategyDao is the manager for logic model data accessing and custom defined data operations functions management.
+type InfoYoungeeStrategyDao struct {
+	Table   string                     // Table is the underlying table name of the DAO.
+	Group   string                     // Group is the database configuration group name of current DAO.
+	Columns InfoYoungeeStrategyColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
+}
+
+// InfoYoungeeStrategyColumns defines and stores column names for table info_youngee_strategy.
+type InfoYoungeeStrategyColumns struct {
+	Id          string // id
+	ProjectType string // 项目类型,0表示不限,1为全流程项目,2为选品项目
+	StrategyId  string // 定价策略编号
+	Platform    string // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	TaskType    string // 任务形式,实体商品寄拍、虚拟产品测评、线下探店打卡、悬赏任务、纯佣带货
+	ContentType string // 内容形式 图文、视频、直播
+	Reason      string // 奖励原因,成团-新用户、成团-老用户、成单-申请成功、成单-结案完毕;
+	Points      string // 积分奖励
+	Cash        string // 现金奖励
+	Status      string // '定价策略当前状态,0表示正常,1表示禁用',
+	CreateAt    string // 创建时间
+}
+
+//  infoYoungeeStrategyColumns holds the columns for table info_youngee_strategy.
+var infoYoungeeStrategyColumns = InfoYoungeeStrategyColumns{
+	Id:          "id",
+	ProjectType: "project_type",
+	StrategyId:  "strategyId",
+	Platform:    "platform",
+	TaskType:    "task_type",
+	ContentType: "content_type",
+	Reason:      "reason",
+	Points:      "points",
+	Cash:        "cash",
+	Status:      "status",
+	CreateAt:    "create_at",
+}
+
+// NewInfoYoungeeStrategyDao creates and returns a new DAO object for table data access.
+func NewInfoYoungeeStrategyDao() *InfoYoungeeStrategyDao {
+	return &InfoYoungeeStrategyDao{
+		Group:   "default",
+		Table:   "info_youngee_strategy",
+		Columns: infoYoungeeStrategyColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *InfoYoungeeStrategyDao) DB() gdb.DB {
+	return g.DB(dao.Group)
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *InfoYoungeeStrategyDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *InfoYoungeeStrategyDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 2 - 0
app/dao/internal/project_photo.go

@@ -24,6 +24,7 @@ type ProjectPhotoColumns struct {
 	PhotoUid       string //
 	ProjectId      string // 所属项目id
 	CreatedAt      string // 创建时间
+	FileName       string // 文件名称
 }
 
 //  projectPhotoColumns holds the columns for table project_photo.
@@ -33,6 +34,7 @@ var projectPhotoColumns = ProjectPhotoColumns{
 	PhotoUid:       "photo_uid",
 	ProjectId:      "project_id",
 	CreatedAt:      "created_at",
+	FileName:       "file_name",
 }
 
 // NewProjectPhotoDao creates and returns a new DAO object for table data access.

+ 2 - 0
app/dao/internal/youngee_platform_account_info.go

@@ -23,6 +23,7 @@ type YoungeePlatformAccountInfoColumns struct {
 	TalentId           string // 达人账号id(youngee_talent_info表id值)
 	PlatformId         string // 平台id,与third_platform_info中的id相同
 	PlatformNickname   string // 在平台上的昵称
+	PlatformType       string // 标签及类型
 	HomePageUrl        string // 主页链接
 	FansCount          string // 粉丝数
 	HomePageCaptureUrl string // 主页截图链接
@@ -39,6 +40,7 @@ var youngeePlatformAccountInfoColumns = YoungeePlatformAccountInfoColumns{
 	TalentId:           "talent_id",
 	PlatformId:         "platform_id",
 	PlatformNickname:   "platform_nickname",
+	PlatformType:       "platform_type",
 	HomePageUrl:        "home_page_url",
 	FansCount:          "fans_count",
 	HomePageCaptureUrl: "home_page_capture_url",

+ 4 - 0
app/dao/internal/youngee_talent_info.go

@@ -27,6 +27,7 @@ type YoungeeTalentInfoColumns struct {
 	Withdrawing       string // 提现中金额
 	Canwithdraw       string // 可提现金额
 	Withdrawed        string // 已提现金额
+	Point             string // 可用积分
 	TalentPhoneNumber string // 电话号码
 	TalentAgeBracket  string // 年龄段,取tallent_age_bracket表id
 	TalentNationality string // 国籍,取tallent_nationality表id
@@ -43,6 +44,7 @@ type YoungeeTalentInfoColumns struct {
 	CreateDate        string // 创建时间
 	LastLoginDate     string // 最后登录时间
 	ApplyNum          string // 剩余申请次数(每天更新)
+	UserType          string // 用户类型,1、2分别表示新用户、老用户
 }
 
 //  youngeeTalentInfoColumns holds the columns for table youngee_talent_info.
@@ -55,6 +57,7 @@ var youngeeTalentInfoColumns = YoungeeTalentInfoColumns{
 	Withdrawing:       "withdrawing",
 	Canwithdraw:       "canwithdraw",
 	Withdrawed:        "withdrawed",
+	Point:             "point",
 	TalentPhoneNumber: "talent_phone_number",
 	TalentAgeBracket:  "talent_age_bracket",
 	TalentNationality: "talent_nationality",
@@ -71,6 +74,7 @@ var youngeeTalentInfoColumns = YoungeeTalentInfoColumns{
 	CreateDate:        "create_date",
 	LastLoginDate:     "last_login_date",
 	ApplyNum:          "apply_num",
+	UserType:          "user_type",
 }
 
 // NewYoungeeTalentInfoDao creates and returns a new DAO object for table data access.

+ 36 - 24
app/dao/internal/youngee_task_info.go

@@ -23,38 +23,44 @@ type YoungeeTaskInfoColumns struct {
 	ProjectId              string // 项目id
 	TalentId               string // 达人id
 	AccountId              string // 账号id
+	StrategyId             string // 报名选择的招募策略id
 	TalentPlatformInfoSnap string // 达人平台信息快照
 	TalentPersonalInfoSnap string // 达人个人信息快照
 	TalentPostAddrSnap     string // 收货地址快照
-	StrategyId             string // 报名选择的招募策略id
 	TaskReward             string // 达人报酬
 	SettleAmount           string // 达人实际所得(扣除违约扣款)
 	AllPayment             string // 企业支付
 	RealPayment            string // 企业实际支付(扣除违约扣款)
+	ServiceRate            string // 服务费率,千分之
+	ServiceCharge          string // 服务费
+	FeeForm                string // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
 	ErrBreakRate           string // 未上传类型违约扣款比例,百分之
 	ScriptBreakRate        string // 脚本上传超时违约扣款比例,百分之
 	SketchBreakRate        string // 初稿上传超时违约扣款比例,百分之
 	LinkBreakRate          string // 链接上传超时违约扣款比例,百分之
 	DataBreakRate          string // 数据上传超时违约扣款比例,百分之
-	FeeForm                string // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
-	ServiceCharge          string // 服务费
-	ServiceRate            string // 服务费率,千分之
+	TaskStage              string //
 	TaskStatus             string // 任务状态 1待选 2已选 3落选
-	TaskStage              string // 任务阶段,详情见info_task_stage表
-	CreateDate             string // 创建时间
-	SelectDate             string // 反选时间
-	DeliveryDate           string // 发货时间
-	CompleteDate           string // 结束时间
-	WithdrawDate           string // 提现时间
-	CompleteStatus         string // 结束方式 1未结束 2正常结束 3反选失败 4被解约
 	LogisticsStatus        string // 发货状态 1 待发货 2已发货 3 已签收
 	ScriptStatus           string // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
 	SketchStatus           string // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	UpdateAt               string // 更新时间
 	LinkStatus             string // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
 	DataStatus             string // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	CompleteStatus         string // 结束方式 1未结束 2正常结束 3反选失败 4被解约
+	UpdateAt               string // 更新时间
+	CreateDate             string // 创建时间
+	SelectDate             string // 反选时间
+	DeliveryDate           string // 发货时间
+	CompleteDate           string // 结束时间
+	WithdrawDate           string // 提现时间
 	CurDefaultType         string // 任务当前处于的违约类型 0-10分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约、解约待处理、解约
 	WithdrawStatus         string // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
+	LeadTeamId             string // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
+	TeamId                 string // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
+	SettleStatus           string // 结算状态,1、2分别表示待结算、已结算
+	TeamIncome             string // young之团团长现金收益
+	TeamPoint              string // young之团团长积分收益
+	CurBreakAt             string // 当前阶段截止时间
 }
 
 //  youngeeTaskInfoColumns holds the columns for table youngee_task_info.
@@ -63,38 +69,44 @@ var youngeeTaskInfoColumns = YoungeeTaskInfoColumns{
 	ProjectId:              "project_id",
 	TalentId:               "talent_id",
 	AccountId:              "account_id",
+	StrategyId:             "strategy_id",
 	TalentPlatformInfoSnap: "talent_platform_info_snap",
 	TalentPersonalInfoSnap: "talent_personal_info_snap",
 	TalentPostAddrSnap:     "talent_post_addr_snap",
-	StrategyId:             "strategy_id",
 	TaskReward:             "task_reward",
 	SettleAmount:           "settle_amount",
 	AllPayment:             "all_payment",
 	RealPayment:            "real_payment",
+	ServiceRate:            "service_rate",
+	ServiceCharge:          "service_charge",
+	FeeForm:                "fee_form",
 	ErrBreakRate:           "err_break_rate",
 	ScriptBreakRate:        "script_break_rate",
 	SketchBreakRate:        "sketch_break_rate",
 	LinkBreakRate:          "link_break_rate",
 	DataBreakRate:          "data_break_rate",
-	FeeForm:                "fee_form",
-	ServiceCharge:          "service_charge",
-	ServiceRate:            "service_rate",
-	TaskStatus:             "task_status",
 	TaskStage:              "task_stage",
-	CreateDate:             "create_date",
-	SelectDate:             "select_date",
-	DeliveryDate:           "delivery_date",
-	CompleteDate:           "complete_date",
-	WithdrawDate:           "withdraw_date",
-	CompleteStatus:         "complete_status",
+	TaskStatus:             "task_status",
 	LogisticsStatus:        "logistics_status",
 	ScriptStatus:           "script_status",
 	SketchStatus:           "sketch_status",
-	UpdateAt:               "update_at",
 	LinkStatus:             "link_status",
 	DataStatus:             "data_status",
+	CompleteStatus:         "complete_status",
+	UpdateAt:               "update_at",
+	CreateDate:             "create_date",
+	SelectDate:             "select_date",
+	DeliveryDate:           "delivery_date",
+	CompleteDate:           "complete_date",
+	WithdrawDate:           "withdraw_date",
 	CurDefaultType:         "cur_default_type",
 	WithdrawStatus:         "withdraw_status",
+	LeadTeamId:             "lead_team_id",
+	TeamId:                 "team_id",
+	SettleStatus:           "settle_status",
+	TeamIncome:             "team_income",
+	TeamPoint:              "team_point",
+	CurBreakAt:             "cur_break_at",
 }
 
 // NewYoungeeTaskInfoDao creates and returns a new DAO object for table data access.

+ 79 - 0
app/dao/internal/younggee_assignment_info.go

@@ -0,0 +1,79 @@
+// ==========================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+)
+
+// YounggeeAssignmentInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
+type YounggeeAssignmentInfoDao struct {
+	Table   string                        // Table is the underlying table name of the DAO.
+	Group   string                        // Group is the database configuration group name of current DAO.
+	Columns YounggeeAssignmentInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
+}
+
+// YounggeeAssignmentInfoColumns defines and stores column names for table younggee_assignment_info.
+type YounggeeAssignmentInfoColumns struct {
+	AssignmentId  string // 作业id,递增
+	TaskId        string // 任务id
+	LinkUrl       string // 作业连接
+	PhotoUrl      string // 作业截图
+	ReviseOpinion string // 审核意见
+	IsSubmit      string // 是否提交
+	IsReview      string // 是否审核
+	IsOk          string // 是否合格
+	CreateAt      string // 创建时间
+	SubmitAt      string // 提交时间
+	AgreeAt       string // 同意时间
+	RejectAt      string // 驳回时间
+}
+
+//  younggeeAssignmentInfoColumns holds the columns for table younggee_assignment_info.
+var younggeeAssignmentInfoColumns = YounggeeAssignmentInfoColumns{
+	AssignmentId:  "assignment_id",
+	TaskId:        "task_id",
+	LinkUrl:       "link_url",
+	PhotoUrl:      "photo_url",
+	ReviseOpinion: "revise_opinion",
+	IsSubmit:      "is_submit",
+	IsReview:      "is_review",
+	IsOk:          "is_ok",
+	CreateAt:      "create_at",
+	SubmitAt:      "submit_at",
+	AgreeAt:       "agree_at",
+	RejectAt:      "reject_at",
+}
+
+// NewYounggeeAssignmentInfoDao creates and returns a new DAO object for table data access.
+func NewYounggeeAssignmentInfoDao() *YounggeeAssignmentInfoDao {
+	return &YounggeeAssignmentInfoDao{
+		Group:   "default",
+		Table:   "younggee_assignment_info",
+		Columns: younggeeAssignmentInfoColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *YounggeeAssignmentInfoDao) DB() gdb.DB {
+	return g.DB(dao.Group)
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *YounggeeAssignmentInfoDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *YounggeeAssignmentInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 67 - 0
app/dao/internal/younggee_sec_brief.go

@@ -0,0 +1,67 @@
+// ==========================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+)
+
+// YounggeeSecBriefDao is the manager for logic model data accessing and custom defined data operations functions management.
+type YounggeeSecBriefDao struct {
+	Table   string                  // Table is the underlying table name of the DAO.
+	Group   string                  // Group is the database configuration group name of current DAO.
+	Columns YounggeeSecBriefColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
+}
+
+// YounggeeSecBriefColumns defines and stores column names for table younggee_sec_brief.
+type YounggeeSecBriefColumns struct {
+	SectionBriefId string // brief的Id
+	FileUrl        string // 文件url
+	FileUid        string // 文件uid
+	SelectionId    string // 所属选品id
+	CreatedAt      string // 创建时间
+	FileName       string // 文件名称
+}
+
+//  younggeeSecBriefColumns holds the columns for table younggee_sec_brief.
+var younggeeSecBriefColumns = YounggeeSecBriefColumns{
+	SectionBriefId: "section_brief_id",
+	FileUrl:        "file_url",
+	FileUid:        "file_uid",
+	SelectionId:    "selection_id",
+	CreatedAt:      "created_at",
+	FileName:       "file_name",
+}
+
+// NewYounggeeSecBriefDao creates and returns a new DAO object for table data access.
+func NewYounggeeSecBriefDao() *YounggeeSecBriefDao {
+	return &YounggeeSecBriefDao{
+		Group:   "default",
+		Table:   "younggee_sec_brief",
+		Columns: younggeeSecBriefColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *YounggeeSecBriefDao) DB() gdb.DB {
+	return g.DB(dao.Group)
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *YounggeeSecBriefDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *YounggeeSecBriefDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 67 - 0
app/dao/internal/younggee_sec_example.go

@@ -0,0 +1,67 @@
+// ==========================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+)
+
+// YounggeeSecExampleDao is the manager for logic model data accessing and custom defined data operations functions management.
+type YounggeeSecExampleDao struct {
+	Table   string                    // Table is the underlying table name of the DAO.
+	Group   string                    // Group is the database configuration group name of current DAO.
+	Columns YounggeeSecExampleColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
+}
+
+// YounggeeSecExampleColumns defines and stores column names for table younggee_sec_example.
+type YounggeeSecExampleColumns struct {
+	ExampleId   string // 选品示例图id
+	FileUrl     string // 文件url
+	FileUid     string // 文件uid
+	SelectionId string // 所属项目id
+	CreatedAt   string // 创建时间
+	FileName    string // 文件名称
+}
+
+//  younggeeSecExampleColumns holds the columns for table younggee_sec_example.
+var younggeeSecExampleColumns = YounggeeSecExampleColumns{
+	ExampleId:   "example_id",
+	FileUrl:     "file_url",
+	FileUid:     "file_uid",
+	SelectionId: "selection_id",
+	CreatedAt:   "created_at",
+	FileName:    "file_name",
+}
+
+// NewYounggeeSecExampleDao creates and returns a new DAO object for table data access.
+func NewYounggeeSecExampleDao() *YounggeeSecExampleDao {
+	return &YounggeeSecExampleDao{
+		Group:   "default",
+		Table:   "younggee_sec_example",
+		Columns: younggeeSecExampleColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *YounggeeSecExampleDao) DB() gdb.DB {
+	return g.DB(dao.Group)
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *YounggeeSecExampleDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *YounggeeSecExampleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 115 - 0
app/dao/internal/younggee_sec_task_info.go

@@ -0,0 +1,115 @@
+// ==========================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+)
+
+// YounggeeSecTaskInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
+type YounggeeSecTaskInfoDao struct {
+	Table   string                     // Table is the underlying table name of the DAO.
+	Group   string                     // Group is the database configuration group name of current DAO.
+	Columns YounggeeSecTaskInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
+}
+
+// YounggeeSecTaskInfoColumns defines and stores column names for table younggee_sec_task_info.
+type YounggeeSecTaskInfoColumns struct {
+	Id                     string // 递增id
+	TaskId                 string // 选品任务id
+	SelectionId            string // 选品id
+	TalentId               string // 达人id
+	AccountId              string // 账号id
+	TalentPlatformInfoSnap string // 达人平台信息快照
+	TalentPersonalInfoSnap string // 达人个人信息快照
+	TalentPostAddrSnap     string // 收货地址快照
+	TaskReward             string // 达人赏金
+	TalentPayment          string // 达人垫付金额
+	IsPayPayment           string // 企业是否返样品钱
+	IsPayReward            string // 企业是否结算悬赏
+	TaskMode               string // 任务形式,1、2分别表示纯佣带货、悬赏任务
+	SampleMode             string // 领样形式,1-3分别表示免费领样、垫付买样、不提供样品
+	TaskStatus             string // 任务状态 1待选 2已选 3落选
+	TaskStage              string // 任务阶段,详情见info_sec_task_stage表
+	CreateDate             string // 创建时间
+	SelectDate             string // 反选时间
+	DeliveryDate           string // 发货时间
+	CompleteDate           string // 结束时间
+	WithdrawDate           string // 提现时间
+	CompleteStatus         string // 结束方式 1未结束 2正常结束 3反选失败
+	LogisticsStatus        string // 发货状态 1 待发货 2已发货 3 已签收
+	AssignmentStatus       string // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	UpdateAt               string // 更新时间
+	WithdrawStatus         string // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
+	LeadTeamId             string // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
+	TeamId                 string // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
+	TeamIncome             string // young之团团长现金收益
+	TeamPoint              string // young之团团长积分收益
+}
+
+//  younggeeSecTaskInfoColumns holds the columns for table younggee_sec_task_info.
+var younggeeSecTaskInfoColumns = YounggeeSecTaskInfoColumns{
+	Id:                     "id",
+	TaskId:                 "task_id",
+	SelectionId:            "selection_id",
+	TalentId:               "talent_id",
+	AccountId:              "account_id",
+	TalentPlatformInfoSnap: "talent_platform_info_snap",
+	TalentPersonalInfoSnap: "talent_personal_info_snap",
+	TalentPostAddrSnap:     "talent_post_addr_snap",
+	TaskReward:             "task_reward",
+	TalentPayment:          "talent_payment",
+	IsPayPayment:           "is_pay_payment",
+	IsPayReward:            "is_pay_reward",
+	TaskMode:               "task_mode",
+	SampleMode:             "sample_mode",
+	TaskStatus:             "task_status",
+	TaskStage:              "task_stage",
+	CreateDate:             "create_date",
+	SelectDate:             "select_date",
+	DeliveryDate:           "delivery_date",
+	CompleteDate:           "complete_date",
+	WithdrawDate:           "withdraw_date",
+	CompleteStatus:         "complete_status",
+	LogisticsStatus:        "logistics_status",
+	AssignmentStatus:       "assignment_status",
+	UpdateAt:               "update_at",
+	WithdrawStatus:         "withdraw_status",
+	LeadTeamId:             "lead_team_id",
+	TeamId:                 "team_id",
+	TeamIncome:             "team_income",
+	TeamPoint:              "team_point",
+}
+
+// NewYounggeeSecTaskInfoDao creates and returns a new DAO object for table data access.
+func NewYounggeeSecTaskInfoDao() *YounggeeSecTaskInfoDao {
+	return &YounggeeSecTaskInfoDao{
+		Group:   "default",
+		Table:   "younggee_sec_task_info",
+		Columns: younggeeSecTaskInfoColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *YounggeeSecTaskInfoDao) DB() gdb.DB {
+	return g.DB(dao.Group)
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *YounggeeSecTaskInfoDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *YounggeeSecTaskInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 119 - 0
app/dao/internal/younggee_selection_info.go

@@ -0,0 +1,119 @@
+// ==========================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+)
+
+// YounggeeSelectionInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
+type YounggeeSelectionInfoDao struct {
+	Table   string                       // Table is the underlying table name of the DAO.
+	Group   string                       // Group is the database configuration group name of current DAO.
+	Columns YounggeeSelectionInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
+}
+
+// YounggeeSelectionInfoColumns defines and stores column names for table younggee_selection_info.
+type YounggeeSelectionInfoColumns struct {
+	SelectionId      string // 选品项目id
+	SelectionName    string // 选品项目名称
+	EnterpriseId     string // 所属企业id
+	ProductId        string // 关联商品id
+	ContentType      string // 内容形式,1代表图文,2代表视频,3代表直播
+	SelectionStatus  string // 选品项目状态,1-8分别代表创建中、待审核、审核通过、待支付、已支付、执行中、失效、已结案
+	TaskMode         string // 任务形式,1、2分别表示悬赏任务、纯佣带货
+	Platform         string // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	SampleMode       string // 领样形式,1、2、3分别表示免费领样、垫付领样、不提供样品
+	ProductUrl       string // 带货链接
+	SampleNum        string // 样品数量
+	RemainNum        string // 剩余数量
+	CommissionRate   string // 佣金比例
+	EstimatedCost    string // 预估成本
+	TaskReward       string // 任务悬赏
+	SampleCondition  string // 领样条件
+	RewardCondition  string // 返现悬赏条件
+	SettlementAmount string // 结算金额
+	TaskDdl          string // 招募截止时间
+	Detail           string // 卖点总结
+	ProductSnap      string // 商品信息快照
+	ProductPhotoSnap string // 商品图片快照
+	CreatedAt        string // 创建时间
+	UpdatedAt        string // 修改时间
+	SubmitAt         string // 提交审核时间
+	PassAt           string // 审核通过时间
+	FailReason       string // 失效原因,1、2分别表示逾期未支付、项目存在风险
+	PayAt            string // 支付时间
+	FinishAt         string // 结案时间
+	IsRead           string // 是否已读
+	AutoTaskId       string // 定时任务id
+	AutoFailAt       string // 失效自动处理时间
+}
+
+//  younggeeSelectionInfoColumns holds the columns for table younggee_selection_info.
+var younggeeSelectionInfoColumns = YounggeeSelectionInfoColumns{
+	SelectionId:      "selection_id",
+	SelectionName:    "selection_name",
+	EnterpriseId:     "enterprise_id",
+	ProductId:        "product_id",
+	ContentType:      "content_type",
+	SelectionStatus:  "selection_status",
+	TaskMode:         "task_mode",
+	Platform:         "platform",
+	SampleMode:       "sample_mode",
+	ProductUrl:       "product_url",
+	SampleNum:        "sample_num",
+	RemainNum:        "remain_num",
+	CommissionRate:   "commission_rate",
+	EstimatedCost:    "estimated_cost",
+	TaskReward:       "task_reward",
+	SampleCondition:  "sample_condition",
+	RewardCondition:  "reward_condition",
+	SettlementAmount: "settlement_amount",
+	TaskDdl:          "task_ddl",
+	Detail:           "detail",
+	ProductSnap:      "product_snap",
+	ProductPhotoSnap: "product_photo_snap",
+	CreatedAt:        "created_at",
+	UpdatedAt:        "updated_at",
+	SubmitAt:         "submit_at",
+	PassAt:           "pass_at",
+	FailReason:       "fail_reason",
+	PayAt:            "pay_at",
+	FinishAt:         "finish_at",
+	IsRead:           "is_read",
+	AutoTaskId:       "auto_task_id",
+	AutoFailAt:       "auto_fail_at",
+}
+
+// NewYounggeeSelectionInfoDao creates and returns a new DAO object for table data access.
+func NewYounggeeSelectionInfoDao() *YounggeeSelectionInfoDao {
+	return &YounggeeSelectionInfoDao{
+		Group:   "default",
+		Table:   "younggee_selection_info",
+		Columns: younggeeSelectionInfoColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *YounggeeSelectionInfoDao) DB() gdb.DB {
+	return g.DB(dao.Group)
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *YounggeeSelectionInfoDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *YounggeeSelectionInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 1 - 1
app/dao/internal/younggee_talent_bank.go

@@ -23,7 +23,7 @@ type YounggeeTalentBankColumns struct {
 	TalentId        string // 达人id,取younggee_talent_info表中的id字段值
 	Name            string // 户主姓名
 	Phone           string // 手机号
-	Bank            string // 银行id,取info_bank表中的bank_id字段值
+	Bank            string // 银行
 	BankCardNumber  string // 银行卡号
 	BankOpenAddress string // 开户地址区域码,取info_region表中的self_code字段值
 	AlipayNumber    string // 支付宝账号

+ 87 - 0
app/dao/internal/younggee_talent_income.go

@@ -0,0 +1,87 @@
+// ==========================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+)
+
+// YounggeeTalentIncomeDao is the manager for logic model data accessing and custom defined data operations functions management.
+type YounggeeTalentIncomeDao struct {
+	Table   string                      // Table is the underlying table name of the DAO.
+	Group   string                      // Group is the database configuration group name of current DAO.
+	Columns YounggeeTalentIncomeColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
+}
+
+// YounggeeTalentIncomeColumns defines and stores column names for table younggee_talent_income.
+type YounggeeTalentIncomeColumns struct {
+	Id             string // 递增id
+	TalentId       string // 达人id,对应youngee_talent_info中id字段
+	ProjectId      string // 项目id
+	SelectionId    string // 选品id
+	TaskId         string // 任务id
+	SectaskId      string // 选品任务id
+	BrandName      string // 品牌名称
+	TaskName       string // 任务名称
+	TeamId         string // young之团id
+	Income         string // 收益金额
+	IncomeType     string // 收益类型,1-4分别表示任务收益、开团收益、样品返现、悬赏收益
+	WithdrawStatus string // 提现状态,1-3分别表示可提现、提现中、已提现
+	IncomeAt       string // 收益产生时间
+	WithdrawAt     string // 提现时间
+	PhotoUrl       string // 商品主图
+	Type           string // 选品or项目,1:项目,2:选品
+}
+
+//  younggeeTalentIncomeColumns holds the columns for table younggee_talent_income.
+var younggeeTalentIncomeColumns = YounggeeTalentIncomeColumns{
+	Id:             "id",
+	TalentId:       "talent_id",
+	ProjectId:      "project_id",
+	SelectionId:    "selection_id",
+	TaskId:         "task_id",
+	SectaskId:      "sectask_id",
+	BrandName:      "brand_name",
+	TaskName:       "task_name",
+	TeamId:         "team_id",
+	Income:         "income",
+	IncomeType:     "income_type",
+	WithdrawStatus: "withdraw_status",
+	IncomeAt:       "income_at",
+	WithdrawAt:     "withdraw_at",
+	PhotoUrl:       "photo_url",
+	Type:           "type",
+}
+
+// NewYounggeeTalentIncomeDao creates and returns a new DAO object for table data access.
+func NewYounggeeTalentIncomeDao() *YounggeeTalentIncomeDao {
+	return &YounggeeTalentIncomeDao{
+		Group:   "default",
+		Table:   "younggee_talent_income",
+		Columns: younggeeTalentIncomeColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *YounggeeTalentIncomeDao) DB() gdb.DB {
+	return g.DB(dao.Group)
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *YounggeeTalentIncomeDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *YounggeeTalentIncomeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 67 - 0
app/dao/internal/younggee_talent_point_record.go

@@ -0,0 +1,67 @@
+// ==========================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+)
+
+// YounggeeTalentPointRecordDao is the manager for logic model data accessing and custom defined data operations functions management.
+type YounggeeTalentPointRecordDao struct {
+	Table   string                           // Table is the underlying table name of the DAO.
+	Group   string                           // Group is the database configuration group name of current DAO.
+	Columns YounggeeTalentPointRecordColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
+}
+
+// YounggeeTalentPointRecordColumns defines and stores column names for table younggee_talent_point_record.
+type YounggeeTalentPointRecordColumns struct {
+	Id             string // 递增id
+	TalentId       string // 达人id
+	PointIncome    string // 收益积分
+	IncomeSource   string // 收益来源
+	IncomeSourceId string // 收益来源id
+	IncomeAt       string // 收益时间
+}
+
+//  younggeeTalentPointRecordColumns holds the columns for table younggee_talent_point_record.
+var younggeeTalentPointRecordColumns = YounggeeTalentPointRecordColumns{
+	Id:             "id",
+	TalentId:       "talent_id",
+	PointIncome:    "point_income",
+	IncomeSource:   "income_source",
+	IncomeSourceId: "income_source_id",
+	IncomeAt:       "income_at",
+}
+
+// NewYounggeeTalentPointRecordDao creates and returns a new DAO object for table data access.
+func NewYounggeeTalentPointRecordDao() *YounggeeTalentPointRecordDao {
+	return &YounggeeTalentPointRecordDao{
+		Group:   "default",
+		Table:   "younggee_talent_point_record",
+		Columns: younggeeTalentPointRecordColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *YounggeeTalentPointRecordDao) DB() gdb.DB {
+	return g.DB(dao.Group)
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *YounggeeTalentPointRecordDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *YounggeeTalentPointRecordDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 89 - 0
app/dao/internal/younggee_talent_team.go

@@ -0,0 +1,89 @@
+// ==========================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+)
+
+// YounggeeTalentTeamDao is the manager for logic model data accessing and custom defined data operations functions management.
+type YounggeeTalentTeamDao struct {
+	Table   string                    // Table is the underlying table name of the DAO.
+	Group   string                    // Group is the database configuration group name of current DAO.
+	Columns YounggeeTalentTeamColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
+}
+
+// YounggeeTalentTeamColumns defines and stores column names for table younggee_talent_team.
+type YounggeeTalentTeamColumns struct {
+	Id              string // 递增id
+	TeamId          string // young之团id,10位随机数
+	TalentId        string // 团长达人id,对应youngee_talent_info中id字段
+	ProjectId       string // 项目id
+	SelectionId     string // 选品id
+	ProjectType     string // 项目类型,1为项目,2为选品
+	ProjectName     string // 项目名称
+	ProjectPhoto    string // 项目主图
+	Platform        string // 项目平台
+	TeamStatus      string // young之团状态,1表示创建中,2表示开团中,3表示已结束
+	NumApply        string // 报名人数
+	NumApplySuccess string // 申请成功人数
+	NumEnd          string // 结案人数
+	PointIncome     string // 积分收益
+	MoneyIncome     string // 现金收益
+	CreateAt        string // 成团时间
+	EndAt           string // 结束时间
+}
+
+//  younggeeTalentTeamColumns holds the columns for table younggee_talent_team.
+var younggeeTalentTeamColumns = YounggeeTalentTeamColumns{
+	Id:              "id",
+	TeamId:          "team_id",
+	TalentId:        "talent_id",
+	ProjectId:       "project_id",
+	SelectionId:     "selection_id",
+	ProjectType:     "project_type",
+	ProjectName:     "project_name",
+	ProjectPhoto:    "project_photo",
+	Platform:        "platform",
+	TeamStatus:      "team_status",
+	NumApply:        "num_apply",
+	NumApplySuccess: "num_apply_success",
+	NumEnd:          "num_end",
+	PointIncome:     "point_income",
+	MoneyIncome:     "money_income",
+	CreateAt:        "create_at",
+	EndAt:           "end_at",
+}
+
+// NewYounggeeTalentTeamDao creates and returns a new DAO object for table data access.
+func NewYounggeeTalentTeamDao() *YounggeeTalentTeamDao {
+	return &YounggeeTalentTeamDao{
+		Group:   "default",
+		Table:   "younggee_talent_team",
+		Columns: younggeeTalentTeamColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *YounggeeTalentTeamDao) DB() gdb.DB {
+	return g.DB(dao.Group)
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *YounggeeTalentTeamDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *YounggeeTalentTeamDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 73 - 0
app/dao/internal/younggee_team_reward_config.go

@@ -0,0 +1,73 @@
+// ==========================================================================
+// Code generated by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+)
+
+// YounggeeTeamRewardConfigDao is the manager for logic model data accessing and custom defined data operations functions management.
+type YounggeeTeamRewardConfigDao struct {
+	Table   string                          // Table is the underlying table name of the DAO.
+	Group   string                          // Group is the database configuration group name of current DAO.
+	Columns YounggeeTeamRewardConfigColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
+}
+
+// YounggeeTeamRewardConfigColumns defines and stores column names for table younggee_team_reward_config.
+type YounggeeTeamRewardConfigColumns struct {
+	Id           string // 自增id
+	ProjectType  string // 项目类型,1、2分别为全流程项目、选品项目
+	Platform     string // 社媒平台
+	TaskForm     string // 任务形式,1-5为实体商品寄拍、虚拟产品测评、线下探店打卡、悬赏任务、纯佣带货;
+	ContentForm  string // 内容形式,1-3为图文、视频、直播
+	RewardReason string // 奖励原因,1-4为成团-新用户、成团-老用户、成单-申请成功、成单-结案完毕
+	Point        string // 积分奖励
+	Money        string // 现金奖励,结算额百分比
+	CreateAt     string // 创建时间
+}
+
+//  younggeeTeamRewardConfigColumns holds the columns for table younggee_team_reward_config.
+var younggeeTeamRewardConfigColumns = YounggeeTeamRewardConfigColumns{
+	Id:           "id",
+	ProjectType:  "project_type",
+	Platform:     "platform",
+	TaskForm:     "task_form",
+	ContentForm:  "content_form",
+	RewardReason: "reward_reason",
+	Point:        "point",
+	Money:        "money",
+	CreateAt:     "create_at",
+}
+
+// NewYounggeeTeamRewardConfigDao creates and returns a new DAO object for table data access.
+func NewYounggeeTeamRewardConfigDao() *YounggeeTeamRewardConfigDao {
+	return &YounggeeTeamRewardConfigDao{
+		Group:   "default",
+		Table:   "younggee_team_reward_config",
+		Columns: younggeeTeamRewardConfigColumns,
+	}
+}
+
+// DB retrieves and returns the underlying raw database management object of current DAO.
+func (dao *YounggeeTeamRewardConfigDao) DB() gdb.DB {
+	return g.DB(dao.Group)
+}
+
+// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
+func (dao *YounggeeTeamRewardConfigDao) Ctx(ctx context.Context) *gdb.Model {
+	return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rollbacks the transaction and returns the error from function f if it returns non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note that, you should not Commit or Rollback the transaction in function f
+// as it is automatically handled by this function.
+func (dao *YounggeeTeamRewardConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
+	return dao.Ctx(ctx).Transaction(ctx, f)
+}

+ 4 - 2
app/dao/internal/younggee_withdraw_record.go

@@ -23,7 +23,8 @@ type YounggeeWithdrawRecordColumns struct {
 	TalentId       string // 达人id
 	WithdrawAmount string // 提现金额
 	AmountPayable  string // 应付金额
-	TaskIdList     string // 该提现订单包含的task_id列表
+	PayPoint       string // 抵扣积分
+	IncomeIdList   string // 该提现订单包含的income_id列表
 	ReceiveInfo    string // 收款信息
 	Status         string // 提现状态:1为提现待确认,2为已提现
 	BankType       string // 到账方式,1为支付宝,2为银行卡
@@ -37,7 +38,8 @@ var younggeeWithdrawRecordColumns = YounggeeWithdrawRecordColumns{
 	TalentId:       "talent_id",
 	WithdrawAmount: "withdraw_amount",
 	AmountPayable:  "amount_payable",
-	TaskIdList:     "task_id_list",
+	PayPoint:       "pay_point",
+	IncomeIdList:   "income_id_list",
 	ReceiveInfo:    "receive_info",
 	Status:         "status",
 	BankType:       "bank_type",

+ 24 - 0
app/dao/younggee_assignment_info.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package dao
+
+import (
+	"youngmini_server/app/dao/internal"
+)
+
+// younggeeAssignmentInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
+// You can define custom methods on it to extend its functionality as you wish.
+type younggeeAssignmentInfoDao struct {
+	*internal.YounggeeAssignmentInfoDao
+}
+
+var (
+	// YounggeeAssignmentInfo is globally public accessible object for table younggee_assignment_info operations.
+	YounggeeAssignmentInfo = younggeeAssignmentInfoDao{
+		internal.NewYounggeeAssignmentInfoDao(),
+	}
+)
+
+// Fill with you ideas below.

+ 24 - 0
app/dao/younggee_sec_brief.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package dao
+
+import (
+	"youngmini_server/app/dao/internal"
+)
+
+// younggeeSecBriefDao is the manager for logic model data accessing and custom defined data operations functions management.
+// You can define custom methods on it to extend its functionality as you wish.
+type younggeeSecBriefDao struct {
+	*internal.YounggeeSecBriefDao
+}
+
+var (
+	// YounggeeSecBrief is globally public accessible object for table younggee_sec_brief operations.
+	YounggeeSecBrief = younggeeSecBriefDao{
+		internal.NewYounggeeSecBriefDao(),
+	}
+)
+
+// Fill with you ideas below.

+ 24 - 0
app/dao/younggee_sec_example.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package dao
+
+import (
+	"youngmini_server/app/dao/internal"
+)
+
+// younggeeSecExampleDao is the manager for logic model data accessing and custom defined data operations functions management.
+// You can define custom methods on it to extend its functionality as you wish.
+type younggeeSecExampleDao struct {
+	*internal.YounggeeSecExampleDao
+}
+
+var (
+	// YounggeeSecExample is globally public accessible object for table younggee_sec_example operations.
+	YounggeeSecExample = younggeeSecExampleDao{
+		internal.NewYounggeeSecExampleDao(),
+	}
+)
+
+// Fill with you ideas below.

+ 24 - 0
app/dao/younggee_sec_task_info.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package dao
+
+import (
+	"youngmini_server/app/dao/internal"
+)
+
+// younggeeSecTaskInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
+// You can define custom methods on it to extend its functionality as you wish.
+type younggeeSecTaskInfoDao struct {
+	*internal.YounggeeSecTaskInfoDao
+}
+
+var (
+	// YounggeeSecTaskInfo is globally public accessible object for table younggee_sec_task_info operations.
+	YounggeeSecTaskInfo = younggeeSecTaskInfoDao{
+		internal.NewYounggeeSecTaskInfoDao(),
+	}
+)
+
+// Fill with you ideas below.

+ 24 - 0
app/dao/younggee_selection_info.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package dao
+
+import (
+	"youngmini_server/app/dao/internal"
+)
+
+// younggeeSelectionInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
+// You can define custom methods on it to extend its functionality as you wish.
+type younggeeSelectionInfoDao struct {
+	*internal.YounggeeSelectionInfoDao
+}
+
+var (
+	// YounggeeSelectionInfo is globally public accessible object for table younggee_selection_info operations.
+	YounggeeSelectionInfo = younggeeSelectionInfoDao{
+		internal.NewYounggeeSelectionInfoDao(),
+	}
+)
+
+// Fill with you ideas below.

+ 24 - 0
app/dao/younggee_talent_income.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package dao
+
+import (
+	"youngmini_server/app/dao/internal"
+)
+
+// younggeeTalentIncomeDao is the manager for logic model data accessing and custom defined data operations functions management.
+// You can define custom methods on it to extend its functionality as you wish.
+type younggeeTalentIncomeDao struct {
+	*internal.YounggeeTalentIncomeDao
+}
+
+var (
+	// YounggeeTalentIncome is globally public accessible object for table younggee_talent_income operations.
+	YounggeeTalentIncome = younggeeTalentIncomeDao{
+		internal.NewYounggeeTalentIncomeDao(),
+	}
+)
+
+// Fill with you ideas below.

+ 24 - 0
app/dao/younggee_talent_point_record.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package dao
+
+import (
+	"youngmini_server/app/dao/internal"
+)
+
+// younggeeTalentPointRecordDao is the manager for logic model data accessing and custom defined data operations functions management.
+// You can define custom methods on it to extend its functionality as you wish.
+type younggeeTalentPointRecordDao struct {
+	*internal.YounggeeTalentPointRecordDao
+}
+
+var (
+	// YounggeeTalentPointRecord is globally public accessible object for table younggee_talent_point_record operations.
+	YounggeeTalentPointRecord = younggeeTalentPointRecordDao{
+		internal.NewYounggeeTalentPointRecordDao(),
+	}
+)
+
+// Fill with you ideas below.

+ 24 - 0
app/dao/younggee_talent_team.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package dao
+
+import (
+	"youngmini_server/app/dao/internal"
+)
+
+// younggeeTalentTeamDao is the manager for logic model data accessing and custom defined data operations functions management.
+// You can define custom methods on it to extend its functionality as you wish.
+type younggeeTalentTeamDao struct {
+	*internal.YounggeeTalentTeamDao
+}
+
+var (
+	// YounggeeTalentTeam is globally public accessible object for table younggee_talent_team operations.
+	YounggeeTalentTeam = younggeeTalentTeamDao{
+		internal.NewYounggeeTalentTeamDao(),
+	}
+)
+
+// Fill with you ideas below.

+ 24 - 0
app/dao/younggee_team_reward_config.go

@@ -0,0 +1,24 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package dao
+
+import (
+	"youngmini_server/app/dao/internal"
+)
+
+// younggeeTeamRewardConfigDao is the manager for logic model data accessing and custom defined data operations functions management.
+// You can define custom methods on it to extend its functionality as you wish.
+type younggeeTeamRewardConfigDao struct {
+	*internal.YounggeeTeamRewardConfigDao
+}
+
+var (
+	// YounggeeTeamRewardConfig is globally public accessible object for table younggee_team_reward_config operations.
+	YounggeeTeamRewardConfig = younggeeTeamRewardConfigDao{
+		internal.NewYounggeeTeamRewardConfigDao(),
+	}
+)
+
+// Fill with you ideas below.

+ 219 - 16
app/model/model.go

@@ -119,12 +119,13 @@ type InfoAutoTask struct {
 	ReviewUnlimited   int `orm:"review_unlimited"     json:"review_unlimited"`     // 不限形式的审稿处理
 	Postreview        int `orm:"postreview"           json:"postreview"`           // 发布审核自动处理
 	CaseClose         int `orm:"case_close"           json:"case_close"`           // 结案自动处理
-	Invalid           int `orm:"invalid"              json:"invalid"`              // 失效自动处理
+	Invalid           int `orm:"invalid"              json:"invalid"`              // 全流程项目失效自动处理
 	DraftDefaultInPic int `orm:"draft_default_in_pic" json:"draft_default_in_pic"` // 图片初稿违约自动处理
 	DraftDefaultInMv  int `orm:"draft_default_in_mv"  json:"draft_default_in_mv"`  // 视频初稿违约自动处理
 	ScriptDefault     int `orm:"script_default"       json:"script_default"`       // 脚本违约自动处理
 	LinkBreach        int `orm:"link_breach"          json:"link_breach"`          // 链接违约自动处理
 	CaseCloseDefault  int `orm:"case_close_default"   json:"case_close_default"`   // 结案违约自动处理
+	Selectioninvalid  int `orm:"selectioninvalid"     json:"selectioninvalid"`     // 选品项目失效自动处理
 }
 
 // InfoBank is the golang structure for table info_bank.
@@ -178,6 +179,12 @@ type InfoRegion struct {
 	RegionName  string `orm:"region_name"       json:"region_name"`  //
 }
 
+// InfoSectaskStage is the golang structure for table info_sectask_stage.
+type InfoSectaskStage struct {
+	TaskStageId int    `orm:"task_stage_id,primary" json:"task_stage_id"` // 选品任务阶段id
+	TaskStage   string `orm:"task_stage"            json:"task_stage"`    // 选品任务阶段
+}
+
 // InfoTalentAgeBracket is the golang structure for table info_talent_age_bracket.
 type InfoTalentAgeBracket struct {
 	AgeAid             int    `orm:"age_aid,primary"      json:"age_aid"`              //
@@ -204,12 +211,27 @@ type InfoTaskStage struct {
 
 // InfoThirdPlatform is the golang structure for table info_third_platform.
 type InfoThirdPlatform struct {
-	PlatformId        uint   `orm:"platform_id,primary" json:"platform_id"`         // 平台id,主键
+	PlatformId        int    `orm:"platform_id,primary" json:"platform_id"`         // 平台id,主键
 	PlatformName      string `orm:"platform_name"       json:"platform_name"`       // 平台名
 	PlatformIcon      string `orm:"platform_icon"       json:"platform_icon"`       // 平台图标url
 	PlatformTableName string `orm:"platform_table_name" json:"platform_table_name"` // 平台数据表表名
 }
 
+// InfoYoungeeStrategy is the golang structure for table info_youngee_strategy.
+type InfoYoungeeStrategy struct {
+	Id          int         `orm:"id,primary"   json:"id"`           // id
+	ProjectType int         `orm:"project_type" json:"project_type"` // 项目类型,0表示不限,1为全流程项目,2为选品项目
+	StrategyId  string      `orm:"strategyId"   json:"strategy_id"`  // 定价策略编号
+	Platform    int         `orm:"platform"     json:"platform"`     // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	TaskType    int         `orm:"task_type"    json:"task_type"`    // 任务形式,实体商品寄拍、虚拟产品测评、线下探店打卡、悬赏任务、纯佣带货
+	ContentType int         `orm:"content_type" json:"content_type"` // 内容形式 图文、视频、直播
+	Reason      int         `orm:"reason"       json:"reason"`       // 奖励原因,成团-新用户、成团-老用户、成单-申请成功、成单-结案完毕;
+	Points      float64     `orm:"points"       json:"points"`       // 积分奖励
+	Cash        float64     `orm:"cash"         json:"cash"`         // 现金奖励
+	Status      int         `orm:"status"       json:"status"`       // '定价策略当前状态,0表示正常,1表示禁用',
+	CreateAt    *gtime.Time `orm:"create_at"    json:"create_at"`    // 创建时间
+}
+
 // OrderAnswer is the golang structure for table order_answer.
 type OrderAnswer struct {
 	TraId                int64  `orm:"tra_id,primary"         json:"tra_id"`                 //
@@ -575,6 +597,7 @@ type ProjectPhoto struct {
 	PhotoUid       string      `orm:"photo_uid"                json:"photo_uid"`        //
 	ProjectId      string      `orm:"project_id"               json:"project_id"`       // 所属项目id
 	CreatedAt      *gtime.Time `orm:"created_at"               json:"created_at"`       // 创建时间
+	FileName       string      `orm:"file_name"                json:"file_name"`        // 文件名称
 }
 
 // ROrderCompeleteStageToType is the golang structure for table r_order_compelete_stage_to_type.
@@ -918,6 +941,7 @@ type YoungeePlatformAccountInfo struct {
 	TalentId           string      `orm:"talent_id"             json:"talent_id"`             // 达人账号id(youngee_talent_info表id值)
 	PlatformId         int         `orm:"platform_id"           json:"platform_id"`           // 平台id,与third_platform_info中的id相同
 	PlatformNickname   string      `orm:"platform_nickname"     json:"platform_nickname"`     // 在平台上的昵称
+	PlatformType       string      `orm:"platform_type"         json:"platform_type"`         // 标签及类型
 	HomePageUrl        string      `orm:"home_page_url"         json:"home_page_url"`         // 主页链接
 	FansCount          int64       `orm:"fans_count"            json:"fans_count"`            // 粉丝数
 	HomePageCaptureUrl string      `orm:"home_page_capture_url" json:"home_page_capture_url"` // 主页截图链接
@@ -949,6 +973,7 @@ type YoungeeTalentInfo struct {
 	Withdrawing       float64     `orm:"withdrawing"         json:"withdrawing"`         // 提现中金额
 	Canwithdraw       float64     `orm:"canwithdraw"         json:"canwithdraw"`         // 可提现金额
 	Withdrawed        float64     `orm:"withdrawed"          json:"withdrawed"`          // 已提现金额
+	Point             int         `orm:"point"               json:"point"`               // 可用积分
 	TalentPhoneNumber string      `orm:"talent_phone_number" json:"talent_phone_number"` // 电话号码
 	TalentAgeBracket  int         `orm:"talent_age_bracket"  json:"talent_age_bracket"`  // 年龄段,取tallent_age_bracket表id
 	TalentNationality int         `orm:"talent_nationality"  json:"talent_nationality"`  // 国籍,取tallent_nationality表id
@@ -965,6 +990,7 @@ type YoungeeTalentInfo struct {
 	CreateDate        *gtime.Time `orm:"create_date"         json:"create_date"`         // 创建时间
 	LastLoginDate     *gtime.Time `orm:"last_login_date"     json:"last_login_date"`     // 最后登录时间
 	ApplyNum          int         `orm:"apply_num"           json:"apply_num"`           // 剩余申请次数(每天更新)
+	UserType          int         `orm:"user_type"           json:"user_type"`           // 用户类型,1、2分别表示新用户、老用户
 }
 
 // YoungeeTaskInfo is the golang structure for table youngee_task_info.
@@ -973,38 +999,44 @@ type YoungeeTaskInfo struct {
 	ProjectId              string      `orm:"project_id"                json:"project_id"`                // 项目id
 	TalentId               string      `orm:"talent_id"                 json:"talent_id"`                 // 达人id
 	AccountId              int         `orm:"account_id"                json:"account_id"`                // 账号id
+	StrategyId             int         `orm:"strategy_id"               json:"strategy_id"`               // 报名选择的招募策略id
 	TalentPlatformInfoSnap string      `orm:"talent_platform_info_snap" json:"talent_platform_info_snap"` // 达人平台信息快照
 	TalentPersonalInfoSnap string      `orm:"talent_personal_info_snap" json:"talent_personal_info_snap"` // 达人个人信息快照
 	TalentPostAddrSnap     string      `orm:"talent_post_addr_snap"     json:"talent_post_addr_snap"`     // 收货地址快照
-	StrategyId             int         `orm:"strategy_id"               json:"strategy_id"`               // 报名选择的招募策略id
 	TaskReward             float64     `orm:"task_reward"               json:"task_reward"`               // 达人报酬
 	SettleAmount           float64     `orm:"settle_amount"             json:"settle_amount"`             // 达人实际所得(扣除违约扣款)
 	AllPayment             float64     `orm:"all_payment"               json:"all_payment"`               // 企业支付
 	RealPayment            float64     `orm:"real_payment"              json:"real_payment"`              // 企业实际支付(扣除违约扣款)
+	ServiceRate            int         `orm:"service_rate"              json:"service_rate"`              // 服务费率,千分之
+	ServiceCharge          float64     `orm:"service_charge"            json:"service_charge"`            // 服务费
+	FeeForm                int         `orm:"fee_form"                  json:"fee_form"`                  // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
 	ErrBreakRate           int         `orm:"err_break_rate"            json:"err_break_rate"`            // 未上传类型违约扣款比例,百分之
 	ScriptBreakRate        int         `orm:"script_break_rate"         json:"script_break_rate"`         // 脚本上传超时违约扣款比例,百分之
 	SketchBreakRate        int         `orm:"sketch_break_rate"         json:"sketch_break_rate"`         // 初稿上传超时违约扣款比例,百分之
 	LinkBreakRate          int         `orm:"link_break_rate"           json:"link_break_rate"`           // 链接上传超时违约扣款比例,百分之
 	DataBreakRate          int         `orm:"data_break_rate"           json:"data_break_rate"`           // 数据上传超时违约扣款比例,百分之
-	FeeForm                int         `orm:"fee_form"                  json:"fee_form"`                  // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
-	ServiceCharge          float64     `orm:"service_charge"            json:"service_charge"`            // 服务费
-	ServiceRate            int         `orm:"service_rate"              json:"service_rate"`              // 服务费率,千分之
+	TaskStage              int         `orm:"task_stage"                json:"task_stage"`                //
 	TaskStatus             int         `orm:"task_status"               json:"task_status"`               // 任务状态 1待选 2已选 3落选
-	TaskStage              int         `orm:"task_stage"                json:"task_stage"`                // 任务阶段,详情见info_task_stage表
-	CreateDate             *gtime.Time `orm:"create_date"               json:"create_date"`               // 创建时间
-	SelectDate             *gtime.Time `orm:"select_date"               json:"select_date"`               // 反选时间
-	DeliveryDate           *gtime.Time `orm:"delivery_date"             json:"delivery_date"`             // 发货时间
-	CompleteDate           *gtime.Time `orm:"complete_date"             json:"complete_date"`             // 结束时间
-	WithdrawDate           *gtime.Time `orm:"withdraw_date"             json:"withdraw_date"`             // 提现时间
-	CompleteStatus         int         `orm:"complete_status"           json:"complete_status"`           // 结束方式 1未结束 2正常结束 3反选失败 4被解约
 	LogisticsStatus        int         `orm:"logistics_status"          json:"logistics_status"`          // 发货状态 1 待发货 2已发货 3 已签收
 	ScriptStatus           uint        `orm:"script_status"             json:"script_status"`             // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
 	SketchStatus           uint        `orm:"sketch_status"             json:"sketch_status"`             // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	UpdateAt               *gtime.Time `orm:"update_at"                 json:"update_at"`                 // 更新时间
 	LinkStatus             uint        `orm:"link_status"               json:"link_status"`               // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
 	DataStatus             uint        `orm:"data_status"               json:"data_status"`               // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	CompleteStatus         int         `orm:"complete_status"           json:"complete_status"`           // 结束方式 1未结束 2正常结束 3反选失败 4被解约
+	UpdateAt               *gtime.Time `orm:"update_at"                 json:"update_at"`                 // 更新时间
+	CreateDate             *gtime.Time `orm:"create_date"               json:"create_date"`               // 创建时间
+	SelectDate             *gtime.Time `orm:"select_date"               json:"select_date"`               // 反选时间
+	DeliveryDate           *gtime.Time `orm:"delivery_date"             json:"delivery_date"`             // 发货时间
+	CompleteDate           *gtime.Time `orm:"complete_date"             json:"complete_date"`             // 结束时间
+	WithdrawDate           *gtime.Time `orm:"withdraw_date"             json:"withdraw_date"`             // 提现时间
 	CurDefaultType         int         `orm:"cur_default_type"          json:"cur_default_type"`          // 任务当前处于的违约类型 0-10分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约、解约待处理、解约
 	WithdrawStatus         int         `orm:"withdraw_status"           json:"withdraw_status"`           // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
+	LeadTeamId             string      `orm:"lead_team_id"              json:"lead_team_id"`              // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
+	TeamId                 string      `orm:"team_id"                   json:"team_id"`                   // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
+	SettleStatus           int         `orm:"settle_status"             json:"settle_status"`             // 结算状态,1、2分别表示待结算、已结算
+	TeamIncome             float64     `orm:"team_income"               json:"team_income"`               // young之团团长现金收益
+	TeamPoint              int         `orm:"team_point"                json:"team_point"`                // young之团团长积分收益
+	CurBreakAt             *gtime.Time `orm:"cur_break_at"              json:"cur_break_at"`              // 当前阶段截止时间
 }
 
 // YoungeeTaskLogistics is the golang structure for table youngee_task_logistics.
@@ -1026,6 +1058,22 @@ type YoungeeTaskLogistics struct {
 	Status                int         `orm:"status"                  json:"status"`                  // 签收状态,0为未签收,1为已签收
 }
 
+// YounggeeAssignmentInfo is the golang structure for table younggee_assignment_info.
+type YounggeeAssignmentInfo struct {
+	AssignmentId  int         `orm:"assignment_id,primary" json:"assignment_id"`  // 作业id,递增
+	TaskId        string      `orm:"task_id,unique"        json:"task_id"`        // 任务id
+	LinkUrl       string      `orm:"link_url"              json:"link_url"`       // 作业连接
+	PhotoUrl      string      `orm:"photo_url"             json:"photo_url"`      // 作业截图
+	ReviseOpinion string      `orm:"revise_opinion"        json:"revise_opinion"` // 审核意见
+	IsSubmit      int         `orm:"is_submit"             json:"is_submit"`      // 是否提交
+	IsReview      int         `orm:"is_review"             json:"is_review"`      // 是否审核
+	IsOk          int         `orm:"is_ok"                 json:"is_ok"`          // 是否合格
+	CreateAt      *gtime.Time `orm:"create_at"             json:"create_at"`      // 创建时间
+	SubmitAt      *gtime.Time `orm:"submit_at"             json:"submit_at"`      // 提交时间
+	AgreeAt       *gtime.Time `orm:"agree_at"              json:"agree_at"`       // 同意时间
+	RejectAt      *gtime.Time `orm:"reject_at"             json:"reject_at"`      // 驳回时间
+}
+
 // YounggeeDataInfo is the golang structure for table younggee_data_info.
 type YounggeeDataInfo struct {
 	DataId          int         `orm:"data_id,primary"    json:"data_id"`            // 脚本id
@@ -1177,6 +1225,96 @@ type YounggeeScriptInfo struct {
 	AutoScriptBreakAt *gtime.Time `orm:"auto_script_break_at" json:"auto_script_break_at"` // 脚本违约自动处理时间
 }
 
+// YounggeeSecBrief is the golang structure for table younggee_sec_brief.
+type YounggeeSecBrief struct {
+	SectionBriefId int         `orm:"section_brief_id,primary" json:"section_brief_id"` // brief的Id
+	FileUrl        string      `orm:"file_url"                 json:"file_url"`         // 文件url
+	FileUid        string      `orm:"file_uid"                 json:"file_uid"`         // 文件uid
+	SelectionId    string      `orm:"selection_id"             json:"selection_id"`     // 所属选品id
+	CreatedAt      *gtime.Time `orm:"created_at"               json:"created_at"`       // 创建时间
+	FileName       string      `orm:"file_name"                json:"file_name"`        // 文件名称
+}
+
+// YounggeeSecExample is the golang structure for table younggee_sec_example.
+type YounggeeSecExample struct {
+	ExampleId   int         `orm:"example_id,primary" json:"example_id"`   // 选品示例图id
+	FileUrl     string      `orm:"file_url"           json:"file_url"`     // 文件url
+	FileUid     string      `orm:"file_uid"           json:"file_uid"`     // 文件uid
+	SelectionId string      `orm:"selection_id"       json:"selection_id"` // 所属项目id
+	CreatedAt   *gtime.Time `orm:"created_at"         json:"created_at"`   // 创建时间
+	FileName    string      `orm:"file_name"          json:"file_name"`    // 文件名称
+}
+
+// YounggeeSecTaskInfo is the golang structure for table younggee_sec_task_info.
+type YounggeeSecTaskInfo struct {
+	Id                     int         `orm:"id,primary"                json:"id"`                        // 递增id
+	TaskId                 string      `orm:"task_id"                   json:"task_id"`                   // 选品任务id
+	SelectionId            string      `orm:"selection_id"              json:"selection_id"`              // 选品id
+	TalentId               string      `orm:"talent_id"                 json:"talent_id"`                 // 达人id
+	AccountId              int         `orm:"account_id"                json:"account_id"`                // 账号id
+	TalentPlatformInfoSnap string      `orm:"talent_platform_info_snap" json:"talent_platform_info_snap"` // 达人平台信息快照
+	TalentPersonalInfoSnap string      `orm:"talent_personal_info_snap" json:"talent_personal_info_snap"` // 达人个人信息快照
+	TalentPostAddrSnap     string      `orm:"talent_post_addr_snap"     json:"talent_post_addr_snap"`     // 收货地址快照
+	TaskReward             float64     `orm:"task_reward"               json:"task_reward"`               // 达人赏金
+	TalentPayment          float64     `orm:"talent_payment"            json:"talent_payment"`            // 达人垫付金额
+	IsPayPayment           int         `orm:"is_pay_payment"            json:"is_pay_payment"`            // 企业是否返样品钱
+	IsPayReward            int         `orm:"is_pay_reward"             json:"is_pay_reward"`             // 企业是否结算悬赏
+	TaskMode               int         `orm:"task_mode"                 json:"task_mode"`                 // 任务形式,1、2分别表示纯佣带货、悬赏任务
+	SampleMode             int         `orm:"sample_mode"               json:"sample_mode"`               // 领样形式,1-3分别表示免费领样、垫付买样、不提供样品
+	TaskStatus             int         `orm:"task_status"               json:"task_status"`               // 任务状态 1待选 2已选 3落选
+	TaskStage              int         `orm:"task_stage"                json:"task_stage"`                // 任务阶段,详情见info_sec_task_stage表
+	CreateDate             *gtime.Time `orm:"create_date"               json:"create_date"`               // 创建时间
+	SelectDate             *gtime.Time `orm:"select_date"               json:"select_date"`               // 反选时间
+	DeliveryDate           *gtime.Time `orm:"delivery_date"             json:"delivery_date"`             // 发货时间
+	CompleteDate           *gtime.Time `orm:"complete_date"             json:"complete_date"`             // 结束时间
+	WithdrawDate           *gtime.Time `orm:"withdraw_date"             json:"withdraw_date"`             // 提现时间
+	CompleteStatus         int         `orm:"complete_status"           json:"complete_status"`           // 结束方式 1未结束 2正常结束 3反选失败
+	LogisticsStatus        int         `orm:"logistics_status"          json:"logistics_status"`          // 发货状态 1 待发货 2已发货 3 已签收
+	AssignmentStatus       uint        `orm:"assignment_status"         json:"assignment_status"`         // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	UpdateAt               *gtime.Time `orm:"update_at"                 json:"update_at"`                 // 更新时间
+	WithdrawStatus         int         `orm:"withdraw_status"           json:"withdraw_status"`           // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
+	LeadTeamId             string      `orm:"lead_team_id"              json:"lead_team_id"`              // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
+	TeamId                 string      `orm:"team_id"                   json:"team_id"`                   // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
+	TeamIncome             int         `orm:"team_income"               json:"team_income"`               // young之团团长现金收益
+	TeamPoint              int         `orm:"team_point"                json:"team_point"`                // young之团团长积分收益
+}
+
+// YounggeeSelectionInfo is the golang structure for table younggee_selection_info.
+type YounggeeSelectionInfo struct {
+	SelectionId      string      `orm:"selection_id,primary" json:"selection_id"`       // 选品项目id
+	SelectionName    string      `orm:"selection_name"       json:"selection_name"`     // 选品项目名称
+	EnterpriseId     string      `orm:"enterprise_id"        json:"enterprise_id"`      // 所属企业id
+	ProductId        int         `orm:"product_id"           json:"product_id"`         // 关联商品id
+	ContentType      int         `orm:"content_type"         json:"content_type"`       // 内容形式,1代表图文,2代表视频,3代表直播
+	SelectionStatus  int         `orm:"selection_status"     json:"selection_status"`   // 选品项目状态,1-8分别代表创建中、待审核、审核通过、待支付、已支付、执行中、失效、已结案
+	TaskMode         int         `orm:"task_mode"            json:"task_mode"`          // 任务形式,1、2分别表示悬赏任务、纯佣带货
+	Platform         int         `orm:"platform"             json:"platform"`           // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	SampleMode       int         `orm:"sample_mode"          json:"sample_mode"`        // 领样形式,1、2、3分别表示免费领样、垫付领样、不提供样品
+	ProductUrl       string      `orm:"product_url"          json:"product_url"`        // 带货链接
+	SampleNum        int         `orm:"sample_num"           json:"sample_num"`         // 样品数量
+	RemainNum        int         `orm:"remain_num"           json:"remain_num"`         // 剩余数量
+	CommissionRate   float64     `orm:"commission_rate"      json:"commission_rate"`    // 佣金比例
+	EstimatedCost    float64     `orm:"estimated_cost"       json:"estimated_cost"`     // 预估成本
+	TaskReward       float64     `orm:"task_reward"          json:"task_reward"`        // 任务悬赏
+	SampleCondition  string      `orm:"sample_condition"     json:"sample_condition"`   // 领样条件
+	RewardCondition  string      `orm:"reward_condition"     json:"reward_condition"`   // 返现悬赏条件
+	SettlementAmount float64     `orm:"settlement_amount"    json:"settlement_amount"`  // 结算金额
+	TaskDdl          *gtime.Time `orm:"task_ddl"             json:"task_ddl"`           // 招募截止时间
+	Detail           string      `orm:"detail"               json:"detail"`             // 卖点总结
+	ProductSnap      string      `orm:"product_snap"         json:"product_snap"`       // 商品信息快照
+	ProductPhotoSnap string      `orm:"product_photo_snap"   json:"product_photo_snap"` // 商品图片快照
+	CreatedAt        *gtime.Time `orm:"created_at"           json:"created_at"`         // 创建时间
+	UpdatedAt        *gtime.Time `orm:"updated_at"           json:"updated_at"`         // 修改时间
+	SubmitAt         *gtime.Time `orm:"submit_at"            json:"submit_at"`          // 提交审核时间
+	PassAt           *gtime.Time `orm:"pass_at"              json:"pass_at"`            // 审核通过时间
+	FailReason       int         `orm:"fail_reason"          json:"fail_reason"`        // 失效原因,1、2分别表示逾期未支付、项目存在风险
+	PayAt            *gtime.Time `orm:"pay_at"               json:"pay_at"`             // 支付时间
+	FinishAt         *gtime.Time `orm:"finish_at"            json:"finish_at"`          // 结案时间
+	IsRead           int         `orm:"is_read"              json:"is_read"`            // 是否已读
+	AutoTaskId       int         `orm:"auto_task_id"         json:"auto_task_id"`       // 定时任务id
+	AutoFailAt       *gtime.Time `orm:"auto_fail_at"         json:"auto_fail_at"`       // 失效自动处理时间
+}
+
 // YounggeeSketchInfo is the golang structure for table younggee_sketch_info.
 type YounggeeSketchInfo struct {
 	SketchId          int         `orm:"sketch_id,primary"    json:"sketch_id"`            // 初稿id
@@ -1213,7 +1351,7 @@ type YounggeeTalentBank struct {
 	TalentId        string      `orm:"talent_id,unique"  json:"talent_id"`         // 达人id,取younggee_talent_info表中的id字段值
 	Name            string      `orm:"name"              json:"name"`              // 户主姓名
 	Phone           string      `orm:"phone"             json:"phone"`             // 手机号
-	Bank            string      `orm:"bank"              json:"bank"`              // 银行id,取info_bank表中的bank_id字段值
+	Bank            string      `orm:"bank"              json:"bank"`              // 银行
 	BankCardNumber  string      `orm:"bank_card_number"  json:"bank_card_number"`  // 银行卡号
 	BankOpenAddress int         `orm:"bank_open_address" json:"bank_open_address"` // 开户地址区域码,取info_region表中的self_code字段值
 	AlipayNumber    string      `orm:"alipay_number"     json:"alipay_number"`     // 支付宝账号
@@ -1224,6 +1362,57 @@ type YounggeeTalentBank struct {
 	UpdateAt        *gtime.Time `orm:"update_at"         json:"update_at"`         //
 }
 
+// YounggeeTalentIncome is the golang structure for table younggee_talent_income.
+type YounggeeTalentIncome struct {
+	Id             int         `orm:"id,primary"      json:"id"`              // 递增id
+	TalentId       string      `orm:"talent_id"       json:"talent_id"`       // 达人id,对应youngee_talent_info中id字段
+	ProjectId      string      `orm:"project_id"      json:"project_id"`      // 项目id
+	SelectionId    string      `orm:"selection_id"    json:"selection_id"`    // 选品id
+	TaskId         string      `orm:"task_id"         json:"task_id"`         // 任务id
+	SectaskId      string      `orm:"sectask_id"      json:"sectask_id"`      // 选品任务id
+	BrandName      string      `orm:"brand_name"      json:"brand_name"`      // 品牌名称
+	TaskName       string      `orm:"task_name"       json:"task_name"`       // 任务名称
+	TeamId         string      `orm:"team_id"         json:"team_id"`         // young之团id
+	Income         float64     `orm:"income"          json:"income"`          // 收益金额
+	IncomeType     int         `orm:"income_type"     json:"income_type"`     // 收益类型,1-4分别表示任务收益、开团收益、样品返现、悬赏收益
+	WithdrawStatus int         `orm:"withdraw_status" json:"withdraw_status"` // 提现状态,1-3分别表示可提现、提现中、已提现
+	IncomeAt       *gtime.Time `orm:"income_at"       json:"income_at"`       // 收益产生时间
+	WithdrawAt     *gtime.Time `orm:"withdraw_at"     json:"withdraw_at"`     // 提现时间
+	PhotoUrl       string      `orm:"photo_url"       json:"photo_url"`       // 商品主图
+	Type           int         `orm:"type"            json:"type"`            // 选品or项目,1:项目,2:选品
+}
+
+// YounggeeTalentPointRecord is the golang structure for table younggee_talent_point_record.
+type YounggeeTalentPointRecord struct {
+	Id             int         `orm:"id,primary"       json:"id"`               // 递增id
+	TalentId       string      `orm:"talent_id"        json:"talent_id"`        // 达人id
+	PointIncome    int         `orm:"point_income"     json:"point_income"`     // 收益积分
+	IncomeSource   string      `orm:"income_source"    json:"income_source"`    // 收益来源
+	IncomeSourceId int         `orm:"income_source_id" json:"income_source_id"` // 收益来源id
+	IncomeAt       *gtime.Time `orm:"income_at"        json:"income_at"`        // 收益时间
+}
+
+// YounggeeTalentTeam is the golang structure for table younggee_talent_team.
+type YounggeeTalentTeam struct {
+	Id              int         `orm:"id,primary"        json:"id"`                // 递增id
+	TeamId          string      `orm:"team_id"           json:"team_id"`           // young之团id,10位随机数
+	TalentId        string      `orm:"talent_id"         json:"talent_id"`         // 团长达人id,对应youngee_talent_info中id字段
+	ProjectId       string      `orm:"project_id"        json:"project_id"`        // 项目id
+	SelectionId     string      `orm:"selection_id"      json:"selection_id"`      // 选品id
+	ProjectType     int         `orm:"project_type"      json:"project_type"`      // 项目类型,1为项目,2为选品
+	ProjectName     string      `orm:"project_name"      json:"project_name"`      // 项目名称
+	ProjectPhoto    string      `orm:"project_photo"     json:"project_photo"`     // 项目主图
+	Platform        int         `orm:"platform"          json:"platform"`          // 项目平台
+	TeamStatus      int         `orm:"team_status"       json:"team_status"`       // young之团状态,1表示创建中,2表示开团中,3表示已结束
+	NumApply        int         `orm:"num_apply"         json:"num_apply"`         // 报名人数
+	NumApplySuccess int         `orm:"num_apply_success" json:"num_apply_success"` // 申请成功人数
+	NumEnd          int         `orm:"num_end"           json:"num_end"`           // 结案人数
+	PointIncome     int         `orm:"point_income"      json:"point_income"`      // 积分收益
+	MoneyIncome     float64     `orm:"money_income"      json:"money_income"`      // 现金收益
+	CreateAt        *gtime.Time `orm:"create_at"         json:"create_at"`         // 成团时间
+	EndAt           *gtime.Time `orm:"end_at"            json:"end_at"`            // 结束时间
+}
+
 // YounggeeTaskLog is the golang structure for table younggee_task_log.
 type YounggeeTaskLog struct {
 	LogId   int         `orm:"log_id,primary" json:"log_id"`  // 任务日志id
@@ -1238,6 +1427,19 @@ type YounggeeTaskMessage struct {
 	Name string `orm:"name"       json:"name"` // 银行名称
 }
 
+// YounggeeTeamRewardConfig is the golang structure for table younggee_team_reward_config.
+type YounggeeTeamRewardConfig struct {
+	Id           int         `orm:"id,primary"    json:"id"`            // 自增id
+	ProjectType  int         `orm:"project_type"  json:"project_type"`  // 项目类型,1、2分别为全流程项目、选品项目
+	Platform     int         `orm:"platform"      json:"platform"`      // 社媒平台
+	TaskForm     int         `orm:"task_form"     json:"task_form"`     // 任务形式,1-5为实体商品寄拍、虚拟产品测评、线下探店打卡、悬赏任务、纯佣带货;
+	ContentForm  int         `orm:"content_form"  json:"content_form"`  // 内容形式,1-3为图文、视频、直播
+	RewardReason int         `orm:"reward_reason" json:"reward_reason"` // 奖励原因,1-4为成团-新用户、成团-老用户、成单-申请成功、成单-结案完毕
+	Point        int         `orm:"point"         json:"point"`         // 积分奖励
+	Money        int         `orm:"money"         json:"money"`         // 现金奖励,结算额百分比
+	CreateAt     *gtime.Time `orm:"create_at"     json:"create_at"`     // 创建时间
+}
+
 // YounggeeUser is the golang structure for table younggee_user.
 type YounggeeUser struct {
 	Id            int         `orm:"id,primary"      json:"id"`              // 用户表id
@@ -1260,7 +1462,8 @@ type YounggeeWithdrawRecord struct {
 	TalentId       string      `orm:"talent_id"           json:"talent_id"`       // 达人id
 	WithdrawAmount float64     `orm:"withdraw_amount"     json:"withdraw_amount"` // 提现金额
 	AmountPayable  float64     `orm:"amount_payable"      json:"amount_payable"`  // 应付金额
-	TaskIdList     string      `orm:"task_id_list"        json:"task_id_list"`    // 该提现订单包含的task_id列表
+	PayPoint       int         `orm:"pay_point"           json:"pay_point"`       // 抵扣积分
+	IncomeIdList   string      `orm:"income_id_list"      json:"income_id_list"`  // 该提现订单包含的income_id列表
 	ReceiveInfo    string      `orm:"receive_info"        json:"receive_info"`    // 收款信息
 	Status         int         `orm:"status"              json:"status"`          // 提现状态:1为提现待确认,2为已提现
 	BankType       int         `orm:"bank_type"           json:"bank_type"`       // 到账方式,1为支付宝,2为银行卡

+ 1 - 0
app/model/youngee_talent_model/info_tables.go

@@ -8,6 +8,7 @@ type InfoTables struct {
 	SkilledArea   []model.InfoTalentSkilledArea
 	ThirdPlatform []ThirdPlatformInfo
 	TaskStage     []model.InfoTaskStage
+	SecTaskStage  []model.InfoSectaskStage
 	Bank          []model.InfoBank
 	MessageInfo   []model.InfoMessage
 }

+ 1 - 0
app/model/youngee_talent_model/project_detail.go

@@ -54,6 +54,7 @@ type ProjectPhoto struct {
 	PhotoUrl       string `json:"photo_url"`        // 图片url
 	PhotoUid       string `json:"photo_uid"`        //
 	ProjectId      string `json:"project_id"`       // 所属项目id
+	FileName       string `json:"file_name"`        // 文件名称
 }
 
 type ProjectDetail struct {

+ 100 - 0
app/model/youngee_talent_model/selection.go

@@ -0,0 +1,100 @@
+package youngee_talent_model
+
+import (
+	"github.com/gogf/gf/util/gmeta"
+
+	"github.com/gogf/gf/os/gtime"
+)
+
+type SelectionInfo struct {
+	gmeta.Meta       `orm:"table:younggee_selection_info"`
+	SelectionId      string      `json:"selection_id"`       // 选品项目id
+	SelectionName    string      `json:"selection_name"`     // 选品项目名称
+	EnterpriseId     string      `json:"enterprise_id"`      // 所属企业id
+	ProductId        int         `json:"product_id"`         // 关联商品id
+	ContentType      int         `json:"content_type"`       // 内容形式,1代表图文,2代表视频
+	SelectionStatus  int         `json:"selection_status"`   // 选品项目状态,1-8分别代表创建中、待审核、审核通过、待支付、已支付、执行中、失效、已结案
+	TaskMode         int         `json:"task_mode"`          // 任务形式,1、2分别表示悬赏任务、纯佣带货
+	Platform         int         `json:"platform"`           // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	SampleMode       int         `json:"sample_mode"`        // 领样形式,1、2分别表示免费领样、垫付领样
+	SampleNum        int         `json:"sample_num"`         // 样品数量
+	RemainNum        int         `json:"remain_num"`         // 剩余数量
+	CommissionRate   int         `json:"commission_rate"`    // 佣金比例
+	EstimatedCost    float64     `json:"estimated_cost"`     // 预估成本
+	TaskReward       float64     `json:"task_reward"`        // 任务悬赏
+	RewardCondition  string      `json:"reward_condition"`   // 返现悬赏条件
+	SettlementAmount float64     `json:"settlement_amount"`  // 结算金额
+	TaskDdl          *gtime.Time `json:"task_ddl"`           // 招募截止时间
+	Detail           string      `json:"detail"`             // 卖点总结
+	ProductSnap      string      `json:"product_snap"`       // 商品信息快照
+	ProductPhotoSnap string      `json:"product_photo_snap"` // 商品图片快照
+	CreatedAt        *gtime.Time `json:"created_at"`         // 创建时间
+	UpdatedAt        *gtime.Time `json:"updated_at"`         // 修改时间
+	FailReason       int         `json:"fail_reason"`        // 失效原因,1、2分别表示逾期未支付、项目存在风险
+	PassAt           *gtime.Time `json:"pass_at"`            // 审核通过时间
+	FinishAt         *gtime.Time `json:"finish_at"`          // 结案时间
+	IsRead           int         `json:"is_read"`            // 是否已读
+	SubmitAt         *gtime.Time `json:"submit_at"`          // 提交审核时间
+}
+
+type SelectionInfoList struct {
+	Count         int `json:"count"`
+	MaxPage       int `json:"max_page"`
+	SeletionInfos []*SelectionInfo
+}
+
+type SelectionBrief struct {
+	gmeta.Meta     `orm:"table:younggee_sec_brief"`
+	SectionBriefId int         `json:"section_brief_id"` // brief的Id
+	FileUrl        string      `json:"file_url"`         // 文件url
+	FileUid        string      `json:"file_uid"`         // 文件uid
+	SelectionId    string      `json:"selection_id"`     // 所属项目id
+	CreatedAt      *gtime.Time `json:"created_at"`       // 创建时间
+	FileName       string      `json:"file_name"`        // 文件名称
+}
+
+type SelectionExample struct {
+	gmeta.Meta  `orm:"table:younggee_sec_example"`
+	ExampleId   int         `json:"example_id"`   // 选品示例图id
+	FileUrl     string      `json:"file_url"`     // 文件url
+	FileUid     string      `json:"file_uid"`     // 文件uid
+	SelectionId string      `json:"selection_id"` // 所属选品id
+	CreatedAt   *gtime.Time `json:"created_at"`   // 创建时间
+	FileName    string      `json:"file_name"`    // 文件名称
+}
+
+type SelectionDetail struct {
+	gmeta.Meta       `orm:"table:younggee_selection_info"`
+	SelectionName    string              `json:"selection_name"`                // 选品项目名称
+	SelectionId      string              `json:"selection_id"`                  // 选品项目id
+	EnterpriseId     string              `json:"enterprise_id"`                 // 所属企业id
+	ProductId        int                 `json:"product_id"`                    // 关联商品id
+	ContentType      int                 `json:"content_type"`                  // 内容形式,1代表图文,2代表视频
+	SelectionStatus  int                 `json:"selection_status"`              // 选品项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、失效、执行中、已结案
+	TaskMode         int                 `json:"task_mode"`                     // 任务形式,1、2分别表示悬赏任务、纯佣带货
+	Platform         int                 `json:"platform"`                      // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	SampleMode       int                 `json:"sample_mode"`                   // 领样形式,1、2分别表示免费领样、垫付领样
+	ProductUrl       string              `json:"product_url"`                   // 带货链接
+	SampleNum        int                 `json:"sample_num"`                    // 样品数量
+	RemainNum        int                 `json:"remain_num"`                    // 剩余数量
+	TaskDdl          *gtime.Time         `json:"task_ddl"`                      // 招募截止时间
+	Detail           string              `json:"detail"`                        // 卖点总结
+	TaskReward       float64             `json:"task_reward"`                   // 任务悬赏
+	CommissionRate   int                 `json:"commission_rate"`               // 佣金比例
+	EstimatedCost    float64             `json:"estimated_cost"`                // 预估成本
+	SampleCondition  string              `json:"sample_condition"`              // 领样条件
+	RewardCondition  string              `json:"reward_condition"`              // 返现悬赏条件
+	CreatedAt        *gtime.Time         `json:"created_at"`                    // 创建时间
+	UpdatedAt        *gtime.Time         `json:"updated_at"`                    // 修改时间
+	FailReason       int                 `json:"fail_reason"`                   // 失效原因,1、2分别表示逾期未支付、项目存在风险
+	PassAt           *gtime.Time         `json:"pass_at"`                       // 审核通过时间
+	FinishAt         *gtime.Time         `json:"finish_at"`                     // 结案时间
+	IsRead           int                 `json:"is_read"`                       // 是否已读
+	SettlementAmount float64             `json:"settlement_amount"`             // 结算金额
+	ProductSnap      string              `json:"product_snap"`                  // 商品信息快照
+	ProductPhotoSnap string              `json:"product_photo_snap"`            // 商品图片快照
+	SubmitAt         *gtime.Time         `json:"submit_at"`                     // 提交审核时间
+	SelectionBrief   []*SelectionBrief   `orm:"with:selection_id=selection_id"` // 项目brief
+	SelectionExample []*SelectionExample `orm:"with:selection_id=selection_id"` // 项目样例图
+	PlatformInfo     *PlatformInfo       `orm:"with:platform_id=platform"`
+}

+ 36 - 0
app/model/youngee_talent_model/selection_task.go

@@ -0,0 +1,36 @@
+package youngee_talent_model
+
+import "youngmini_server/app/model"
+
+type SignSecTaskReq struct {
+	SelectionId string `json:"selection_id"`
+	AddressId   uint64 `json:"address_id"`
+	LeadTeamId  string `json:"lead_team_id"`
+	TeamId      string `json:"team_id"`
+}
+
+type SignSecTaskResp struct {
+	TaskId string `json:"task_id"`
+}
+
+type SecTaskInfoBrief struct {
+	TaskId           string  `json:"task_id"`
+	PlatformIconUrl  string  `json:"platform_icon_url"`
+	PlatformName     string  `json:"platform_name"`
+	PlatformNickName string  `json:"platform_nick_name"`
+	SelectionName    string  `json:"selection_name"`
+	ProductPhotoSnap string  `json:"product_photo_snap"`
+	TaskStatus       int     `json:"task_status"`
+	TaskStage        int     `json:"task_stage"`
+	AssignmentStatus uint    `json:"assignment_status"` // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	TaskMode         int     `json:"task_mode"`         // 任务形式,1、2分别表示纯佣带货、悬赏任务
+	TaskReward       float64 `json:"task_reward"`       // 达人报酬
+	TalentPayment    float64 `json:"talent_payment"`    // 达人垫付金额
+	SampleMode       int     `json:"sample_mode"`       // 领样形式,1-3分别表示免费领样、垫付买样、不提供样品
+}
+
+type SecTaskDetailResp struct {
+	SecTaskInfo     *model.YounggeeSecTaskInfo `json:"sec_task_info"`
+	SelectionDetail *SelectionDetail           `json:"selection_detail"`
+	WithdrawStatus  int                        `json:"withdraw_status"`
+}

+ 34 - 0
app/model/youngee_talent_model/talent_income.go

@@ -0,0 +1,34 @@
+package youngee_talent_model
+
+import (
+	"youngmini_server/app/model"
+
+	"github.com/gogf/gf/os/gtime"
+)
+
+type GetTalentIncomeReq struct {
+	Type        int    `json:"type"`         // 提现阶段,1-3分别表示可提现、已提现、提现中
+	SearchInput string `json:"search_input"` // 模糊搜索内容
+}
+
+type TalentIncomeInfo struct {
+	Id              int         `json:"id"`         // 收益记录id
+	ProjectId       string      `json:"project_id"` // 项目id
+	TaskId          string      `json:"task_id"`    // 任务id
+	BrandName       string      `json:"brand_name"` // 品牌名称
+	TaskName        string      `json:"task_name"`  // 任务名称
+	Type            int         `json:"type"`
+	PhotoUrl        string      `json:"photo_url"`
+	TeamId          string      `json:"team_id"`         // young之团id
+	Income          float64     `json:"income"`          // 收益金额
+	IncomeType      int         `json:"income_type"`     // 收益类型,1-4分别表示任务收益、开团收益、样品返现、悬赏收益
+	WithdrawStatus  int         `json:"withdraw_status"` // 提现状态,1-3分别表示可提现、提现中、已提现
+	IncomeAt        *gtime.Time `json:"income_at"`       // 收益产生时间
+	WithdrawAt      *gtime.Time `json:"withdraw_at"`     // 提现时间
+	PlatformIconUrl string      `json:"platform_icon_url"`
+}
+
+type TalentPointInfo struct {
+	Point             int                                `json:"point"`               // 现有积分
+	TalentPointRecord []*model.YounggeeTalentPointRecord `json:"talent_point_record"` // 达人积分收益记录
+}

+ 40 - 19
app/model/youngee_talent_model/talent_info.go

@@ -1,6 +1,7 @@
 package youngee_talent_model
 
 import (
+	"github.com/gogf/gf/os/gtime"
 	"github.com/gogf/gf/util/gmeta"
 )
 
@@ -17,23 +18,43 @@ type TalentSelfInputInfo struct {
 
 type TalentInfo struct {
 	gmeta.Meta        `orm:"table:youngee_talent_info"`
-	Id                string  `json:"id"`                  // 达人id
-	TalentWxOpenid    string  `json:"talent_wx_openid"`    // 达人的微信openid
-	TalentWxNickname  string  `json:"talent_wx_nickname"`  // 达人的微信昵称
-	Income            float64 `json:"income"`              // 收益总数
-	Withdrawing       float64 `json:"withdrawing"`         // 提现中金额
-	Canwithdraw       float64 `json:"canwithdraw"`         // 可提现金额
-	Withdrawed        float64 `json:"withdrawed"`          // 已提现金额
-	TalentPhoneNumber string  `json:"talent_phone_number"` // 电话号码
-	TalentAgeBracket  int     `json:"talent_age_bracket"`  // 年龄段,取tallent_age_bracket表id
-	TalentNationality int     `json:"talent_nationality"`  // 国籍,取tallent_nationality表id
-	VisitStoreRegion  int     `json:"visit_store_region"`  // 探店区域,取region_info表中的self_code
-	IsBindInfo        uint    `json:"is_bind_info"`        // 是否填写个人资料
-	IsBindLocation    uint    `json:"is_bind_location"`    // 是否绑定收货地址
-	IsBindBank        uint    `json:"is_bind_bank"`        // 是否绑定银行账户信息
-	InBlacklist       uint    `json:"in_blacklist"`        // 是否加入黑名单 0否 1是
-	TaskAll           int     `json:"task_all"`            // 任务总数
-	TaskApply         int     `json:"task_apply"`          // 报名任务数量
-	TaskExecute       int     `json:"task_execute"`        // 执行中任务数量
-	TaskEnd           int     `json:"task_end"`            // 结束任务数量
+	Id                string      `json:"id"`                  // 达人id
+	TalentWxOpenid    string      `json:"talent_wx_openid"`    // 达人的微信openid
+	Avatar            string      `json:"avatar"`              //
+	TalentWxNickname  string      `json:"talent_wx_nickname"`  // 达人的微信昵称
+	Income            float64     `json:"income"`              // 收益总数
+	Withdrawing       float64     `json:"withdrawing"`         // 提现中金额
+	Canwithdraw       float64     `json:"canwithdraw"`         // 可提现金额
+	Withdrawed        float64     `json:"withdrawed"`          // 已提现金额
+	Point             int         `json:"point"`               // 可用积分
+	TalentPhoneNumber string      `json:"talent_phone_number"` // 电话号码
+	TalentAgeBracket  int         `json:"talent_age_bracket"`  // 年龄段,取tallent_age_bracket表id
+	TalentNationality int         `json:"talent_nationality"`  // 国籍,取tallent_nationality表id
+	VisitStoreRegion  int         `json:"visit_store_region"`  // 探店区域,取region_info表中的self_code
+	IsBindInfo        int         `json:"is_bind_info"`        // 是否填写个人资料
+	IsBindAccount     int         `json:"is_bind_account"`     // 是否绑定账号,1是0否
+	IsBindLocation    int         `json:"is_bind_location"`    // 是否绑定收货地址
+	IsBindBank        int         `json:"is_bind_bank"`        // 是否绑定银行账户信息
+	InBlacklist       int         `json:"in_blacklist"`        // 是否加入黑名单 0否 1是
+	TaskAll           int         `json:"task_all"`            // 任务总数
+	TaskApply         int         `json:"task_apply"`          // 报名任务数量
+	TaskExecute       int         `json:"task_execute"`        // 执行中任务数量
+	TaskEnd           int         `json:"task_end"`            // 结束任务数量
+	CreateDate        *gtime.Time `json:"create_date"`         // 创建时间
+	LastLoginDate     *gtime.Time `json:"last_login_date"`     // 最后登录时间
+	ApplyNum          int         `json:"apply_num"`           // 剩余申请次数(每天更新)
+	UserType          int         `json:"user_type"`           // 用户类型,1、2分别表示新用户、老用户
+}
+
+type TalentInfoNum struct {
+	AllTaskNum      int `json:"all_task_num"`
+	ApplyTaskNum    int `json:"apply_task_num"`
+	ExeTaskNum      int `json:"exe_task_num"`
+	EndTaskNum      int `json:"end_task_num"`
+	ExeTeamNum      int `json:"exe_team_num"`
+	EndTeamNum      int `json:"end_team_num"`
+	AllSecTaskNum   int `json:"all_sec_task_num"`
+	ApplySecTaskNum int `json:"apply_sec_task_num"`
+	ExeSecTaskNum   int `json:"exe_sec_task_num"`
+	EndSecTaskNum   int `json:"end_sec_task_num"`
 }

+ 30 - 0
app/model/youngee_talent_model/talent_team.go

@@ -0,0 +1,30 @@
+package youngee_talent_model
+
+import "youngmini_server/app/model"
+
+type YounggeeTeamTaskInfo struct {
+	Avatar           string  `json:"avatar"`             // 头像
+	TalentWxNickname string  `json:"talent_wx_nickname"` // 昵称
+	PointIncome      int     `json:"point_income"`       // 积分收益
+	MoneyIncome      float64 `json:"money_income"`       // 现金收益
+	TaskStage        int     `json:"task_stage"`         // 任务阶段
+	CurDefaultStatus int     `json:"cur_default_status"` // 当前违约状态
+}
+
+type AddYoungTeamReq struct {
+	ProjectType int    `json:"project_type"` // 项目类型,1为项目,2为选品
+	ProjectId   string `json:"project_id"`
+	SelectionId string `json:"selection_id"`
+}
+
+type GetLeadYoungTeamIdRsp struct {
+	TeamId string `json:"team_id"`
+	Num    int    `json:"num"`
+}
+
+type GetYoungTeamListRsp struct {
+	YoungTeamList []*model.YounggeeTalentTeam `json:"young_team_list"`
+	Num           int                         `json:"num"`
+	PointIncome   int                         `json:"point_income"`
+	MoneyIncome   float64                     `json:"money_income"`
+}

+ 10 - 10
app/model/youngee_talent_model/task_income.go

@@ -1,16 +1,15 @@
 package youngee_talent_model
 
 import (
-	"youngmini_server/app/model"
-
 	"github.com/gogf/gf/os/gtime"
 )
 
 type WithdrawTaskInfo struct {
-	TaskId          string `json:"task_id"`
-	ProjectName     string `json:"project_name"`
-	ProductPrice    int    `json:"product_price"`
-	RecruitStrategy *model.RecruitStrategy
+	TaskId          string      `json:"task_id"`
+	ProjectName     string      `json:"project_name"`
+	PlatformIconUrl string      `json:"platform_icon_url"`
+	PlatformName    string      `json:"platform_name"`
+	ProductPhoto    string      `json:"product_photo"`
 	TaskReward      float64     `json:"task_reward"`
 	SettleAmount    float64     `json:"settle_amount"`
 	CompleteDate    *gtime.Time `json:"complete_date"`
@@ -25,8 +24,9 @@ type WithdrawTaskInfoList struct {
 }
 
 type WithdrawInfo struct {
-	TaskIdList  string  `json:"task_id_list"`
-	TotalAmount float64 `json:"total_amount"`
-	RealAmount  float64 `json:"real_amount"`
-	BankType    int     `json:"bank_type"`
+	IncomeIdList string  `json:"income_id_list"` // 收益记录id列表
+	Point        int     `json:"point"`          // 抵扣积分
+	TotalAmount  float64 `json:"total_amount"`   // 提现金额
+	RealAmount   float64 `json:"real_amount"`    // 实际金额
+	BankType     int     `json:"bank_type"`      // 到账方式
 }

+ 26 - 16
app/model/youngee_talent_model/task_info.go

@@ -42,18 +42,22 @@ type SignTaskInfo struct {
 }
 
 type TaskInfoBrief struct {
-	TaskId           string `json:"task_id"`
-	PlatformIconUrl  string `json:"platform_icon_url"`
-	PlatformName     string `json:"platform_name"`
-	PlatformNickName string `json:"platform_nick_name"`
-	ProjectName      string `json:"project_name"`
-	ProductPhotoSnap string `json:"product_photo_snap"`
-	TaskStatus       int    `json:"task_status"`
-	TaskStage        int    `json:"task_stage"`
-	ScriptStatus     uint   `json:"script_status"` // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	SketchStatus     uint   `json:"sketch_status"` // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	LinkStatus       uint   `json:"link_status"`   // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	DataStatus       uint   `json:"data_status"`   // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	TaskId           string      `json:"task_id"`
+	PlatformIconUrl  string      `json:"platform_icon_url"`
+	PlatformName     string      `json:"platform_name"`
+	PlatformNickName string      `json:"platform_nick_name"`
+	ProjectName      string      `json:"project_name"`
+	ProductPhotoSnap string      `json:"product_photo_snap"`
+	TaskStatus       int         `json:"task_status"`
+	TaskStage        int         `json:"task_stage"`
+	ScriptStatus     uint        `json:"script_status"` // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	SketchStatus     uint        `json:"sketch_status"` // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	LinkStatus       uint        `json:"link_status"`   // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	DataStatus       uint        `json:"data_status"`   // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	TaskReward       float64     `json:"task_reward"`   // 达人报酬
+	BreakRate        int         `json:"break_rate"`    // 违约扣款比例,百分之
+	CurBreakAt       *gtime.Time `json:"cur_break_at"`  // 当前阶段截止时间
+	FeeForm          int         `json:"fee_form"`      // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
 }
 
 type TaskInfoBriefList struct {
@@ -84,10 +88,11 @@ type ExeTaskNum struct {
 }
 
 type TaskDetail struct {
-	TaskInfo      *model.YoungeeTaskInfo      `json:"task_info"`
-	ProjectDetail *ProjectDetail              `json:"project_detail"`
-	ProductPhoto  *model.YounggeeProductPhoto `json:"product_photo"`
-	Strategy      *model.RecruitStrategy      `json:"strategy"`
+	TaskInfo       *model.YoungeeTaskInfo      `json:"task_info"`
+	ProjectDetail  *ProjectDetail              `json:"project_detail"`
+	ProductPhoto   *model.YounggeeProductPhoto `json:"product_photo"`
+	Strategy       *model.RecruitStrategy      `json:"strategy"`
+	WithdrawStatus int                         `json:"withdraw_status"`
 }
 
 type IsSign struct {
@@ -95,3 +100,8 @@ type IsSign struct {
 	IsAgree  int                    `json:"is_agree"`
 	TaskInfo *model.YoungeeTaskInfo `json:"task_info"`
 }
+
+type IsSignSecTask struct {
+	IsSign      int                        `json:"is_sign"`
+	SecTaskInfo *model.YounggeeSecTaskInfo `json:"sec_task_info"`
+}

+ 394 - 0
app/service/youngee_sectask_service/seletion_square.go

@@ -0,0 +1,394 @@
+package youngee_sectask_service
+
+import (
+	"context"
+	"encoding/json"
+	"fmt"
+	"github.com/gogf/gf/database/gdb"
+	"reflect"
+	"youngmini_server/app/dao"
+	"youngmini_server/app/model"
+	"youngmini_server/app/model/youngee_talent_model"
+	"youngmini_server/app/utils"
+
+	"github.com/gogf/gf/encoding/gjson"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/net/ghttp"
+	"github.com/gogf/gf/os/gtime"
+)
+
+const (
+	selectionStatusCreating = iota + 1
+	selectionStatusReviewing
+	selectionStatusReviewed
+	selectionStatusPaying
+	selectionStatusPaid
+	selectionStatusInProgress
+	selectionStatusInvalid
+	selectionStatusClosed
+)
+
+// 获取项目信息列表service
+func GetSelectionList(r *ghttp.Request) *TalentHttpResult {
+
+	pageIndex := r.GetQueryInt("idx", -1)
+	cntPerPage := r.GetQueryInt("cnt", -1)
+	platform := r.Get("platform")
+	secForm := r.Get("secform")
+	taskForm := r.Get("taskform")
+	searchValue := r.Get("searchvalue")
+	if pageIndex == -1 || cntPerPage == -1 || cntPerPage == 0 {
+		return &TalentHttpResult{Code: -1, Msg: "参数错误"}
+	}
+
+	// 如果有领样形式的过滤条件,则将过滤条件保存于secFormList
+	var secFormList []interface{}
+	if secForm != nil {
+		if reflect.TypeOf(secForm).Kind() != reflect.Slice {
+			return &TalentHttpResult{Code: -2, Msg: "搜索条件领样形式错误"}
+		}
+
+		secFormList = make([]interface{}, 0)
+		secFormList = secForm.([]interface{})
+	}
+
+	// 如果有任务形式的过滤条件,则将过滤条件保存于taskFormList
+	var taskFormList []interface{}
+	if taskForm != nil {
+		if reflect.TypeOf(taskForm).Kind() != reflect.Slice {
+			return &TalentHttpResult{Code: -2, Msg: "搜索条件任务形式错误"}
+		}
+
+		taskFormList = make([]interface{}, 0)
+		taskFormList = taskForm.([]interface{})
+	}
+
+	// 如果有平台的过滤条件,则将平台列表保存于platformList
+	var platformList []interface{}
+	if platform != nil {
+		if reflect.TypeOf(platform).Kind() != reflect.Slice {
+			return &TalentHttpResult{Code: -2, Msg: "搜索条件平台类型错误"}
+		}
+
+		platformList = make([]interface{}, 0)
+		platformList = platform.([]interface{})
+	}
+
+	// 构造查询的条件
+	startId := pageIndex * cntPerPage
+	whereStr := fmt.Sprintf("(selection_status >= %d)", selectionStatusInProgress)
+	if platformList != nil {
+		whereStr = whereStr + " and platform in ("
+		for _, v := range platformList {
+			whereStr += v.(string) + ", "
+		}
+
+		whereStr = whereStr[0 : len(whereStr)-2]
+		whereStr += ")"
+	}
+
+	if taskFormList != nil {
+		whereStr += " and task_mode in ("
+		for _, v := range taskFormList {
+			whereStr += v.(string) + ", "
+		}
+
+		whereStr = whereStr[0 : len(whereStr)-2]
+		whereStr += ")"
+	}
+	if secFormList != nil {
+		whereStr += " and sample_mode in ("
+		for _, v := range secFormList {
+			whereStr += v.(string) + ", "
+		}
+
+		whereStr = whereStr[0 : len(whereStr)-2]
+		whereStr += ")"
+	}
+	if searchValue != nil {
+		whereStr += " and selection_name like '%" + searchValue.(string) + "%'"
+	}
+
+	// 查询所有selection
+	var selectionList = []model.YounggeeSelectionInfo{}
+	err := g.Model(dao.YounggeeSelectionInfo.Table).Where(whereStr).Scan(&selectionList)
+	if err != nil {
+		return &TalentHttpResult{Code: -3, Msg: "查询数据库失败"}
+	}
+	fmt.Println("searchValue:", searchValue)
+	fmt.Println("secFormList:", secFormList)
+	fmt.Println("taskFormList:", taskFormList)
+
+	fmt.Println("whereStr: ", whereStr)
+
+	// 判断请求页面是否超过最大页面
+	c, err := g.DB().Model(dao.YounggeeSelectionInfo.Table).Where(whereStr).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -4, Msg: err.Error(), Data: nil}
+	}
+
+	maxPage := c / cntPerPage
+	if c%cntPerPage > 0 {
+		maxPage += 1
+	}
+
+	if pageIndex+1 > maxPage {
+		return &TalentHttpResult{Code: -5, Msg: "over max page"}
+	}
+
+	var selectionInfoList = youngee_talent_model.SelectionInfoList{
+		Count: c,
+	}
+	err = g.DB().Model(dao.YounggeeSelectionInfo.Table).WithAll().Where(whereStr).
+		Order("selection_status ASC,task_ddl DESC, selection_id").Limit(startId, cntPerPage).Scan(&selectionInfoList.SeletionInfos)
+	if err != nil {
+		return &TalentHttpResult{Code: -6, Msg: "查询数据库失败"}
+	}
+
+	selectionInfoList.MaxPage = maxPage
+
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: selectionInfoList}
+}
+
+// 获取单个选品详情service
+func GetSelectionDetail(r *ghttp.Request) *TalentHttpResult {
+	sid := r.GetQueryString("selectionid", 0)
+	if sid == "" {
+		return &TalentHttpResult{Code: -2, Msg: "data query failed"}
+	}
+
+	var selectionDetail *youngee_talent_model.SelectionDetail
+	err := g.DB().Model(youngee_talent_model.SelectionDetail{}).WithAll().Where("selection_id", sid).Scan(&selectionDetail)
+	if err != nil {
+		return &TalentHttpResult{Code: -3, Msg: err.Error()}
+	}
+
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: selectionDetail}
+}
+
+// 判断是否已报名任务
+func IsSignUpSecTask(r *ghttp.Request) *TalentHttpResult {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: "Get talent info failed"}
+	}
+	selectionId := r.GetQueryInt("selection_id", -1)
+
+	task := []model.YounggeeSecTaskInfo{}
+	err = g.Model(dao.YounggeeSecTaskInfo.Table).Where("selection_id = ? and talent_id = ?", selectionId, tid).Scan(&task)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: err.Error()}
+	}
+	isSign := youngee_talent_model.IsSignSecTask{}
+	if len(task) != 0 {
+		isSign.SecTaskInfo = &task[0]
+		isSign.IsSign = 1
+	} else {
+		isSign.IsSign = 0
+	}
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: isSign}
+}
+
+// 选品任务报名service
+func SignUpSecTask(r *ghttp.Request) *TalentHttpResult {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: "Get talent info failed"}
+	}
+
+	// 解析body/json参数
+	var signSecTaskReq *youngee_talent_model.SignSecTaskReq
+	err = r.ParseForm(&signSecTaskReq)
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "parse param error"}
+	}
+
+	// 查询选品详情
+	var selectionDetail *youngee_talent_model.SelectionDetail
+	err = g.DB().Model(youngee_talent_model.SelectionDetail{}).WithAll().Where("selection_id", signSecTaskReq.SelectionId).Scan(&selectionDetail)
+	if err != nil {
+		return &TalentHttpResult{Code: -3, Msg: err.Error()}
+	}
+
+	var product model.YounggeeProduct
+	err = json.Unmarshal([]byte(selectionDetail.ProductSnap), &product)
+	if err != nil {
+		return &TalentHttpResult{Code: -3, Msg: "json Unmarshal failed"}
+	}
+
+	// 查询达人详情
+	var talentInfo *youngee_talent_model.TalentInfo
+	err = g.DB().Model("youngee_talent_info").WithAll().Where("id", tid).Scan(&talentInfo)
+	if err != nil {
+		return &TalentHttpResult{Code: -4, Msg: "Get talent info failed"}
+	}
+
+	// 社媒账号详情
+	var accountInfo *youngee_talent_model.PlatformAccountInfo
+	err = g.DB().Model("youngee_platform_account_info").WithAll().Where("talent_id = ? and platform_id = ?", tid, selectionDetail.Platform).Scan(&accountInfo)
+	if err != nil {
+		return &TalentHttpResult{Code: -5, Msg: err.Error()}
+	}
+
+	// 收货地址详情
+	address, err := g.DB().Model(dao.YoungeeTalentDeliveryAddress.Table).One("talent_id = ? and address_id = ?", tid, signSecTaskReq.AddressId)
+	if err != nil {
+		return &TalentHttpResult{Code: -6, Msg: err.Error()}
+	}
+
+	var newTaskId string
+	// 首先生成任务id
+	newTaskId = utils.GetUuid.GetTaskId(selectionDetail.SelectionId, selectionDetail.EnterpriseId, tid)
+
+	// 生成达人平台账号信息快照
+	accountSnap, err := gjson.Encode(accountInfo)
+	if err != nil {
+		return &TalentHttpResult{Code: -7, Msg: "encode platform snap failed"}
+	}
+
+	// 生成达人信息快照
+	talentSnap, err := gjson.Encode(talentInfo)
+	if err != nil {
+		return &TalentHttpResult{Code: -8, Msg: "encode talent info snap failed"}
+	}
+
+	// 生成收货地址快照
+	addrSnap, err := gjson.Encode(address)
+	if err != nil {
+		return &TalentHttpResult{Code: -9, Msg: "encode delivery address snap failed"}
+	}
+
+	// 新建选品任务
+	secTaskInfo := model.YounggeeSecTaskInfo{
+		TaskId:                 newTaskId,
+		SelectionId:            signSecTaskReq.SelectionId,
+		TalentId:               tid,
+		AccountId:              accountInfo.AccountId,
+		TalentPlatformInfoSnap: string(accountSnap),
+		TalentPersonalInfoSnap: string(talentSnap),
+		TalentPostAddrSnap:     string(addrSnap),
+		TaskReward:             selectionDetail.TaskReward,
+		TalentPayment:          product.ProductPrice,
+		IsPayPayment:           0,
+		IsPayReward:            0,
+		TaskMode:               selectionDetail.TaskMode,
+		SampleMode:             selectionDetail.SampleMode,
+		TaskStage:              3,
+		TaskStatus:             1,
+		CreateDate:             gtime.Now(),
+		CompleteStatus:         1,
+		LogisticsStatus:        1,
+		AssignmentStatus:       1,
+		UpdateAt:               gtime.Now(),
+		WithdrawStatus:         1,
+		LeadTeamId:             signSecTaskReq.LeadTeamId,
+		TeamId:                 signSecTaskReq.TeamId,
+		TeamIncome:             0,
+		TeamPoint:              0,
+	}
+
+	err = g.DB().Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
+		// young之团收益计算
+		var rewardConfig *model.YounggeeTeamRewardConfig
+		whereCondition := g.Map{
+			dao.YounggeeTeamRewardConfig.Columns.ProjectType:  2,
+			dao.YounggeeTeamRewardConfig.Columns.TaskForm:     selectionDetail.TaskMode + 3,
+			dao.YounggeeTeamRewardConfig.Columns.ContentForm:  selectionDetail.ContentType,
+			dao.YounggeeTeamRewardConfig.Columns.RewardReason: talentInfo.UserType,
+		}
+		err = tx.Model(dao.YounggeeTeamRewardConfig.Table).Where(whereCondition).Scan(&rewardConfig)
+		if err != nil {
+			fmt.Println(err)
+			return err
+		}
+		if rewardConfig != nil {
+			secTaskInfo.TeamPoint = rewardConfig.Point
+			secTaskInfo.TeamIncome = rewardConfig.Money
+
+			whereCondition = g.Map{
+				dao.YounggeeTalentTeam.Columns.TeamId: signSecTaskReq.LeadTeamId,
+			}
+			whereCondition1 := g.Map{
+				dao.YounggeeTalentTeam.Columns.TeamId: signSecTaskReq.TeamId,
+			}
+			updateData := g.Map{
+				dao.YounggeeTalentTeam.Columns.PointIncome: gdb.Raw(fmt.Sprintf("%s + %d", dao.YounggeeTalentTeam.Columns.PointIncome, rewardConfig.Point)),
+				dao.YounggeeTalentTeam.Columns.MoneyIncome: gdb.Raw(fmt.Sprintf("%s + %f", dao.YounggeeTalentTeam.Columns.MoneyIncome, float64(rewardConfig.Money)*secTaskInfo.TaskReward/100)),
+			}
+			_, err = tx.Ctx(ctx).Model(dao.YounggeeTalentTeam.Table).Data(updateData).Where(whereCondition).Update()
+			if err != nil {
+				return err
+			}
+			_, err = tx.Ctx(ctx).Model(dao.YounggeeTalentTeam.Table).Data(updateData).Where(whereCondition1).Update()
+			if err != nil {
+				return err
+			}
+
+			// young之团状态变更
+			if signSecTaskReq.LeadTeamId != "" {
+				// 更新young之团状态
+				whereCondition2 := g.Map{
+					dao.YounggeeTalentTeam.Columns.TeamStatus: 1,
+				}
+				updateData = g.Map{
+					dao.YounggeeTalentTeam.Columns.TeamStatus: 2,
+				}
+				_, err = tx.Ctx(ctx).Model(dao.YounggeeTalentTeam.Table).Where(whereCondition).Where(whereCondition2).Data(updateData).Update()
+				if err != nil {
+					return err
+				}
+			}
+			if signSecTaskReq.TeamId != "" {
+				// 更新young之团状态
+				whereCondition2 := g.Map{
+					dao.YounggeeTalentTeam.Columns.TeamStatus: 1,
+				}
+				updateData = g.Map{
+					dao.YounggeeTalentTeam.Columns.TeamStatus: 2,
+				}
+				_, err = tx.Ctx(ctx).Model(dao.YounggeeTalentTeam.Table).Where(whereCondition1).Where(whereCondition2).Data(updateData).Update()
+				if err != nil {
+					return err
+				}
+			}
+		}
+
+		if selectionDetail.SampleMode == 2 {
+			// 减少选品库存
+			whereCondition1 := g.Map{
+				dao.YounggeeSelectionInfo.Columns.SelectionId: selectionDetail.SelectionId,
+			}
+			updateData := g.Map{
+				dao.YounggeeSelectionInfo.Columns.RemainNum: gdb.Raw(fmt.Sprintf("%s - 1", dao.YounggeeSelectionInfo.Columns.RemainNum)),
+			}
+			_, err = tx.Ctx(ctx).Model(dao.YounggeeSelectionInfo.Table).Where(whereCondition1).Data(updateData).Update()
+			if err != nil {
+				return err
+			}
+			// 新建任务,初始化状态为待发货
+			secTaskInfo.TaskStage = 6
+			_, err = tx.Ctx(ctx).Model(dao.YounggeeSecTaskInfo.Table).Data(&secTaskInfo).Insert()
+			if err != nil {
+				return err
+			}
+
+		} else {
+			// 新建任务,初始化状态为待确认
+			_, err = tx.Ctx(ctx).Model(dao.YounggeeSecTaskInfo.Table).Data(&secTaskInfo).Insert()
+			if err != nil {
+				return err
+			}
+		}
+
+		return nil
+	})
+	if err != nil {
+		return &TalentHttpResult{Code: -18, Msg: "add Task data failed"}
+	}
+
+	signSecTaskResp := youngee_talent_model.SignSecTaskResp{
+		TaskId: newTaskId,
+	}
+
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: signSecTaskResp}
+}

+ 19 - 0
app/service/youngee_sectask_service/talent_http_result.go

@@ -0,0 +1,19 @@
+package youngee_sectask_service
+
+import "github.com/gogf/gf/os/glog"
+
+type TalentHttpResult struct {
+	Code int         `json:"code"`
+	Msg  string      `json:"msg"`
+	Data interface{} `json:"data"`
+}
+
+func New(code int, msg string, data *interface{}) *TalentHttpResult {
+	t := &TalentHttpResult{code, msg, data}
+	if code != 0 {
+		glog.DefaultLogger().Error()
+	} else {
+
+	}
+	return t
+}

+ 139 - 0
app/service/youngee_sectask_service/work_space.go

@@ -0,0 +1,139 @@
+package youngee_sectask_service
+
+import (
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/net/ghttp"
+	"strconv"
+	"youngmini_server/app/dao"
+	"youngmini_server/app/model"
+	"youngmini_server/app/model/youngee_talent_model"
+	"youngmini_server/app/utils"
+)
+
+// 获取执行中选品任务列表service
+func GetExeSecTaskList(r *ghttp.Request) *TalentHttpResult {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: "Get talent info failed"}
+	}
+	var taskStageList = [2]int{0, 8}
+	taskStageKey := r.GetQueryInt("taskStage", 0)
+	if taskStageKey == 0 {
+		return &TalentHttpResult{Code: -2, Msg: "parse param error"}
+	}
+	taskStage := taskStageList[taskStageKey-3]
+
+	// 获取任务列表
+	var taskList []*model.YounggeeSecTaskInfo
+	whereCondition := g.Map{
+		dao.YounggeeSecTaskInfo.Columns.TalentId:  tid,
+		dao.YounggeeSecTaskInfo.Columns.TaskStage: taskStage,
+	}
+	err = g.Model(dao.YounggeeSecTaskInfo.Table).Where(whereCondition).Scan(&taskList)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: "Get task list failed"}
+	}
+
+	platformMap := make(map[string]model.InfoThirdPlatform)
+	var platformInfo []*model.InfoThirdPlatform
+	if len(taskList) != 0 {
+		err := g.Model(dao.InfoThirdPlatform.Table).Scan(&platformInfo)
+		if err != nil {
+			return &TalentHttpResult{Code: -1, Msg: "Get platform failed"}
+		}
+
+		for i, _ := range platformInfo {
+			platformMap[strconv.Itoa(platformInfo[i].PlatformId)] = *platformInfo[i]
+		}
+	}
+
+	// 为每个任务根据项目id查询项目名称和主图
+	var taskBriefList []*youngee_talent_model.SecTaskInfoBrief
+	for _, v := range taskList {
+		whereCondition = g.Map{
+			dao.YounggeeSelectionInfo.Columns.SelectionId: v.SelectionId,
+		}
+		selectionInfo, err := g.Model(dao.YounggeeSelectionInfo.Table).Where(whereCondition).One()
+		if err != nil {
+			return &TalentHttpResult{Code: -1, Msg: "Get fullproject info failed"}
+		}
+		whereCondition = g.Map{
+			dao.YoungeePlatformAccountInfo.Columns.PlatformId: selectionInfo[dao.YounggeeSelectionInfo.Columns.Platform],
+			dao.YoungeePlatformAccountInfo.Columns.TalentId:   v.TalentId,
+		}
+		account, err := g.Model(dao.YoungeePlatformAccountInfo.Table).Where(whereCondition).One()
+		if err != nil {
+			return &TalentHttpResult{Code: -1, Msg: "Get account info failed"}
+		}
+		taskInfoBrief := &youngee_talent_model.SecTaskInfoBrief{
+			TaskId:           v.TaskId,
+			PlatformIconUrl:  platformMap[selectionInfo[dao.YounggeeSelectionInfo.Columns.Platform].String()].PlatformIcon,
+			PlatformName:     platformMap[selectionInfo[dao.YounggeeSelectionInfo.Columns.Platform].String()].PlatformName,
+			PlatformNickName: account[dao.YoungeePlatformAccountInfo.Columns.PlatformNickname].String(),
+			SelectionName:    selectionInfo[dao.YounggeeSelectionInfo.Columns.SelectionName].String(),
+			ProductPhotoSnap: selectionInfo[dao.YounggeeSelectionInfo.Columns.ProductPhotoSnap].String(),
+			TaskStatus:       v.TaskStatus,
+			TaskStage:        v.TaskStage,
+			AssignmentStatus: v.AssignmentStatus,
+			TaskReward:       v.TaskReward,
+			TalentPayment:    v.TalentPayment,
+			SampleMode:       v.SampleMode,
+		}
+		taskBriefList = append(taskBriefList, taskInfoBrief)
+	}
+
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: taskBriefList}
+}
+
+// 获取选品任务详情
+func GetSecTaskDetail(r *ghttp.Request) *TalentHttpResult {
+	taskId := r.GetQueryInt("task_id", -1)
+
+	var secTask *model.YounggeeSecTaskInfo
+	err := g.Model(dao.YounggeeSecTaskInfo.Table).Where("task_id = ?", taskId).Scan(&secTask)
+	if err != nil {
+		g.Log().Error("Get selection task info failed: " + err.Error())
+		return &TalentHttpResult{Code: -1, Msg: "Get task info failed"}
+	}
+	if secTask == nil {
+		g.Log().Error("Get selection task info failed, The task does not exist.")
+		return &TalentHttpResult{Code: -2, Msg: "Task Miss"}
+	}
+
+	var selectionDetail *youngee_talent_model.SelectionDetail
+	err = g.Model(youngee_talent_model.SelectionDetail{}).WithAll().Where("selection_id", secTask.SelectionId).Scan(&selectionDetail)
+	if err != nil {
+		g.Log().Error("Get selection detail failed.")
+		return &TalentHttpResult{Code: -3, Msg: "Get selection detail failed."}
+	}
+
+	var withdrawStatus = 1
+	if secTask.SampleMode == 2 {
+		var taskIncome *model.YounggeeTalentIncome
+		err = g.Model(dao.YounggeeTalentIncome.Table).Where("sectask_id = ? and income_type = 3", taskId).Scan(&taskIncome)
+		if err != nil {
+			return &TalentHttpResult{Code: -3, Msg: "Get return income detail failed."}
+		}
+		if taskIncome != nil {
+			withdrawStatus = taskIncome.WithdrawStatus + 1
+		}
+	}
+	if secTask.TaskMode == 1 {
+		var taskIncome *model.YounggeeTalentIncome
+		err = g.Model(dao.YounggeeTalentIncome.Table).Where("sectask_id = ? and income_type = 4", taskId).Scan(&taskIncome)
+		if err != nil {
+			return &TalentHttpResult{Code: -3, Msg: "Get reward income detail failed."}
+		}
+		if taskIncome != nil && taskIncome.WithdrawStatus == 1 {
+			withdrawStatus = 2
+		}
+	}
+
+	taskDetail := &youngee_talent_model.SecTaskDetailResp{
+		SecTaskInfo:     secTask,
+		SelectionDetail: selectionDetail,
+		WithdrawStatus:  withdrawStatus,
+	}
+
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: taskDetail}
+}

+ 7 - 2
app/service/youngee_talent_service/info_tables.go

@@ -25,7 +25,7 @@ func GetInfoTables() *TalentHttpResult {
 		return &TalentHttpResult{Code: -3, Msg: "query product type failed"}
 	}
 
-	err = g.DB().Model(model.InfoTaskStage{}).Scan(&allInfos.TaskStage)
+	err = g.DB().Model(model.InfoTaskStage{}).OrderAsc(dao.InfoTaskStage.Columns.TaskStageId).Scan(&allInfos.TaskStage)
 	if err != nil {
 		return &TalentHttpResult{Code: -4, Msg: "query infoTask stage failed"}
 	}
@@ -40,10 +40,15 @@ func GetInfoTables() *TalentHttpResult {
 		return &TalentHttpResult{Code: -6, Msg: "query skilled area failed"}
 	}
 
+	err = g.DB().Model(model.InfoSectaskStage{}).OrderAsc(dao.InfoSectaskStage.Columns.TaskStageId).Scan(&allInfos.SecTaskStage)
+	if err != nil {
+		return &TalentHttpResult{Code: -7, Msg: "query InfoSectaskStage failed"}
+	}
+
 	err = g.DB().Model(dao.InfoThirdPlatform.Table).Fields(
 		dao.InfoThirdPlatform.Columns.PlatformId,
 		dao.InfoThirdPlatform.Columns.PlatformIcon,
-		dao.InfoThirdPlatform.Columns.PlatformName).Scan(&allInfos.ThirdPlatform)
+		dao.InfoThirdPlatform.Columns.PlatformName).OrderAsc(dao.InfoThirdPlatform.Columns.PlatformId).Scan(&allInfos.ThirdPlatform)
 
 	if err != nil {
 		return &TalentHttpResult{Code: -7, Msg: "query third platform info failed"}

+ 1 - 1
app/service/youngee_talent_service/talent_bank.go

@@ -72,7 +72,7 @@ func OnAddTalentBank(r *ghttp.Request) *TalentHttpResult {
 		return nil
 	})
 	if err != nil {
-		return &TalentHttpResult{Code: -3, Msg: "failed"}
+		return &TalentHttpResult{Code: -3, Msg: err.Error()}
 	}
 
 	return &TalentHttpResult{Code: 0, Msg: "success"}

+ 254 - 0
app/service/youngee_talent_service/talent_income.go

@@ -0,0 +1,254 @@
+package youngee_talent_service
+
+import (
+	"context"
+	"encoding/json"
+	"fmt"
+	"math/rand"
+	"strconv"
+	"strings"
+	"time"
+	"youngmini_server/app/dao"
+	"youngmini_server/app/model"
+	"youngmini_server/app/model/youngee_talent_model"
+	"youngmini_server/app/utils"
+
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/net/ghttp"
+	"github.com/gogf/gf/os/gtime"
+)
+
+func GetTalentIncomeInfo(r *ghttp.Request) *TalentHttpResult {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: "Get talent info failed"}
+	}
+
+	var getTalentIncomeReq *youngee_talent_model.GetTalentIncomeReq
+	err = r.ParseForm(&getTalentIncomeReq)
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "params error"}
+	}
+
+	var talentIncomerep []youngee_talent_model.TalentIncomeInfo
+	var talentIncomeList []*model.YounggeeTalentIncome
+	err = g.DB().Model(dao.YounggeeTalentIncome.Table).Where("talent_id = ? and withdraw_status = ?", tid, getTalentIncomeReq.Type).Scan(&talentIncomeList)
+	if err != nil {
+		return &TalentHttpResult{Code: -3, Msg: err.Error()}
+	}
+
+	platformMap := make(map[string]model.InfoThirdPlatform)
+	platformInfo := []*model.InfoThirdPlatform{}
+	if len(talentIncomeList) != 0 {
+		err := g.Model(dao.InfoThirdPlatform.Table).Scan(&platformInfo)
+		if err != nil {
+			return &TalentHttpResult{Code: -1, Msg: "Get platform failed"}
+		}
+
+		for i, _ := range platformInfo {
+			platformMap[strconv.Itoa(platformInfo[i].PlatformId)] = *platformInfo[i]
+		}
+	}
+
+	for _, v := range talentIncomeList {
+		var platform model.InfoThirdPlatform
+		switch v.Type {
+		case 1:
+			projectPlatform, err := g.Model(dao.ProjectInfo.Table).Fields("project_platform").Where("project_id = ?", v.ProjectId).Value()
+			if err != nil {
+				return &TalentHttpResult{Code: -1, Msg: "Get fullproject info failed"}
+			}
+			platform = platformMap[projectPlatform.String()]
+
+			talentIncomeInfo := youngee_talent_model.TalentIncomeInfo{
+				Id:              v.Id,
+				ProjectId:       v.ProjectId,
+				TaskId:          v.TaskId,
+				Type:            v.Type,
+				BrandName:       v.BrandName,
+				TaskName:        v.TaskName,
+				PhotoUrl:        v.PhotoUrl,
+				TeamId:          v.TeamId,
+				Income:          v.Income,
+				IncomeType:      v.IncomeType,
+				WithdrawStatus:  v.WithdrawStatus,
+				IncomeAt:        v.IncomeAt,
+				WithdrawAt:      v.WithdrawAt,
+				PlatformIconUrl: platform.PlatformIcon,
+			}
+
+			talentIncomerep = append(talentIncomerep, talentIncomeInfo)
+			break
+		case 2:
+			platformId, err := g.Model(dao.YounggeeSelectionInfo.Table).Fields("platform").Where("selection_id = ?", v.SelectionId).Value()
+			if err != nil {
+				return &TalentHttpResult{Code: -1, Msg: "Get fullproject info failed"}
+			}
+			platform = platformMap[platformId.String()]
+
+			talentIncomeInfo := youngee_talent_model.TalentIncomeInfo{
+				Id:              v.Id,
+				ProjectId:       v.SelectionId,
+				TaskId:          v.SectaskId,
+				Type:            v.Type,
+				BrandName:       v.BrandName,
+				TaskName:        v.TaskName,
+				PhotoUrl:        v.PhotoUrl,
+				TeamId:          v.TeamId,
+				Income:          v.Income,
+				IncomeType:      v.IncomeType,
+				WithdrawStatus:  v.WithdrawStatus,
+				IncomeAt:        v.IncomeAt,
+				WithdrawAt:      v.WithdrawAt,
+				PlatformIconUrl: platform.PlatformIcon,
+			}
+
+			talentIncomerep = append(talentIncomerep, talentIncomeInfo)
+			break
+		default:
+		}
+
+	}
+
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: talentIncomerep}
+}
+
+// 提现
+func Withdraw(r *ghttp.Request) *TalentHttpResult {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: err.Error()}
+	}
+
+	var DataInfoReq *youngee_talent_model.WithdrawInfo
+	err = r.ParseForm(&DataInfoReq)
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: err.Error()}
+	}
+	incomeIdStrList := strings.Split(DataInfoReq.IncomeIdList, ",")
+	incomeIdList := utils.TypeTran.String2Int(incomeIdStrList)
+
+	// 检验是否均处于可提现状态,且达人id是否对应
+	var incomeList []model.YounggeeTalentIncome
+	err = g.Model(dao.YounggeeTalentIncome.Table).Where("talent_id = ? and withdraw_status = 1", tid).And("id IN (?)", incomeIdList).Scan(&incomeList)
+	if err != nil {
+		return &TalentHttpResult{Code: -4, Msg: err.Error()}
+	}
+	if len(incomeIdList) != len(incomeList) {
+		return &TalentHttpResult{Code: -3, Msg: "Req IncomeIdList Error"}
+	}
+
+	// 检查达人积分是否足够
+	totalPoint, err := g.Model(dao.YoungeeTalentInfo.Table).Fields("point").Where("id = ?", tid).Value()
+	if err != nil {
+		return &TalentHttpResult{Code: -5, Msg: err.Error()}
+	}
+	if totalPoint.Int() < DataInfoReq.Point {
+		return &TalentHttpResult{Code: -3, Msg: "Req Point Error"}
+	}
+
+	// 查询达人提现到账账户信息
+	var talentBank model.YounggeeTalentBank
+	err = g.Model(dao.YounggeeTalentBank.Table).Where("talent_id = ?", tid).Scan(&talentBank)
+	if err != nil {
+		return &TalentHttpResult{Code: -6, Msg: err.Error()}
+	}
+	bankJsons, errs := json.Marshal(talentBank) //转换成JSON返回的是byte[]
+	if errs != nil {
+		return &TalentHttpResult{Code: -7, Msg: err.Error()}
+	}
+
+	err = g.DB().Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
+		s1 := tid[7:]
+		s2 := fmt.Sprintf("%d", gtime.Now().YearDay())
+		s3 := fmt.Sprintf("%02v", rand.New(rand.NewSource(time.Now().UnixNano())).Int63n(100))
+		s := "6" + s1 + s2 + s3
+		// 插入提现记录
+		_, err1 := tx.Ctx(ctx).Model(dao.YounggeeWithdrawRecord.Table).Data(model.YounggeeWithdrawRecord{
+			WithdrawId:     s,
+			TalentId:       tid,
+			WithdrawAmount: float64(DataInfoReq.TotalAmount),
+			AmountPayable:  float64(DataInfoReq.RealAmount),
+			IncomeIdList:   DataInfoReq.IncomeIdList,
+			PayPoint:       DataInfoReq.Point,
+			ReceiveInfo:    string(bankJsons),
+			BankType:       2,
+			Status:         1,
+			SubmitAt:       gtime.Now(),
+		}).InsertAndGetId()
+		if err1 != nil {
+			fmt.Printf("[Withdraw Transaction] Error:%+v\n", err1)
+			return err1
+		}
+
+		// 更新income表中提现状态
+		_, err1 = tx.Ctx(ctx).Model(dao.YounggeeTalentIncome.Table).Where("id IN (?)", incomeIdList).Update(g.Map{"withdraw_status": 2, "withdraw_at": gtime.Now()})
+		if err1 != nil {
+			fmt.Printf("[Withdraw Transaction] Error:%+v\n", err1)
+			return err1
+		}
+
+		// 更新talent表中提现金额
+		_, err1 = tx.Ctx(ctx).Model(dao.YoungeeTalentInfo.Table).Where("id = ?", tid).Increment("withdrawing", float64(DataInfoReq.TotalAmount))
+		if err1 != nil {
+			fmt.Printf("[Withdraw Transaction] Error:%+v\n", err1)
+			return err1
+		}
+		_, err1 = tx.Ctx(ctx).Model(dao.YoungeeTalentInfo.Table).Where("id = ?", tid).Decrement("canwithdraw", float64(DataInfoReq.TotalAmount))
+		if err1 != nil {
+			fmt.Printf("[Withdraw Transaction] Error:%+v\n", err1)
+			return err1
+		}
+
+		// 达人消息
+		for _, incomeInfo := range incomeList {
+			messageTypeId := [4]int{25, 26, 27, 28}
+			messageInfo := model.YounggeeMessageInfo{
+				MessageId:   messageTypeId[incomeInfo.IncomeType-1],
+				MessageType: 2,
+				CreatedAt:   gtime.Now(),
+				ProjectName: incomeInfo.TaskName,
+				IsReaded:    0,
+				IsDeleted:   0,
+			}
+			_, err = tx.Ctx(ctx).Model(dao.YounggeeMessageInfo.Table).Data(&messageInfo).Insert()
+			if err != nil {
+				fmt.Printf("[Withdraw Transaction] Error:%+v\n", err)
+				return err
+			}
+		}
+		return nil
+	})
+	if err != nil {
+		return &TalentHttpResult{Code: -8, Msg: "Add Withdraw Record failed: " + err.Error()}
+	}
+
+	return &TalentHttpResult{Code: 0, Msg: "success"}
+}
+
+// 查询积分明细
+func GetTalentPointInfo(r *ghttp.Request) *TalentHttpResult {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: err.Error()}
+	}
+
+	var talentPointList []*model.YounggeeTalentPointRecord
+	err = g.DB().Model(dao.YounggeeTalentPointRecord.Table).Where("talent_id = ?", tid).Order("income_at").Scan(talentPointList)
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: err.Error()}
+	}
+
+	point, err := g.DB().Model(dao.YoungeeTalentInfo.Table).Fields("point").Where("talent_id = ?", tid).Value()
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: err.Error()}
+	}
+
+	TalentPointInfo := youngee_talent_model.TalentPointInfo{
+		Point:             point.Int(),
+		TalentPointRecord: talentPointList,
+	}
+
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: TalentPointInfo}
+}

+ 64 - 0
app/service/youngee_talent_service/talent_info.go

@@ -60,3 +60,67 @@ func GetTalentInfo(r *ghttp.Request) *TalentHttpResult {
 	}
 	return &TalentHttpResult{Code: 0, Msg: "success", Data: talentInfo}
 }
+
+// 查询任务数量、young之团数量、选品任务数量
+func GetMyInfoNum(r *ghttp.Request) *TalentHttpResult {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: "Get talent info failed"}
+	}
+	talentInfoNum := youngee_talent_model.TalentInfoNum{}
+	// 查询任务相关数量
+	var endTaskStageList = [3]int{3, 5, 16}
+	whereCondition := g.Map{
+		dao.YoungeeTaskInfo.Columns.TalentId: tid,
+	}
+
+	talentInfoNum.AllTaskNum, err = g.DB().Model(dao.YoungeeTaskInfo.Table).Where(whereCondition).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "Get task num failed"}
+	}
+	talentInfoNum.ApplyTaskNum, err = g.DB().Model(dao.YoungeeTaskInfo.Table).Where("talent_id = ? and task_stage = 1", tid).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "Get task num failed"}
+	}
+	talentInfoNum.ExeTaskNum, err = g.DB().Model(dao.YoungeeTaskInfo.Table).Where("talent_id = ? and task_stage >= 4 and task_stage <= 14", tid).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "Get task num failed"}
+	}
+	talentInfoNum.EndTaskNum, err = g.DB().Model(dao.YoungeeTaskInfo.Table).Where("talent_id = ? and task_stage in (?)", tid, endTaskStageList).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "Get task num failed"}
+	}
+
+	// 查询young之团相关数量
+	talentInfoNum.ExeTeamNum, err = g.DB().Model(dao.YounggeeTalentTeam.Table).Where("talent_id = ? and team_status = 2", tid).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "Get task num failed"}
+	}
+	talentInfoNum.EndTeamNum, err = g.DB().Model(dao.YounggeeTalentTeam.Table).Where("talent_id = ? and team_status = 3", tid).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "Get task num failed"}
+	}
+
+	// 查询选品任务相关数量
+	var signSecTaskStageList = []int{2, 3}
+	var exeSecTaskStageList = []int{6, 7, 8}
+	var endSecTaskStageList = []int{5, 9, 10}
+	talentInfoNum.AllSecTaskNum, err = g.DB().Model(dao.YounggeeSecTaskInfo.Table).Where("talent_id = ?", tid).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "Get task num failed"}
+	}
+	talentInfoNum.ApplySecTaskNum, err = g.DB().Model(dao.YounggeeSecTaskInfo.Table).Where("talent_id = ? and task_stage in (?)", tid, signSecTaskStageList).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "Get task num failed"}
+	}
+	talentInfoNum.ExeSecTaskNum, err = g.DB().Model(dao.YounggeeSecTaskInfo.Table).Where("talent_id = ? and task_stage in (?)", tid, exeSecTaskStageList).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "Get task num failed"}
+	}
+	talentInfoNum.EndSecTaskNum, err = g.DB().Model(dao.YounggeeSecTaskInfo.Table).Where("talent_id = ? and task_stage in (?) ", tid, endSecTaskStageList).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "Get task num failed"}
+	}
+
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: talentInfoNum}
+}

+ 322 - 0
app/service/youngee_talent_service/young_team.go

@@ -0,0 +1,322 @@
+package youngee_talent_service
+
+import (
+	"encoding/json"
+	"fmt"
+	"github.com/gogf/gf/os/gtime"
+	"youngmini_server/app/dao"
+	"youngmini_server/app/model"
+	"youngmini_server/app/model/youngee_talent_model"
+	"youngmini_server/app/utils"
+
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/net/ghttp"
+)
+
+func GetYounggeeTeamList(r *ghttp.Request) *TalentHttpResult {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: "Get talent info failed"}
+	}
+	status := r.GetQueryInt("status", 0)
+	if status == 0 {
+		return &TalentHttpResult{Code: -2, Msg: "parse param error"}
+	}
+	whereCondition := g.Map{
+		dao.YounggeeTalentTeam.Columns.TalentId:   tid,
+		dao.YounggeeTalentTeam.Columns.TeamStatus: status,
+	}
+	num, err := g.DB().Model(dao.YounggeeTalentTeam.Table).Where(whereCondition).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -3, Msg: "mysql select failed"}
+	}
+	var teamList []*model.YounggeeTalentTeam
+	if num != 0 {
+		err = g.DB().Model(dao.YounggeeTalentTeam.Table).Where("leader_tid = ? and team_status = ?", tid, status).Scan(&teamList)
+		if err != nil {
+			return &TalentHttpResult{Code: -3, Msg: "mysql select failed"}
+		}
+	}
+	whereCondition1 := g.Map{
+		dao.YounggeeTalentTeam.Columns.TalentId:   tid,
+		dao.YounggeeTalentTeam.Columns.TeamStatus: 3,
+	}
+	point, err := g.DB().Model(dao.YounggeeTalentTeam.Table).Where(whereCondition1).Sum(dao.YounggeeTalentTeam.Columns.PointIncome)
+	if err != nil {
+		return &TalentHttpResult{Code: -3, Msg: "mysql select failed"}
+	}
+	money, err := g.DB().Model(dao.YounggeeTalentTeam.Table).Where(whereCondition1).Sum(dao.YounggeeTalentTeam.Columns.MoneyIncome)
+	if err != nil {
+		return &TalentHttpResult{Code: -3, Msg: "mysql select failed"}
+	}
+	GetYoungTeamListRsp := youngee_talent_model.GetYoungTeamListRsp{
+		YoungTeamList: teamList,
+		Num:           num,
+		PointIncome:   int(point),
+		MoneyIncome:   money,
+	}
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: GetYoungTeamListRsp}
+}
+
+func GetYounggeeTeamDetail(r *ghttp.Request) *TalentHttpResult {
+	// tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	// if err != nil {
+	// 	return &TalentHttpResult{Code: -1, Msg: "Get talent info failed"}
+	// }
+
+	teamId := r.GetQueryString("id", "")
+	projectType := r.GetQueryInt("type", 0)
+	taskStage := r.GetQueryInt("stage", 0)
+	if teamId == "" || projectType == 0 || taskStage == 0 {
+		return &TalentHttpResult{Code: -2, Msg: "parse param error"}
+	}
+
+	if projectType == 1 { //全流程项目
+		// 构造查询条件
+		whereStr1 := ""
+		switch taskStage {
+		case 1:
+			whereStr1 += fmt.Sprintf("")
+		case 2:
+			whereStr1 += fmt.Sprintf("task_stage > 3 and task_stage < 15")
+		case 3:
+			whereStr1 += fmt.Sprintf("task_stage = 15")
+		case 4:
+			whereStr1 += fmt.Sprintf("task_stage = 16")
+		default:
+			return &TalentHttpResult{Code: -2, Msg: "parse param error"}
+		}
+		whereStr2 := fmt.Sprintf("team_id = %s", teamId)
+		whereStr3 := fmt.Sprintf("lead_team_id = %s", teamId)
+		whereStr := whereStr1 + " and " + whereStr2
+		orStr := whereStr1 + " and " + whereStr3
+
+		// 查询
+		var taskList []*model.YoungeeTaskInfo
+		var teamTaskList []youngee_talent_model.YounggeeTeamTaskInfo
+		err := g.DB().Model(dao.YoungeeTaskInfo.Table).Where(whereStr).Or(orStr).Scan(&taskList)
+		if err != nil {
+			return &TalentHttpResult{Code: -3, Msg: "mysql select failed"}
+		}
+
+		for _, v := range taskList {
+			var talentInfo *model.YoungeeTalentInfo
+			jsonData := []byte(v.TalentPersonalInfoSnap)
+			json.Unmarshal(jsonData, &talentInfo)
+			teamTask := youngee_talent_model.YounggeeTeamTaskInfo{
+				Avatar:           talentInfo.Avatar,
+				TalentWxNickname: talentInfo.TalentWxNickname,
+				MoneyIncome:      v.TeamIncome,
+				PointIncome:      v.TeamPoint,
+				TaskStage:        v.TaskStage,
+				CurDefaultStatus: v.CurDefaultType,
+			}
+			teamTaskList = append(teamTaskList, teamTask)
+		}
+
+		return &TalentHttpResult{Code: 0, Msg: "success", Data: teamTaskList}
+	} else if projectType == 2 { //选品项目
+		// 构造查询条件
+		whereStr1 := ""
+		switch taskStage {
+		case 1:
+			whereStr1 += fmt.Sprintf("")
+		case 2:
+			whereStr1 += fmt.Sprintf("task_stage > 4 and task_stage < 9")
+		case 3:
+			whereStr1 += fmt.Sprintf("task_stage = 9")
+		case 4:
+			return &TalentHttpResult{Code: -2, Msg: "parse param error"}
+		default:
+			return &TalentHttpResult{Code: -2, Msg: "parse param error"}
+		}
+		whereStr2 := fmt.Sprintf("team_id = %s", teamId)
+		whereStr3 := fmt.Sprintf("lead_team_id = %s", teamId)
+		whereStr := whereStr1 + " and " + whereStr2
+		orStr := whereStr1 + " and " + whereStr3
+
+		// 查询
+		var taskList []*model.YounggeeSecTaskInfo
+		var teamTaskList []youngee_talent_model.YounggeeTeamTaskInfo
+		err := g.DB().Model(dao.YounggeeSecTaskInfo.Table).Where(whereStr).Or(orStr).Scan(&taskList)
+		if err != nil {
+			return &TalentHttpResult{Code: -3, Msg: "mysql select failed"}
+		}
+
+		for _, v := range taskList {
+			var talentInfo *model.YoungeeTalentInfo
+			jsonData := []byte(v.TalentPersonalInfoSnap)
+			json.Unmarshal(jsonData, &talentInfo)
+			teamTask := youngee_talent_model.YounggeeTeamTaskInfo{
+				Avatar:           talentInfo.Avatar,
+				TalentWxNickname: talentInfo.TalentWxNickname,
+				MoneyIncome:      float64(v.TeamIncome) * v.TaskReward / 100,
+				PointIncome:      v.TeamPoint,
+				TaskStage:        v.TaskStage,
+			}
+			teamTaskList = append(teamTaskList, teamTask)
+		}
+
+		return &TalentHttpResult{Code: 0, Msg: "success", Data: teamTaskList}
+	} else {
+		return &TalentHttpResult{Code: -2, Msg: "parse param error"}
+	}
+}
+
+// 创建young之团
+func AddYoungTeam(r *ghttp.Request) *TalentHttpResult {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: "Get talent info failed"}
+	}
+
+	var addYoungTeamReq *youngee_talent_model.AddYoungTeamReq
+	err = r.ParseForm(&addYoungTeamReq)
+	if err != nil {
+		return &TalentHttpResult{Code: -2, Msg: "params error"}
+	}
+	var whereCondition g.Map
+	if addYoungTeamReq.ProjectType == 1 {
+		whereCondition = g.Map{
+			dao.YounggeeTalentTeam.Columns.ProjectId: addYoungTeamReq.ProjectId,
+			dao.YounggeeTalentTeam.Columns.TalentId:  tid,
+		}
+	} else {
+		whereCondition = g.Map{
+			dao.YounggeeTalentTeam.Columns.SelectionId: addYoungTeamReq.SelectionId,
+			dao.YounggeeTalentTeam.Columns.TalentId:    tid,
+		}
+	}
+	num, err := g.DB().Model(dao.YounggeeTalentTeam.Table).Where(whereCondition).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -3, Msg: "data query failed"}
+	}
+	var youngTeam *model.YounggeeTalentTeam
+	var teamId string
+	if num == 0 {
+		// 生成随机十位数作为young之团id
+		teamId = utils.GetUuid.GetTeamId(addYoungTeamReq.ProjectId, addYoungTeamReq.SelectionId, tid)
+		// 查询项目主图
+		var mainPhoto string
+		var projectName string
+		var platform int
+		if addYoungTeamReq.ProjectType == 1 {
+			whereCondition1 := g.Map{
+				dao.ProjectInfo.Columns.ProjectId: addYoungTeamReq.ProjectId,
+			}
+			var project *model.ProjectInfo
+			err = g.DB().Model(dao.ProjectInfo.Table).Where(whereCondition1).Scan(&project)
+			if err != nil {
+				return &TalentHttpResult{Code: -3, Msg: "data query failed"}
+			}
+			projectName = project.ProjectName
+			platform = project.ProjectPlatform
+			var productPhotos []model.YounggeeProductPhoto
+			err = json.Unmarshal([]byte(project.ProductPhotoSnap), &productPhotos)
+			if err != nil {
+				return &TalentHttpResult{Code: -3, Msg: "json Unmarshal failed"}
+			}
+			fmt.Println("productPhotos: ", productPhotos)
+			for _, v := range productPhotos {
+				if v.Symbol == 1 {
+					mainPhoto = v.PhotoUrl
+				}
+			}
+		} else {
+			whereCondition1 := g.Map{
+				dao.YounggeeSelectionInfo.Columns.SelectionId: addYoungTeamReq.SelectionId,
+			}
+			var selection *model.YounggeeSelectionInfo
+			err = g.DB().Model(dao.YounggeeSelectionInfo.Table).Where(whereCondition1).Scan(&selection)
+			if err != nil {
+				return &TalentHttpResult{Code: -3, Msg: "data query failed"}
+			}
+			projectName = selection.SelectionName
+			platform = selection.Platform
+			var productPhotos []model.YounggeeProductPhoto
+			fmt.Println("ProductPhotoSnap: ", selection.ProductPhotoSnap)
+			err = json.Unmarshal([]byte(selection.ProductPhotoSnap), &productPhotos)
+			if err != nil {
+				return &TalentHttpResult{Code: -3, Msg: "json Unmarshal failed"}
+			}
+			fmt.Println("productPhotos: ", productPhotos)
+			for _, v := range productPhotos {
+				if v.Symbol == 1 {
+					mainPhoto = v.PhotoUrl
+				}
+			}
+		}
+		// 查询奖励机制id
+		newYoungTeam := model.YounggeeTalentTeam{
+			TeamId:          teamId,
+			TalentId:        tid,
+			ProjectId:       addYoungTeamReq.ProjectId,
+			SelectionId:     addYoungTeamReq.SelectionId,
+			ProjectType:     addYoungTeamReq.ProjectType,
+			ProjectPhoto:    mainPhoto,
+			ProjectName:     projectName,
+			Platform:        platform,
+			TeamStatus:      1,
+			NumApply:        0,
+			NumApplySuccess: 0,
+			MoneyIncome:     0,
+			PointIncome:     0,
+			CreateAt:        gtime.Now(),
+		}
+
+		_, err = g.DB().Model(dao.YounggeeTalentTeam.Table).Insert(newYoungTeam)
+		if err != nil {
+			return &TalentHttpResult{Code: -4, Msg: "YounggeeTalentTeam Insert failed"}
+		}
+	} else {
+		err = g.DB().Model(dao.YounggeeTalentTeam.Table).Where(whereCondition).Scan(&youngTeam)
+		if err != nil {
+			return &TalentHttpResult{Code: -5, Msg: "data query failed"}
+		}
+		teamId = youngTeam.TeamId
+	}
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: teamId}
+}
+
+// 获取团长young之团id
+func GetLeadYoungTeamId(r *ghttp.Request) *TalentHttpResult {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: "Get talent info failed"}
+	}
+
+	projectType := r.GetQueryInt("project_type", -1)
+	projectId := r.Get("project_id", "")
+	selectionId := r.Get("selection_id", "")
+
+	var whereCondition g.Map
+	if projectType == 1 {
+		whereCondition = g.Map{
+			dao.YounggeeTalentTeam.Columns.ProjectId: projectId,
+			dao.YounggeeTalentTeam.Columns.TalentId:  tid,
+		}
+	} else {
+		whereCondition = g.Map{
+			dao.YounggeeTalentTeam.Columns.SelectionId: selectionId,
+			dao.YounggeeTalentTeam.Columns.TalentId:    tid,
+		}
+	}
+	num, err := g.DB().Model(dao.YounggeeTalentTeam.Table).Where(whereCondition).Count()
+	if err != nil {
+		return &TalentHttpResult{Code: -3, Msg: "data query failed"}
+	}
+	var youngTeam *model.YounggeeTalentTeam
+	var teamId string
+	if num != 0 {
+		err = g.DB().Model(dao.YounggeeTalentTeam.Table).Where(whereCondition).Scan(&youngTeam)
+		if err != nil {
+			return &TalentHttpResult{Code: -5, Msg: "data query failed"}
+		}
+		teamId = youngTeam.TeamId
+	}
+	getLeadYoungTeamIdRsp := youngee_talent_model.GetLeadYoungTeamIdRsp{
+		teamId,
+		num,
+	}
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: getLeadYoungTeamIdRsp}
+}

+ 3 - 3
app/service/youngee_talent_service/project_info.go → app/service/youngee_task_service/project_info.go

@@ -1,4 +1,4 @@
-package youngee_talent_service
+package youngee_task_service
 
 import (
 	"fmt"
@@ -138,7 +138,7 @@ func GetProjectInfoList(r *ghttp.Request) *TalentHttpResult {
 		whereStr = whereStr[0 : len(whereStr)-2]
 		whereStr += ")"
 	} else if feeForm != nil {
-		return &TalentHttpResult{Code: -4, Msg: "has no project", Data: nil}
+		return &TalentHttpResult{Code: -4, Msg: "has no fullproject", Data: nil}
 	}
 
 	fmt.Println("whereStr: ", whereStr)
@@ -147,7 +147,7 @@ func GetProjectInfoList(r *ghttp.Request) *TalentHttpResult {
 	c, err := g.DB().Model(dao.ProjectInfo.Table).Fields("project_id").Where(whereStr).Count()
 
 	if c <= 0 {
-		return &TalentHttpResult{Code: -4, Msg: "has no project", Data: nil}
+		return &TalentHttpResult{Code: -4, Msg: "has no fullproject", Data: nil}
 	}
 
 	maxPage := c / cntPerPage

+ 19 - 0
app/service/youngee_task_service/talent_http_result.go

@@ -0,0 +1,19 @@
+package youngee_task_service
+
+import "github.com/gogf/gf/os/glog"
+
+type TalentHttpResult struct {
+	Code int         `json:"code"`
+	Msg  string      `json:"msg"`
+	Data interface{} `json:"data"`
+}
+
+func New(code int, msg string, data *interface{}) *TalentHttpResult {
+	t := &TalentHttpResult{code, msg, data}
+	if code != 0 {
+		glog.DefaultLogger().Error()
+	} else {
+
+	}
+	return t
+}

+ 1 - 1
app/service/youngee_talent_service/auto_time.go → app/service/youngee_task_service/task_auto_time.go

@@ -1,4 +1,4 @@
-package youngee_talent_service
+package youngee_task_service
 
 import (
 	"fmt"

+ 1 - 1
app/service/youngee_talent_service/task_data.go → app/service/youngee_task_service/task_data.go

@@ -1,4 +1,4 @@
-package youngee_talent_service
+package youngee_task_service
 
 import (
 	"youngmini_server/app/dao"

+ 65 - 53
app/service/youngee_talent_service/task_income.go → app/service/youngee_task_service/task_income.go

@@ -1,10 +1,11 @@
-package youngee_talent_service
+package youngee_task_service
 
 import (
 	"context"
 	"encoding/json"
 	"fmt"
 	"math/rand"
+	"strconv"
 	"strings"
 	"time"
 	"youngmini_server/app/dao"
@@ -27,31 +28,45 @@ func GetWithdrawTaskInfo(r *ghttp.Request) *TalentHttpResult {
 	withdrawTaskInfoList := youngee_talent_model.WithdrawTaskInfoList{}
 	// 获取可提现任务列表
 	var taskList []*model.YoungeeTaskInfo
-	err = g.Model(dao.YoungeeTaskInfo.Table).Where("talent_id = ? and project_type = 1", tid).And("withdraw_status IN(?)", g.Slice{2, 3, 4}).Scan(&taskList)
+	err = g.Model(dao.YoungeeTaskInfo.Table).Where("talent_id = ?", tid).And("withdraw_status IN(?)", g.Slice{2, 3, 4}).Scan(&taskList)
 	if err != nil {
 		return &TalentHttpResult{Code: -1, Msg: "Get task list failed"}
 	}
 
-	for _, v := range taskList {
-		projectInfo, err := g.Model(dao.ProjectInfo.Table).Where("project_id = ?", v.ProjectId).One()
+	platformMap := make(map[string]model.InfoThirdPlatform)
+	platformInfo := []*model.InfoThirdPlatform{}
+	if len(taskList) != 0 {
+		err := g.Model(dao.InfoThirdPlatform.Table).Scan(&platformInfo)
 		if err != nil {
-			return &TalentHttpResult{Code: -1, Msg: "Get project info failed"}
+			return &TalentHttpResult{Code: -1, Msg: "Get platform failed"}
 		}
-		product, err := g.Model(dao.YounggeeProduct.Table).One("product_id = ?", projectInfo[dao.ProjectInfo.Columns.ProductId])
-		if err != nil {
-			return &TalentHttpResult{Code: -1, Msg: "Get product mainphoto failed"}
+
+		for i, _ := range platformInfo {
+			platformMap[strconv.Itoa(platformInfo[i].PlatformId)] = *platformInfo[i]
 		}
-		strategy := model.RecruitStrategy{}
-		err = g.Model(dao.RecruitStrategy.Table).Where("project_id = ? and strategy_id = ?", v.ProjectId, v.StrategyId).Scan(&strategy)
+	}
+
+	for _, v := range taskList {
+		projectInfo, err := g.Model(dao.ProjectInfo.Table).Where("project_id = ?", v.ProjectId).One()
 		if err != nil {
-			return &TalentHttpResult{Code: -1, Msg: "Get RecruitStrategy failed"}
+			return &TalentHttpResult{Code: -1, Msg: "Get fullproject info failed"}
 		}
+		// product, err := g.Model(dao.YounggeeProduct.Table).One("product_id = ?", projectInfo[dao.ProjectInfo.Columns.ProductId])
+		// if err != nil {
+		// 	return &TalentHttpResult{Code: -1, Msg: "Get product mainphoto failed"}
+		// }
+		// strategy := model.RecruitStrategy{}
+		// err = g.Model(dao.RecruitStrategy.Table).Where("project_id = ? and strategy_id = ?", v.ProjectId, v.StrategyId).Scan(&strategy)
+		// if err != nil {
+		// 	return &TalentHttpResult{Code: -1, Msg: "Get RecruitStrategy failed"}
+		// }
 
 		taskInfoBrief := &youngee_talent_model.WithdrawTaskInfo{
 			TaskId:          v.TaskId,
 			ProjectName:     projectInfo[dao.ProjectInfo.Columns.ProjectName].String(),
-			ProductPrice:    product[dao.Product.Columns.ProductPrice].Int(),
-			RecruitStrategy: &strategy,
+			ProductPhoto:    projectInfo[dao.ProjectInfo.Columns.ProductPhotoSnap].String(),
+			PlatformIconUrl: platformMap[projectInfo[dao.ProjectInfo.Columns.ProjectPlatform].String()].PlatformIcon,
+			PlatformName:    platformMap[projectInfo[dao.ProjectInfo.Columns.ProjectPlatform].String()].PlatformName,
 			TaskReward:      v.TaskReward,
 			SettleAmount:    v.SettleAmount,
 			CompleteDate:    v.CompleteDate,
@@ -80,23 +95,18 @@ func Withdraw(r *ghttp.Request) *TalentHttpResult {
 	if err != nil {
 		return &TalentHttpResult{Code: -2, Msg: err.Error()}
 	}
-	taskIdListStr := strings.Split(DataInfoReq.TaskIdList, ",")
+	incomeIdList := strings.Split(DataInfoReq.IncomeIdList, ",")
 	// taskIdListInt := utils.TypeTran.String2Int(taskIdListStr)
 
 	// 检验是否taskIdList中所有task均处于可提现状态,且talent_id是否正确
-	var taskList []model.YoungeeTaskInfo
-	err = g.Model(dao.YoungeeTaskInfo.Table).Where("talent_id = ?", tid).And("task_id IN (?)", taskIdListStr).Scan(&taskList)
+	var incomeList []model.YounggeeTalentIncome
+	err = g.Model(dao.YounggeeTalentIncome.Table).Where("talent_id = ? and withdraw_status = 1", tid).And("task_id IN (?)", incomeIdList).Scan(&incomeList)
 	if err != nil {
 		return &TalentHttpResult{Code: -3, Msg: "Get task list failed"}
 	}
-	if len(taskIdListStr) != len(taskList) {
+	if len(incomeIdList) != len(incomeList) {
 		return &TalentHttpResult{Code: -4, Msg: "Task TalentID Error"}
 	}
-	for _, v := range taskList {
-		if v.WithdrawStatus != 2 {
-			return &TalentHttpResult{Code: -4, Msg: "Task Withdraw Status Error"}
-		}
-	}
 
 	var talentBank model.YounggeeTalentBank
 	err = g.Model(dao.YounggeeTalentBank.Table).Where("talent_id = ?", tid).Scan(&talentBank)
@@ -120,7 +130,7 @@ func Withdraw(r *ghttp.Request) *TalentHttpResult {
 			TalentId:       tid,
 			WithdrawAmount: float64(DataInfoReq.TotalAmount),
 			AmountPayable:  float64(DataInfoReq.RealAmount),
-			TaskIdList:     DataInfoReq.TaskIdList,
+			IncomeIdList:   DataInfoReq.IncomeIdList,
 			ReceiveInfo:    string(bankJsons),
 			BankType:       2,
 			Status:         1,
@@ -131,8 +141,8 @@ func Withdraw(r *ghttp.Request) *TalentHttpResult {
 			return err1
 		}
 
-		// 更新task表中提现状态
-		_, err1 = tx.Ctx(ctx).Model(dao.YoungeeTaskInfo.Table).Where("task_id IN (?)", taskIdListStr).Update(g.Map{"withdraw_status": 3, "withdraw_date": gtime.Now()})
+		// 更新income表中提现状态
+		_, err1 = tx.Ctx(ctx).Model(dao.YounggeeTalentIncome.Table).Where("task_id IN (?)", incomeIdList).Update(g.Map{"withdraw_status": 2, "withdraw_at": gtime.Now()})
 		if err1 != nil {
 			fmt.Printf("[Withdraw Transaction] Error:%+v\n", err1)
 			return err1
@@ -149,34 +159,36 @@ func Withdraw(r *ghttp.Request) *TalentHttpResult {
 			fmt.Printf("[Withdraw Transaction] Error:%+v\n", err1)
 			return err1
 		}
-		for _, taskId := range taskIdListStr {
-			taskInfo := model.YoungeeTaskInfo{}
-			err1 = tx.Ctx(ctx).Model(dao.YoungeeTaskInfo.Table).Where("task_id = ?", taskId).Scan(&taskInfo)
-			if err1 != nil {
-				fmt.Printf("[Withdraw Transaction] Error:%+v\n", err1)
-				return err1
-			}
-			projectInfo := model.ProjectInfo{}
-			err1 = tx.Ctx(ctx).Model(model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectId).Scan(&projectInfo)
-			if err1 != nil {
-				fmt.Printf("[Withdraw Transaction] Error:%+v\n", err1)
-				return err1
-			}
-			messageInfo := model.YounggeeMessageInfo{
-				MessageId:   12,
-				MessageType: 2,
-				CreatedAt:   gtime.Now(),
-				TalentId:    taskId,
-				ProjectName: projectInfo.ProjectName,
-				IsReaded:    0,
-				IsDeleted:   0,
-			}
-			_, err = tx.Ctx(ctx).Model(dao.YounggeeMessageInfo.Table).Data(&messageInfo).Insert()
-			if err != nil {
-				fmt.Printf("[Withdraw Transaction] Error:%+v\n", err)
-				return err
-			}
-		}
+
+		// // 达人消息
+		// for _, taskId := range taskIdListStr {
+		// 	taskInfo := model.YoungeeTaskInfo{}
+		// 	err1 = tx.Ctx(ctx).Model(dao.YoungeeTaskInfo.Table).Where("task_id = ?", taskId).Scan(&taskInfo)
+		// 	if err1 != nil {
+		// 		fmt.Printf("[Withdraw Transaction] Error:%+v\n", err1)
+		// 		return err1
+		// 	}
+		// 	projectInfo := model.ProjectInfo{}
+		// 	err1 = tx.Ctx(ctx).Model(model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectId).Scan(&projectInfo)
+		// 	if err1 != nil {
+		// 		fmt.Printf("[Withdraw Transaction] Error:%+v\n", err1)
+		// 		return err1
+		// 	}
+		// 	messageInfo := model.YounggeeMessageInfo{
+		// 		MessageId:   12,
+		// 		MessageType: 2,
+		// 		CreatedAt:   gtime.Now(),
+		// 		TalentId:    taskId,
+		// 		ProjectName: projectInfo.ProjectName,
+		// 		IsReaded:    0,
+		// 		IsDeleted:   0,
+		// 	}
+		// 	_, err = tx.Ctx(ctx).Model(dao.YounggeeMessageInfo.Table).Data(&messageInfo).Insert()
+		// 	if err != nil {
+		// 		fmt.Printf("[Withdraw Transaction] Error:%+v\n", err)
+		// 		return err
+		// 	}
+		// }
 		return nil
 	})
 	if err != nil {

+ 79 - 42
app/service/youngee_talent_service/task_info.go → app/service/youngee_task_service/task_info.go

@@ -1,8 +1,9 @@
-package youngee_talent_service
+package youngee_task_service
 
 import (
 	"context"
 	"fmt"
+	"strconv"
 	"youngmini_server/app/dao"
 	"youngmini_server/app/model"
 	"youngmini_server/app/model/youngee_talent_model"
@@ -167,6 +168,7 @@ func SignUpTask(r *ghttp.Request) *TalentHttpResult {
 			CompleteStatus:         1,
 			CurDefaultType:         0,
 			WithdrawStatus:         1,
+			SettleStatus:           1,
 		}
 	} else {
 		// 专项任务
@@ -255,16 +257,25 @@ func GetTaskBriefList(r *ghttp.Request) *TalentHttpResult {
 		return &TalentHttpResult{Code: -1, Msg: "Get task list failed"}
 	}
 
+	platformMap := make(map[string]model.InfoThirdPlatform)
+	platformInfo := []*model.InfoThirdPlatform{}
+	if len(taskList) != 0 {
+		err := g.Model(dao.InfoThirdPlatform.Table).Scan(&platformInfo)
+		if err != nil {
+			return &TalentHttpResult{Code: -1, Msg: "Get platform failed"}
+		}
+
+		for i, _ := range platformInfo {
+			platformMap[strconv.Itoa(platformInfo[i].PlatformId)] = *platformInfo[i]
+		}
+	}
+
 	// 为每个任务根据项目id查询项目名称和主图
 	taskBriefList := youngee_talent_model.TaskInfoBriefList{}
 	for _, v := range taskList {
 		projectInfo, err := g.Model(dao.ProjectInfo.Table).Where("project_id = ?", v.ProjectId).One()
 		if err != nil {
-			return &TalentHttpResult{Code: -1, Msg: "Get project info failed"}
-		}
-		platform, err := g.Model(dao.InfoThirdPlatform.Table).One("platform_id = ?", projectInfo[dao.ProjectInfo.Columns.ProjectPlatform])
-		if err != nil {
-			return &TalentHttpResult{Code: -1, Msg: "Get platform failed"}
+			return &TalentHttpResult{Code: -1, Msg: "Get fullproject info failed"}
 		}
 		account, err := g.Model(dao.YoungeePlatformAccountInfo.Table).One("platform_id = ? and talent_id = ?", projectInfo[dao.ProjectInfo.Columns.ProjectPlatform], v.TalentId)
 		if err != nil {
@@ -272,8 +283,8 @@ func GetTaskBriefList(r *ghttp.Request) *TalentHttpResult {
 		}
 		taskInfoBrief := &youngee_talent_model.TaskInfoBrief{
 			TaskId:           v.TaskId,
-			PlatformIconUrl:  platform[dao.InfoThirdPlatform.Columns.PlatformIcon].String(),
-			PlatformName:     platform[dao.InfoThirdPlatform.Columns.PlatformName].String(),
+			PlatformIconUrl:  platformMap[projectInfo[dao.ProjectInfo.Columns.ProjectPlatform].String()].PlatformIcon,
+			PlatformName:     platformMap[projectInfo[dao.ProjectInfo.Columns.ProjectPlatform].String()].PlatformName,
 			PlatformNickName: account[dao.YoungeePlatformAccountInfo.Columns.PlatformNickname].String(),
 			ProjectName:      projectInfo[dao.ProjectInfo.Columns.ProjectName].String(),
 			ProductPhotoSnap: projectInfo[dao.ProjectInfo.Columns.ProductPhotoSnap].String(),
@@ -283,6 +294,10 @@ func GetTaskBriefList(r *ghttp.Request) *TalentHttpResult {
 			DataStatus:       v.DataStatus,
 			ScriptStatus:     v.ScriptStatus,
 			SketchStatus:     v.SketchStatus,
+			TaskReward:       v.TaskReward,
+			BreakRate:        v.ScriptBreakRate + v.SketchBreakRate + v.LinkBreakRate + v.DataBreakRate,
+			CurBreakAt:       v.CurBreakAt,
+			FeeForm:          v.FeeForm,
 		}
 		taskBriefList.AllTaskInfoList = append(taskBriefList.AllTaskInfoList, taskInfoBrief)
 
@@ -309,40 +324,54 @@ func GetExeTaskBriefList(r *ghttp.Request) *TalentHttpResult {
 	if taskStageKey == 0 {
 		return &TalentHttpResult{Code: -2, Msg: "parse param error"}
 	}
-	taskStage := taskStageList[taskStageKey]
+	taskStage := taskStageList[taskStageKey+1]
 
 	// 获取任务列表
 	var taskList []*model.YoungeeTaskInfo
-	err = g.Model(dao.YoungeeTaskInfo.Table).Where("talent_id = ?", tid).And("task_stage = ?", taskStage).Scan(&taskList)
+	whereCondition := g.Map{
+		dao.YoungeeTaskInfo.Columns.TalentId:  tid,
+		dao.YoungeeTaskInfo.Columns.TaskStage: taskStage,
+	}
+	err = g.Model(dao.YoungeeTaskInfo.Table).Where(whereCondition).Scan(&taskList)
 	if err != nil {
 		return &TalentHttpResult{Code: -1, Msg: "Get task list failed"}
 	}
-	// // 获取任务列表
-	// var taskList []*model.YoungeeTaskInfo
-	// err = g.Model(dao.YoungeeTaskInfo.Table).Where("talent_id = ?", tid).And("task_stage IN(?)", g.Slice{7, 9, 11, 13}).Scan(&taskList)
-	// if err != nil {
-	// 	return &TalentHttpResult{Code: -1, Msg: "Get task list failed"}
-	// }
+
+	platformMap := make(map[string]model.InfoThirdPlatform)
+	var platformInfo []*model.InfoThirdPlatform
+	if len(taskList) != 0 {
+		err := g.Model(dao.InfoThirdPlatform.Table).Scan(&platformInfo)
+		if err != nil {
+			return &TalentHttpResult{Code: -1, Msg: "Get platform failed"}
+		}
+
+		for i, _ := range platformInfo {
+			platformMap[strconv.Itoa(platformInfo[i].PlatformId)] = *platformInfo[i]
+		}
+	}
 
 	// 为每个任务根据项目id查询项目名称和主图
-	taskBriefList := youngee_talent_model.EXETaskInfoBriefList{}
+	var taskBriefList []*youngee_talent_model.TaskInfoBrief
 	for _, v := range taskList {
-		projectInfo, err := g.Model(dao.ProjectInfo.Table).Where("project_id = ?", v.ProjectId).One()
-		if err != nil {
-			return &TalentHttpResult{Code: -1, Msg: "Get project info failed"}
+		whereCondition = g.Map{
+			dao.ProjectInfo.Columns.ProjectId: v.ProjectId,
 		}
-		platform, err := g.Model(dao.InfoThirdPlatform.Table).One("platform_id = ?", projectInfo[dao.ProjectInfo.Columns.ProjectPlatform])
+		projectInfo, err := g.Model(dao.ProjectInfo.Table).Where(whereCondition).One()
 		if err != nil {
-			return &TalentHttpResult{Code: -1, Msg: "Get platform failed"}
+			return &TalentHttpResult{Code: -1, Msg: "Get fullproject info failed"}
 		}
-		account, err := g.Model(dao.YoungeePlatformAccountInfo.Table).One("platform_id = ? and talent_id = ?", projectInfo[dao.ProjectInfo.Columns.ProjectPlatform], v.TalentId)
+		whereCondition = g.Map{
+			dao.YoungeePlatformAccountInfo.Columns.PlatformId: projectInfo[dao.ProjectInfo.Columns.ProjectPlatform],
+			dao.YoungeePlatformAccountInfo.Columns.TalentId:   v.TalentId,
+		}
+		account, err := g.Model(dao.YoungeePlatformAccountInfo.Table).Where(whereCondition).One()
 		if err != nil {
 			return &TalentHttpResult{Code: -1, Msg: "Get account info failed"}
 		}
 		taskInfoBrief := &youngee_talent_model.TaskInfoBrief{
 			TaskId:           v.TaskId,
-			PlatformIconUrl:  platform[dao.InfoThirdPlatform.Columns.PlatformIcon].String(),
-			PlatformName:     platform[dao.InfoThirdPlatform.Columns.PlatformName].String(),
+			PlatformIconUrl:  platformMap[projectInfo[dao.ProjectInfo.Columns.ProjectPlatform].String()].PlatformIcon,
+			PlatformName:     platformMap[projectInfo[dao.ProjectInfo.Columns.ProjectPlatform].String()].PlatformName,
 			PlatformNickName: account[dao.YoungeePlatformAccountInfo.Columns.PlatformNickname].String(),
 			ProjectName:      projectInfo[dao.ProjectInfo.Columns.ProjectName].String(),
 			ProductPhotoSnap: projectInfo[dao.ProjectInfo.Columns.ProductPhotoSnap].String(),
@@ -352,17 +381,12 @@ func GetExeTaskBriefList(r *ghttp.Request) *TalentHttpResult {
 			DataStatus:       v.DataStatus,
 			ScriptStatus:     v.ScriptStatus,
 			SketchStatus:     v.SketchStatus,
+			TaskReward:       v.TaskReward,
+			BreakRate:        v.ScriptBreakRate + v.SketchBreakRate + v.LinkBreakRate + v.DataBreakRate,
+			CurBreakAt:       v.CurBreakAt,
+			FeeForm:          v.FeeForm,
 		}
-		taskBriefList.List1 = append(taskBriefList.List1, taskInfoBrief)
-		// if v.TaskStage == 7 {
-		// 	taskBriefList.List1 = append(taskBriefList.List1, taskInfoBrief)
-		// } else if v.TaskStage == 9 {
-		// 	taskBriefList.List2 = append(taskBriefList.List2, taskInfoBrief)
-		// } else if v.TaskStage == 11 {
-		// 	taskBriefList.List3 = append(taskBriefList.List3, taskInfoBrief)
-		// } else if v.TaskStage == 13 {
-		// 	taskBriefList.List4 = append(taskBriefList.List4, taskInfoBrief)
-		// }
+		taskBriefList = append(taskBriefList, taskInfoBrief)
 	}
 
 	return &TalentHttpResult{Code: 0, Msg: "success", Data: taskBriefList}
@@ -442,6 +466,17 @@ func GetTaskDetail(r *ghttp.Request) *TalentHttpResult {
 	if err != nil {
 		return &TalentHttpResult{Code: -3, Msg: "data query failed"}
 	}
+
+	var withdrawStatus = 1
+	var taskIncome *model.YounggeeTalentIncome
+	err = g.Model(dao.YounggeeTalentIncome.Table).Where("task_id = ? and income_type = 1", taskId).Scan(&taskIncome)
+	if err != nil {
+		return &TalentHttpResult{Code: -3, Msg: "Get task income detail failed."}
+	}
+	if taskIncome != nil {
+		withdrawStatus = taskIncome.WithdrawStatus + 1
+	}
+
 	taskDetail := &youngee_talent_model.TaskDetail{}
 	if projectDetail.ProjectType == 1 {
 		var strategy *model.RecruitStrategy
@@ -451,16 +486,18 @@ func GetTaskDetail(r *ghttp.Request) *TalentHttpResult {
 		}
 
 		taskDetail = &youngee_talent_model.TaskDetail{
-			TaskInfo:      task,
-			ProjectDetail: projectDetail,
-			ProductPhoto:  productPhoto,
-			Strategy:      strategy,
+			TaskInfo:       task,
+			ProjectDetail:  projectDetail,
+			ProductPhoto:   productPhoto,
+			Strategy:       strategy,
+			WithdrawStatus: withdrawStatus,
 		}
 	} else {
 		taskDetail = &youngee_talent_model.TaskDetail{
-			TaskInfo:      task,
-			ProjectDetail: projectDetail,
-			ProductPhoto:  productPhoto,
+			TaskInfo:       task,
+			ProjectDetail:  projectDetail,
+			ProductPhoto:   productPhoto,
+			WithdrawStatus: withdrawStatus,
 		}
 	}
 

+ 2 - 2
app/service/youngee_talent_service/task_link.go → app/service/youngee_task_service/task_link.go

@@ -1,4 +1,4 @@
-package youngee_talent_service
+package youngee_task_service
 
 import (
 	"youngmini_server/app/dao"
@@ -113,7 +113,7 @@ func SubmitTaskLink(r *ghttp.Request) *TalentHttpResult {
 			return &TalentHttpResult{Code: -5, Msg: "YounggeeTaskLog insert failed"}
 		}
 		projectInfo := model.ProjectInfo{}
-		err1 := g.DB().Model(model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectId).Scan(&projectInfo)
+		err1 = g.DB().Model(model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectId).Scan(&projectInfo)
 		if err1 != nil {
 			return &TalentHttpResult{Code: -8, Msg: "ProjectInfo find failed"}
 		}

+ 1 - 1
app/service/youngee_talent_service/task_logistics.go → app/service/youngee_task_service/task_logistics.go

@@ -1,4 +1,4 @@
-package youngee_talent_service
+package youngee_task_service
 
 import (
 	"youngmini_server/app/dao"

+ 1 - 1
app/service/youngee_talent_service/task_script.go → app/service/youngee_task_service/task_script.go

@@ -1,4 +1,4 @@
-package youngee_talent_service
+package youngee_task_service
 
 import (
 	"youngmini_server/app/dao"

+ 1 - 1
app/service/youngee_talent_service/task_sketch.go → app/service/youngee_task_service/task_sketch.go

@@ -1,4 +1,4 @@
-package youngee_talent_service
+package youngee_task_service
 
 import (
 	"strings"

+ 30 - 0
app/system/assignment/assignment_api.go

@@ -0,0 +1,30 @@
+package assignment
+
+import (
+	"github.com/gogf/gf/net/ghttp"
+	"youngmini_server/library/response"
+)
+
+var Assignment = assignmentApi{}
+
+type assignmentApi struct{}
+
+func (*assignmentApi) Add(r *ghttp.Request) {
+	var req *AddAssignmentReq
+	if err := r.Parse(&req); err != nil {
+		response.ParamErr(r, err)
+	}
+	res, err := service.Add(r, req)
+	if err != nil {
+		response.Code(r, err)
+	}
+	response.SuccessWithData(r, res)
+}
+
+func (*assignmentApi) List(r *ghttp.Request) {
+	if res, err := service.List(r); err != nil {
+		response.Code(r, err)
+	} else {
+		response.SuccessWithData(r, res)
+	}
+}

+ 35 - 0
app/system/assignment/assignment_model.go

@@ -0,0 +1,35 @@
+package assignment
+
+import "github.com/gogf/gf/os/gtime"
+
+type AddAssignmentReq struct {
+	TaskId        string      `json:"task_id"`         // 任务id
+	LinkUrl       string      `json:"link_url"`        // 作业连接
+	PhotoUrl      string      `json:"photo_url"`       // 作业截图
+	ReviseOpinion string      `json:"revise_opinion"`  // 审核意见
+	IsSubmit      int         `json:"is_submit" d:"1"` // 是否提交
+	IsReview      int         `json:"is_review" d:"0"` // 是否审核
+	IsOk          int         `json:"is_ok" d:"0"`     // 是否合格
+	CreateAt      *gtime.Time `json:"create_at"`       // 创建时间
+	SubmitAt      *gtime.Time `json:"submit_at"`       // 提交时间
+	AgreeAt       *gtime.Time `json:"agree_at" d:""`   // 同意时间
+	RejectAt      *gtime.Time `json:"reject_at" d:""`  // 驳回时间
+}
+
+type ListAssignmentRes struct {
+	AssignmentList []*ListAssignmentSql `json:"assignment_list"`
+}
+
+type ListAssignmentSql struct {
+	TaskId        string      `json:"task_id"`        // 任务id
+	LinkUrl       string      `json:"link_url"`       // 作业连接
+	PhotoUrl      string      `json:"photo_url"`      // 作业截图
+	ReviseOpinion string      `json:"revise_opinion"` // 审核意见
+	IsSubmit      int         `json:"is_submit"`      // 是否提交
+	IsReview      int         `json:"is_review"`      // 是否审核
+	IsOk          int         `json:"is_ok"`          // 是否合格
+	CreateAt      *gtime.Time `json:"create_at"`      // 创建时间
+	SubmitAt      *gtime.Time `json:"submit_at"`      // 提交时间
+	AgreeAt       *gtime.Time `json:"agree_at"`       // 同意时间
+	RejectAt      *gtime.Time `json:"reject_at"`      // 驳回时间
+}

+ 84 - 0
app/system/assignment/assignment_service.go

@@ -0,0 +1,84 @@
+package assignment
+
+import (
+	"database/sql"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/net/ghttp"
+	"github.com/gogf/gf/os/gtime"
+	"youngmini_server/app/dao"
+	"youngmini_server/app/system/message"
+	"youngmini_server/app/system/sectask"
+	"youngmini_server/app/system/sectasklog"
+	"youngmini_server/app/system/selection"
+	"youngmini_server/app/utils"
+)
+
+var service = new(assignmentService)
+
+type assignmentService struct {
+}
+
+func (s *assignmentService) Add(r *ghttp.Request, req *AddAssignmentReq) (res sql.Result, err error) {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return nil, err
+	}
+	res, err = dao.YounggeeAssignmentInfo.Ctx(r.GetCtx()).Insert(req)
+	if err != nil {
+		return nil, err
+	}
+
+	// 2. 更新任务阶段
+	updateStageReq := sectask.UpdateStageReq{
+		TaskId:           req.TaskId,
+		TaskStage:        9,
+		AssignmentStatus: 2,
+	}
+	err = sectask.UpdateStageAndStatus(r.Context(), &updateStageReq)
+	if err != nil {
+		return nil, err
+	}
+	// 3. 插入日志
+	addSecTaskLogReq := sectasklog.AddSecTaskLogReq{
+		TaskId:  req.TaskId,
+		Content: "上传作业",
+		LogAt:   gtime.Now(),
+	}
+	err = sectasklog.Add(r.Context(), addSecTaskLogReq)
+	if err != nil {
+		return nil, err
+	}
+	//4. 插入消息
+	// 查询选品项目信息
+	selectionInfo, err := selection.GetDetailByTaskId(r.Context(), req.TaskId)
+	if err != nil {
+		return nil, err
+	}
+	addMessageReq := message.AddMessageReq{
+		MessageId:   29,
+		MessageType: 2,
+		CreatedAt:   gtime.Now(),
+		TalentId:    tid,
+		ProjectName: selectionInfo.SelectionName,
+		IsReaded:    0,
+		IsDeleted:   0,
+	}
+	// 插入消息
+	err = message.Add(r.Context(), addMessageReq)
+	if err != nil {
+		return nil, err
+	}
+	return
+}
+
+func (s *assignmentService) List(r *ghttp.Request) (res ListAssignmentRes, err error) {
+	sortCondition := string(dao.YounggeeAssignmentInfo.Columns.SubmitAt + " ASC")
+	whereCondition := g.Map{
+		dao.YounggeeAssignmentInfo.Columns.IsReview: 1,
+	}
+	err = dao.YounggeeAssignmentInfo.Ctx(r.GetCtx()).Where(whereCondition).Order(sortCondition).Scan(&res.AssignmentList)
+	if err != nil {
+		return
+	}
+	return
+}

+ 13 - 0
app/system/message/message_model.go

@@ -0,0 +1,13 @@
+package message
+
+import "github.com/gogf/gf/os/gtime"
+
+type AddMessageReq struct {
+	MessageId   int         `json:"message_id"`   // 消息内容id,对应info_message
+	MessageType int         `json:"message_type"` // 消息类型,1-4分别表示成功、通知、错误、警告
+	TalentId    string      `json:"talent_id"`    // 达人id
+	ProjectName string      `json:"project_name"` // 项目名称
+	CreatedAt   *gtime.Time `json:"created_at"`   // 消息创建时间
+	IsReaded    int         `json:"is_readed"`    // 是否已读,1表示未读,2表示已读
+	IsDeleted   int         `json:"is_deleted"`   // 是否删除,1表示未删,2表示已删
+}

+ 19 - 0
app/system/message/message_service.go

@@ -0,0 +1,19 @@
+package message
+
+import (
+	"context"
+	"youngmini_server/app/dao"
+)
+
+var service = new(secTaskLogService)
+
+type secTaskLogService struct {
+}
+
+func Add(ctx context.Context, req AddMessageReq) (err error) {
+	_, err = dao.YounggeeMessageInfo.Ctx(ctx).Insert(req)
+	if err != nil {
+		return
+	}
+	return
+}

+ 26 - 0
app/system/sectask/sectask_api.go

@@ -0,0 +1,26 @@
+package sectask
+
+import (
+	"github.com/gogf/gf/net/ghttp"
+	"strconv"
+	"youngmini_server/app/utils"
+	"youngmini_server/library/response"
+)
+
+var SecTask = secTaskApi{}
+
+type secTaskApi struct{}
+
+func (*secTaskApi) List(r *ghttp.Request) {
+	var req ListSecTaskReq
+	req.TaskStage, _ = strconv.Atoi(r.Get("task_stage").(string))
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		response.Code(r, err)
+	}
+	if res, err := service.List(r.Context(), &req, tid); err != nil {
+		response.Code(r, err)
+	} else {
+		response.SuccessWithData(r, res)
+	}
+}

+ 55 - 0
app/system/sectask/sectask_model.go

@@ -0,0 +1,55 @@
+package sectask
+
+import "github.com/gogf/gf/os/gtime"
+
+type ListSecTaskReq struct {
+	TaskStage int `json:"task_stage"`
+}
+
+type ListSecTaskRes struct {
+	Count   int               `json:"count"`
+	SecTask []*ListSecTaskSql `json:"sec_task"`
+}
+
+type ListSecTaskSql struct {
+	TaskId                 string      `json:"task_id"`                   // 选品任务id
+	SelectionId            string      `json:"selection_id"`              // 选品id
+	TalentId               string      `json:"talent_id"`                 // 达人id
+	AccountId              int         `json:"account_id"`                // 账号id
+	TalentPlatformInfoSnap string      `json:"talent_platform_info_snap"` // 达人平台信息快照
+	TalentPersonalInfoSnap string      `json:"talent_personal_info_snap"` // 达人个人信息快照
+	TalentPostAddrSnap     string      `json:"talent_post_addr_snap"`     // 收货地址快照
+	TaskReward             float64     `json:"task_reward"`               // 达人赏金
+	TalentPayment          float64     `json:"talent_payment"`            // 达人垫付金额
+	IsPayPayment           int         `json:"is_pay_payment"`            // 企业是否返样品钱
+	IsPayReward            int         `json:"is_pay_reward"`             // 企业是否结算悬赏
+	TaskMode               int         `json:"task_mode"`                 // 任务形式,1、2分别表示纯佣带货、悬赏任务
+	SampleMode             int         `json:"sample_mode"`               // 领样形式,1-3分别表示免费领样、垫付买样、不提供样品
+	TaskStatus             int         `json:"task_status"`               // 任务状态 1待选 2已选 3落选
+	TaskStage              int         `json:"task_stage"`                // 任务阶段,详情见info_sec_task_stage表
+	CreateDate             *gtime.Time `json:"create_date"`               // 创建时间
+	SelectDate             *gtime.Time `json:"select_date"`               // 反选时间
+	DeliveryDate           *gtime.Time `json:"delivery_date"`             // 发货时间
+	CompleteDate           *gtime.Time `json:"complete_date"`             // 结束时间
+	WithdrawDate           *gtime.Time `json:"withdraw_date"`             // 提现时间
+	CompleteStatus         int         `json:"complete_status"`           // 结束方式 1未结束 2正常结束 3反选失败
+	LogisticsStatus        int         `json:"logistics_status"`          // 发货状态 1 待发货 2已发货 3 已签收
+	AssignmentStatus       uint        `json:"assignment_status"`         // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	UpdateAt               *gtime.Time `json:"update_at"`                 // 更新时间
+	WithdrawStatus         int         `json:"withdraw_status"`           // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
+	LeadTeamId             string      `json:"lead_team_id"`              // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
+	TeamId                 string      `json:"team_id"`                   // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
+	TeamIncome             float64     `json:"team_income"`               // young之团团长现金收益
+	TeamPoint              int         `json:"team_point"`                // young之团团长积分收益
+	PlatformIconUrl        string      `json:"platform_icon_url"`
+	PlatformName           string      `json:"platform_name"`
+	PlatformNickName       string      `json:"platform_nick_name"`
+	SelectionName          string      `json:"selection_name"`
+	ProductPhotoSnap       string      `json:"product_photo_snap"`
+}
+
+type UpdateStageReq struct {
+	TaskId           string `json:"task_id"`           // 选品任务id
+	TaskStage        int    `json:"task_stage"`        // 任务阶段,详情见info_sec_task_stage表
+	AssignmentStatus uint   `json:"assignment_status"` // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+}

+ 104 - 0
app/system/sectask/sectask_service.go

@@ -0,0 +1,104 @@
+package sectask
+
+import (
+	"context"
+	"fmt"
+	"github.com/gogf/gf/frame/g"
+	"strconv"
+	"youngmini_server/app/dao"
+	"youngmini_server/app/model"
+)
+
+var service = new(secTaskService)
+
+type secTaskService struct {
+}
+
+func (s *secTaskService) List(ctx context.Context, listSecTaskReq *ListSecTaskReq, tid string) (res ListSecTaskRes, err error) {
+	var taskStageList = g.Slice{}
+	switch listSecTaskReq.TaskStage {
+	case 1:
+		taskStageList = g.Slice{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
+		break
+	case 2:
+		taskStageList = g.Slice{2, 3}
+		break
+	case 3:
+		taskStageList = g.Slice{6, 7, 8}
+		break
+	case 4:
+		taskStageList = g.Slice{5, 9, 10}
+		break
+	}
+	whereCondition := g.Map{
+		dao.YounggeeSecTaskInfo.Columns.TaskStage: taskStageList,
+		dao.YounggeeSecTaskInfo.Columns.TalentId:  tid,
+	}
+	err = dao.YounggeeSecTaskInfo.Ctx(ctx).Where(whereCondition).Scan(&res.SecTask)
+	if err != nil {
+		return
+	}
+	res.Count = len(res.SecTask)
+	platformMap := make(map[string]model.InfoThirdPlatform)
+	platformInfo := []*model.InfoThirdPlatform{}
+	if res.Count != 0 {
+		err = g.Model(dao.InfoThirdPlatform.Table).Scan(&platformInfo)
+		if err != nil {
+			fmt.Println(err)
+			return
+		}
+
+		for i, _ := range platformInfo {
+			platformMap[strconv.Itoa(platformInfo[i].PlatformId)] = *platformInfo[i]
+		}
+
+		// 为每个任务根据项目id查询项目名称和主图
+		for index, v := range res.SecTask {
+			whereCondition1 := g.Map{
+				dao.YounggeeSelectionInfo.Columns.SelectionId: v.SelectionId,
+			}
+			var selection *model.YounggeeSelectionInfo
+			err = g.Model(dao.YounggeeSelectionInfo.Table).Where(whereCondition1).Scan(&selection)
+			if err != nil || selection == nil {
+				if err == nil {
+					fmt.Println("没查到选品")
+				} else {
+					return
+				}
+			}
+			whereCondition1 = g.Map{
+				dao.YoungeePlatformAccountInfo.Columns.PlatformId: selection.Platform,
+				dao.YoungeePlatformAccountInfo.Columns.TalentId:   v.TalentId,
+			}
+			var account *model.YoungeePlatformAccountInfo
+			err = g.Model(dao.YoungeePlatformAccountInfo.Table).Where(whereCondition1).Scan(&account)
+			if err != nil {
+				fmt.Println(err)
+				return
+			}
+			res.SecTask[index].PlatformIconUrl = platformMap[strconv.Itoa(selection.Platform)].PlatformIcon
+			res.SecTask[index].PlatformName = platformMap[strconv.Itoa(selection.Platform)].PlatformName
+			res.SecTask[index].PlatformNickName = account.PlatformNickname
+			res.SecTask[index].SelectionName = selection.SelectionName
+			res.SecTask[index].ProductPhotoSnap = selection.ProductPhotoSnap
+			//fmt.Println("--------------res.SecTask[index]: ", res.SecTask[index])
+			fmt.Println("--------------selection: ", selection)
+		}
+	}
+	return
+}
+
+func UpdateStageAndStatus(ctx context.Context, updateStageReq *UpdateStageReq) (err error) {
+	whereCondition := g.Map{
+		dao.YounggeeSecTaskInfo.Columns.TaskId: updateStageReq.TaskId,
+	}
+	dataUpdate := g.Map{
+		dao.YounggeeSecTaskInfo.Columns.TaskStage:        updateStageReq.TaskStage,
+		dao.YounggeeSecTaskInfo.Columns.AssignmentStatus: updateStageReq.AssignmentStatus,
+	}
+	_, err = dao.YounggeeSecTaskInfo.Ctx(ctx).Where(whereCondition).Data(dataUpdate).Update()
+	if err != nil {
+		return
+	}
+	return
+}

+ 9 - 0
app/system/sectasklog/sectasklog_model.go

@@ -0,0 +1,9 @@
+package sectasklog
+
+import "github.com/gogf/gf/os/gtime"
+
+type AddSecTaskLogReq struct {
+	TaskId  string      `json:"task_id"`
+	Content string      `json:"content"`
+	LogAt   *gtime.Time `json:"log_at"`
+}

+ 19 - 0
app/system/sectasklog/sectasklog_service.go

@@ -0,0 +1,19 @@
+package sectasklog
+
+import (
+	"context"
+	"youngmini_server/app/dao"
+)
+
+var service = new(secTaskLogService)
+
+type secTaskLogService struct {
+}
+
+func Add(ctx context.Context, req AddSecTaskLogReq) (err error) {
+	_, err = dao.YounggeeTaskLog.Ctx(ctx).Insert(req)
+	if err != nil {
+		return
+	}
+	return
+}

+ 45 - 0
app/system/selection/selction_model.go

@@ -0,0 +1,45 @@
+package selection
+
+import (
+	"github.com/gogf/gf/os/gtime"
+)
+
+type ListSelectionReq struct {
+	PageIndex   int    `json:"page_index"`
+	CntPerPage  int    `json:"cnt_per_page"`
+	Platform    string `json:"platform"`
+	SecForm     string `json:"sec_form"`
+	TaskForm    string `json:"task_form"`
+	SearchValue string `json:"search_value"`
+}
+
+type ListSelectionRes struct {
+	MaxPage       int                 `json:"max_page"`
+	SelectionList []*ListSelectionSql `json:"selection_list"`
+}
+
+type ListSelectionSql struct {
+	SelectionName    string      `json:"selection_name"`     // 选品项目名称
+	SelectionId      string      `json:"selection_id"`       // 选品项目id
+	ProductId        int         `json:"product_id"`         // 关联商品id
+	ContentType      int         `json:"content_type"`       // 内容形式,1代表图文,2代表视频
+	SelectionStatus  int         `json:"selection_status"`   // 选品项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、失效、执行中、已结案
+	SelectionForm    int         `json:"selection_form"`     // 任务形式,1、2分别表示悬赏任务、纯佣带货
+	Platform         int         `json:"platform"`           // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	SampleForm       int         `json:"sample_form"`        // 领样形式,1、2分别表示免费领样、垫付领样
+	SampleNum        string      `json:"sample_num"`         // 样品数量
+	TaskDdl          *gtime.Time `json:"task_ddl"`           // 招募截止时间
+	Detail           string      `json:"detail"`             // 卖点总结
+	EnterpriseId     string      `json:"enterprise_id"`      // 所属企业id
+	CreatedAt        *gtime.Time `json:"created_at"`         // 创建时间
+	UpdatedAt        *gtime.Time `json:"updated_at"`         // 修改时间
+	FailReason       int         `json:"fail_reason"`        // 失效原因,1、2分别表示逾期未支付、项目存在风险
+	PassAt           *gtime.Time `json:"pass_at"`            // 审核通过时间
+	FinishAt         *gtime.Time `json:"finish_at"`          // 结案时间
+	EstimatedCost    float64     `json:"estimated_cost"`     // 预估成本
+	IsRead           int         `json:"is_read"`            // 是否已读
+	SettlementAmount float64     `json:"settlement_amount"`  // 结算金额
+	ProductSnap      string      `json:"product_snap"`       // 商品信息快照
+	ProductPhotoSnap string      `json:"product_photo_snap"` // 商品图片快照
+	SubmitAt         *gtime.Time `json:"submit_at"`          // 提交审核时间
+}

+ 25 - 0
app/system/selection/selection_api.go

@@ -0,0 +1,25 @@
+package selection
+
+import (
+	"github.com/gogf/gf/net/ghttp"
+	"youngmini_server/library/response"
+)
+
+var Selection = selectionApi{}
+
+type selectionApi struct{}
+
+func (*selectionApi) List(r *ghttp.Request) {
+	var req ListSelectionReq
+	req.PageIndex = r.GetInt("idx")
+	req.CntPerPage = r.GetInt("cnt")
+	req.Platform = r.GetString("platform")
+	req.SearchValue = r.GetString("searchvalue")
+	req.SecForm = r.GetString("secform")
+	req.TaskForm = r.GetString("taskform")
+	if res, err := service.List(r); err != nil {
+		response.Code(r, err)
+	} else {
+		response.SuccessWithData(r, res)
+	}
+}

+ 53 - 0
app/system/selection/selection_service.go

@@ -0,0 +1,53 @@
+package selection
+
+import (
+	"context"
+	"fmt"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/net/ghttp"
+	"youngmini_server/app/dao"
+)
+
+var service = new(selectionService)
+
+type selectionService struct {
+}
+
+func (s *selectionService) List(r *ghttp.Request) (res ListSelectionRes, err error) {
+	err = dao.YounggeeAssignmentInfo.Ctx(r.GetCtx()).Scan(&res.SelectionList)
+	if err != nil {
+		return
+	}
+
+	return
+}
+
+func GetDetailBySelectionId(ctx context.Context, selectionId string) (res ListSelectionSql, err error) {
+	whereCondition := g.Map{
+		dao.YounggeeSelectionInfo.Columns.SelectionId: selectionId,
+	}
+	err = dao.YounggeeSelectionInfo.Ctx(ctx).Where(whereCondition).Scan(&res)
+	if err != nil {
+		return
+	}
+	return
+}
+func GetDetailByTaskId(ctx context.Context, taskId string) (res ListSelectionSql, err error) {
+	var selectionId interface{}
+	whereCondition := g.Map{
+		dao.YounggeeSecTaskInfo.Columns.TaskId: taskId,
+	}
+	selectionId, err = dao.YounggeeSecTaskInfo.Ctx(ctx).Fields(dao.YounggeeSecTaskInfo.Columns.SelectionId).Where(whereCondition).Value()
+	if err != nil {
+		return
+	}
+	whereCondition = g.Map{
+		dao.YounggeeSelectionInfo.Columns.SelectionId: selectionId,
+	}
+	fmt.Println("selectionId: ", selectionId)
+	err = dao.YounggeeSelectionInfo.Ctx(ctx).Where(whereCondition).Scan(&res)
+	if err != nil {
+		return
+	}
+	return
+}

+ 28 - 0
app/system/wxpay/apiclient_key.pem

@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDiS0mOMU85JaH1
+nRsOU57TfKP+3ma7TiEe2jQNHhF1UUW8i1+Hc1NeLe7dh29J5aEa/isu0RG2LHjY
+P73dzPkarAdhmW3ETsbBVazUw7RfhbPawR6EjBArRAojqHLXdSTFeDM6LtmwbWD2
+JEjiBKyTMtsbnap4ubLhR03huPn8V20Hbq3Zg+U8T4XtnK7jrac2SqkuybKheRX8
+OzaefU/nYbxKwyTqKCanAs96ZTFuEceW9Utoa4jb4bqdVVhbc2P5gyyssKfYkfDj
+Pdr2X3vg11qq7bhjQ+xLgUiWwXlqnKY0eHxvx0Zdh5PWdh0oYZtbuHrkPPJaf4zu
+Zkre9VnXAgMBAAECggEASPlaWP5Ru+4E0n29UdtpZm3VPMVff5tsVtSq4GgH3Ts+
+L9UKE1X/Vmmdk9au7recQmYgatKE0ah5t9KmWbZVxmIfZzvhB+MXeRU1zM7nhb5K
+B4srWjcIp8sjMeiKUCy4lO10J5kgHiLHl9iPoEM9m6JUwg0QAipwIvGpjdbm1paH
+esqCyZ2+fyTypO1mkpPOOB6caGwePE0Ppd/U5woPKPS0H5JnBdKPWBh/XYkBigOl
+fMRjJg9BDGPjxI1Rt+F6S359fgfXZJV1m74YVL9HxgfKi+WHdDTtj0094NBqizCg
+goeLZbz6aWYbOBmpFHrK8F2i/pYU658KLCtjjpvnQQKBgQD6JJGRqqF1OLVsjJ+E
++8ts8IdC+OBYY9YHgLw5D2aFUrtJre9Fiktj0hupXPm+01kmc+5OupR3O/L8jhM6
++NTe3fmIzNLk72GeZsiWFrZCN0fKjts421wwyhBrqW/qZN66a1kYA7fvr0ToRjL1
+jLhTqu0a8BGRyaxbqlebo/5FkQKBgQDnl8MYmJoYpJ36WK3Bd1j/9eczDmRXf4RW
+kZjIOeXBN4zHZsvlFtMtcaZAw3Z1KPbM4ncuKwl+pc7oNUfOAU/IOiBEiZR7zSYG
+D8g+UoXfZzv5mFQQBSagfY4Q0bigG1Zt/QPMoN5setiG6BJ+bwN7WfXNjRjyaXtZ
+ovUUniFU5wKBgQDrvu0mcL6MIG7zp7Brf3bf6+w+lRmylBzRo2VBDZ+chTUXooJ/
+cm/M2ubQ/lwtmThLAjWVI0jq+qftl+TNzleo12DmqcsUkfrZc5sVwL/ytfDGGU7I
+TgybusQxA1YDfR9gZ+1msZJ3pSJ3GjnKq93IlK2zlo+oa34yQd8hQzRP0QKBgQDQ
+5TkbNHq6g7HjoJ2KBocGyd2zVeX4bpMGKuouoNq2v86CBh0gFMiDEyItBKIS59JF
+2Hg78qHr1M+e8IBGNzSpnJSCfb6rNM55ZT7vyCvs6QdWCaq5kIvY86dzUFhCQqZh
+K3mD2A8Itn4cobQcyzHOz8RBlmXMMo0Ku0xpPoE+PQKBgEFcy2wvv/saKJ+3t2Cw
+4ckwskhsQ2CizlAlTCNmBzou+IYfcg3VxS7P0EA/ViUXHTOx1pjhS977FLqJxe08
+FU7a3mIzzehJA0VnsZC6lzCqSRxdE4bcEs9Opw+sJS7abJKRU2QeZSJEChqAMUhJ
+3oP15BVjOfW79TL/hp8fRZAt
+-----END PRIVATE KEY-----

+ 25 - 0
app/system/wxpay/wxpay_api.go

@@ -0,0 +1,25 @@
+package wxpay
+
+import (
+	"github.com/gogf/gf/net/ghttp"
+	"youngmini_server/library/response"
+)
+
+var WxPay = wxPayApi{}
+
+type wxPayApi struct{}
+
+func (*wxPayApi) WxPay(r *ghttp.Request) {
+	// 解析参数
+	var req *WxPayRequestData
+	if err := r.Parse(&req); err != nil {
+		response.ParamErr(r, err)
+	}
+	// 调用service层处理
+	res, err := service.WxPayRequest(r, *req)
+	// 返回结果
+	if err != nil {
+		response.Code(r, err)
+	}
+	response.SuccessWithData(r, res)
+}

+ 16 - 0
app/system/wxpay/wxpay_model.go

@@ -0,0 +1,16 @@
+package wxpay
+
+type WxPayRequestData struct {
+	Description string `json:"description"`
+	Amount      int64  `json:"amount"`
+}
+
+type WxPayResponseData struct {
+	PaySign   string `json:"pay_sign"`
+	Package   string `json:"package"`
+	TimeStamp string `json:"time_stamp"`
+	NonceStr  string `json:"nonce_str"`
+}
+
+type WxPayNotifyData struct {
+}

+ 107 - 0
app/system/wxpay/wxpay_service.go

@@ -0,0 +1,107 @@
+package wxpay
+
+import (
+	"context"
+	"crypto/rsa"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/net/ghttp"
+	"github.com/wechatpay-apiv3/wechatpay-go/core"
+	"github.com/wechatpay-apiv3/wechatpay-go/core/option"
+	"github.com/wechatpay-apiv3/wechatpay-go/services/payments/jsapi"
+	wxpayUtils "github.com/wechatpay-apiv3/wechatpay-go/utils"
+	"log"
+	"youngmini_server/app/utils"
+)
+
+var service = new(wxPayService)
+
+type wxPayService struct {
+}
+
+func (s *wxPayService) WxPayRequest(r *ghttp.Request, req WxPayRequestData) (WxPayResponseData, error) {
+
+	openId, err := utils.SessionTalentInfo.GetOpenIdFromSession(r)
+	if err != nil {
+		log.Fatalf("get WxOpenId error:%s", err)
+	}
+	appID := g.Config().GetString("miniapp.appid")
+	mchID := g.Config().GetString("miniapp.mchid")
+	mchCertificateSerialNumber := g.Config().GetString("miniapp.mchCertificateSerialNumber")
+	mchAPIv3Key := g.Config().GetString("miniapp.mchAPIv3Key")
+
+	// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
+	mchPrivateKey, err := wxpayUtils.LoadPrivateKeyWithPath("./apiclient_key.pem")
+	if err != nil {
+		log.Fatalf("load merchant private key error:%s", err)
+	}
+
+	ctx := context.Background()
+	// 使用商户私钥等初始化 client,并使它具有自动定时获取微信支付平台证书的能力
+	opts := []core.ClientOption{
+		option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key),
+	}
+	client, err := core.NewClient(ctx, opts...)
+	if err != nil {
+		log.Fatalf("new wechat pay client err:%s", err)
+	}
+
+	svc := jsapi.JsapiApiService{Client: client}
+	// 得到prepay_id,以及调起支付所需的参数和签名
+	var tradeId = utils.GetUuid.GetRandomString(32)
+	resp, result, err := svc.PrepayWithRequestPayment(ctx,
+		jsapi.PrepayRequest{
+			Appid:       core.String(appID),
+			Mchid:       core.String(mchID),
+			Description: core.String(req.Description),
+			OutTradeNo:  core.String(tradeId),
+			NotifyUrl:   core.String("https://www.weixin.qq.com/wxpay/pay.php"),
+			Amount: &jsapi.Amount{
+				Total: core.Int64(req.Amount),
+			},
+			Payer: &jsapi.Payer{
+				Openid: core.String(openId),
+			},
+		},
+	)
+
+	if err == nil {
+		log.Println(resp)
+		log.Println(result)
+		var packageStr = "prepay_id=" + *resp.PrepayId
+		var parts []string
+		parts = append(parts, appID)
+		parts = append(parts, *resp.TimeStamp)
+		parts = append(parts, tradeId)
+		parts = append(parts, packageStr)
+		sign, err := getSign(parts, mchPrivateKey)
+		if err == nil {
+			var res = WxPayResponseData{
+				Package:   packageStr,
+				TimeStamp: *resp.TimeStamp,
+				NonceStr:  tradeId,
+				PaySign:   sign,
+			}
+			return res, nil
+		} else {
+			log.Println(err)
+		}
+	} else {
+		log.Println(err)
+	}
+	return WxPayResponseData{}, err
+}
+
+func getSign(parts []string, privateKey *rsa.PrivateKey) (string, error) {
+	var str string
+	for i := range parts {
+		str += parts[i] + "\n"
+	}
+	sign, err := wxpayUtils.SignSHA256WithRSA(str, privateKey)
+	if err != nil {
+		log.Println(err)
+		return "", err
+	} else {
+		log.Println(sign)
+		return sign, nil
+	}
+}

+ 24 - 0
app/utils/GetInfoFromSession.go

@@ -36,3 +36,27 @@ func (*sessionTalentInfo) GetTalentIdFromSession(r *ghttp.Request) (string, erro
 	tid := sTid.(string)
 	return tid, nil
 }
+
+func (*sessionTalentInfo) GetOpenIdFromSession(r *ghttp.Request) (string, error) {
+	t := r.GetHeader("Token")
+	if t == "" {
+		return "", errors.New("not found info by token")
+	}
+
+	infoMap := r.Session.Get(t)
+	if infoMap == nil {
+		return "", errors.New("info in session not found")
+	}
+
+	sInfoMap, ok := infoMap.(g.Map)
+	if !ok {
+		return "", errors.New("info in session is not a map")
+	}
+
+	openId := sInfoMap["wxOpenId"]
+	if openId == nil {
+		return "", errors.New("session map not contains key wxOpenId")
+	}
+
+	return openId.(string), nil
+}

+ 20 - 0
app/utils/uuid.go

@@ -19,9 +19,29 @@ func (*getUuid) GetTalentId() string {
 	tid := "2" + str1 + str2
 	return tid
 }
+
 func (*getUuid) GetTaskId(ProjectId string, EnterpriseId string, TalentId string) string {
 	str1 := ProjectId[len(ProjectId)-2:] + EnterpriseId[len(EnterpriseId)-1:] + TalentId[len(TalentId)-2:]
 	str2 := fmt.Sprintf("%05v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(100000))
 	tid := str1 + str2
 	return tid
 }
+
+func (*getUuid) GetTeamId(ProjectId string, SelectionId string, TalentId string) string {
+	str0 := ProjectId + SelectionId
+	str1 := str0[len(str0)-3:] + TalentId[len(TalentId)-2:]
+	str2 := fmt.Sprintf("%05v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(100000))
+	tid := str1 + str2
+	return tid
+}
+
+func (*getUuid) GetRandomString(l int) string {
+	str := "0123456789"
+	bytes := []byte(str)
+	var result []byte
+	r := rand.New(rand.NewSource(time.Now().UnixNano()))
+	for i := 0; i < l; i++ {
+		result = append(result, bytes[r.Intn(len(bytes))])
+	}
+	return string(result)
+}

BIN
bin/v10.0.0/linux_amd64/youngmini_server


BIN
bin/v10.0.0/windows_amd64/youngmini_server.exe


BIN
bin/v7.0.9/linux_amd64/youngmini_server → bin/v2.1.0/linux_amd64/youngmini_server


BIN
bin/v9.1.0/windows_amd64/youngmini_server.exe → bin/v2.1.0/windows_amd64/youngmini_server.exe


BIN
bin/v6.0.2/linux_amd64/youngmini_server → bin/v3.0.0/linux_amd64/youngmini_server


BIN
bin/v6.0.3/windows_amd64/youngmini_server.exe → bin/v3.0.0/windows_amd64/youngmini_server.exe


BIN
bin/v6.0.3/linux_amd64/youngmini_server → bin/v3.0.1/linux_amd64/youngmini_server


BIN
bin/v6.0.2/windows_amd64/youngmini_server.exe → bin/v3.0.1/windows_amd64/youngmini_server.exe


BIN
bin/v7.0.2/linux_amd64/youngmini_server → bin/v3.0.2/linux_amd64/youngmini_server


BIN
bin/v7.0.2/windows_amd64/youngmini_server.exe → bin/v3.0.2/windows_amd64/youngmini_server.exe


BIN
bin/v7.0.8/linux_amd64/youngmini_server → bin/v3.2.0/linux_amd64/youngmini_server


BIN
bin/v7.0.9/windows_amd64/youngmini_server.exe → bin/v3.2.0/windows_amd64/youngmini_server.exe


BIN
bin/v6.0.1/windows_amd64/youngmini_server.exe


BIN
bin/v6.0.4/linux_amd64/youngmini_server


BIN
bin/v6.0.4/windows_amd64/youngmini_server.exe


Some files were not shown because too many files changed in this diff