Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway into dev
正在显示
12 个修改的文件
包含
134 行增加
和
75 行删除
@@ -38,14 +38,14 @@ func (srv CooperationProjectService) CreateCooperationProject(createCooperationP | @@ -38,14 +38,14 @@ func (srv CooperationProjectService) CreateCooperationProject(createCooperationP | ||
38 | if err != nil { | 38 | if err != nil { |
39 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 39 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
40 | } | 40 | } |
41 | - data := struct { | ||
42 | - CooperationProjectId int `json:"cooperationProjectId"` | ||
43 | - command.CreateCooperationProjectCommand | ||
44 | - }{ | ||
45 | - CooperationProjectId: result.CooperationProjectId, | ||
46 | - CreateCooperationProjectCommand: *createCooperationProjectCommand, | ||
47 | - } | ||
48 | - return data, nil | 41 | + // data := struct { |
42 | + // CooperationProjectId int `json:"cooperationProjectId"` | ||
43 | + // command.CreateCooperationProjectCommand | ||
44 | + // }{ | ||
45 | + // CooperationProjectId: result.CooperationProjectId, | ||
46 | + // CreateCooperationProjectCommand: *createCooperationProjectCommand, | ||
47 | + // } | ||
48 | + return dto.ToCooperationProjectInfo(&result.CooperationProject), nil | ||
49 | } | 49 | } |
50 | 50 | ||
51 | // GetCooperationProject 返回共创项目明细 | 51 | // GetCooperationProject 返回共创项目明细 |
@@ -6,42 +6,20 @@ import ( | @@ -6,42 +6,20 @@ import ( | ||
6 | 6 | ||
7 | type DividendsOrder struct { | 7 | type DividendsOrder struct { |
8 | Company struct { | 8 | Company struct { |
9 | - CompanyID int `json:"companyId"` | 9 | + CompanyID int `json:"companyId,string"` |
10 | CompanyLogo string `json:"companyLogo"` | 10 | CompanyLogo string `json:"companyLogo"` |
11 | CompanyName string `json:"companyName"` | 11 | CompanyName string `json:"companyName"` |
12 | } `json:"company"` | 12 | } `json:"company"` |
13 | - CustomerName string `json:"customerName"` //客户名字 | ||
14 | - DividendStatus int `json:"dividendStatus"` //分红订单分红状态,1待分红,2已分红,3部分分红 | ||
15 | - DividendTime int64 `json:"dividendTime"` //分红订单分红时间 | ||
16 | - DividendsOrderAmount float64 `json:"dividendsOrderAmount"` //分红订单金额 | ||
17 | - DividendsOrderID int `json:"dividendsOrderId"` //分红订单 | ||
18 | - DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红订单号 | ||
19 | - DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号 | ||
20 | - OrderSalesman struct { //订单业务员 | ||
21 | - Department struct { | ||
22 | - DepartmentID int `json:"departmentId"` | ||
23 | - DepartmentName string `json:"departmentName"` | ||
24 | - DepartmentNumber string `json:"departmentNumber"` | ||
25 | - IsOrganization bool `json:"isOrganization"` | ||
26 | - } `json:"department"` | ||
27 | - Org struct { | ||
28 | - OrgID int `json:"orgId"` | ||
29 | - OrgName string `json:"orgName"` | ||
30 | - } `json:"org"` | ||
31 | - UserBaseID int `json:"userBaseId"` | ||
32 | - UserID int `json:"userId"` | ||
33 | - UserInfo struct { | ||
34 | - UserAccount string `json:"userAccount"` | ||
35 | - UserAvatar string `json:"userAvatar"` | ||
36 | - UserEmail string `json:"userEmail"` | ||
37 | - UserName string `json:"userName"` | ||
38 | - UserPhone string `json:"userPhone"` | ||
39 | - } `json:"userInfo"` | ||
40 | - UserType int `json:"userType"` | ||
41 | - } `json:"orderSalesman"` | ||
42 | - OrderTime int64 `json:"orderTime"` | ||
43 | - Org struct { | ||
44 | - OrgID int `json:"orgId"` | 13 | + CustomerName string `json:"customerName"` //客户名字 |
14 | + DividendStatus int `json:"dividendStatus"` //分红订单分红状态,1待分红,2已分红,3部分分红 | ||
15 | + DividendTime int64 `json:"dividendTime"` //分红订单分红时间 | ||
16 | + DividendsOrderAmount float64 `json:"dividendsOrderAmount"` //分红订单金额 | ||
17 | + DividendsOrderID int `json:"dividendsOrderId"` //分红订单 | ||
18 | + DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红订单号 | ||
19 | + DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号 | ||
20 | + OrderTime int64 `json:"orderTime"` | ||
21 | + Org struct { | ||
22 | + OrgID int `json:"orgId,string"` | ||
45 | OrgName string `json:"orgName"` | 23 | OrgName string `json:"orgName"` |
46 | } `json:"org"` | 24 | } `json:"org"` |
47 | Region struct { | 25 | Region struct { |
@@ -60,7 +38,6 @@ func ToDividendsOrder(param *allied_creation_cooperation.DividendsOrder) *Divide | @@ -60,7 +38,6 @@ func ToDividendsOrder(param *allied_creation_cooperation.DividendsOrder) *Divide | ||
60 | DividendsOrderID: param.DividendsOrderID, | 38 | DividendsOrderID: param.DividendsOrderID, |
61 | DividendsOrderNumber: param.DividendsOrderNumber, | 39 | DividendsOrderNumber: param.DividendsOrderNumber, |
62 | DividendsOriginalOrderNum: param.DividendsOriginalOrderNum, | 40 | DividendsOriginalOrderNum: param.DividendsOriginalOrderNum, |
63 | - OrderSalesman: param.OrderSalesman, | ||
64 | OrderTime: param.OrderTime.Unix(), | 41 | OrderTime: param.OrderTime.Unix(), |
65 | Org: param.Org, | 42 | Org: param.Org, |
66 | Region: param.Region, | 43 | Region: param.Region, |
1 | package service | 1 | package service |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "time" | 4 | + "strconv" |
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/dividendsOrder/command" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsOrder/command" |
@@ -32,14 +32,14 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD | @@ -32,14 +32,14 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD | ||
32 | } | 32 | } |
33 | orderGoods = append(orderGoods, good) | 33 | orderGoods = append(orderGoods, good) |
34 | } | 34 | } |
35 | - t := time.Unix(createDividendsOrderCommand.OrderTime, 0) | ||
36 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsOrderCommand.Operator) | 35 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsOrderCommand.Operator) |
37 | result, err := creationCooperationGateway.DividendsOrderAdd(allied_creation_cooperation.ReqDividendsOrderAdd{ | 36 | result, err := creationCooperationGateway.DividendsOrderAdd(allied_creation_cooperation.ReqDividendsOrderAdd{ |
38 | CompanyId: int(createDividendsOrderCommand.Operator.CompanyId), | 37 | CompanyId: int(createDividendsOrderCommand.Operator.CompanyId), |
38 | + UserId: int(createDividendsOrderCommand.Operator.UserId), | ||
39 | CustomerName: createDividendsOrderCommand.CustomerName, | 39 | CustomerName: createDividendsOrderCommand.CustomerName, |
40 | DividendsOriginalOrderNum: createDividendsOrderCommand.DividendsOriginalOrderNum, | 40 | DividendsOriginalOrderNum: createDividendsOrderCommand.DividendsOriginalOrderNum, |
41 | OperatorUid: int(createDividendsOrderCommand.Operator.UserId), | 41 | OperatorUid: int(createDividendsOrderCommand.Operator.UserId), |
42 | - OrderTime: t, | 42 | + OrderTime: strconv.Itoa(int(createDividendsOrderCommand.OrderTime * 1000)), |
43 | Remarks: createDividendsOrderCommand.Remarks, | 43 | Remarks: createDividendsOrderCommand.Remarks, |
44 | RegionName: createDividendsOrderCommand.RegionName, | 44 | RegionName: createDividendsOrderCommand.RegionName, |
45 | OrderGoods: orderGoods, | 45 | OrderGoods: orderGoods, |
@@ -129,7 +129,6 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD | @@ -129,7 +129,6 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD | ||
129 | } | 129 | } |
130 | orderGoods = append(orderGoods, good) | 130 | orderGoods = append(orderGoods, good) |
131 | } | 131 | } |
132 | - t := time.Unix(updateDividendsOrderCommand.OrderTime, 0) | ||
133 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsOrderCommand.Operator) | 132 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsOrderCommand.Operator) |
134 | _, err := creationCooperationGateway.DividendsOrderUpdate(allied_creation_cooperation.ReqDividendsOrderUpdate{ | 133 | _, err := creationCooperationGateway.DividendsOrderUpdate(allied_creation_cooperation.ReqDividendsOrderUpdate{ |
135 | DividendsOrderId: updateDividendsOrderCommand.DividendsOrderID, | 134 | DividendsOrderId: updateDividendsOrderCommand.DividendsOrderID, |
@@ -138,7 +137,7 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD | @@ -138,7 +137,7 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD | ||
138 | DividendsOrderAmount: updateDividendsOrderCommand.DividendsOrderAmount, | 137 | DividendsOrderAmount: updateDividendsOrderCommand.DividendsOrderAmount, |
139 | DividendsOriginalOrderNum: updateDividendsOrderCommand.DividendsOriginalOrderNum, | 138 | DividendsOriginalOrderNum: updateDividendsOrderCommand.DividendsOriginalOrderNum, |
140 | OperatorUid: int(updateDividendsOrderCommand.Operator.UserId), | 139 | OperatorUid: int(updateDividendsOrderCommand.Operator.UserId), |
141 | - OrderTime: t, | 140 | + OrderTime: strconv.Itoa(int(updateDividendsOrderCommand.OrderTime * 1000)), |
142 | Remarks: updateDividendsOrderCommand.Remarks, | 141 | Remarks: updateDividendsOrderCommand.Remarks, |
143 | RegionName: updateDividendsOrderCommand.RegionName, | 142 | RegionName: updateDividendsOrderCommand.RegionName, |
144 | OrderGoods: orderGoods, | 143 | OrderGoods: orderGoods, |
1 | +package command | ||
2 | + | ||
3 | +import "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
4 | + | ||
5 | +type SearchFeedbackCommand struct { | ||
6 | + //操作人 | ||
7 | + Operator domain.Operator `json:"-"` | ||
8 | + // 页面大小 | ||
9 | + PageNumber int64 ` json:"pageNumber"` | ||
10 | + // 页面大小 | ||
11 | + PageSize int64 ` json:"pageSize"` | ||
12 | + ContractName string `json:"contractName"` | ||
13 | + UndertakerName string `json:"undertakerName"` | ||
14 | +} |
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/web/undertakerFeedback/command" | ||
6 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | ||
7 | +) | ||
8 | + | ||
9 | +// UndertakerFeedbackService 承接反馈服务 | ||
10 | +type UndertakerFeedbackService struct { | ||
11 | +} | ||
12 | + | ||
13 | +// CreateCooperationProject 承接反馈列表 | ||
14 | +func (srv UndertakerFeedbackService) SearchFeedback(cmd *command.SearchFeedbackCommand) (interface{}, error) { | ||
15 | + gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
16 | + cmd.Operator) | ||
17 | + resultMenu, err := gateway.ContractUndertakerFeedbackSearch(allied_creation_cooperation.ReqContractUndertakerFeedbackSearch{ | ||
18 | + PageNumber: cmd.PageNumber, | ||
19 | + PageSize: cmd.PageSize, | ||
20 | + CooperationContractName: cmd.ContractName, | ||
21 | + UndertakerName: cmd.UndertakerName, | ||
22 | + }) | ||
23 | + if err != nil { | ||
24 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
25 | + } | ||
26 | + return resultMenu, nil | ||
27 | +} |
@@ -12,6 +12,7 @@ import ( | @@ -12,6 +12,7 @@ import ( | ||
12 | 12 | ||
13 | // DividendsOrderAdd 创建分红订单 | 13 | // DividendsOrderAdd 创建分红订单 |
14 | func (gateway HttplibAlliedCreationCooperation) DividendsOrderAdd(param ReqDividendsOrderAdd) (*DataDividendsOrderAdd, error) { | 14 | func (gateway HttplibAlliedCreationCooperation) DividendsOrderAdd(param ReqDividendsOrderAdd) (*DataDividendsOrderAdd, error) { |
15 | + param.SalesmanUid = "1" //TODO 调试用删除 | ||
15 | url := gateway.baseUrL + "/dividends-orders" | 16 | url := gateway.baseUrL + "/dividends-orders" |
16 | method := "POST" | 17 | method := "POST" |
17 | req := gateway.CreateRequest(url, method) | 18 | req := gateway.CreateRequest(url, method) |
@@ -43,6 +44,7 @@ func (gateway HttplibAlliedCreationCooperation) DividendsOrderAdd(param ReqDivid | @@ -43,6 +44,7 @@ func (gateway HttplibAlliedCreationCooperation) DividendsOrderAdd(param ReqDivid | ||
43 | 44 | ||
44 | // DividendsOrderUpdate 更新分红订单 | 45 | // DividendsOrderUpdate 更新分红订单 |
45 | func (gateway HttplibAlliedCreationCooperation) DividendsOrderUpdate(param ReqDividendsOrderUpdate) (*DataDividendsOrderUpdate, error) { | 46 | func (gateway HttplibAlliedCreationCooperation) DividendsOrderUpdate(param ReqDividendsOrderUpdate) (*DataDividendsOrderUpdate, error) { |
47 | + param.SalesmanUid = "1" //TODO 调试用删除 | ||
46 | url := gateway.baseUrL + "/dividends-orders/" + strconv.Itoa(param.DividendsOrderId) | 48 | url := gateway.baseUrL + "/dividends-orders/" + strconv.Itoa(param.DividendsOrderId) |
47 | method := "PUT" | 49 | method := "PUT" |
48 | req := gateway.CreateRequest(url, method) | 50 | req := gateway.CreateRequest(url, method) |
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_contract_undertaker_feedback.go
@@ -36,9 +36,11 @@ type ( | @@ -36,9 +36,11 @@ type ( | ||
36 | type ( | 36 | type ( |
37 | ReqContractUndertakerFeedbackSearch struct { | 37 | ReqContractUndertakerFeedbackSearch struct { |
38 | // 页面大小 | 38 | // 页面大小 |
39 | - PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` | 39 | + PageNumber int64 `json:"pageNumber"` |
40 | // 页面大小 | 40 | // 页面大小 |
41 | - PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` | 41 | + PageSize int64 `json:"pageSize"` |
42 | + UndertakerName string `json:"undertakerName"` | ||
43 | + CooperationContractName string `json:"cooperationContractName"` | ||
42 | } | 44 | } |
43 | 45 | ||
44 | DataContractUndertakerFeedbackSearch struct { | 46 | DataContractUndertakerFeedbackSearch struct { |
@@ -175,16 +175,16 @@ type ( | @@ -175,16 +175,16 @@ type ( | ||
175 | //更新共创合约 | 175 | //更新共创合约 |
176 | type ( | 176 | type ( |
177 | ReqCooperationContractUpdate struct { | 177 | ReqCooperationContractUpdate struct { |
178 | - CooperationContractId int `json:"cooperationContractId"` // 共创合约id | ||
179 | - CooperationContractDescription string `json:"cooperationContractDescription"` //共创 | ||
180 | - CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号 | ||
181 | - CooperationProjectNumber string `json:"cooperationProjectNumber"` // 共创项目编号, | ||
182 | - DepartmentId string `json:"departmentId"` // 共创合约发起部门id | ||
183 | - CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"` // 共创合约承接对象,1员工,2共创用户,3公开 | ||
184 | - CooperationContractName string `json:"cooperationContractName"` // 共创合约名称 | ||
185 | - CooperationModeNumber string `json:"cooperationModeNumber"` // 共创模式编码, | ||
186 | - SponsorUid string `json:"sponsorUid,omitempty,"` // 共创合约发起人uid | ||
187 | - DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"` // 金额激励规则列表 | 178 | + CooperationContractId int `json:"cooperationContractId,string"` // 共创合约id |
179 | + CooperationContractDescription string `json:"cooperationContractDescription"` //共创 | ||
180 | + CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号 | ||
181 | + CooperationProjectNumber string `json:"cooperationProjectNumber"` // 共创项目编号, | ||
182 | + DepartmentId string `json:"departmentId"` // 共创合约发起部门id | ||
183 | + CooperationContractUndertakerType []int `json:"cooperationContractUndertakerTypes"` // 共创合约承接对象,1员工,2共创用户,3公开 | ||
184 | + CooperationContractName string `json:"cooperationContractName"` // 共创合约名称 | ||
185 | + CooperationModeNumber string `json:"cooperationModeNumber"` // 共创模式编码, | ||
186 | + SponsorUid string `json:"sponsorUid,omitempty,"` // 共创合约发起人uid | ||
187 | + DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"` // 金额激励规则列表 | ||
188 | MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"` | 188 | MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"` |
189 | Undertakers []Undertaker `json:"undertakers"` // 承接方列表 // 业绩分红激励规则列表 | 189 | Undertakers []Undertaker `json:"undertakers"` // 承接方列表 // 业绩分红激励规则列表 |
190 | RelevantIds []string `json:"relevantIds"` //关联业务员 | 190 | RelevantIds []string `json:"relevantIds"` //关联业务员 |
@@ -6,7 +6,7 @@ import "time" | @@ -6,7 +6,7 @@ import "time" | ||
6 | 6 | ||
7 | type DividendsOrder struct { | 7 | type DividendsOrder struct { |
8 | Company struct { | 8 | Company struct { |
9 | - CompanyID int `json:"companyId"` | 9 | + CompanyID int `json:"companyId,string"` |
10 | CompanyLogo string `json:"companyLogo"` | 10 | CompanyLogo string `json:"companyLogo"` |
11 | CompanyName string `json:"companyName"` | 11 | CompanyName string `json:"companyName"` |
12 | } `json:"company"` | 12 | } `json:"company"` |
@@ -14,22 +14,22 @@ type DividendsOrder struct { | @@ -14,22 +14,22 @@ type DividendsOrder struct { | ||
14 | DividendStatus int `json:"dividendStatus"` //分红订单分红状态,1待分红,2已分红,3部分分红 | 14 | DividendStatus int `json:"dividendStatus"` //分红订单分红状态,1待分红,2已分红,3部分分红 |
15 | DividendTime time.Time `json:"dividendTime"` //分红订单分红时间 | 15 | DividendTime time.Time `json:"dividendTime"` //分红订单分红时间 |
16 | DividendsOrderAmount float64 `json:"dividendsOrderAmount"` //分红订单金额 | 16 | DividendsOrderAmount float64 `json:"dividendsOrderAmount"` //分红订单金额 |
17 | - DividendsOrderID int `json:"dividendsOrderId"` //分红订单 | 17 | + DividendsOrderID int `json:"dividendsOrderId,string"` //分红订单 |
18 | DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红订单号 | 18 | DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红订单号 |
19 | DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号 | 19 | DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号 |
20 | OrderSalesman struct { //订单业务员 | 20 | OrderSalesman struct { //订单业务员 |
21 | Department struct { | 21 | Department struct { |
22 | - DepartmentID int `json:"departmentId"` | 22 | + DepartmentID int `json:"departmentId,string"` |
23 | DepartmentName string `json:"departmentName"` | 23 | DepartmentName string `json:"departmentName"` |
24 | DepartmentNumber string `json:"departmentNumber"` | 24 | DepartmentNumber string `json:"departmentNumber"` |
25 | IsOrganization bool `json:"isOrganization"` | 25 | IsOrganization bool `json:"isOrganization"` |
26 | } `json:"department"` | 26 | } `json:"department"` |
27 | Org struct { | 27 | Org struct { |
28 | - OrgID int `json:"orgId"` | 28 | + OrgID int `json:"orgId,string"` |
29 | OrgName string `json:"orgName"` | 29 | OrgName string `json:"orgName"` |
30 | } `json:"org"` | 30 | } `json:"org"` |
31 | - UserBaseID int `json:"userBaseId"` | ||
32 | - UserID int `json:"userId"` | 31 | + UserBaseID int `json:"userBaseId,string"` |
32 | + UserID int `json:"userId,string"` | ||
33 | UserInfo struct { | 33 | UserInfo struct { |
34 | UserAccount string `json:"userAccount"` | 34 | UserAccount string `json:"userAccount"` |
35 | UserAvatar string `json:"userAvatar"` | 35 | UserAvatar string `json:"userAvatar"` |
@@ -41,7 +41,7 @@ type DividendsOrder struct { | @@ -41,7 +41,7 @@ type DividendsOrder struct { | ||
41 | } `json:"orderSalesman"` | 41 | } `json:"orderSalesman"` |
42 | OrderTime time.Time `json:"orderTime"` | 42 | OrderTime time.Time `json:"orderTime"` |
43 | Org struct { | 43 | Org struct { |
44 | - OrgID int `json:"orgId"` | 44 | + OrgID int `json:"orgId,string"` |
45 | OrgName string `json:"orgName"` | 45 | OrgName string `json:"orgName"` |
46 | } `json:"org"` | 46 | } `json:"org"` |
47 | Region struct { | 47 | Region struct { |
@@ -62,14 +62,15 @@ type ( | @@ -62,14 +62,15 @@ type ( | ||
62 | OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量 | 62 | OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量 |
63 | } | 63 | } |
64 | ReqDividendsOrderAdd struct { | 64 | ReqDividendsOrderAdd struct { |
65 | - CompanyId int `json:"companyId"` | 65 | + CompanyId int `json:"companyId,string"` |
66 | CustomerName string `json:"customerName"` //客户名称 | 66 | CustomerName string `json:"customerName"` //客户名称 |
67 | DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号 | 67 | DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号 |
68 | - OperatorUid int `json:"operatorUid"` //订单操作人id | 68 | + OperatorUid int `json:"operatorUid,string"` //订单操作人id |
69 | OrderGoods []DividendsOrderGoods `json:"orderGoods"` //订单产品列表 | 69 | OrderGoods []DividendsOrderGoods `json:"orderGoods"` //订单产品列表 |
70 | - OrderTime time.Time `json:"orderTime"` //订单产生时间 | 70 | + OrderTime string `json:"orderTime"` //订单日期,13位长度字符串类型时间戳 |
71 | Remarks string `json:"remarks"` //备注 | 71 | Remarks string `json:"remarks"` //备注 |
72 | - UserId int `json:"userId"` // | 72 | + UserId int `json:"userId,string"` // |
73 | + SalesmanUid string `json:"salesmanUid"` //订单业务员uid | ||
73 | RegionName string `json:"regionName"` //区域名称 | 74 | RegionName string `json:"regionName"` //区域名称 |
74 | } | 75 | } |
75 | 76 | ||
@@ -81,18 +82,18 @@ type ( | @@ -81,18 +82,18 @@ type ( | ||
81 | //更新分红订单 | 82 | //更新分红订单 |
82 | type ( | 83 | type ( |
83 | ReqDividendsOrderUpdate struct { | 84 | ReqDividendsOrderUpdate struct { |
84 | - DividendsOrderId int `json:"dividendsOrderId"` | ||
85 | - CompanyId int `json:"companyId"` | 85 | + DividendsOrderId int `json:"dividendsOrderId,string"` |
86 | + CompanyId int `json:"companyId,string"` | ||
86 | CustomerName string `json:"customerName"` //客户名称 | 87 | CustomerName string `json:"customerName"` //客户名称 |
87 | DividendsOrderAmount float64 `json:"dividendsOrderAmount"` //分红订单金额 | 88 | DividendsOrderAmount float64 `json:"dividendsOrderAmount"` //分红订单金额 |
88 | DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红订单号 | 89 | DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红订单号 |
89 | DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号 | 90 | DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号 |
90 | - OperatorUid int `json:"operatorUid"` //订单操作人id | 91 | + OperatorUid int `json:"operatorUid,string"` //订单操作人id |
91 | OrderGoods []DividendsOrderGoods `json:"orderGoods"` //订单产品列表 | 92 | OrderGoods []DividendsOrderGoods `json:"orderGoods"` //订单产品列表 |
92 | - OrderTime time.Time `json:"orderTime"` //订单产生时间 | 93 | + OrderTime string `json:"orderTime"` //订单日期,13位长度字符串类型时间戳 |
93 | Remarks string `json:"remarks"` //备注 | 94 | Remarks string `json:"remarks"` //备注 |
94 | SalesmanUid string `json:"salesmanUid"` //订单业务员uid | 95 | SalesmanUid string `json:"salesmanUid"` //订单业务员uid |
95 | - UserId int `json:"userId"` // | 96 | + UserId int `json:"userId,string"` // |
96 | RegionName string `json:"regionName"` //区域名称 | 97 | RegionName string `json:"regionName"` //区域名称 |
97 | } | 98 | } |
98 | 99 |
@@ -18,6 +18,7 @@ func (controller *DividendsOrderController) CreateDividendsOrder() { | @@ -18,6 +18,7 @@ func (controller *DividendsOrderController) CreateDividendsOrder() { | ||
18 | if err != nil { | 18 | if err != nil { |
19 | log.Logger.Debug("json err:" + err.Error()) | 19 | log.Logger.Debug("json err:" + err.Error()) |
20 | } | 20 | } |
21 | + createDividendsOrderCommand.Operator = controller.GetOperator() | ||
21 | data, err := dividendsOrderService.CreateDividendsOrder(createDividendsOrderCommand) | 22 | data, err := dividendsOrderService.CreateDividendsOrder(createDividendsOrderCommand) |
22 | controller.Response(data, err) | 23 | controller.Response(data, err) |
23 | } | 24 | } |
@@ -30,6 +31,7 @@ func (controller *DividendsOrderController) UpdateDividendsOrder() { | @@ -30,6 +31,7 @@ func (controller *DividendsOrderController) UpdateDividendsOrder() { | ||
30 | log.Logger.Debug("json err:" + err.Error()) | 31 | log.Logger.Debug("json err:" + err.Error()) |
31 | } | 32 | } |
32 | orderId, _ := controller.GetInt(":orderId") | 33 | orderId, _ := controller.GetInt(":orderId") |
34 | + updateDividendsOrderCommand.Operator = controller.GetOperator() | ||
33 | updateDividendsOrderCommand.DividendsOrderID = orderId | 35 | updateDividendsOrderCommand.DividendsOrderID = orderId |
34 | data, err := dividendsOrderService.UpdateDividendsOrder(updateDividendsOrderCommand) | 36 | data, err := dividendsOrderService.UpdateDividendsOrder(updateDividendsOrderCommand) |
35 | controller.Response(data, err) | 37 | controller.Response(data, err) |
@@ -43,6 +45,7 @@ func (controller *DividendsOrderController) RemoveDividendsOrder() { | @@ -43,6 +45,7 @@ func (controller *DividendsOrderController) RemoveDividendsOrder() { | ||
43 | log.Logger.Debug("json err:" + err.Error()) | 45 | log.Logger.Debug("json err:" + err.Error()) |
44 | } | 46 | } |
45 | removeDividendsOrderCommand.Operator = controller.GetOperator() | 47 | removeDividendsOrderCommand.Operator = controller.GetOperator() |
48 | + | ||
46 | data, err := dividendsOrderService.RemoveDividendsOrder(removeDividendsOrderCommand) | 49 | data, err := dividendsOrderService.RemoveDividendsOrder(removeDividendsOrderCommand) |
47 | controller.Response(data, err) | 50 | controller.Response(data, err) |
48 | } | 51 | } |
1 | +package web_client | ||
2 | + | ||
3 | +import ( | ||
4 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/undertakerFeedback/command" | ||
5 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/undertakerFeedback/service" | ||
6 | +) | ||
7 | + | ||
8 | +type UndertakerFeedbackController struct { | ||
9 | + baseController | ||
10 | +} | ||
11 | + | ||
12 | +//SearchFeedback ... | ||
13 | +func (controller *UndertakerFeedbackController) SearchFeedback() { | ||
14 | + svr := service.UndertakerFeedbackService{} | ||
15 | + cmd := &command.SearchFeedbackCommand{} | ||
16 | + err := controller.Unmarshal(cmd) | ||
17 | + if err != nil { | ||
18 | + controller.Response(nil, err) | ||
19 | + return | ||
20 | + } | ||
21 | + cmd.Operator = controller.GetOperator() | ||
22 | + data, err := svr.SearchFeedback(cmd) | ||
23 | + controller.Response(data, err) | ||
24 | +} |
1 | +package routers | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/beego/beego/v2/server/web" | ||
5 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers/web_client" | ||
6 | +) | ||
7 | + | ||
8 | +func init() { | ||
9 | + web.Router("/v1/web/contract-undertaker-feedbacks/search", &web_client.UndertakerFeedbackController{}, "Post:SearchFeedback") | ||
10 | +} |
-
请 注册 或 登录 后发表评论