作者 yangfu

增加app端天联共创路由、服务

正在显示 23 个修改的文件 包含 1180 行增加0 行删除
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type AuditCooperationApplicationCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + // 共创申请ID
  14 + CooperationApplicationId []int `json:"cooperationApplicationId,string" valid:"Required"`
  15 + // 共创申请审核状态,1待审核,2已同意,3已拒绝
  16 + CooperationApplicationStatus int `json:"cooperationApplicationStatus" valid:"Required"`
  17 + // 共创申请审核描述
  18 + CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription" valid:"Required"`
  19 +}
  20 +
  21 +func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) Valid(validation *validation.Validation) {
  22 + validation.SetError("CustomValid", "未实现的自定义认证")
  23 +}
  24 +
  25 +func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) ValidateCommand() error {
  26 + valid := validation.Validation{}
  27 + b, err := valid.Valid(auditCooperationApplicationCommand)
  28 + if err != nil {
  29 + return err
  30 + }
  31 + if !b {
  32 + for _, validErr := range valid.Errors {
  33 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  34 + }
  35 + }
  36 + return nil
  37 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type CancelCooperationApplicationCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + // 共创申请ID
  14 + CooperationApplicationId []int `json:"cooperationApplicationId,string" valid:"Required"`
  15 + // 共创申请审核状态,1待审核,2已同意,3已拒绝
  16 + CooperationApplicationStatus int `json:"cooperationApplicationStatus" valid:"Required"`
  17 + // 共创申请审核描述
  18 + CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription" valid:"Required"`
  19 +}
  20 +
  21 +func (auditCooperationApplicationCommand *CancelCooperationApplicationCommand) Valid(validation *validation.Validation) {
  22 + validation.SetError("CustomValid", "未实现的自定义认证")
  23 +}
  24 +
  25 +func (auditCooperationApplicationCommand *CancelCooperationApplicationCommand) ValidateCommand() error {
  26 + valid := validation.Validation{}
  27 + b, err := valid.Valid(auditCooperationApplicationCommand)
  28 + if err != nil {
  29 + return err
  30 + }
  31 + if !b {
  32 + for _, validErr := range valid.Errors {
  33 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  34 + }
  35 + }
  36 + return nil
  37 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 + "github.com/beego/beego/v2/core/validation"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  7 +)
  8 +
  9 +type CreateCooperationApplicationCommand struct {
  10 + //操作人
  11 + Operator domain.Operator `json:"-"`
  12 + // 共创申请描述
  13 + CooperationApplicationDescription string `json:"cooperationApplicationDescription" valid:"Required"`
  14 + // 申请人的id
  15 + UserId int64 `json:"userId,omitempty"`
  16 + // 附件列表
  17 + Attachment []domain.Attachment `json:"attachment"`
  18 +}
  19 +
  20 +func (createCooperationApplicationCommand *CreateCooperationApplicationCommand) Valid(validation *validation.Validation) {
  21 + //validation.SetError("CustomValid", "未实现的自定义认证")
  22 +}
  23 +
  24 +func (createCooperationApplicationCommand *CreateCooperationApplicationCommand) ValidateCommand() error {
  25 + valid := validation.Validation{}
  26 + b, err := valid.Valid(createCooperationApplicationCommand)
  27 + if err != nil {
  28 + return err
  29 + }
  30 + if !b {
  31 + for _, validErr := range valid.Errors {
  32 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  33 + }
  34 + }
  35 + return nil
  36 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type GetCooperationApplicationQuery struct {
  11 +
  12 + //操作人
  13 + Operator domain.Operator `json:"-"`
  14 + // 共创申请ID
  15 + CooperationApplicationId int `json:"cooperationApplicationId,string" valid:"Required"`
  16 +}
  17 +
  18 +func (getCooperationApplicationQuery *GetCooperationApplicationQuery) Valid(validation *validation.Validation) {
  19 + validation.SetError("CustomValid", "未实现的自定义认证")
  20 +}
  21 +
  22 +func (getCooperationApplicationQuery *GetCooperationApplicationQuery) ValidateQuery() error {
  23 + valid := validation.Validation{}
  24 + b, err := valid.Valid(getCooperationApplicationQuery)
  25 + if err != nil {
  26 + return err
  27 + }
  28 + if !b {
  29 + for _, validErr := range valid.Errors {
  30 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  31 + }
  32 + }
  33 + return nil
  34 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type ListCooperationApplicationQuery struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + // 查询偏离量
  14 + PageNumber int `json:"pageNumber" valid:"Required"`
  15 + // 查询限制
  16 + PageSize int `json:"pageSize" valid:"Required"`
  17 + //共创项目名称
  18 + ProjectName string `json:"projectName"`
  19 + //申请人名称
  20 + ApplicantName string `json:"applicantName"`
  21 + //审核状态
  22 + VerifyStatus int `json:"verifyStatus"`
  23 +}
  24 +
  25 +func (listCooperationApplicationQuery *ListCooperationApplicationQuery) Valid(validation *validation.Validation) {
  26 +
  27 +}
  28 +
  29 +func (listCooperationApplicationQuery *ListCooperationApplicationQuery) ValidateQuery() error {
  30 + valid := validation.Validation{}
  31 + b, err := valid.Valid(listCooperationApplicationQuery)
  32 + if err != nil {
  33 + return err
  34 + }
  35 + if !b {
  36 + for _, validErr := range valid.Errors {
  37 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  38 + }
  39 + }
  40 + return nil
  41 +}
  1 +package command
  2 +
  3 +// type UpdateCooperationApplicationCommand struct {
  4 +//操作人
  5 +// Operator domain.Operator `json:"-"`
  6 +// 共创申请ID
  7 +// CooperationApplicationId int64 `json:"cooperationApplicationId" valid:"Required"`
  8 +// }
  9 +
  10 +// func (updateCooperationApplicationCommand *UpdateCooperationApplicationCommand) Valid(validation *validation.Validation) {
  11 +// validation.SetError("CustomValid", "未实现的自定义认证")
  12 +// }
  13 +
  14 +// func (updateCooperationApplicationCommand *UpdateCooperationApplicationCommand) ValidateCommand() error {
  15 +// valid := validation.Validation{}
  16 +// b, err := valid.Valid(updateCooperationApplicationCommand)
  17 +// if err != nil {
  18 +// return err
  19 +// }
  20 +// if !b {
  21 +// for _, validErr := range valid.Errors {
  22 +// return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  23 +// }
  24 +// }
  25 +// return nil
  26 +// }
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 + "github.com/beego/beego/v2/core/validation"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  7 +)
  8 +
  9 +// Command
  10 +type CreditAccountGetCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 +}
  14 +
  15 +func (cmd *CreditAccountGetCommand) Valid(validation *validation.Validation) {
  16 +
  17 +}
  18 +
  19 +func (cmd *CreditAccountGetCommand) ValidateCommand() error {
  20 + valid := validation.Validation{}
  21 + b, err := valid.Valid(cmd)
  22 + if err != nil {
  23 + return err
  24 + }
  25 + if !b {
  26 + for _, validErr := range valid.Errors {
  27 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  28 + }
  29 + }
  30 + return nil
  31 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 + "github.com/beego/beego/v2/core/validation"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  7 +)
  8 +
  9 +// Command
  10 +type CreditAccountPayCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 +}
  14 +
  15 +func (cmd *CreditAccountPayCommand) Valid(validation *validation.Validation) {
  16 +
  17 +}
  18 +
  19 +func (cmd *CreditAccountPayCommand) ValidateCommand() error {
  20 + valid := validation.Validation{}
  21 + b, err := valid.Valid(cmd)
  22 + if err != nil {
  23 + return err
  24 + }
  25 + if !b {
  26 + for _, validErr := range valid.Errors {
  27 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  28 + }
  29 + }
  30 + return nil
  31 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 + "github.com/beego/beego/v2/core/validation"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  7 +)
  8 +
  9 +// Command
  10 +type CreditAccountPaySearchCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 +}
  14 +
  15 +func (cmd *CreditAccountPaySearchCommand) Valid(validation *validation.Validation) {
  16 +
  17 +}
  18 +
  19 +func (cmd *CreditAccountPaySearchCommand) ValidateCommand() error {
  20 + valid := validation.Validation{}
  21 + b, err := valid.Valid(cmd)
  22 + if err != nil {
  23 + return err
  24 + }
  25 + if !b {
  26 + for _, validErr := range valid.Errors {
  27 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  28 + }
  29 + }
  30 + return nil
  31 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 + "github.com/beego/beego/v2/core/validation"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  7 +)
  8 +
  9 +// Command
  10 +type CreditAccountSearchCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 +}
  14 +
  15 +func (cmd *CreditAccountSearchCommand) Valid(validation *validation.Validation) {
  16 +
  17 +}
  18 +
  19 +func (cmd *CreditAccountSearchCommand) ValidateCommand() error {
  20 + valid := validation.Validation{}
  21 + b, err := valid.Valid(cmd)
  22 + if err != nil {
  23 + return err
  24 + }
  25 + if !b {
  26 + for _, validErr := range valid.Errors {
  27 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  28 + }
  29 + }
  30 + return nil
  31 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type CreateCooperationProjectCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + // 模式编码,唯一确定
  14 + CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
  15 + // 发起组织ID
  16 + OrgId int64 `json:"orgId,string," valid:"Required"`
  17 + // 共创项目名称
  18 + CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
  19 + // 共创发起人id
  20 + CooperationProjectSponsor string `json:"cooperationProjectSponsor,string,"`
  21 + // 项目承接对象
  22 + CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"`
  23 + // 共创项目描述
  24 + CooperationProjectDescription string `json:"cooperationProjectDescription" valid:"Required"`
  25 + //图片
  26 + Images []string `json:"images"`
  27 +}
  28 +
  29 +func (createCooperationProjectCommand *CreateCooperationProjectCommand) Valid(validation *validation.Validation) {
  30 +}
  31 +
  32 +func (createCooperationProjectCommand *CreateCooperationProjectCommand) ValidateCommand() error {
  33 + valid := validation.Validation{}
  34 + b, err := valid.Valid(createCooperationProjectCommand)
  35 + if err != nil {
  36 + return err
  37 + }
  38 + if !b {
  39 + for _, validErr := range valid.Errors {
  40 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  41 + }
  42 + }
  43 + return nil
  44 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type EndCooperationProjectCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + // 共创项目id
  14 + CooperationProjectId []int64 `json:"cooperationProjectId,omitempty"`
  15 +}
  16 +
  17 +func (endCooperationProjectCommand *EndCooperationProjectCommand) Valid(validation *validation.Validation) {
  18 + validation.SetError("CustomValid", "未实现的自定义认证")
  19 +}
  20 +
  21 +func (endCooperationProjectCommand *EndCooperationProjectCommand) ValidateCommand() error {
  22 + valid := validation.Validation{}
  23 + b, err := valid.Valid(endCooperationProjectCommand)
  24 + if err != nil {
  25 + return err
  26 + }
  27 + if !b {
  28 + for _, validErr := range valid.Errors {
  29 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  30 + }
  31 + }
  32 + return nil
  33 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type GetCooperationProjectQuery struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + // 共创项目ID
  14 + CooperationProjectId int `json:"cooperationProjectId,string" valid:"Required"`
  15 +}
  16 +
  17 +func (getCooperationProjectQuery *GetCooperationProjectQuery) Valid(validation *validation.Validation) {
  18 +
  19 +}
  20 +
  21 +func (getCooperationProjectQuery *GetCooperationProjectQuery) ValidateQuery() error {
  22 + valid := validation.Validation{}
  23 + b, err := valid.Valid(getCooperationProjectQuery)
  24 + if err != nil {
  25 + return err
  26 + }
  27 + if !b {
  28 + for _, validErr := range valid.Errors {
  29 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  30 + }
  31 + }
  32 + return nil
  33 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type ListCooperationProjectQuery struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + // 查询偏离量
  14 + PageNumber int `json:"pageNumber"`
  15 + // 查询限制
  16 + PageSize int `json:"pageSize" valid:"Required"`
  17 + // 项目状态 全部、招标中、已结束
  18 + // Status int32 `json:"status" valid:"Required"`
  19 + //发起部门名称
  20 + DepartmentName string `json:"departmentName"`
  21 + //项目名称
  22 + CooperationProjectName string `json:"cooperationProjectName"`
  23 +}
  24 +
  25 +func (listCooperationProjectQuery *ListCooperationProjectQuery) Valid(validation *validation.Validation) {
  26 +
  27 +}
  28 +
  29 +func (listCooperationProjectQuery *ListCooperationProjectQuery) ValidateQuery() error {
  30 + valid := validation.Validation{}
  31 + b, err := valid.Valid(listCooperationProjectQuery)
  32 + if err != nil {
  33 + return err
  34 + }
  35 + if !b {
  36 + for _, validErr := range valid.Errors {
  37 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  38 + }
  39 + }
  40 + return nil
  41 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/beego/beego/v2/core/validation"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  8 +)
  9 +
  10 +type UpdateCooperationProjectCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 + // 共创项目ID
  14 + CooperationProjectId string `json:"cooperationProjectId,string" valid:"Required"`
  15 + // 模式编码,唯一确定
  16 + CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
  17 + // 组织ID
  18 + OrgId string `json:"orgId" valid:"Required"`
  19 + // 共创项目名称
  20 + CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
  21 + // 共创发起人id
  22 + CooperationProjectSponsor string `json:"cooperationProjectSponsor,omitempty"`
  23 + // 项目承接对象
  24 + CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerType,omitempty"`
  25 + // 共创项目描述
  26 + CooperationProjectDescription string `json:"cooperationProjectDescription" valid:"Required"`
  27 + //图片
  28 + Images []string `json:"images"`
  29 +}
  30 +
  31 +func (updateCooperationProjectCommand *UpdateCooperationProjectCommand) Valid(validation *validation.Validation) {
  32 + validation.SetError("CustomValid", "未实现的自定义认证")
  33 +}
  34 +
  35 +func (updateCooperationProjectCommand *UpdateCooperationProjectCommand) ValidateCommand() error {
  36 + valid := validation.Validation{}
  37 + b, err := valid.Valid(updateCooperationProjectCommand)
  38 + if err != nil {
  39 + return err
  40 + }
  41 + if !b {
  42 + for _, validErr := range valid.Errors {
  43 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  44 + }
  45 + }
  46 + return nil
  47 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 + "github.com/beego/beego/v2/core/validation"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  7 +)
  8 +
  9 +// Command
  10 +type CreateFeedbackCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 +}
  14 +
  15 +func (cmd *CreateFeedbackCommand) Valid(validation *validation.Validation) {
  16 +
  17 +}
  18 +
  19 +func (cmd *CreateFeedbackCommand) ValidateCommand() error {
  20 + valid := validation.Validation{}
  21 + b, err := valid.Valid(cmd)
  22 + if err != nil {
  23 + return err
  24 + }
  25 + if !b {
  26 + for _, validErr := range valid.Errors {
  27 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  28 + }
  29 + }
  30 + return nil
  31 +}
  1 +package command
  2 +
  3 +import (
  4 + "fmt"
  5 + "github.com/beego/beego/v2/core/validation"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  7 +)
  8 +
  9 +// Command
  10 +type SearchFeedbackCommand struct {
  11 + //操作人
  12 + Operator domain.Operator `json:"-"`
  13 +}
  14 +
  15 +func (cmd *SearchFeedbackCommand) Valid(validation *validation.Validation) {
  16 +
  17 +}
  18 +
  19 +func (cmd *SearchFeedbackCommand) ValidateCommand() error {
  20 + valid := validation.Validation{}
  21 + b, err := valid.Valid(cmd)
  22 + if err != nil {
  23 + return err
  24 + }
  25 + if !b {
  26 + for _, validErr := range valid.Errors {
  27 + return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  28 + }
  29 + }
  30 + return nil
  31 +}
  1 +package service
  2 +
  3 +import (
  4 + "github.com/linmadan/egglib-go/core/application"
  5 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
  7 +)
  8 +
  9 +// CompanyCreditAccountService 企业端账期结算
  10 +type CompanyCreditAccountService struct {
  11 +}
  12 +
  13 +// IndexStatistics TODO:企业的账期结算列表(分红信息按合约划分)
  14 +func (srv CompanyCreditAccountService) CreditAccountSearch(userMenusCommand *command.CreditAccountSearchCommand) (interface{}, error) {
  15 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  16 + userMenusCommand.Operator)
  17 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  18 + UserId: int(userMenusCommand.Operator.UserId),
  19 + })
  20 + if err != nil {
  21 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  22 + }
  23 + return map[string]interface{}{
  24 + "accessMenus": resultMenu.Menus,
  25 + }, nil
  26 +}
  27 +
  28 +// IndexStatistics TODO:企业的账期结算明细
  29 +func (srv CompanyCreditAccountService) CreditAccountGet(userMenusCommand *command.CreditAccountGetCommand) (interface{}, error) {
  30 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  31 + userMenusCommand.Operator)
  32 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  33 + UserId: int(userMenusCommand.Operator.UserId),
  34 + })
  35 + if err != nil {
  36 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  37 + }
  38 + return map[string]interface{}{
  39 + "accessMenus": resultMenu.Menus,
  40 + }, nil
  41 +}
  42 +
  43 +// IndexStatistics TODO:企业的账期结算支付
  44 +func (srv CompanyCreditAccountService) CreditAccountPay(userMenusCommand *command.CreditAccountPayCommand) (interface{}, error) {
  45 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  46 + userMenusCommand.Operator)
  47 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  48 + UserId: int(userMenusCommand.Operator.UserId),
  49 + })
  50 + if err != nil {
  51 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  52 + }
  53 + return map[string]interface{}{
  54 + "accessMenus": resultMenu.Menus,
  55 + }, nil
  56 +}
  57 +
  58 +// IndexStatistics TODO:企业分红结算支付记录
  59 +func (srv CompanyCreditAccountService) CreditAccountPaySearch(userMenusCommand *command.CreditAccountPaySearchCommand) (interface{}, error) {
  60 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  61 + userMenusCommand.Operator)
  62 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  63 + UserId: int(userMenusCommand.Operator.UserId),
  64 + })
  65 + if err != nil {
  66 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  67 + }
  68 + return map[string]interface{}{
  69 + "accessMenus": resultMenu.Menus,
  70 + }, nil
  71 +}
  1 +package service
  2 +
  3 +import (
  4 + "github.com/linmadan/egglib-go/core/application"
  5 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
  7 +)
  8 +
  9 +// CooperationApplicationsService 共创申请服务
  10 +type CooperationApplicationsService struct {
  11 +}
  12 +
  13 +/***** 企业端 *****/
  14 +
  15 +// GetCooperationApplications TODO:企业获取共创申请详情
  16 +func (srv CooperationApplicationsService) GetCooperationApplications(userMenusCommand *command.GetCooperationApplicationQuery) (interface{}, error) {
  17 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  18 + userMenusCommand.Operator)
  19 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  20 + UserId: int(userMenusCommand.Operator.UserId),
  21 + })
  22 + if err != nil {
  23 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  24 + }
  25 + return map[string]interface{}{
  26 + "accessMenus": resultMenu.Menus,
  27 + }, nil
  28 +}
  29 +
  30 +// GetCooperationApplications TODO:企业审核共创申请
  31 +func (srv CooperationApplicationsService) AuditCooperationApplications(userMenusCommand *command.AuditCooperationApplicationCommand) (interface{}, error) {
  32 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  33 + userMenusCommand.Operator)
  34 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  35 + UserId: int(userMenusCommand.Operator.UserId),
  36 + })
  37 + if err != nil {
  38 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  39 + }
  40 + return map[string]interface{}{
  41 + "accessMenus": resultMenu.Menus,
  42 + }, nil
  43 +}
  44 +
  45 +// GetCooperationApplications TODO:企业获取共创申请列表
  46 +func (srv CooperationApplicationsService) SearchCooperationApplications(userMenusCommand *command.ListCooperationApplicationQuery) (interface{}, error) {
  47 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  48 + userMenusCommand.Operator)
  49 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  50 + UserId: int(userMenusCommand.Operator.UserId),
  51 + })
  52 + if err != nil {
  53 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  54 + }
  55 + return map[string]interface{}{
  56 + "accessMenus": resultMenu.Menus,
  57 + }, nil
  58 +}
  59 +
  60 +/***** 共创用户端 *****/
  61 +
  62 +// GetCooperationApplications TODO:创建共创申请管理
  63 +func (srv CooperationApplicationsService) CreateCooperationApplications(userMenusCommand *command.CreateCooperationApplicationCommand) (interface{}, error) {
  64 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  65 + userMenusCommand.Operator)
  66 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  67 + UserId: int(userMenusCommand.Operator.UserId),
  68 + })
  69 + if err != nil {
  70 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  71 + }
  72 + return map[string]interface{}{
  73 + "accessMenus": resultMenu.Menus,
  74 + }, nil
  75 +}
  76 +
  77 +//PersonGetCooperationApplications TODO:共创用户获取共创申请详情
  78 +func (srv CooperationApplicationsService) PersonGetCooperationApplications(userMenusCommand *command.GetCooperationApplicationQuery) (interface{}, error) {
  79 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  80 + userMenusCommand.Operator)
  81 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  82 + UserId: int(userMenusCommand.Operator.UserId),
  83 + })
  84 + if err != nil {
  85 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  86 + }
  87 + return map[string]interface{}{
  88 + "accessMenus": resultMenu.Menus,
  89 + }, nil
  90 +}
  91 +
  92 +// GetCooperationApplications TODO:共创用户取消共创申请
  93 +func (srv CooperationApplicationsService) PersonCancelCooperationApplications(userMenusCommand *command.CancelCooperationApplicationCommand) (interface{}, error) {
  94 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  95 + userMenusCommand.Operator)
  96 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  97 + UserId: int(userMenusCommand.Operator.UserId),
  98 + })
  99 + if err != nil {
  100 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  101 + }
  102 + return map[string]interface{}{
  103 + "accessMenus": resultMenu.Menus,
  104 + }, nil
  105 +}
  106 +
  107 +// GetCooperationApplications TODO:共创用户获取共创申请列表
  108 +func (srv CooperationApplicationsService) PersonSearchCooperationApplications(userMenusCommand *command.ListCooperationApplicationQuery) (interface{}, error) {
  109 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  110 + userMenusCommand.Operator)
  111 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  112 + UserId: int(userMenusCommand.Operator.UserId),
  113 + })
  114 + if err != nil {
  115 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  116 + }
  117 + return map[string]interface{}{
  118 + "accessMenus": resultMenu.Menus,
  119 + }, nil
  120 +}
  1 +package service
  2 +
  3 +import (
  4 + "github.com/linmadan/egglib-go/core/application"
  5 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
  7 +)
  8 +
  9 +// CooperationProjectService 共创项目服务
  10 +type CooperationProjectService struct {
  11 +}
  12 +
  13 +// CreateCooperationProject TODO:创建共创项目
  14 +func (srv CooperationProjectService) CreateCooperationProject(userMenusCommand *command.CreateCooperationProjectCommand) (interface{}, error) {
  15 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  16 + userMenusCommand.Operator)
  17 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  18 + UserId: int(userMenusCommand.Operator.UserId),
  19 + })
  20 + if err != nil {
  21 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  22 + }
  23 + return map[string]interface{}{
  24 + "accessMenus": resultMenu.Menus,
  25 + }, nil
  26 +}
  27 +
  28 +// GetCooperationProject TODO:返回共创项目明细
  29 +func (srv CooperationProjectService) GetCooperationProject(userMenusCommand *command.GetCooperationProjectQuery) (interface{}, error) {
  30 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  31 + userMenusCommand.Operator)
  32 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  33 + UserId: int(userMenusCommand.Operator.UserId),
  34 + })
  35 + if err != nil {
  36 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  37 + }
  38 + return map[string]interface{}{
  39 + "accessMenus": resultMenu.Menus,
  40 + }, nil
  41 +}
  42 +
  43 +// UpdateCooperationProject TODO:企业更新共创项目
  44 +func (srv CooperationProjectService) UpdateCooperationProject(userMenusCommand *command.UpdateCooperationProjectCommand) (interface{}, error) {
  45 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  46 + userMenusCommand.Operator)
  47 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  48 + UserId: int(userMenusCommand.Operator.UserId),
  49 + })
  50 + if err != nil {
  51 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  52 + }
  53 + return map[string]interface{}{
  54 + "accessMenus": resultMenu.Menus,
  55 + }, nil
  56 +}
  57 +
  58 +// EndCooperationProject TODO:企业结束共创项目
  59 +func (srv CooperationProjectService) EndCooperationProject(userMenusCommand *command.EndCooperationProjectCommand) (interface{}, error) {
  60 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  61 + userMenusCommand.Operator)
  62 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  63 + UserId: int(userMenusCommand.Operator.UserId),
  64 + })
  65 + if err != nil {
  66 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  67 + }
  68 + return map[string]interface{}{
  69 + "accessMenus": resultMenu.Menus,
  70 + }, nil
  71 +}
  72 +
  73 +// SearchCooperationProject TODO:获取共创项目列表
  74 +func (srv CooperationProjectService) SearchCooperationProject(userMenusCommand *command.ListCooperationProjectQuery) (interface{}, error) {
  75 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  76 + userMenusCommand.Operator)
  77 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  78 + UserId: int(userMenusCommand.Operator.UserId),
  79 + })
  80 + if err != nil {
  81 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  82 + }
  83 + return map[string]interface{}{
  84 + "accessMenus": resultMenu.Menus,
  85 + }, nil
  86 +}
  1 +package service
  2 +
  3 +import (
  4 + "github.com/linmadan/egglib-go/core/application"
  5 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
  7 +)
  8 +
  9 +// UndertakerFeedbackService 承接反馈服务
  10 +type UndertakerFeedbackService struct {
  11 +}
  12 +
  13 +// CreateCooperationProject TODO:承接反馈列表
  14 +func (srv UndertakerFeedbackService) SearchFeedback(userMenusCommand *command.SearchFeedbackCommand) (interface{}, error) {
  15 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  16 + userMenusCommand.Operator)
  17 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  18 + UserId: int(userMenusCommand.Operator.UserId),
  19 + })
  20 + if err != nil {
  21 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  22 + }
  23 + return map[string]interface{}{
  24 + "accessMenus": resultMenu.Menus,
  25 + }, nil
  26 +}
  27 +
  28 +// CreateCooperationProject TODO:创建承接反馈
  29 +func (srv UndertakerFeedbackService) CreateFeedback(userMenusCommand *command.CreateFeedbackCommand) (interface{}, error) {
  30 + creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
  31 + userMenusCommand.Operator)
  32 + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
  33 + UserId: int(userMenusCommand.Operator.UserId),
  34 + })
  35 + if err != nil {
  36 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  37 + }
  38 + return map[string]interface{}{
  39 + "accessMenus": resultMenu.Menus,
  40 + }, nil
  41 +}
