作者 Your Name

Merge branch 'test' of http://gitlab.fjmaimaimai.com/allied-creation/allied-crea…

…tion-gateway into test
1 package service 1 package service
2 2
3 import ( 3 import (
  4 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  5 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
4 "strconv" 6 "strconv"
5 7
6 "github.com/linmadan/egglib-go/core/application" 8 "github.com/linmadan/egglib-go/core/application"
@@ -103,16 +105,16 @@ func (srv CooperationProjectService) SearchCooperationProject(projectQuery *comm @@ -103,16 +105,16 @@ func (srv CooperationProjectService) SearchCooperationProject(projectQuery *comm
103 105
104 // PersonSearchCooperationProject 共创用户获取共创项目列表 106 // PersonSearchCooperationProject 共创用户获取共创项目列表
105 func (srv CooperationProjectService) PersonSearchCooperationProject(projectQuery *command.PersonSearchCooperationProjectQuery) (int, interface{}, error) { 107 func (srv CooperationProjectService) PersonSearchCooperationProject(projectQuery *command.PersonSearchCooperationProjectQuery) (int, interface{}, error) {
  108 + extQueries := extQuires(projectQuery.Operator)
106 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( 109 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
107 projectQuery.Operator) 110 projectQuery.Operator)
108 - //orgidStr := strconv.Itoa(projectQuery.OrgId)  
109 result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{ 111 result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{
110 - PageNumber: projectQuery.PageNumber + 1, //手机序号从0开始的  
111 - PageSize: projectQuery.PageSize,  
112 - OrgId: projectQuery.OrgId,  
113 - Status: 1, //搜索状态为“招标中”项目  
114 - Keyword: projectQuery.Keyword,  
115 - //UserBaseId: projectQuery.Operator.UserBaseId, 112 + PageNumber: projectQuery.PageNumber + 1, //手机序号从0开始的
  113 + PageSize: projectQuery.PageSize,
  114 + OrgId: projectQuery.OrgId,
  115 + Status: 1, //搜索状态为“招标中”项目
  116 + Keyword: projectQuery.Keyword,
  117 + SearchCooperationProjectExtQueries: extQueries,
116 }) 118 })
117 if err != nil { 119 if err != nil {
118 return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 120 return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
@@ -120,6 +122,40 @@ func (srv CooperationProjectService) PersonSearchCooperationProject(projectQuery @@ -120,6 +122,40 @@ func (srv CooperationProjectService) PersonSearchCooperationProject(projectQuery
120 return int(result.Total), result.List, nil 122 return int(result.Total), result.List, nil
121 } 123 }
122 124
  125 +func extQuires(operator domain.Operator) []*allied_creation_cooperation.SearchCooperationProjectExtQuery {
  126 + var extQueries = make([]*allied_creation_cooperation.SearchCooperationProjectExtQuery, 0)
  127 + if operator.UserBaseId > 0 {
  128 + gatewayUser := allied_creation_user.NewHttplibAlliedCreationUser(
  129 + operator)
  130 + users, err := gatewayUser.UserSearch(allied_creation_user.ReqUserSearch{
  131 + Limit: 100,
  132 + Offset: 0,
  133 + UserBaseId: operator.UserBaseId,
  134 + EnableStatus: domain.UserStatusEnable,
  135 + })
  136 + if err != nil {
  137 + return extQueries
  138 + }
  139 + for i := range users.Users {
  140 + u := users.Users[i]
  141 + q := &allied_creation_cooperation.SearchCooperationProjectExtQuery{
  142 + ExtCompanyId: int64(u.Company.CompanyId),
  143 + //ExtOrgId: int64(u.Org.OrgId),
  144 + //ExtOrgIds: int64(u.UserOrg),
  145 + ExtUserId: int64(u.UserId),
  146 + ExtUserBaseId: int64(u.UserBaseId),
  147 + ExtCooperationProjectUndertakerTypes: []int32{int32(u.UserType & 3), 3},
  148 + }
  149 + for j := range u.UserOrg {
  150 + org := u.UserOrg[j]
  151 + q.ExtOrgIds = append(q.ExtOrgIds, int64(org.OrgID))
  152 + }
  153 + extQueries = append(extQueries, q)
  154 + }
  155 + }
  156 + return extQueries
  157 +}
  158 +
123 // PersonSearchCooperationProject 共创用户获取共创项目列表 159 // PersonSearchCooperationProject 共创用户获取共创项目列表
124 //func (srv CooperationProjectService) PersonRecommendCooperationProject(projectQuery *command.PersonSearchCooperationProjectQuery) (int, interface{}, error) { 160 //func (srv CooperationProjectService) PersonRecommendCooperationProject(projectQuery *command.PersonSearchCooperationProjectQuery) (int, interface{}, error) {
125 // creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( 161 // creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
@@ -166,6 +166,9 @@ func (srv PersonStatisticsService) CompanyStatistics(cmd *command.CooperationPer @@ -166,6 +166,9 @@ func (srv PersonStatisticsService) CompanyStatistics(cmd *command.CooperationPer
166 166
167 // CooperationProjectRecommend TODO:其他公司按公开的项目查 猜你喜欢(共创项目) 167 // CooperationProjectRecommend TODO:其他公司按公开的项目查 猜你喜欢(共创项目)
168 func (srv PersonStatisticsService) CooperationProjectRecommend(projectQuery *command.ListCooperationProjectQuery) (int64, interface{}, error) { 168 func (srv PersonStatisticsService) CooperationProjectRecommend(projectQuery *command.ListCooperationProjectQuery) (int64, interface{}, error) {
  169 + if projectQuery.Operator.UserBaseId > 0 {
  170 +
  171 + }
169 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( 172 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
170 projectQuery.Operator) 173 projectQuery.Operator)
171 result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{ 174 result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{
@@ -120,58 +120,60 @@ func (srv ExcelDataService) ImportCompanyUser2(importDataCommand *command.Import @@ -120,58 +120,60 @@ func (srv ExcelDataService) ImportCompanyUser2(importDataCommand *command.Import
120 120
121 // ImportCooperationUser 导入共创用户信息 121 // ImportCooperationUser 导入共创用户信息
122 func (srv ExcelDataService) ImportCooperationUser(importDataCommand *command.ImportDataCommand) (interface{}, error) { 122 func (srv ExcelDataService) ImportCooperationUser(importDataCommand *command.ImportDataCommand) (interface{}, error) {
123 - //initPassword, _, err := domainService.GetInitPassword(importDataCommand.Operator)  
124 - //if err != nil {  
125 - // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())  
126 - //}  
127 - //excelImport := excel.NewExcelImport()  
128 - //excelImport.RowBegin = 2 //第二行开始读取  
129 - //excelImport.DataFields = []excel.DataField{  
130 - // {EnName: "UserCode", CnName: "*用户编号"},  
131 - // {EnName: "UserName", CnName: "*用户姓名"},  
132 - // {EnName: "CooperationCompany", CnName: "*合伙公司"},  
133 - // {EnName: "CooperationDeadline", CnName: "*合伙到期"},  
134 - // {EnName: "Phone", CnName: "*手机号"},  
135 - // {EnName: "Email", CnName: "邮箱"},  
136 - //}  
137 - //excelData, err := excelImport.OpenExcelFromIoReader(importDataCommand.Reader)  
138 - //if err != nil {  
139 - // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())  
140 - //}  
141 - //users := make([]allied_creation_user.BatchAddUserItem, 0)  
142 - //var fail int  
143 - //for _, v := range excelData {  
144 - // item := allied_creation_user.BatchAddUserItem{  
145 - // CompanyID: importDataCommand.Operator.CompanyId,  
146 - // UserType: domain.UserTypeCooperation,  
147 - // UserCode: v["UserCode"],  
148 - // OrganizationID: int(importDataCommand.Operator.OrgId),  
149 - // UserInfo: allied_creation_user.BatchAddUserItemUserInfo{  
150 - // UserName: v["UserName"],  
151 - // Phone: v["Phone"],  
152 - // Email: v["Email"],  
153 - // },  
154 - // CooperationInfo: allied_creation_user.BatchAddUserItemCooperationInfo{  
155 - // CooperationCompany: v["CooperationCompany"],  
156 - // },  
157 - // }  
158 - // item.CooperationInfo.CooperationDeadline, err = time.Parse("2006-01-02", v["CooperationDeadline"])  
159 - // if err != nil {  
160 - // fail++  
161 - // continue  
162 - // }  
163 - // users = append(users, item)  
164 - //}  
165 - //userGateway := allied_creation_user.NewHttplibAlliedCreationUser(importDataCommand.Operator)  
166 - //result, err := userGateway.UserBatchAdd(allied_creation_user.ReqBatchAddUser{  
167 - // Users: users,  
168 - // Password: initPassword,  
169 - //})  
170 - //if err != nil {  
171 - // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())  
172 - //}  
173 - //return result, nil  
174 - return nil, nil 123 + initPassword, _, err := domainService.GetInitPassword(importDataCommand.Operator)
  124 + if err != nil {
  125 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  126 + }
  127 + userGateway := allied_creation_user.NewHttplibAlliedCreationUser(importDataCommand.Operator)
  128 + orgResult, err := userGateway.OrgGet(allied_creation_user.ReqOrgGet{
  129 + OrgId: int(importDataCommand.Operator.OrgId),
  130 + })
  131 + if err != nil {
  132 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  133 + }
  134 + excelImport := excel.NewExcelImport()
  135 + excelImport.RowBegin = 3 //第二行开始读取
  136 + excelImport.DataFields = []excel.DataField{
  137 + {EnName: "userCode", CnName: "*用户编码"},
  138 + {EnName: "userName", CnName: "*用户姓名"},
  139 + {EnName: "cooperationCompany", CnName: "*合伙公司"},
  140 + {EnName: "cooperationDeadline", CnName: "*合伙到期"},
  141 + {EnName: "enableStatus", CnName: "*用户状态"},
  142 + {EnName: "phone", CnName: "*手机号"},
  143 + {EnName: "email", CnName: "邮箱"},
  144 + }
  145 + excelData, err := excelImport.OpenExcelFromIoReader(importDataCommand.Reader)
  146 + if err != nil {
  147 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  148 + }
  149 + users := make([]allied_creation_user.BatchAddUserItem, 0)
  150 + for _, v := range excelData {
  151 + if srv.fieldValueAllEmpty(v) {
  152 + continue
  153 + }
  154 + item := allied_creation_user.BatchAddUserItem{
  155 + CompanyId: importDataCommand.Operator.CompanyId,
  156 + UserType: domain.UserTypeCooperation,
  157 + UserCode: v["userCode"],
  158 + Org: orgResult.OrgCode,
  159 + UserName: strings.TrimSpace(v["userName"]),
  160 + Phone: strings.TrimSpace(v["phone"]),
  161 + Email: strings.TrimSpace(v["email"]),
  162 + EnableStatus: strings.TrimSpace(v["enableStatus"]),
  163 + CooperationCompany: v["cooperationCompany"],
  164 + CooperationDeadline: v["cooperationDeadline"],
  165 + }
  166 + users = append(users, item)
  167 + }
  168 +
  169 + result, err := userGateway.UserBatchAdd(allied_creation_user.ReqBatchAddUser{
  170 + Users: users,
  171 + Password: initPassword,
  172 + })
  173 + if err != nil {
  174 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  175 + }
  176 + return srv.importResultWithHeader(excelImport.DataFields, result.FailRows, len(users)), nil
175 } 177 }
176 178
177 // ImportCompanyUser 导入公司用户信息 179 // ImportCompanyUser 导入公司用户信息
@@ -197,21 +199,19 @@ func (srv ExcelDataService) ImportCompanyUser(importDataCommand *command.ImportD @@ -197,21 +199,19 @@ func (srv ExcelDataService) ImportCompanyUser(importDataCommand *command.ImportD
197 } 199 }
198 users := make([]allied_creation_user.BatchAddUserItem, 0) 200 users := make([]allied_creation_user.BatchAddUserItem, 0)
199 for _, v := range excelData { 201 for _, v := range excelData {
  202 + if srv.fieldValueAllEmpty(v) {
  203 + continue
  204 + }
200 item := allied_creation_user.BatchAddUserItem{ 205 item := allied_creation_user.BatchAddUserItem{
201 CompanyId: importDataCommand.Operator.CompanyId, 206 CompanyId: importDataCommand.Operator.CompanyId,
202 UserType: domain.UserTypeEmployee, 207 UserType: domain.UserTypeEmployee,
203 - UserCode: v["userCode"],  
204 - Org: v["org"],  
205 - Department: v["department"],  
206 - UserName: v["userName"],  
207 - Phone: v["phone"],  
208 - Email: v["email"],  
209 - EnableStatus: domain.UserStatusEnable,  
210 - }  
211 - if status, ok := v["status"]; ok {  
212 - if strings.TrimSpace(status) != "启用" {  
213 - item.EnableStatus = domain.UserStatusDisable  
214 - } 208 + UserCode: strings.TrimSpace(v["userCode"]),
  209 + Org: strings.TrimSpace(v["org"]),
  210 + Department: strings.TrimSpace(v["department"]),
  211 + UserName: strings.TrimSpace(v["userName"]),
  212 + Phone: strings.TrimSpace(v["phone"]),
  213 + Email: strings.TrimSpace(v["email"]),
  214 + EnableStatus: strings.TrimSpace(v["enableStatus"]),
215 } 215 }
216 users = append(users, item) 216 users = append(users, item)
217 } 217 }
@@ -223,7 +223,7 @@ func (srv ExcelDataService) ImportCompanyUser(importDataCommand *command.ImportD @@ -223,7 +223,7 @@ func (srv ExcelDataService) ImportCompanyUser(importDataCommand *command.ImportD
223 if err != nil { 223 if err != nil {
224 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 224 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
225 } 225 }
226 - return srv.importResultWithHeader(excelImport.DataFields, result.FailRows, len(excelData)), nil 226 + return srv.importResultWithHeader(excelImport.DataFields, result.FailRows, len(users)), nil
227 } 227 }
228 228
229 func (srv ExcelDataService) ImportOrganization(importDataCommand *command.ImportDataCommand) (interface{}, error) { 229 func (srv ExcelDataService) ImportOrganization(importDataCommand *command.ImportDataCommand) (interface{}, error) {
@@ -240,6 +240,9 @@ func (srv ExcelDataService) ImportOrganization(importDataCommand *command.Import @@ -240,6 +240,9 @@ func (srv ExcelDataService) ImportOrganization(importDataCommand *command.Import
240 } 240 }
241 items := make([]allied_creation_user.BatchAddOrgItem, 0) 241 items := make([]allied_creation_user.BatchAddOrgItem, 0)
242 for _, v := range excelData { 242 for _, v := range excelData {
  243 + if srv.fieldValueAllEmpty(v) {
  244 + continue
  245 + }
243 item := allied_creation_user.BatchAddOrgItem{ 246 item := allied_creation_user.BatchAddOrgItem{
244 CompanyId: importDataCommand.Operator.CompanyId, 247 CompanyId: importDataCommand.Operator.CompanyId,
245 OrgCode: v["orgCode"], 248 OrgCode: v["orgCode"],
@@ -255,7 +258,7 @@ func (srv ExcelDataService) ImportOrganization(importDataCommand *command.Import @@ -255,7 +258,7 @@ func (srv ExcelDataService) ImportOrganization(importDataCommand *command.Import
255 if err != nil { 258 if err != nil {
256 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 259 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
257 } 260 }
258 - return srv.importResultWithHeader(excelImport.DataFields, result.FailRows, len(excelData)), nil 261 + return srv.importResultWithHeader(excelImport.DataFields, result.FailRows, len(items)), nil
259 } 262 }
260 263
261 // 导入结果 264 // 导入结果
@@ -282,15 +285,25 @@ func (srv ExcelDataService) importResultWithHeader(headers []excel.DataField, fa @@ -282,15 +285,25 @@ func (srv ExcelDataService) importResultWithHeader(headers []excel.DataField, fa
282 return result 285 return result
283 } 286 }
284 287
  288 +func (srv ExcelDataService) fieldValueAllEmpty(param map[string]string) bool {
  289 + isAllEmpty := true
  290 + for _, v := range param {
  291 + value := strings.TrimSpace(v)
  292 + if len(value) > 0 {
  293 + isAllEmpty = false
  294 + }
  295 + }
  296 + return isAllEmpty
  297 +}
  298 +
285 // ImportCompanyUser 导入公司用户信息 299 // ImportCompanyUser 导入公司用户信息
286 func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.ImportDataCommand) (interface{}, error) { 300 func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.ImportDataCommand) (interface{}, error) {
287 var mapTemplate = map[string]string{ 301 var mapTemplate = map[string]string{
288 - domain.ImportCompanyUser: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210916/object/1631807485_EaxECeRz23WpzrMZmbwdEPRJ3Pdxpx5X.xlsx",  
289 - domain.ImportOrganization: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210916/object/1631807490_r2XWhGmbWWmpbeePBkZ3EJQFKcZEMpEm.xlsx",  
290 - domain.ImportDividendsOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210916/object/1631807770_sBtA4dYcmESZy6Q2ycfGSCKGdFtBETQZ.xlsx",  
291 - // 模板待更新  
292 - domain.ImportCooperationUser: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx",  
293 - domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx", 302 + domain.ImportCompanyUser: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210916/object/1631807485_EaxECeRz23WpzrMZmbwdEPRJ3Pdxpx5X.xlsx",
  303 + domain.ImportOrganization: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210916/object/1631807490_r2XWhGmbWWmpbeePBkZ3EJQFKcZEMpEm.xlsx",
  304 + domain.ImportDividendsOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210917/object/1631843469_DykNwexeYYtzxzbwsER5RrzCS7QRwGmd.xlsx",
  305 + domain.ImportCooperationUser: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210918/object/1631932960_fen6RZS7ZesyDPMzXactKKCenhRMkfRb.xlsx",
  306 + domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210918/object/1631933214_MbTxsQtnEEMprHADFR6MedfZBkxYWBYA.xlsx",
294 } 307 }
295 var url string 308 var url string
296 var ok bool 309 var ok bool
@@ -171,6 +171,20 @@ type ( @@ -171,6 +171,20 @@ type (
171 171
172 //查询共创项目 172 //查询共创项目
173 type ( 173 type (
  174 + SearchCooperationProjectExtQuery struct {
  175 + // 公司ID,通过集成REST上下文获取
  176 + ExtCompanyId int64 `cname:"公司ID" json:"extCompanyId,omitempty"`
  177 + // 组织机构ID
  178 + ExtOrgId int64 `cname:"组织机构ID" json:"extOrgId,omitempty"`
  179 + // 关联的组织机构ID列表
  180 + ExtOrgIds []int64 `cname:"关联的组织机构ID列表" json:"extOrgIds,omitempty"`
  181 + // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
  182 + ExtUserId int64 `cname:"用户ID" json:"extUserId,omitempty"`
  183 + // 用户基础数据id
  184 + ExtUserBaseId int64 `cname:"用户基础数据ID" json:"extUserBaseId,omitempty"`
  185 + // 共创项目承接对象,1员工,2共创用户,3公开,可多选
  186 + ExtCooperationProjectUndertakerTypes []int32 `json:"extCooperationProjectUndertakerTypes"`
  187 + }
174 ReqCooperationProjectSearch struct { 188 ReqCooperationProjectSearch struct {
175 PageNumber int `json:"pageNumber"` 189 PageNumber int `json:"pageNumber"`
176 PageSize int `json:"pageSize"` 190 PageSize int `json:"pageSize"`
@@ -192,6 +206,8 @@ type ( @@ -192,6 +206,8 @@ type (
192 UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"` 206 UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
193 // 共创项目承接对象,1员工,2共创用户,4公开,可以多选 207 // 共创项目承接对象,1员工,2共创用户,4公开,可以多选
194 CooperationProjectUndertakerType int32 `json:"cooperationProjectUndertakerType"` 208 CooperationProjectUndertakerType int32 `json:"cooperationProjectUndertakerType"`
  209 + // 额外的查询条件
  210 + SearchCooperationProjectExtQueries []*SearchCooperationProjectExtQuery `cname:"额外的查询条件" json:"searchCooperationProjectExtQueries"`
195 } 211 }
196 DataCooperationProjectSearchItem struct { 212 DataCooperationProjectSearchItem struct {
197 CooperationProjectID string `json:"cooperationProjectId"` 213 CooperationProjectID string `json:"cooperationProjectId"`
@@ -393,11 +393,11 @@ type ( @@ -393,11 +393,11 @@ type (
393 // 部门编码 393 // 部门编码
394 Department string `json:"department,omitempty"` 394 Department string `json:"department,omitempty"`
395 // 状态(1:启用 2:禁用 3:注销) 395 // 状态(1:启用 2:禁用 3:注销)
396 - EnableStatus int `json:"enableStatus,omitempty"` 396 + EnableStatus string `json:"enableStatus,omitempty"`
397 // 共创公司 cooperationCompany 397 // 共创公司 cooperationCompany
398 CooperationCompany string `json:"cooperationCompany"` 398 CooperationCompany string `json:"cooperationCompany"`
399 // 共创到期时间 (yyyy-MM-dd) cooperationDeadline 399 // 共创到期时间 (yyyy-MM-dd) cooperationDeadline
400 - CooperationDeadline time.Time `json:"cooperationDeadline"` 400 + CooperationDeadline string `json:"cooperationDeadline"`
401 // 失败理由 401 // 失败理由
402 FailReason string `json:"failReason"` 402 FailReason string `json:"failReason"`
403 } 403 }