作者 yangfu
@@ -7,9 +7,9 @@ metadata: @@ -7,9 +7,9 @@ metadata:
7 k8s-app: allied-creation-gateway 7 k8s-app: allied-creation-gateway
8 spec: 8 spec:
9 ports: 9 ports:
10 - - name: "http"  
11 - port: 80  
12 - targetPort: 8082 10 + - name: "http"
  11 + port: 80
  12 + targetPort: 8082
13 selector: 13 selector:
14 k8s-app: allied-creation-gateway 14 k8s-app: allied-creation-gateway
15 --- 15 ---
@@ -43,74 +43,78 @@ spec: @@ -43,74 +43,78 @@ spec:
43 - cn-hangzhou.i-bp1euf5u1ph9kbhtndhb 43 - cn-hangzhou.i-bp1euf5u1ph9kbhtndhb
44 - cn-hangzhou.i-bp1hyp5oips9cdwxxgxy 44 - cn-hangzhou.i-bp1hyp5oips9cdwxxgxy
45 containers: 45 containers:
46 - - name: allied-creation-gateway  
47 - image: 192.168.0.243:5000/mmm/allied-creation-gateway:dev  
48 - imagePullPolicy: Always  
49 - ports:  
50 - - containerPort: 8082  
51 - volumeMounts:  
52 - - mountPath: /opt/logs  
53 - name: accesslogs  
54 - env:  
55 - - name: POSTGRESQL_DB_NAME  
56 - valueFrom:  
57 - configMapKeyRef:  
58 - name: suplus-config  
59 - key: postgresqlalliedcreation.dbname  
60 - - name: POSTGRESQL_USER  
61 - valueFrom:  
62 - configMapKeyRef:  
63 - name: suplus-config  
64 - key: postgresql.user  
65 - - name: POSTGRESQL_PASSWORD  
66 - valueFrom:  
67 - configMapKeyRef:  
68 - name: suplus-config  
69 - key: postgresql.password  
70 - - name: POSTGRESQL_HOST  
71 - valueFrom:  
72 - configMapKeyRef:  
73 - name: suplus-config  
74 - key: postgresql.host  
75 - - name: POSTGRESQL_PORT  
76 - valueFrom:  
77 - configMapKeyRef:  
78 - name: suplus-config  
79 - key: postgresql.port  
80 - - name: REDIS_HOST  
81 - valueFrom:  
82 - configMapKeyRef:  
83 - name: suplus-config  
84 - key: redis.ip  
85 - - name: REDIS_PORT  
86 - valueFrom:  
87 - configMapKeyRef:  
88 - name: suplus-config  
89 - key: redis.port  
90 - - name: REDIS_AUTH  
91 - value: ""  
92 - - name: LOG_LEVEL  
93 - value: "debug"  
94 - - name: ERROR_BASE_CODE  
95 - value: "1"  
96 - - name: ERROR_BASE_CODE_MULTIPLE  
97 - value: "1000"  
98 - - name: ENABLE_KAFKA_LOG  
99 - value: "true"  
100 - - name: HTTP_PORT  
101 - value: "8082"  
102 - - name: ALLIED_CREATION_USER_HOST  
103 - value: "http://allied-creation-user-dev.fjmaimaimai.com"  
104 -# - name: REDIS_HOST  
105 -# valueFrom:  
106 -# configMapKeyRef:  
107 -# name: suplus-config  
108 -# key: redis.ip  
109 -# - name: REDIS_PORT  
110 -# valueFrom:  
111 -# configMapKeyRef:  
112 -# name: suplus-config  
113 -# key: redis.port 46 + - name: allied-creation-gateway
  47 + image: 192.168.0.243:5000/mmm/allied-creation-gateway:dev
  48 + imagePullPolicy: Always
  49 + ports:
  50 + - containerPort: 8082
  51 + volumeMounts:
  52 + - mountPath: /opt/logs
  53 + name: accesslogs
  54 + env:
  55 + - name: POSTGRESQL_DB_NAME
  56 + valueFrom:
  57 + configMapKeyRef:
  58 + name: suplus-config
  59 + key: postgresqlalliedcreation.dbname
  60 + - name: POSTGRESQL_USER
  61 + valueFrom:
  62 + configMapKeyRef:
  63 + name: suplus-config
  64 + key: postgresql.user
  65 + - name: POSTGRESQL_PASSWORD
  66 + valueFrom:
  67 + configMapKeyRef:
  68 + name: suplus-config
  69 + key: postgresql.password
  70 + - name: POSTGRESQL_HOST
  71 + valueFrom:
  72 + configMapKeyRef:
  73 + name: suplus-config
  74 + key: postgresql.host
  75 + - name: POSTGRESQL_PORT
  76 + valueFrom:
  77 + configMapKeyRef:
  78 + name: suplus-config
  79 + key: postgresql.port
  80 + - name: REDIS_HOST
  81 + valueFrom:
  82 + configMapKeyRef:
  83 + name: suplus-config
  84 + key: redis.ip
  85 + - name: REDIS_PORT
  86 + valueFrom:
  87 + configMapKeyRef:
  88 + name: suplus-config
  89 + key: redis.port
  90 + - name: REDIS_AUTH
  91 + value: ""
  92 + - name: LOG_LEVEL
  93 + value: "debug"
  94 + - name: ERROR_BASE_CODE
  95 + value: "1"
  96 + - name: ERROR_BASE_CODE_MULTIPLE
  97 + value: "1000"
  98 + - name: ENABLE_KAFKA_LOG
  99 + value: "true"
  100 + - name: HTTP_PORT
  101 + value: "8082"
  102 + - name: ALLIED_CREATION_USER_HOST
  103 + value: "http://allied-creation-user-dev.fjmaimaimai.com"
  104 + - name: ALLIED_CREATION_COOPERATION_HOST
  105 + value: "http://allied-creation-cooperation-dev.fjmaimaimai.com/"
  106 + - name: SMS_SERVE_HOST
  107 + value: "https://sms.fjmaimaimai.com:9897"
  108 + # - name: REDIS_HOST
  109 + # valueFrom:
  110 + # configMapKeyRef:
  111 + # name: suplus-config
  112 + # key: redis.ip
  113 + # - name: REDIS_PORT
  114 + # valueFrom:
  115 + # configMapKeyRef:
  116 + # name: suplus-config
  117 + # key: redis.port
