作者 陈志颖

fix:重置申请查询条件

@@ -17,9 +17,9 @@ type OneClickApprovalCooperationApplicationCommand struct { @@ -17,9 +17,9 @@ type OneClickApprovalCooperationApplicationCommand struct {
17 // 菜单编码,APP端必须 17 // 菜单编码,APP端必须
18 Code string `cname:"菜单编码" json:"code" valid:"Required"` 18 Code string `cname:"菜单编码" json:"code" valid:"Required"`
19 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 19 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
20 - UserId int64 `cname:"用户ID" json:"userId"` 20 + UserId int64 `cname:"用户ID" json:"userId" valid:"Required"`
21 // 用户基础数据id 21 // 用户基础数据id
22 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"` 22 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"`
23 // 审核动作,1同意,2拒绝 23 // 审核动作,1同意,2拒绝
24 Action int32 `cname:"审核动作" json:"action" valid:"Required"` 24 Action int32 `cname:"审核动作" json:"action" valid:"Required"`
25 // 审核状态 25 // 审核状态
@@ -445,7 +445,7 @@ func (cooperationApplicationService *CooperationApplicationService) OneClickAppr @@ -445,7 +445,7 @@ func (cooperationApplicationService *CooperationApplicationService) OneClickAppr
445 // 获取审核人 445 // 获取审核人
446 var verifier *domain.User 446 var verifier *domain.User
447 if data, err := userService.UserFrom(oneClickApprovalCooperationApplicationCommand.CompanyId, oneClickApprovalCooperationApplicationCommand.OrgId, oneClickApprovalCooperationApplicationCommand.UserId); err != nil { 447 if data, err := userService.UserFrom(oneClickApprovalCooperationApplicationCommand.CompanyId, oneClickApprovalCooperationApplicationCommand.OrgId, oneClickApprovalCooperationApplicationCommand.UserId); err != nil {
448 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取申请人失败") 448 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取审核人失败")
449 } else { 449 } else {
450 verifier = data 450 verifier = data
451 } 451 }
@@ -454,6 +454,9 @@ func (cooperationApplicationService *CooperationApplicationService) OneClickAppr @@ -454,6 +454,9 @@ func (cooperationApplicationService *CooperationApplicationService) OneClickAppr
454 oneClickApprovalCooperationApplicationCommand.CooperationApplicationStatus = 1 // 待审核 454 oneClickApprovalCooperationApplicationCommand.CooperationApplicationStatus = 1 // 待审核
455 oneClickApprovalCooperationApplicationCommand.OffsetLimit = false 455 oneClickApprovalCooperationApplicationCommand.OffsetLimit = false
456 oneClickApprovalCooperationApplicationCommand.IsCanceled = int32(1) 456 oneClickApprovalCooperationApplicationCommand.IsCanceled = int32(1)
  457 + oneClickApprovalCooperationApplicationCommand.UserBaseId = 0
  458 + oneClickApprovalCooperationApplicationCommand.UserId = 0
  459 +
457 if count, cooperationApplications, err := cooperationApplicationRepository.Find(tool_funs.SimpleStructToMap(oneClickApprovalCooperationApplicationCommand)); err != nil { 460 if count, cooperationApplications, err := cooperationApplicationRepository.Find(tool_funs.SimpleStructToMap(oneClickApprovalCooperationApplicationCommand)); err != nil {
458 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 461 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
459 } else { 462 } else {
@@ -72,8 +72,8 @@ func (controller *CooperationApplicationController) OneClickApprovalCooperationA @@ -72,8 +72,8 @@ func (controller *CooperationApplicationController) OneClickApprovalCooperationA
72 header := controller.GetRequestHeader(controller.Ctx) 72 header := controller.GetRequestHeader(controller.Ctx)
73 oneClickApprovalCooperationApplicationCommand.CompanyId = header.CompanyId 73 oneClickApprovalCooperationApplicationCommand.CompanyId = header.CompanyId
74 oneClickApprovalCooperationApplicationCommand.OrgId = header.OrgId 74 oneClickApprovalCooperationApplicationCommand.OrgId = header.OrgId
75 - //oneClickApprovalCooperationApplicationCommand.UserId = header.UserId  
76 - //oneClickApprovalCooperationApplicationCommand.UserBaseId = header.UserBaseId 75 + oneClickApprovalCooperationApplicationCommand.UserId = header.UserId
  76 + oneClickApprovalCooperationApplicationCommand.UserBaseId = header.UserBaseId
77 data, err := cooperationApplicationService.OneClickApprovalCooperationApplication(oneClickApprovalCooperationApplicationCommand) 77 data, err := cooperationApplicationService.OneClickApprovalCooperationApplication(oneClickApprovalCooperationApplicationCommand)
78 controller.Response(data, err) 78 controller.Response(data, err)
79 } 79 }