@@ -10,6 +10,245 @@ type CooperationController struct { @@ -10,6 +10,245 @@ type CooperationController struct {
10 baseController 10 baseController
11 } 11 }
12 12
  13 +/***** CooperationApplicationsService 共创申请服务 *****/
  14 +func (controller *CooperationController) SearchFeedback() {
  15 + svr := service.UndertakerFeedbackService{}
  16 + cmd := &command.SearchFeedbackCommand{}
  17 + err := controller.Unmarshal(cmd)
  18 + if err != nil {
  19 + controller.Response(nil, err)
  20 + return
  21 + }
  22 + cmd.Operator = controller.GetOperator()
  23 + data, err := svr.SearchFeedback(cmd)
  24 + controller.Response(data, err)
  25 +}
  26 +
  27 +func (controller *CooperationController) CreateFeedback() {
  28 + svr := service.UndertakerFeedbackService{}
  29 + cmd := &command.CreateFeedbackCommand{}
  30 + err := controller.Unmarshal(cmd)
  31 + if err != nil {
  32 + controller.Response(nil, err)
  33 + return
  34 + }
  35 + cmd.Operator = controller.GetOperator()
  36 + data, err := svr.CreateFeedback(cmd)
  37 + controller.Response(data, err)
  38 +}
  39 +
  40 +/***** CooperationApplicationsService 共创申请服务 - 企业端 *****/
  41 +func (controller *CooperationController) GetCooperationApplication() {
  42 + svr := service.CooperationApplicationsService{}
  43 + cmd := &command.GetCooperationApplicationQuery{}
  44 + err := controller.Unmarshal(cmd)
  45 + if err != nil {
  46 + controller.Response(nil, err)
  47 + return
  48 + }
  49 + cmd.Operator = controller.GetOperator()
  50 + data, err := svr.GetCooperationApplications(cmd)
  51 + controller.Response(data, err)
  52 +}
  53 +
  54 +func (controller *CooperationController) AuditCooperationApplication() {
  55 + svr := service.CooperationApplicationsService{}
  56 + cmd := &command.AuditCooperationApplicationCommand{}
  57 + err := controller.Unmarshal(cmd)
  58 + if err != nil {
  59 + controller.Response(nil, err)
  60 + return
  61 + }
  62 + cmd.Operator = controller.GetOperator()
  63 + data, err := svr.AuditCooperationApplications(cmd)
  64 + controller.Response(data, err)
  65 +}
  66 +
  67 +func (controller *CooperationController) SearchCooperationApplication() {
  68 + svr := service.CooperationApplicationsService{}
  69 + cmd := &command.ListCooperationApplicationQuery{}
  70 + err := controller.Unmarshal(cmd)
  71 + if err != nil {
  72 + controller.Response(nil, err)
  73 + return
  74 + }
  75 + cmd.Operator = controller.GetOperator()
  76 + data, err := svr.SearchCooperationApplications(cmd)
  77 + controller.Response(data, err)
  78 +}
  79 +
  80 +/***** CooperationApplicationsService 共创申请服务 - 共创用户端 *****/
  81 +func (controller *CooperationController) CreateCooperationApplication() {
  82 + svr := service.CooperationApplicationsService{}
  83 + cmd := &command.CreateCooperationApplicationCommand{}
  84 + err := controller.Unmarshal(cmd)
  85 + if err != nil {
  86 + controller.Response(nil, err)
  87 + return
  88 + }
  89 + cmd.Operator = controller.GetOperator()
  90 + data, err := svr.CreateCooperationApplications(cmd)
  91 + controller.Response(data, err)
  92 +}
  93 +
  94 +func (controller *CooperationController) PersonGetCooperationApplication() {
  95 + svr := service.CooperationApplicationsService{}
  96 + cmd := &command.GetCooperationApplicationQuery{}
  97 + err := controller.Unmarshal(cmd)
  98 + if err != nil {
  99 + controller.Response(nil, err)
  100 + return
  101 + }
  102 + cmd.Operator = controller.GetOperator()
  103 + data, err := svr.PersonGetCooperationApplications(cmd)
  104 + controller.Response(data, err)
  105 +}
  106 +
  107 +func (controller *CooperationController) PersonCancelCooperationApplication() {
  108 + svr := service.CooperationApplicationsService{}
  109 + cmd := &command.CancelCooperationApplicationCommand{}
  110 + err := controller.Unmarshal(cmd)
  111 + if err != nil {
  112 + controller.Response(nil, err)
  113 + return
  114 + }
  115 + cmd.Operator = controller.GetOperator()
  116 + data, err := svr.PersonCancelCooperationApplications(cmd)
  117 + controller.Response(data, err)
  118 +}
  119 +
  120 +func (controller *CooperationController) PersonSearchCooperationApplication() {
  121 + svr := service.CooperationApplicationsService{}
  122 + cmd := &command.ListCooperationApplicationQuery{}
  123 + err := controller.Unmarshal(cmd)
  124 + if err != nil {
  125 + controller.Response(nil, err)
  126 + return
  127 + }
  128 + cmd.Operator = controller.GetOperator()
  129 + data, err := svr.PersonSearchCooperationApplications(cmd)
  130 + controller.Response(data, err)
  131 +}
  132 +
  133 +/***** CooperationProjectService 共创项目服务 *****/
  134 +func (controller *CooperationController) CreateCooperationProject() {
  135 + svr := service.CooperationProjectService{}
  136 + cmd := &command.CreateCooperationProjectCommand{}
  137 + err := controller.Unmarshal(cmd)
  138 + if err != nil {
  139 + controller.Response(nil, err)
  140 + return
  141 + }
  142 + cmd.Operator = controller.GetOperator()
  143 + data, err := svr.CreateCooperationProject(cmd)
  144 + controller.Response(data, err)
  145 +}
  146 +
  147 +func (controller *CooperationController) GetCooperationProject() {
  148 + svr := service.CooperationProjectService{}
  149 + cmd := &command.GetCooperationProjectQuery{}
  150 + err := controller.Unmarshal(cmd)
  151 + if err != nil {
  152 + controller.Response(nil, err)
  153 + return
  154 + }
  155 + cmd.Operator = controller.GetOperator()
  156 + data, err := svr.GetCooperationProject(cmd)
  157 + controller.Response(data, err)
  158 +}
  159 +
  160 +func (controller *CooperationController) UpdateCooperationProject() {
  161 + svr := service.CooperationProjectService{}
  162 + cmd := &command.UpdateCooperationProjectCommand{}
  163 + err := controller.Unmarshal(cmd)
  164 + if err != nil {
  165 + controller.Response(nil, err)
  166 + return
  167 + }
  168 + cmd.Operator = controller.GetOperator()
  169 + data, err := svr.UpdateCooperationProject(cmd)
  170 + controller.Response(data, err)
  171 +}
  172 +
  173 +func (controller *CooperationController) EndCooperationProject() {
  174 + svr := service.CooperationProjectService{}
  175 + cmd := &command.EndCooperationProjectCommand{}
  176 + err := controller.Unmarshal(cmd)
  177 + if err != nil {
  178 + controller.Response(nil, err)
  179 + return
  180 + }
  181 + cmd.Operator = controller.GetOperator()
  182 + data, err := svr.EndCooperationProject(cmd)
  183 + controller.Response(data, err)
  184 +}
  185 +
  186 +func (controller *CooperationController) SearchCooperationProject() {
  187 + svr := service.CooperationProjectService{}
  188 + cmd := &command.ListCooperationProjectQuery{}
  189 + err := controller.Unmarshal(cmd)
  190 + if err != nil {
  191 + controller.Response(nil, err)
  192 + return
  193 + }
  194 + cmd.Operator = controller.GetOperator()
  195 + data, err := svr.SearchCooperationProject(cmd)
  196 + controller.Response(data, err)
  197 +}
  198 +
  199 +/***** CompanyCreditAccountService 企业端账期结算 *****/
  200 +func (controller *CooperationController) CreditAccountSearch() {
  201 + svr := service.CompanyCreditAccountService{}
  202 + cmd := &command.CreditAccountSearchCommand{}
  203 + err := controller.Unmarshal(cmd)
  204 + if err != nil {
  205 + controller.Response(nil, err)
  206 + return
  207 + }
  208 + cmd.Operator = controller.GetOperator()
  209 + data, err := svr.CreditAccountSearch(cmd)
  210 + controller.Response(data, err)
  211 +}
  212 +
  213 +func (controller *CooperationController) CreditAccountGet() {
  214 + svr := service.CompanyCreditAccountService{}
  215 + cmd := &command.CreditAccountGetCommand{}
  216 + err := controller.Unmarshal(cmd)
  217 + if err != nil {
  218 + controller.Response(nil, err)
  219 + return
  220 + }
  221 + cmd.Operator = controller.GetOperator()
  222 + data, err := svr.CreditAccountGet(cmd)
  223 + controller.Response(data, err)
  224 +}
  225 +
  226 +func (controller *CooperationController) CreditAccountPay() {
  227 + svr := service.CompanyCreditAccountService{}
  228 + cmd := &command.CreditAccountPayCommand{}
  229 + err := controller.Unmarshal(cmd)
  230 + if err != nil {
  231 + controller.Response(nil, err)
  232 + return
  233 + }
  234 + cmd.Operator = controller.GetOperator()
  235 + data, err := svr.CreditAccountPay(cmd)
  236 + controller.Response(data, err)
  237 +}
  238 +
  239 +func (controller *CooperationController) CreditAccountPaySearch() {
  240 + svr := service.CompanyCreditAccountService{}
  241 + cmd := &command.CreditAccountPaySearchCommand{}
  242 + err := controller.Unmarshal(cmd)
  243 + if err != nil {
  244 + controller.Response(nil, err)
  245 + return
  246 + }
  247 + cmd.Operator = controller.GetOperator()
  248 + data, err := svr.CreditAccountPaySearch(cmd)
  249 + controller.Response(data, err)
  250 +}
  251 +
