作者 陈志颖

feat:添加取消共创模式接口

@@ -25,14 +25,27 @@ func (controller *CooperationApplicationController) ApplyForCooperation() { @@ -25,14 +25,27 @@ func (controller *CooperationApplicationController) ApplyForCooperation() {
25 25
26 func (controller *CooperationApplicationController) ApprovalCooperationApplication() { 26 func (controller *CooperationApplicationController) ApprovalCooperationApplication() {
27 cooperationApplicationService := service.NewCooperationApplicationService(nil) 27 cooperationApplicationService := service.NewCooperationApplicationService(nil)
28 - agreeCooperationApplicationCommand := &command.ApprovalCooperationApplicationCommand{}  
29 - _ = controller.Unmarshal(agreeCooperationApplicationCommand) 28 + approvalCooperationApplicationCommand := &command.ApprovalCooperationApplicationCommand{}
  29 + _ = controller.Unmarshal(approvalCooperationApplicationCommand)
30 header := controller.GetRequestHeader(controller.Ctx) 30 header := controller.GetRequestHeader(controller.Ctx)
31 - agreeCooperationApplicationCommand.CompanyId = header.CompanyId  
32 - agreeCooperationApplicationCommand.OrgId = header.OrgId  
33 - agreeCooperationApplicationCommand.UserId = header.UserId  
34 - agreeCooperationApplicationCommand.UserBaseId = header.UserBaseId  
35 - data, err := cooperationApplicationService.ApprovalCooperationApplication(agreeCooperationApplicationCommand) 31 + approvalCooperationApplicationCommand.CompanyId = header.CompanyId
  32 + approvalCooperationApplicationCommand.OrgId = header.OrgId
  33 + approvalCooperationApplicationCommand.UserId = header.UserId
  34 + approvalCooperationApplicationCommand.UserBaseId = header.UserBaseId
  35 + data, err := cooperationApplicationService.ApprovalCooperationApplication(approvalCooperationApplicationCommand)
  36 + controller.Response(data, err)
  37 +}
  38 +
  39 +func (controller *CooperationApplicationController) CancelCooperationApplication() {
  40 + cooperationApplicationService := service.NewCooperationApplicationService(nil)
  41 + cancelCooperationApplicationCommand := &command.CancelCooperationApplicationCommand{}
  42 + _ = controller.Unmarshal(cancelCooperationApplicationCommand)
  43 + header := controller.GetRequestHeader(controller.Ctx)
  44 + cancelCooperationApplicationCommand.CompanyId = header.CompanyId
  45 + cancelCooperationApplicationCommand.OrgId = header.OrgId
  46 + cancelCooperationApplicationCommand.UserId = header.UserId
  47 + cancelCooperationApplicationCommand.UserBaseId = header.UserBaseId
  48 + data, err := cooperationApplicationService.CancelCooperationApplication(cancelCooperationApplicationCommand)
36 controller.Response(data, err) 49 controller.Response(data, err)
37 } 50 }
38 51
@@ -6,7 +6,8 @@ import ( @@ -6,7 +6,8 @@ import (
6 ) 6 )
7 7
8 func init() { 8 func init() {
9 - web.Router("/cooperation-applications/apply-for-cooperation", &controllers.CooperationApplicationController{}, "Post:ApplyForCooperation") // 申请共创 9 + web.Router("/cooperation-applications/apply-for-cooperation", &controllers.CooperationApplicationController{}, "Post:ApplyForCooperation") // 申请共创
  10 + web.Router("/cooperation-applications/cancel-application", &controllers.CooperationApplicationController{}, "Post:CancelCooperationApplication")
10 web.Router("/cooperation-applications/agree-cooperation-application", &controllers.CooperationApplicationController{}, "Post:ApprovalCooperationApplication") // 同意共创申请 11 web.Router("/cooperation-applications/agree-cooperation-application", &controllers.CooperationApplicationController{}, "Post:ApprovalCooperationApplication") // 同意共创申请
11 web.Router("/cooperation-applications/batch-approval", &controllers.CooperationContractController{}, "Post:BatchApprovalCooperationApplication") // 一键审核 12 web.Router("/cooperation-applications/batch-approval", &controllers.CooperationContractController{}, "Post:BatchApprovalCooperationApplication") // 一键审核
12 web.Router("/cooperation-applications/", &controllers.CooperationApplicationController{}, "Post:CreateCooperationApplication") // 新增共创申请 13 web.Router("/cooperation-applications/", &controllers.CooperationApplicationController{}, "Post:CreateCooperationApplication") // 新增共创申请