114 volumes: 118 volumes:
115 - - name: accesslogs  
116 - emptyDir: {}  
  119 + - name: accesslogs
  120 + emptyDir: {}
@@ -7,9 +7,9 @@ metadata: @@ -7,9 +7,9 @@ metadata:
7 k8s-app: project 7 k8s-app: project
8 spec: 8 spec:
9 ports: 9 ports:
10 - - name: "http"  
11 - port: 80  
12 - targetPort: 8082 10 + - name: "http"
  11 + port: 80
  12 + targetPort: 8082
13 selector: 13 selector:
14 k8s-app: project 14 k8s-app: project
15 --- 15 ---
@@ -43,21 +43,21 @@ spec: @@ -43,21 +43,21 @@ spec:
43 - cn-hangzhou.i-bp1euf5u1ph9kbhtndhb 43 - cn-hangzhou.i-bp1euf5u1ph9kbhtndhb
44 - cn-hangzhou.i-bp1hyp5oips9cdwxxgxy 44 - cn-hangzhou.i-bp1hyp5oips9cdwxxgxy
45 containers: 45 containers:
46 - - name: project  
47 - image: 192.168.0.243:5000/mmm/project:dev  
48 - imagePullPolicy: Always  
49 - ports:  
50 - - containerPort: 8082  
51 - volumeMounts:  
52 - - mountPath: /opt/logs  
53 - name: accesslogs  
54 - env:  
55 - - name: LOG_LEVEL  
56 - value: "debug"  
57 - - name: ERROR_BASE_CODE  
58 - value: "1"  
59 - - name: ERROR_BASE_CODE_MULTIPLE  
60 - value: "1000" 46 + - name: project
  47 + image: 192.168.0.243:5000/mmm/project:dev
  48 + imagePullPolicy: Always
  49 + ports:
  50 + - containerPort: 8082
  51 + volumeMounts:
  52 + - mountPath: /opt/logs
  53 + name: accesslogs
  54 + env:
  55 + - name: LOG_LEVEL
  56 + value: "debug"
  57 + - name: ERROR_BASE_CODE
  58 + value: "1"
  59 + - name: ERROR_BASE_CODE_MULTIPLE
  60 + value: "1000"
61 volumes: 61 volumes:
62 - - name: accesslogs  
63 - emptyDir: {}  
  62 + - name: accesslogs
  63 + emptyDir: {}
1 -{"D:\\workspaceGo\\src\\allied-creation-gateway\\pkg\\port\\beego\\routers":1628574006679578700}  
  1 +{"D:\\workspaceGo\\src\\allied-creation-gateway\\pkg\\port\\beego\\routers":1628731667364868600}