13 /***** CompanyDividends 企业端分红 *****/ 252 /***** CompanyDividends 企业端分红 *****/
14 func (controller *CooperationController) GetDividendContracts() { 253 func (controller *CooperationController) GetDividendContracts() {
15 svr := service.CompanyStatisticsService{} 254 svr := service.CompanyStatisticsService{}
@@ -9,6 +9,34 @@ import ( @@ -9,6 +9,34 @@ import (
9 9
10 func init() { 10 func init() {
11 11
  12 + /***** 共创申请服务 企业端 *****/
  13 + web.Router("/v1/app/cooperation-applications/:applicationId", &mobile_client.CooperationController{}, "Get:GetCooperationApplication")
  14 + web.Router("/v1/app/cooperation-applications/audit", &mobile_client.CooperationController{}, "Put:AuditCooperationApplication")
  15 + web.Router("/v1/app/cooperation-applications/search", &mobile_client.CooperationController{}, "Post:SearchCooperationApplication")
  16 +
  17 + /***** 共创申请服务 共创用户端 *****/
  18 + web.Router("/v1/app/cooperation-applications", &mobile_client.CooperationController{}, "Post:CreateCooperationApplication")
  19 + web.Router("/v1/app/cooperation-applications/person/:applicationId", &mobile_client.CooperationController{}, "Get:PersonGetCooperationApplication")
  20 + web.Router("/v1/app/cooperation-applications/cancel/:applicationId", &mobile_client.CooperationController{}, "Delete:PersonCancelCooperationApplication")
  21 + web.Router("/v1/app/cooperation-applications/person/search", &mobile_client.CooperationController{}, "Post:PersonSearchCooperationApplication")
  22 +
  23 + /***** 承接反馈 *****/
  24 + web.Router("/v1/app/contract-undertaker-feedbacks", &mobile_client.CooperationController{}, "Post:CreateFeedback")
  25 + web.Router("/v1/app/contract-undertaker-feedbacks/search", &mobile_client.CooperationController{}, "Get:SearchFeedback")
  26 +
  27 + /***** CompanyDividends 共创项目 *****/
  28 + web.Router("/v1/app/cooperation-projects", &mobile_client.CooperationController{}, "Post:CreateCooperationProject")
  29 + web.Router("/v1/app/cooperation-projects/:projectId", &mobile_client.CooperationController{}, "Get:GetCooperationProject")
  30 + web.Router("/v1/app/cooperation-projects/:projectId", &mobile_client.CooperationController{}, "Put:UpdateCooperationProject")
  31 + web.Router("/v1/app/cooperation-projects/end", &mobile_client.CooperationController{}, "Post:EndCooperationProject")
  32 + web.Router("/v1/app/cooperation-projects/search", &mobile_client.CooperationController{}, "Post:SearchCooperationProject")
  33 +
  34 + /***** CompanyDividends 账期结算 *****/
  35 + web.Router("/v1/app/company/credit-accounts/search", &mobile_client.CooperationController{}, "Post:CreditAccountSearch")
  36 + web.Router("/v1/app/company/credit-accounts/:creditId", &mobile_client.CooperationController{}, "Get:CreditAccountGet")
  37 + web.Router("/v1/app/company/credit-accounts/pay", &mobile_client.CooperationController{}, "Post:CreditAccountPay")
  38 + web.Router("/v1/app/company/credit-accounts/pay/search", &mobile_client.CooperationController{}, "Post:CreditAccountPaySearch")
  39 +
12 /***** CompanyDividends 企业端分红 *****/ 40 /***** CompanyDividends 企业端分红 *****/
13 web.Router("/v1/app/cooperation/company/dividends/contracts", &mobile_client.CooperationController{}, "Get:GetDividendContracts") 41 web.Router("/v1/app/cooperation/company/dividends/contracts", &mobile_client.CooperationController{}, "Get:GetDividendContracts")
14 web.Router("/v1/app/cooperation/company/dividends/sum", &mobile_client.CooperationController{}, "Post:DividendsStatistics") 42 web.Router("/v1/app/cooperation/company/dividends/sum", &mobile_client.CooperationController{}, "Post:DividendsStatistics")