作者 陈志颖

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

... ... @@ -25,14 +25,27 @@ func (controller *CooperationApplicationController) ApplyForCooperation() {
func (controller *CooperationApplicationController) ApprovalCooperationApplication() {
cooperationApplicationService := service.NewCooperationApplicationService(nil)
agreeCooperationApplicationCommand := &command.ApprovalCooperationApplicationCommand{}
_ = controller.Unmarshal(agreeCooperationApplicationCommand)
approvalCooperationApplicationCommand := &command.ApprovalCooperationApplicationCommand{}
_ = controller.Unmarshal(approvalCooperationApplicationCommand)
header := controller.GetRequestHeader(controller.Ctx)
agreeCooperationApplicationCommand.CompanyId = header.CompanyId
agreeCooperationApplicationCommand.OrgId = header.OrgId
agreeCooperationApplicationCommand.UserId = header.UserId
agreeCooperationApplicationCommand.UserBaseId = header.UserBaseId
data, err := cooperationApplicationService.ApprovalCooperationApplication(agreeCooperationApplicationCommand)
approvalCooperationApplicationCommand.CompanyId = header.CompanyId
approvalCooperationApplicationCommand.OrgId = header.OrgId
approvalCooperationApplicationCommand.UserId = header.UserId
approvalCooperationApplicationCommand.UserBaseId = header.UserBaseId
data, err := cooperationApplicationService.ApprovalCooperationApplication(approvalCooperationApplicationCommand)
controller.Response(data, err)
}
func (controller *CooperationApplicationController) CancelCooperationApplication() {
cooperationApplicationService := service.NewCooperationApplicationService(nil)
cancelCooperationApplicationCommand := &command.CancelCooperationApplicationCommand{}
_ = controller.Unmarshal(cancelCooperationApplicationCommand)
header := controller.GetRequestHeader(controller.Ctx)
cancelCooperationApplicationCommand.CompanyId = header.CompanyId
cancelCooperationApplicationCommand.OrgId = header.OrgId
cancelCooperationApplicationCommand.UserId = header.UserId
cancelCooperationApplicationCommand.UserBaseId = header.UserBaseId
data, err := cooperationApplicationService.CancelCooperationApplication(cancelCooperationApplicationCommand)
controller.Response(data, err)
}
... ...
... ... @@ -7,6 +7,7 @@ import (
func init() {
web.Router("/cooperation-applications/apply-for-cooperation", &controllers.CooperationApplicationController{}, "Post:ApplyForCooperation") // 申请共创
web.Router("/cooperation-applications/cancel-application", &controllers.CooperationApplicationController{}, "Post:CancelCooperationApplication")
web.Router("/cooperation-applications/agree-cooperation-application", &controllers.CooperationApplicationController{}, "Post:ApprovalCooperationApplication") // 同意共创申请
web.Router("/cooperation-applications/batch-approval", &controllers.CooperationContractController{}, "Post:BatchApprovalCooperationApplication") // 一键审核
web.Router("/cooperation-applications/", &controllers.CooperationApplicationController{}, "Post:CreateCooperationApplication") // 新增共创申请
... ...