@@ -15,7 +15,7 @@ type EndCooperationProjectCommand struct { @@ -15,7 +15,7 @@ type EndCooperationProjectCommand struct {
15 } 15 }
16 16
17 func (endCooperationProjectCommand *EndCooperationProjectCommand) Valid(validation *validation.Validation) { 17 func (endCooperationProjectCommand *EndCooperationProjectCommand) Valid(validation *validation.Validation) {
18 - validation.SetError("CustomValid", "未实现的自定义认证") 18 +
19 } 19 }
20 20
21 func (endCooperationProjectCommand *EndCooperationProjectCommand) ValidateCommand() error { 21 func (endCooperationProjectCommand *EndCooperationProjectCommand) ValidateCommand() error {
@@ -29,7 +29,6 @@ type UpdateCooperationProjectCommand struct { @@ -29,7 +29,6 @@ type UpdateCooperationProjectCommand struct {
29 } 29 }
30 30
31 func (updateCooperationProjectCommand *UpdateCooperationProjectCommand) Valid(validation *validation.Validation) { 31 func (updateCooperationProjectCommand *UpdateCooperationProjectCommand) Valid(validation *validation.Validation) {
32 - validation.SetError("CustomValid", "未实现的自定义认证")  
33 } 32 }
34 33
35 func (updateCooperationProjectCommand *UpdateCooperationProjectCommand) ValidateCommand() error { 34 func (updateCooperationProjectCommand *UpdateCooperationProjectCommand) ValidateCommand() error {
@@ -5,13 +5,71 @@ import ( @@ -5,13 +5,71 @@ import (
5 5
6 "github.com/beego/beego/v2/core/validation" 6 "github.com/beego/beego/v2/core/validation"
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
8 - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"  
9 ) 8 )
10 9
11 type UpdateCooperationContractCommand struct { 10 type UpdateCooperationContractCommand struct {
12 //操作人 11 //操作人
13 - Operator domain.Operator `json:"-"`  
14 - allied_creation_cooperation.ReqCooperationContractUpdate 12 + Operator domain.Operator `json:"-"`
  13 + CooperationContractId int `json:"cooperationContractId"`
  14 + // 共创合约描述
  15 + CooperationContractDescription string `json:"cooperationContractDescription"`
  16 + // 共创合约编号
  17 + CooperationContractNumber string `json:"cooperationContractNumber"`
  18 + // 共创项目编号,
  19 + CooperationProjectNumber string `json:"cooperationProjectNumber"`
  20 + // 共创合约发起部门id
  21 + DepartmentId string `json:"departmentId"`
  22 + // 共创合约承接对象,1员工,2共创用户,3公开
  23 + CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"`
  24 + // 共创合约名称
  25 + CooperationContractName string `json:"cooperationContractName"`
  26 + // 共创模式编码,
  27 + CooperationModeNumber string `json:"cooperationModeNumber"`
  28 + // 共创合约发起人uid
  29 + SponsorUid string `json:"sponsorUid"`
  30 + // 业绩分红激励规则列表
  31 + DividendsIncentivesRules []struct {
  32 + // 关联的项目合约编号
  33 + CooperationContractNumber string `json:"cooperationContractNumber"`
  34 + // 推荐人抽成比例
  35 + ReferrerPercentage float64 `json:"referrerPercentage"`
  36 + // 业务员抽成比例
  37 + SalesmanPercentage float64 `json:"salesmanPercentage"`
  38 + // 分红规则激励百分点
  39 + DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
  40 + // 分红规则激励阶段,
  41 + DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string"`
  42 + // 分红规则激励阶段结束
  43 + DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"`
  44 + // 分红规则激励阶段开始
  45 + DividendsIncentivesStageStart int `json:"dividendsIncentivesStageStart"`
  46 + } `json:"dividendsIncentivesRules"`
  47 + // 金额激励规则列表
  48 + MoneyIncentivesRules []struct {
  49 + // 金额激励规则ID
  50 + MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string"`
  51 + // 关联的共创合约编号
  52 + CooperationContractNumber string `json:"cooperationContractNumber"`
  53 + // 激励金额
  54 + MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"`
  55 + // 金额激励阶段
  56 + MoneyIncentivesStage int `json:"moneyIncentivesStage"`
  57 + // 金额激励规则时间
  58 + MoneyIncentivesTime int `json:"moneyIncentivesTime"`
  59 + // 推荐人抽成比例
  60 + ReferrerPercentage float64 `json:"referrerPercentage"`
  61 + // 业务员抽成比例
  62 + SalesmanPercentage float64 `json:"salesmanPercentage"`
  63 + } `json:"moneyIncentivesRules"`
  64 + // 承接方列表
  65 + Undertakers []struct {
  66 + UndertakerId string `json:"undertakerId"` //承接人用户id
  67 + RerferrerId string `json:"rerferrerId"` //推荐人用户id
  68 + SalesmanId string `json:"salesmanId"` //关联业务员id
  69 + Attachment domain.Attachment `json:"attachment"`
  70 + } `json:"undertakers"`
  71 + //关联业务员
  72 + RelevantIds []string `json:"relevantIds"`
15 } 73 }
16 74
17 func (updateCooperationContractCommand *UpdateCooperationContractCommand) Valid(validation *validation.Validation) { 75 func (updateCooperationContractCommand *UpdateCooperationContractCommand) Valid(validation *validation.Validation) {
1 package dto 1 package dto
2 2
3 -import "time" 3 +import (
  4 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
  5 +)
4 6
5 type CooperationContractItem struct { 7 type CooperationContractItem struct {
6 - CooperationContractId int `json:"cooperationContractId,string,"`  
7 - CooperationContractNumber string `json:"cooperationContractNumber"` //合约编号  
8 - CooperationProjectNumber string `json:"cooperationProjectNumber"`  
9 - CooperationContractName string `json:"CooperationContractName"` //合约名称  
10 - Department string `json:"department"` 8 + CooperationContractId int `json:"cooperationContractId,string,"`
  9 + CooperationContractNumber string `json:"cooperationContractNumber"` //合约编号
  10 + CooperationProjectNumber string `json:"cooperationProjectNumber"` //项目编号
  11 + CooperationContractName string `json:"CooperationContractName"` //合约名称
  12 + Status int `json:"status"` //合约状态
  13 + CreateTtime int `json:"createTtime"`
  14 + Department struct {
  15 + DepartmentId int `json:"departmentId"`
  16 + DepartmentName string `json:"departmentName"`
  17 + } `json:"department"`
11 IncentivesType string `json:"incentivesType"` //Incentives激励方式 18 IncentivesType string `json:"incentivesType"` //Incentives激励方式
12 CooperationContractSponsor struct { 19 CooperationContractSponsor struct {
13 UserId int `json:"userId,string,"` 20 UserId int `json:"userId,string,"`
@@ -18,13 +25,34 @@ type CooperationContractItem struct { @@ -18,13 +25,34 @@ type CooperationContractItem struct {
18 CooperationModeNumber string `json:"cooperationModeNumber"` // 共创模式编码, 25 CooperationModeNumber string `json:"cooperationModeNumber"` // 共创模式编码,
19 CooperationModeName string `json:"cooperationModeName"` // 模式名称, 26 CooperationModeName string `json:"cooperationModeName"` // 模式名称,
20 } `json:"cooperationMode"` //共创模式 27 } `json:"cooperationMode"` //共创模式
21 - Status int `json:"status"` //合约状态  
22 - CreateTtime time.Time `json:"createTtime"`  
23 - Org struct {  
24 - OrgId int `json:"orgId"` //发部门, id  
25 - OrgName string `json:"orgName"` //发起企业 28 + Org struct {
  29 + OrgId int `json:"orgId"` // id
  30 + OrgName string `json:"orgName"` //
26 } `json:"org"` //组织结构 31 } `json:"org"` //组织结构
27 } 32 }
28 33
  34 +func ToCooperationContractItem(param *allied_creation_cooperation.CooperationContract) *CooperationContractItem {
  35 + // relevantPeople := []int{}
  36 + data := CooperationContractItem{
  37 + CooperationContractId: param.CooperationContractId,
  38 + CooperationProjectNumber: param.CooperationContractNumber,
  39 + CooperationContractName: param.CooperationContractName,
  40 + CooperationContractNumber: param.CooperationContractNumber,
  41 + Status: param.Status,
  42 + CreateTtime: int(param.CreatedAt.Unix()),
  43 + }
  44 + data.CooperationContractSponsor.UserId = param.CooperationContractSponsor.UserId
  45 + data.CooperationContractSponsor.UserName = param.CooperationContractSponsor.UserInfo.UserName
  46 + data.Department.DepartmentId = param.Department.DepartmentId
  47 + data.Department.DepartmentName = param.Department.DepartmentName
  48 + data.Org.OrgId = int(param.Org.OrgId)
  49 + data.Org.OrgName = param.Org.OrgName
  50 + data.CooperationMode.CooperationModeId = param.CooperationMode.CooperationModeId
  51 + data.CooperationMode.CooperationModeName = param.CooperationMode.CooperationModeName
  52 + data.CooperationMode.CooperationModeNumber = param.CooperationMode.CooperationModeNumber
  53 +
  54 + return nil
  55 +}
  56 +
29 type CooperationContractInfo struct { 57 type CooperationContractInfo struct {
30 } 58 }
@@ -5,6 +5,7 @@ import ( @@ -5,6 +5,7 @@ import (
5 5
6 "github.com/linmadan/egglib-go/core/application" 6 "github.com/linmadan/egglib-go/core/application"
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/command" 7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/command"
  8 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/dto"
8 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/query" 9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/query"
9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" 10 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
10 ) 11 )
@@ -19,7 +20,6 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC @@ -19,7 +20,6 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC
19 return nil, application.ThrowError(application.ARG_ERROR, err.Error()) 20 return nil, application.ThrowError(application.ARG_ERROR, err.Error())
20 } 21 }
21 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationContractCommand.Operator) 22 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationContractCommand.Operator)
22 -  
23 rules1 := []allied_creation_cooperation.DividendsIncentivesRule{} 23 rules1 := []allied_creation_cooperation.DividendsIncentivesRule{}
24 for _, v := range createCooperationContractCommand.DividendsIncentivesRules { 24 for _, v := range createCooperationContractCommand.DividendsIncentivesRules {
25 r := allied_creation_cooperation.DividendsIncentivesRule{ 25 r := allied_creation_cooperation.DividendsIncentivesRule{
@@ -33,9 +33,43 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC @@ -33,9 +33,43 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC
33 } 33 }
34 rules1 = append(rules1, r) 34 rules1 = append(rules1, r)
35 } 35 }
36 - // rules2 := []allied_creation_cooperation.MoneyIncentivesRule{}  
37 -  
38 - _, err := creationCooperationGateway.CooperationContractAdd(allied_creation_cooperation.ReqCooperationContractAdd{}) 36 + rules2 := []allied_creation_cooperation.MoneyIncentivesRule{}
  37 + for _, v := range createCooperationContractCommand.MoneyIncentivesRules {
  38 + r := allied_creation_cooperation.MoneyIncentivesRule{
  39 + MoneyIncentivesRuleId: 0,
  40 + CooperationContractNumber: v.CooperationContractNumber,
  41 + MoneyIncentivesAmount: v.MoneyIncentivesAmount,
  42 + MoneyIncentivesStage: v.MoneyIncentivesStage,
  43 + MoneyIncentivesTime: time.Unix(int64(v.MoneyIncentivesTime), 0),
  44 + ReferrerPercentage: v.ReferrerPercentage,
  45 + SalesmanPercentage: v.SalesmanPercentage,
  46 + }
  47 + rules2 = append(rules2, r)
  48 + }
  49 + underTakers := []allied_creation_cooperation.Undertaker{}
  50 + for _, v := range createCooperationContractCommand.Undertakers {
  51 + u := allied_creation_cooperation.Undertaker{
  52 + UndertakerId: v.UndertakerId,
  53 + RerferrerId: v.RerferrerId,
  54 + SalesmanId: v.SalesmanId,
  55 + Attachment: v.Attachment,
  56 + }
  57 + underTakers = append(underTakers, u)
  58 + }
  59 + _, err := creationCooperationGateway.CooperationContractAdd(allied_creation_cooperation.ReqCooperationContractAdd{
  60 + MoneyIncentivesRules: rules2,
  61 + DividendsIncentivesRules: rules1,
  62 + Undertakers: underTakers,
  63 + RelevantIds: createCooperationContractCommand.RelevantIds,
  64 + CooperationContractDescription: createCooperationContractCommand.CooperationContractDescription,
  65 + CooperationContractNumber: createCooperationContractCommand.CooperationContractNumber,
  66 + CooperationProjectNumber: createCooperationContractCommand.CooperationProjectNumber,
  67 + DepartmentId: createCooperationContractCommand.DepartmentId,
  68 + CooperationContractUndertakerType: createCooperationContractCommand.CooperationContractUndertakerType,
  69 + CooperationContractName: createCooperationContractCommand.CooperationContractName,
  70 + CooperationModeNumber: createCooperationContractCommand.CooperationModeNumber,
  71 + SponsorUid: createCooperationContractCommand.SponsorUid,
  72 + })
39 if err != nil { 73 if err != nil {
40 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 74 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
41 } 75 }
@@ -51,7 +85,7 @@ func (cooperationContractService *CooperationContractService) EnableCooperationC @@ -51,7 +85,7 @@ func (cooperationContractService *CooperationContractService) EnableCooperationC
51 return nil, nil 85 return nil, nil
52 } 86 }
53 87
54 -// 返回共创合约管理 88 +// 返回共创合约详情
55 func (cooperationContractService *CooperationContractService) GetCooperationContract(getCooperationContractQuery *query.GetCooperationContractQuery) (interface{}, error) { 89 func (cooperationContractService *CooperationContractService) GetCooperationContract(getCooperationContractQuery *query.GetCooperationContractQuery) (interface{}, error) {
56 if err := getCooperationContractQuery.ValidateQuery(); err != nil { 90 if err := getCooperationContractQuery.ValidateQuery(); err != nil {
57 return nil, application.ThrowError(application.ARG_ERROR, err.Error()) 91 return nil, application.ThrowError(application.ARG_ERROR, err.Error())
@@ -67,17 +101,25 @@ func (cooperationContractService *CooperationContractService) GetCooperationCont @@ -67,17 +101,25 @@ func (cooperationContractService *CooperationContractService) GetCooperationCont
67 } 101 }
68 102
69 // 返回共创合约管理列表 103 // 返回共创合约管理列表
70 -func (cooperationContractService *CooperationContractService) ListCooperationContract(listCooperationContractQuery *query.ListCooperationContractQuery) (interface{}, error) { 104 +func (cooperationContractService *CooperationContractService) ListCooperationContract(
  105 + listCooperationContractQuery *query.ListCooperationContractQuery) (int, interface{}, error) {
71 if err := listCooperationContractQuery.ValidateQuery(); err != nil { 106 if err := listCooperationContractQuery.ValidateQuery(); err != nil {
72 - return nil, application.ThrowError(application.ARG_ERROR, err.Error()) 107 + return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error())
73 } 108 }
74 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationContractQuery.Operator) 109 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationContractQuery.Operator)
75 result, err := creationCooperationGateway.CooperationContractSearch(allied_creation_cooperation.ReqCooperationContractSearch{}) 110 result, err := creationCooperationGateway.CooperationContractSearch(allied_creation_cooperation.ReqCooperationContractSearch{})
76 if err != nil { 111 if err != nil {
77 - return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 112 + return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
78 } 113 }
79 - _ = result  
80 - return nil, nil 114 +
  115 + data := []dto.CooperationContractItem{}
  116 +
  117 + for i := range result.Grid.List {
  118 + item := dto.ToCooperationContractItem(&result.Grid.List[i])
  119 + data = append(data, *item)
  120 + }
  121 +
  122 + return result.Grid.Total, data, nil
81 } 123 }
82 124
83 // 更新共创合约管理 125 // 更新共创合约管理
@@ -85,6 +127,61 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC @@ -85,6 +127,61 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC
85 if err := updateCooperationContractCommand.ValidateCommand(); err != nil { 127 if err := updateCooperationContractCommand.ValidateCommand(); err != nil {
86 return nil, application.ThrowError(application.ARG_ERROR, err.Error()) 128 return nil, application.ThrowError(application.ARG_ERROR, err.Error())
87 } 129 }
  130 + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationContractCommand.Operator)
  131 + rules1 := []allied_creation_cooperation.DividendsIncentivesRule{}
  132 + for _, v := range updateCooperationContractCommand.DividendsIncentivesRules {
  133 + r := allied_creation_cooperation.DividendsIncentivesRule{
  134 + CooperationContractNumber: v.CooperationContractNumber,
  135 + ReferrerPercentage: v.ReferrerPercentage,
  136 + SalesmanPercentage: v.SalesmanPercentage,
  137 + DividendsIncentivesPercentage: v.DividendsIncentivesPercentage,
  138 + DividendsIncentivesStage: v.DividendsIncentivesStage,
  139 + DividendsIncentivesStageEnd: time.Unix(int64(v.DividendsIncentivesStageEnd), 0),
  140 + DividendsIncentivesStageStart: time.Unix(int64(v.DividendsIncentivesStageStart), 0),
  141 + }
  142 + rules1 = append(rules1, r)
  143 + }
  144 + rules2 := []allied_creation_cooperation.MoneyIncentivesRule{}
  145 + for _, v := range updateCooperationContractCommand.MoneyIncentivesRules {
  146 + r := allied_creation_cooperation.MoneyIncentivesRule{
  147 + MoneyIncentivesRuleId: 0,
  148 + CooperationContractNumber: v.CooperationContractNumber,
  149 + MoneyIncentivesAmount: v.MoneyIncentivesAmount,
  150 + MoneyIncentivesStage: v.MoneyIncentivesStage,
  151 + MoneyIncentivesTime: time.Unix(int64(v.MoneyIncentivesTime), 0),
  152 + ReferrerPercentage: v.ReferrerPercentage,
  153 + SalesmanPercentage: v.SalesmanPercentage,
  154 + }
  155 + rules2 = append(rules2, r)
  156 + }
  157 + underTakers := []allied_creation_cooperation.Undertaker{}
  158 + for _, v := range updateCooperationContractCommand.Undertakers {
  159 + u := allied_creation_cooperation.Undertaker{
  160 + UndertakerId: v.UndertakerId,
  161 + RerferrerId: v.RerferrerId,
  162 + SalesmanId: v.SalesmanId,
  163 + Attachment: v.Attachment,
  164 + }
  165 + underTakers = append(underTakers, u)
  166 + }
  167 + _, err := creationCooperationGateway.CooperationContractUpdate(allied_creation_cooperation.ReqCooperationContractUpdate{
  168 + CooperationContractId: updateCooperationContractCommand.CooperationContractId,
  169 + MoneyIncentivesRules: rules2,
  170 + DividendsIncentivesRules: rules1,
  171 + Undertakers: underTakers,
  172 + RelevantIds: updateCooperationContractCommand.RelevantIds,
  173 + CooperationContractDescription: updateCooperationContractCommand.CooperationContractDescription,
  174 + CooperationContractNumber: updateCooperationContractCommand.CooperationContractNumber,
  175 + CooperationProjectNumber: updateCooperationContractCommand.CooperationProjectNumber,
  176 + DepartmentId: updateCooperationContractCommand.DepartmentId,
  177 + CooperationContractUndertakerType: updateCooperationContractCommand.CooperationContractUndertakerType,
  178 + CooperationContractName: updateCooperationContractCommand.CooperationContractName,
  179 + CooperationModeNumber: updateCooperationContractCommand.CooperationModeNumber,
  180 + SponsorUid: updateCooperationContractCommand.SponsorUid,
  181 + })
  182 + if err != nil {
  183 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  184 + }
88 return nil, nil 185 return nil, nil
89 } 186 }
90 187
@@ -33,6 +33,12 @@ func init() { @@ -33,6 +33,12 @@ func init() {
33 if os.Getenv("ALLIED_CREATION_USER_HOST") != "" { 33 if os.Getenv("ALLIED_CREATION_USER_HOST") != "" {
34 ALLIED_CREATION_USER_HOST = os.Getenv("ALLIED_CREATION_USER_HOST") 34 ALLIED_CREATION_USER_HOST = os.Getenv("ALLIED_CREATION_USER_HOST")
35 } 35 }
  36 + if os.Getenv("ALLIED_CREATION_COOPERATION_HOST") != "" {
  37 + ALLIED_CREATION_COOPERATION_HOST = os.Getenv("ALLIED_CREATION_COOPERATION_HOST")
  38 + }
  39 + if os.Getenv("SMS_SERVE_HOST") != "" {
  40 + SMS_SERVE_HOST = os.Getenv("SMS_SERVE_HOST")
  41 + }
36 if os.Getenv("HTTP_PORT") != "" { 42 if os.Getenv("HTTP_PORT") != "" {
37 HTTP_PORT, _ = strconv.Atoi(os.Getenv("HTTP_PORT")) 43 HTTP_PORT, _ = strconv.Atoi(os.Getenv("HTTP_PORT"))
38 } 44 }
@@ -6,6 +6,95 @@ import ( @@ -6,6 +6,95 @@ import (
6 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 6 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
7 ) 7 )
8 8
  9 +type CooperationContract struct {
  10 + CooperationContractId int `json:"cooperationContractId,string"` // 共创合约ID
  11 + CooperationContractDescription string `json:"cooperationContractDescription"` // 共创合约描述
  12 + CooperationContractName string `json:"cooperationContractName"` // 共创合约名称
  13 + CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号
  14 + CooperationProjectNumber string `json:"cooperationProjectNumber"`
  15 + CooperationContractUndertakerTypes []int `json:"cooperationContractUndertakerType"` // 共创合约承接对象,1员工,2共创用户,3公开
  16 + Department struct {
  17 + DepartmentId int `json:"departmentId"`
  18 + DepartmentName string `json:"departmentName"`
  19 + } `jsopn:"department"` //发起部门
  20 + CooperationContractSponsor struct {
  21 + UserId int `json:"userId"` //id
  22 + UserInfo struct {
  23 + UserAvatar string `json:"userAvatar"` // 用户头像
  24 + UserEmail string `json:"userEmail"` // 用户邮箱
  25 + UserName string `json:"userName"` // 共创人员姓名
  26 + UserPhone string `json:"userPhone"` // 用户手机号
  27 + UserAccount string `json:"userAccount"` // 用户账号,区别于手机号,冗余字段
  28 + } `json:"userInfo"`
  29 + Department struct {
  30 + DepartmentId int64 `json:"departmentId,string"` // 部门ID,通过REST集成上下文获取
  31 + DepartmentName string `json:"departmentName"` // 部门名称
  32 + DepartmentNumber string `json:"departmentNumber"` // 部门编码
  33 + } `json:"department"` //申请人部门
  34 + Org struct {
  35 + OrgId int64 `json:"orgId,string"` // 组织机构ID
  36 + OrgName string `json:"orgName"` // 组织名称
  37 + } `json:"org"`
  38 + UserType int `json:"userType"`
  39 + UserName string `json:"userName"`
  40 + UserPhone string `json:"userPhone"`
  41 + } `json:"cooperationContractSponsor"` // 共创合约发起人
  42 + CooperationMode domain.CooperationMode `json:"cooperationMode"` // 共创模式或者合伙模式
  43 + Status int `json:"status"` // 合约状态,1启用,2禁用
  44 + Org struct {
  45 + OrgId int64 `json:"orgId,string"` // 组织机构ID
  46 + OrgName string `json:"orgName"` // 组织名称
  47 + } `json:"org"` // 数据所属组织机构
  48 + Company struct {
  49 + CompanyId int64 `json:"companyId,string"` // 公司ID
  50 + CompanyLogo string `json:"companyLogo"` // 公司logo
  51 + CompanyName string `json:"companyName"` // 公司名称
  52 + } `json:"company"` // 公司
  53 + DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"` // 分红激励规则
  54 + MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"` // 金额激励规则
  55 + Undertakers []struct {
  56 + UserId int `json:"userId"`
  57 + UserInfo struct {
  58 + UserAvatar string `json:"userAvatar"` // 用户头像
  59 + UserEmail string `json:"userEmail"` // 用户邮箱
  60 + UserName string `json:"userName"` // 共创人员姓名
  61 + UserPhone string `json:"userPhone"` // 用户手机号
  62 + UserAccount string `json:"userAccount"` // 用户账号,区别于手机号,冗余字段
  63 + } `json:"userInfo"`
  64 + Department struct {
  65 + DepartmentId int64 `json:"departmentId,string"` // 部门ID
  66 + DepartmentName string `json:"departmentName"` // 部门名称
  67 + DepartmentNumber string `json:"departmentNumber"` // 部门编码
  68 + } `json:"department"` //申请人部门
  69 + Org struct {
  70 + OrgId int64 `json:"orgId,string"` // 组织机构ID
  71 + OrgName string `json:"orgName"` // 组织名称
  72 + } `json:"org"`
  73 + UserType int `json:"userType"`
  74 + UserName string `json:"userName"`
  75 + UserPhone string `json:"userPhone"`
  76 + } `json:"undertakers"` // 共创承接人列表
  77 + RelevantPeople []struct {
  78 + RelevantId int `json:"relevantId,string"`
  79 + CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号
  80 + UserId int64 `json:"userId,string"`
  81 + UserBaseId int `json:"userBaseId,string"`
  82 + Org struct {
  83 + OrgId int64 `json:"orgId,string"` // 组织机构ID
  84 + OrgName string `json:"orgName"` // 组织名称
  85 + } `json:"org"`
  86 + UserInfo domain.UserInfo `json:"userInfo"`
  87 + Department struct {
  88 + DepartmentId int64 `json:"departmentId,string"` // 部门ID
  89 + DepartmentName string `json:"departmentName"` // 部门名称
  90 + DepartmentNumber string `json:"departmentNumber"` // 部门编码
  91 + } `json:"department"` //申请人部门
  92 + } `json:"relevantPeople"` // 共创合约相关人列表
  93 + OperateTime time.Time `json:"operateTime"` // 操作时间
  94 + CreatedAt time.Time `json:"createdAt"` // 创建时间
  95 + UpdatedAt time.Time `json:"updatedAt"` // 更新时间
  96 +}
  97 +
9 //创建共创合约 98 //创建共创合约
10 type ( 99 type (
11 //分红激励规则 100 //分红激励规则
@@ -27,20 +116,13 @@ type ( @@ -27,20 +116,13 @@ type (
27 } 116 }
28 //金额激励规则 117 //金额激励规则
29 MoneyIncentivesRule struct { 118 MoneyIncentivesRule struct {
30 - // 金额激励规则ID  
31 - MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string"`  
32 - // 关联的共创合约编号  
33 - CooperationContractNumber string `json:"cooperationContractNumber"`  
34 - // 激励金额  
35 - MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"`  
36 - // 金额激励阶段  
37 - MoneyIncentivesStage int `json:"moneyIncentivesStage"`  
38 - // 金额激励规则时间  
39 - MoneyIncentivesTime time.Time `json:"moneyIncentivesTime"`  
40 - // 推荐人抽成比例  
41 - ReferrerPercentage float64 `json:"referrerPercentage"`  
42 - // 业务员抽成比例  
43 - SalesmanPercentage float64 `json:"salesmanPercentage"` 119 + MoneyIncentivesRuleId int `json:"moneyIncentivesRuleId,string"` // 金额激励规则ID
  120 + CooperationContractNumber string `json:"cooperationContractNumber"` // 关联的共创合约编号
  121 + MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"` // 激励金额
  122 + MoneyIncentivesStage int `json:"moneyIncentivesStage"` // 金额激励阶段
  123 + MoneyIncentivesTime time.Time `json:"moneyIncentivesTime"` // 金额激励规则时间
  124 + ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例
  125 + SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例
44 } 126 }
45 127
46 //合约承接方 128 //合约承接方
@@ -52,67 +134,47 @@ type ( @@ -52,67 +134,47 @@ type (
52 } 134 }
53 135
54 ReqCooperationContractAdd struct { 136 ReqCooperationContractAdd struct {
55 - // 共创合约描述  
56 - CooperationContractDescription string `json:"cooperationContractDescription"`  
57 - // 共创合约编号  
58 - CooperationContractNumber string `json:"cooperationContractNumber"`  
59 - // 共创项目编号,  
60 - CooperationProjectNumber string `json:"cooperationProjectNumber"`  
61 - // 共创合约发起部门id  
62 - DepartmentId string `json:"departmentId"`  
63 - // 共创合约承接对象,1员工,2共创用户,3公开  
64 - CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"`  
65 - // 共创合约名称  
66 - CooperationContractName string `json:"cooperationContractName"`  
67 - // 共创模式编码,  
68 - CooperationModeNumber string `json:"cooperationModeNumber"`  
69 - // 共创合约发起人uid  
70 - SponsorUid string `json:"sponsorUid"`  
71 - // 业绩分红激励规则列表  
72 - DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"`  
73 - // 金额激励规则列表  
74 - MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"`  
75 - // 承接方列表  
76 - Undertakers []Undertaker `json:"undertakers"`  
77 - //关联业务员  
78 - RelevantIds []string `json:"relevantIds"` 137 + CooperationContractDescription string `json:"cooperationContractDescription"` // 共创合约描述
  138 + CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号
  139 + CooperationProjectNumber string `json:"cooperationProjectNumber"` // 共创项目编号,
  140 + DepartmentId string `json:"departmentId"` // 共创合约发起部门id
  141 + CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"` // 共创合约承接对象,1员工,2共创用户,3公开
  142 + CooperationContractName string `json:"cooperationContractName"` // 共创合约名称
  143 + CooperationModeNumber string `json:"cooperationModeNumber"` // 共创模式编码,
  144 + SponsorUid string `json:"sponsorUid"` // 共创合约发起人uid
  145 + DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"` // 业绩分红激励规则列表
  146 + MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"` // 金额激励规则列表
  147 + Undertakers []Undertaker `json:"undertakers"` // 承接方列表
  148 + RelevantIds []string `json:"relevantIds"` //关联业务员
79 } 149 }
80 150
81 DataCooperationContractAdd struct { 151 DataCooperationContractAdd struct {
  152 + CooperationContract
82 } 153 }
83 ) 154 )
84 155
85 //更新共创合约 156 //更新共创合约
86 type ( 157 type (
87 ReqCooperationContractUpdate struct { 158 ReqCooperationContractUpdate struct {
88 - CooperationContractId int `json:"cooperationContractId"`  
89 - // 共创合约描述  
90 - CooperationContractDescription string `json:"cooperationContractDescription"`  
91 - // 共创合约编号  
92 - CooperationContractNumber string `json:"cooperationContractNumber"`  
93 - // 共创项目编号,  
94 - CooperationProjectNumber string `json:"cooperationProjectNumber"`  
95 - // 共创合约发起部门id  
96 - DepartmentId string `json:"departmentId"`  
97 - // 共创合约承接对象,1员工,2共创用户,3公开  
98 - CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"`  
99 - // 共创合约名称  
100 - CooperationContractName string `json:"cooperationContractName"`  
101 - // 共创模式编码,  
102 - CooperationModeNumber string `json:"cooperationModeNumber"`  
103 - // 共创合约发起人uid  
104 - SponsorUid string `json:"sponsorUid,omitempty,"`  
105 - // 业绩分红激励规则列表  
106 - DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"`  
107 - // 金额激励规则列表  
108 - MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"`  
109 - // 承接方列表  
110 - Undertakers []Undertaker `json:"undertakers"` 159 + CooperationContractId int `json:"cooperationContractId"` // 共创合约id
  160 + CooperationContractDescription string `json:"cooperationContractDescription"` //共创
  161 + CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号
  162 + CooperationProjectNumber string `json:"cooperationProjectNumber"` // 共创项目编号,
  163 + DepartmentId string `json:"departmentId"` // 共创合约发起部门id
  164 + CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"` // 共创合约承接对象,1员工,2共创用户,3公开
  165 + CooperationContractName string `json:"cooperationContractName"` // 共创合约名称
  166 + CooperationModeNumber string `json:"cooperationModeNumber"` // 共创模式编码,
  167 + SponsorUid string `json:"sponsorUid,omitempty,"` // 共创合约发起人uid
  168 + DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"` // 金额激励规则列表
  169 + MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"`
  170 +
  171 + Undertakers []Undertaker `json:"undertakers"` // 承接方列表 // 业绩分红激励规则列表
111 //关联业务员 172 //关联业务员
112 RelevantIds []string `json:"relevantIds"` 173 RelevantIds []string `json:"relevantIds"`
113 } 174 }
114 175
115 DataCooperationContractUpdate struct { 176 DataCooperationContractUpdate struct {
  177 + CooperationContract
116 } 178 }
117 ) 179 )
118 180
@@ -126,17 +188,21 @@ type ( @@ -126,17 +188,21 @@ type (
126 } 188 }
127 189
128 DataCooperationContractSearch struct { 190 DataCooperationContractSearch struct {
  191 + Grid struct {
  192 + Total int `json:"total"`
  193 + List []CooperationContract `json:"list"`
  194 + } `json:"grid"`
129 } 195 }
130 ) 196 )
131 197
132 //根据承接人查询并返回共创项目合约 198 //根据承接人查询并返回共创项目合约
133 type ( 199 type (
134 ReqCooperationContractSearchByUndertaker struct { 200 ReqCooperationContractSearchByUndertaker struct {
135 - CooperationContractName string //合约名称  
136 - SponsorName string //项目发起人姓名  
137 - UserId int //合约发起人  
138 - PageNumber int  
139 - PageIndex int 201 + CooperationContractName string `json:"cooperationContractName"` //合约名称
  202 + SponsorName string `json:"sponsorName"` //项目发起人姓名
  203 + UserId int `json:"userId"` //合约发起人
  204 + PageNumber int `json:"pageNumber"`
  205 + PageIndex int `json:"pageIndex"`
140 } 206 }
141 207
142 DataCooperationContractSearchByUndertaker struct { 208 DataCooperationContractSearchByUndertaker struct {
@@ -146,10 +212,11 @@ type ( @@ -146,10 +212,11 @@ type (
146 //移除共创合约 212 //移除共创合约
147 type ( 213 type (
148 ReqCooperationContractRemove struct { 214 ReqCooperationContractRemove struct {
149 - CooperationContractId int 215 + CooperationContractId int `json:"cooperationContractId"`
150 } 216 }
151 217
152 DataCooperationContractRemove struct { 218 DataCooperationContractRemove struct {
  219 + CooperationContract
153 } 220 }
154 ) 221 )
155 222
@@ -169,5 +236,8 @@ type ( @@ -169,5 +236,8 @@ type (
169 } 236 }
170 237
171 DataCooperationContractGet struct { 238 DataCooperationContractGet struct {
  239 + CooperationContract
  240 + // 可以去除勾选的共创项目承接对象列表
  241 + UndertakerTypesUncheckedAvailable []int `json:"undertakerTypesUncheckedAvailable"`
172 } 242 }
173 ) 243 )
@@ -2,12 +2,11 @@ package allied_creation_cooperation @@ -2,12 +2,11 @@ package allied_creation_cooperation
2 2
3 import "time" 3 import "time"
4 4
  5 +
  6 +
5 //确定预算分红激励 7 //确定预算分红激励
6 type ( 8 type (
7 ReqDividendsEstimateIncentive struct { 9 ReqDividendsEstimateIncentive struct {
8 - // companyId  
9 - // orgId  
10 - // userId  
11 CooperationContractNumber string //合约编号 10 CooperationContractNumber string //合约编号
12 OrderOrReturnedOrderNum string //分红订单号/退货单号 11 OrderOrReturnedOrderNum string //分红订单号/退货单号
13 } 12 }
@@ -133,7 +133,7 @@ type ( @@ -133,7 +133,7 @@ type (
133 //移除分红订单 133 //移除分红订单
134 type ( 134 type (
135 ReqDividendsOrderRemove struct { 135 ReqDividendsOrderRemove struct {
136 - DividendsOrderId int 136 + DividendsOrderId int `json:"dividendsOrderId"`
137 } 137 }
138 138
139 DataDividendsOrderRemove struct { 139 DataDividendsOrderRemove struct {
@@ -41,7 +41,7 @@ func (controller *CooperationContractController) GetCooperationContract() { @@ -41,7 +41,7 @@ func (controller *CooperationContractController) GetCooperationContract() {
41 func (controller *CooperationContractController) ListCooperationContract() { 41 func (controller *CooperationContractController) ListCooperationContract() {
42 cooperationContractService := service.NewCooperationContractService(nil) 42 cooperationContractService := service.NewCooperationContractService(nil)
43 listCooperationContractQuery := &query.ListCooperationContractQuery{} 43 listCooperationContractQuery := &query.ListCooperationContractQuery{}
44 - data, err := cooperationContractService.ListCooperationContract(listCooperationContractQuery) 44 + _, data, err := cooperationContractService.ListCooperationContract(listCooperationContractQuery)
45 controller.Response(data, err) 45 controller.Response(data, err)
46 } 46 }
47 47