...
|
...
|
@@ -14,7 +14,6 @@ func (controller *CooperationApplicationController) ApplyForCooperation() { |
|
|
cooperationApplicationService := service.NewCooperationApplicationService(nil)
|
|
|
applyForCooperationCommand := &command.ApplyForCooperationCommand{}
|
|
|
_ = controller.Unmarshal(applyForCooperationCommand)
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
applyForCooperationCommand.CompanyId = header.CompanyId
|
|
|
applyForCooperationCommand.OrgId = header.OrgId
|
...
|
...
|
@@ -24,31 +23,16 @@ func (controller *CooperationApplicationController) ApplyForCooperation() { |
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationApplicationController) AgreeCooperationApplication() {
|
|
|
func (controller *CooperationApplicationController) ApprovalCooperationApplication() {
|
|
|
cooperationApplicationService := service.NewCooperationApplicationService(nil)
|
|
|
agreeCooperationApplicationCommand := &command.AgreeCooperationApplicationCommand{}
|
|
|
agreeCooperationApplicationCommand := &command.ApprovalCooperationApplicationCommand{}
|
|
|
_ = controller.Unmarshal(agreeCooperationApplicationCommand)
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
agreeCooperationApplicationCommand.CompanyId = header.CompanyId
|
|
|
agreeCooperationApplicationCommand.OrgId = header.OrgId
|
|
|
agreeCooperationApplicationCommand.UserId = header.UserId
|
|
|
agreeCooperationApplicationCommand.UserBaseId = header.UserBaseId
|
|
|
data, err := cooperationApplicationService.AgreeCooperationApplication(agreeCooperationApplicationCommand)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller *CooperationApplicationController) RejectCooperationApplication() {
|
|
|
cooperationApplicationService := service.NewCooperationApplicationService(nil)
|
|
|
rejectCooperationApplicationCommand := &command.RejectCooperationApplicationCommand{}
|
|
|
_ = controller.Unmarshal(rejectCooperationApplicationCommand)
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
rejectCooperationApplicationCommand.CompanyId = header.CompanyId
|
|
|
rejectCooperationApplicationCommand.OrgId = header.OrgId
|
|
|
rejectCooperationApplicationCommand.UserId = header.UserId
|
|
|
rejectCooperationApplicationCommand.UserBaseId = header.UserBaseId
|
|
|
data, err := cooperationApplicationService.RejectCooperationApplication(rejectCooperationApplicationCommand)
|
|
|
data, err := cooperationApplicationService.ApprovalCooperationApplication(agreeCooperationApplicationCommand)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
...
|
...
|
@@ -56,7 +40,6 @@ func (controller *CooperationContractController) BatchApprovalCooperationApplica |
|
|
cooperationApplicationService := service.NewCooperationApplicationService(nil)
|
|
|
batchApprovalCooperationApplicationCommand := &command.BatchApprovalCooperationApplicationCommand{}
|
|
|
_ = controller.Unmarshal(batchApprovalCooperationApplicationCommand)
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
batchApprovalCooperationApplicationCommand.CompanyId = header.CompanyId
|
|
|
batchApprovalCooperationApplicationCommand.OrgId = header.OrgId
|
...
|
...
|
@@ -70,7 +53,6 @@ func (controller *CooperationApplicationController) CreateCooperationApplication |
|
|
cooperationApplicationService := service.NewCooperationApplicationService(nil)
|
|
|
createCooperationApplicationCommand := &command.CreateCooperationApplicationCommand{}
|
|
|
_ = controller.Unmarshal(createCooperationApplicationCommand)
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
createCooperationApplicationCommand.CompanyId = header.CompanyId
|
|
|
createCooperationApplicationCommand.OrgId = header.OrgId
|
...
|
...
|
@@ -84,13 +66,11 @@ func (controller *CooperationApplicationController) UpdateCooperationApplication |
|
|
cooperationApplicationService := service.NewCooperationApplicationService(nil)
|
|
|
updateCooperationApplicationCommand := &command.UpdateCooperationApplicationCommand{}
|
|
|
_ = controller.Unmarshal(updateCooperationApplicationCommand)
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
updateCooperationApplicationCommand.CompanyId = header.CompanyId
|
|
|
updateCooperationApplicationCommand.OrgId = header.OrgId
|
|
|
updateCooperationApplicationCommand.UserId = header.UserId
|
|
|
updateCooperationApplicationCommand.UserBaseId = header.UserBaseId
|
|
|
// 解析路径参数
|
|
|
cooperationApplicationId := controller.GetString(":cooperationApplicationId")
|
|
|
updateCooperationApplicationCommand.CooperationApplicationId = cooperationApplicationId
|
|
|
data, err := cooperationApplicationService.UpdateCooperationApplication(updateCooperationApplicationCommand)
|
...
|
...
|
@@ -100,13 +80,11 @@ func (controller *CooperationApplicationController) UpdateCooperationApplication |
|
|
func (controller *CooperationApplicationController) GetCooperationApplication() {
|
|
|
cooperationApplicationService := service.NewCooperationApplicationService(nil)
|
|
|
getCooperationApplicationQuery := &query.GetCooperationApplicationQuery{}
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
getCooperationApplicationQuery.CompanyId = header.CompanyId
|
|
|
getCooperationApplicationQuery.OrgId = header.OrgId
|
|
|
getCooperationApplicationQuery.UserId = header.UserId
|
|
|
getCooperationApplicationQuery.UserBaseId = header.UserBaseId
|
|
|
// 解析路劲参数
|
|
|
cooperationApplicationId, _ := controller.GetInt64(":cooperationApplicationId")
|
|
|
getCooperationApplicationQuery.CooperationApplicationId = cooperationApplicationId
|
|
|
data, err := cooperationApplicationService.GetCooperationApplication(getCooperationApplicationQuery)
|
...
|
...
|
@@ -117,13 +95,11 @@ func (controller *CooperationApplicationController) RemoveCooperationApplication |
|
|
cooperationApplicationService := service.NewCooperationApplicationService(nil)
|
|
|
removeCooperationApplicationCommand := &command.RemoveCooperationApplicationCommand{}
|
|
|
_ = controller.Unmarshal(removeCooperationApplicationCommand)
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
removeCooperationApplicationCommand.CompanyId = header.CompanyId
|
|
|
removeCooperationApplicationCommand.OrgId = header.OrgId
|
|
|
removeCooperationApplicationCommand.UserId = header.UserId
|
|
|
removeCooperationApplicationCommand.UserBaseId = header.UserBaseId
|
|
|
// 解析路径参数
|
|
|
cooperationApplicationId, _ := controller.GetInt64(":cooperationApplicationId")
|
|
|
removeCooperationApplicationCommand.CooperationApplicationId = cooperationApplicationId
|
|
|
data, err := cooperationApplicationService.RemoveCooperationApplication(removeCooperationApplicationCommand)
|
...
|
...
|
@@ -133,13 +109,11 @@ func (controller *CooperationApplicationController) RemoveCooperationApplication |
|
|
func (controller *CooperationApplicationController) SearchCooperationApplication() {
|
|
|
cooperationApplicationService := service.NewCooperationApplicationService(nil)
|
|
|
searchCooperationApplicationQuery := &query.SearchCooperationApplicationQuery{}
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
searchCooperationApplicationQuery.CompanyId = header.CompanyId
|
|
|
searchCooperationApplicationQuery.OrgId = header.OrgId
|
|
|
searchCooperationApplicationQuery.UserId = header.UserId
|
|
|
searchCooperationApplicationQuery.UserBaseId = header.UserBaseId
|
|
|
// 解析其他参数
|
|
|
pageSize, _ := controller.GetInt64("pageSize")
|
|
|
searchCooperationApplicationQuery.PageSize = pageSize
|
|
|
pageNumber, _ := controller.GetInt64("pageNumber")
|
...
|
...
|
@@ -151,13 +125,11 @@ func (controller *CooperationApplicationController) SearchCooperationApplication |
|
|
func (controller *CooperationApplicationController) ListCooperationApplication() {
|
|
|
cooperationApplicationService := service.NewCooperationApplicationService(nil)
|
|
|
listCooperationApplicationQuery := &query.ListCooperationApplicationQuery{}
|
|
|
// 解析头部信息
|
|
|
header := controller.GetRequestHeader(controller.Ctx)
|
|
|
listCooperationApplicationQuery.CompanyId = header.CompanyId
|
|
|
listCooperationApplicationQuery.OrgId = header.OrgId
|
|
|
listCooperationApplicationQuery.UserId = header.UserId
|
|
|
listCooperationApplicationQuery.UserBaseId = header.UserBaseId
|
|
|
// 解析其他参数
|
|
|
pageSize, _ := controller.GetInt64("pageSize")
|
|
|
listCooperationApplicationQuery.PageSize = pageSize
|
|
|
pageNumber, _ := controller.GetInt64("pageNumber")
|
...
|
...
|
|