作者 tangxuhui

更新

... ... @@ -10,4 +10,5 @@ require (
github.com/go-redis/redis v6.14.2+incompatible
github.com/linmadan/egglib-go v0.0.0-20210527091316-06b0732fb5f6
github.com/sony/sonyflake v1.0.0
)
... ...
... ... @@ -4,84 +4,14 @@ import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
)
type CreateCooperationContractCommand struct {
CooperationContract struct {
CooperationContractId int `json:"cooperationContractId,string"`
// 共创合约描述
Description string `json:"Description"`
// 共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 共创项目编号,
CooperationProjectNumber string `json:"cooperationProjectNumber"`
// 共创合约发起部门编码
DepartmentId string `json:"departmentId"`
// 共创合约承接对象,1员工,2共创用户,3公开
CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"`
// 共创合约名称
CooperationContractName string `json:"cooperationContractName"`
// 共创模式编码,手动输入,唯一确定
CooperationModeNumber string `json:"cooperationModeNumber"`
// 共创合约发起人uid
SponsorUserId string `json:"sponsorUserId"`
} `json:"cooperationContract"`
// 业绩分红激励规则列表
DividendsIncentivesRules []struct {
// 关联的项目合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 推荐人抽成比例
ReferrerPercentage float64 `json:"referrerPercentage"`
// 业务员抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"`
// 分红规则激励百分点
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
// 分红规则激励阶段,
DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string,"`
// 分红规则激励阶段结束
DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"`
// 分红规则激励阶段开始
DividendsIncentivesStageStart int `json:"dividendsIncentivesStageStart"`
} `json:"dividendsIncentivesRules"`
// 金额激励规则列表
MoneyIncentivesRules []struct {
// 金额激励规则ID
MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string,"`
// 关联的共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 激励金额
MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"`
// 金额激励阶段,
MoneyIncentivesStage int64 `json:"moneyIncentivesStage,string,"`
// 金额激励规则时间
MoneyIncentivesTime int `json:"moneyIncentivesTime"`
// 推荐人抽成比例
ReferrerPercentage float64 `json:"referrerPercentage"`
// 业务员抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"`
} `json:"moneyIncentivesRules"`
// 关联用户id
RelationUser []int `json:"relationUser"`
//承接人列表
ContractUndertaker []struct {
HasReferrer bool `json:"hasReferrer"`
HasSalesman bool `json:"hasSalesman"`
UsersId int `json:"usersId,string,"`
ReferrerUser struct {
UserId int `json:"userId,string,"`
} `json:"referrerUser"`
SalesmanUser struct {
UserId int `json:"userId"`
} `json:"salesmanUser"`
Attachment []struct {
Name string `json:"name"`
Type string `json:"type"`
Url string `json:"url"`
FileSize int `json:"fileSize"`
} `json:"attachment"`
} `json:"contractUndertaker"`
//操作人
Operator domain.Operator `json:"-"`
allied_creation_cooperation.ReqCooperationContractAdd
}
func (createCooperationContractCommand *CreateCooperationContractCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -4,9 +4,12 @@ import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type EnableCooperationContractCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 共创合约ID
CooperationContractId []string `json:"cooperationContractId" valid:"Required"`
// 暂停和恢复的状态
... ...
... ... @@ -2,87 +2,16 @@ package command
import (
"fmt"
"time"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
)
type UpdateCooperationContractCommand struct {
CooperationContract struct {
CooperationContractId int `json:"cooperationContractId,string"`
// 共创合约描述
Description string `json:"Description"`
// 共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 共创项目编号,
CooperationProjectNumber string `json:"cooperationProjectNumber"`
// 共创合约发起部门编码
DepartmentId string `json:"departmentId"`
// 共创合约承接对象,1员工,2共创用户,3公开
CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"`
// 共创合约名称
CooperationContractName string `json:"cooperationContractName"`
// 共创模式编码,手动输入,唯一确定
CooperationModeNumber string `json:"cooperationModeNumber"`
// 共创合约发起人uid
SponsorUserId string `json:"sponsorUserId"`
} `json:"cooperationContract"`
// 业绩分红激励规则列表
DividendsIncentivesRules []struct {
// 关联的项目合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 推荐人抽成比例
ReferrerPercentage float64 `json:"referrerPercentage"`
// 业务员抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"`
// 分红规则激励百分点
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
// 分红规则激励阶段,
DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string,"`
// 分红规则激励阶段结束
DividendsIncentivesStageEnd time.Time `json:"dividendsIncentivesStageEnd"`
// 分红规则激励阶段开始
DividendsIncentivesStageStart time.Time `json:"dividendsIncentivesStageStart"`
} `json:"dividendsIncentivesRules"`
// 金额激励规则列表
MoneyIncentivesRules []struct {
// 金额激励规则ID
MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string,"`
// 关联的共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 激励金额
MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"`
// 金额激励阶段,
MoneyIncentivesStage int64 `json:"moneyIncentivesStage,string,"`
// 金额激励规则时间
MoneyIncentivesTime time.Time `json:"moneyIncentivesTime"`
// 推荐人抽成比例
ReferrerPercentage float64 `json:"referrerPercentage"`
// 业务员抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"`
} `json:"moneyIncentivesRules"`
// 关联用户id
RelationUser []int `json:"relationUser"`
//承接人列表
ContractUndertaker []struct {
HasReferrer bool `json:"hasReferrer"`
HasSalesman bool `json:"hasSalesman"`
UsersId int `json:"usersId,string,"`
ReferrerUser struct {
UserId int `json:"userId,string,"`
} `json:"referrerUser"`
SalesmanUser struct {
UserId int `json:"userId"`
} `json:"salesmanUser"`
Attachment []struct {
Name string `json:"name"`
Type string `json:"type"`
Url string `json:"url"`
FileSize int `json:"fileSize"`
} `json:"attachment"`
} `json:"contractUndertaker"`
//操作人
Operator domain.Operator `json:"-"`
allied_creation_cooperation.ReqCooperationContractUpdate
}
func (updateCooperationContractCommand *UpdateCooperationContractCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -4,11 +4,14 @@ import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type GetCooperationContractQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 共创合约ID
CooperationContractId int `json:"cooperationContractId" valid:"Required"`
CooperationContractId int `json:"cooperationContractId,string" valid:"Required"`
}
func (getCooperationContractQuery *GetCooperationContractQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -4,9 +4,12 @@ import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type ListCooperationContractQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 查询偏离量
PageNumber int `json:"pageNumber"`
// 查询限制
... ...
... ... @@ -4,6 +4,7 @@ import (
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/query"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
)
// 共创合约管理
... ... @@ -15,7 +16,12 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC
if err := createCooperationContractCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
return nil, nil
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationContractCommand.Operator)
_, err := creationCooperationGateway.CooperationContractAdd(createCooperationContractCommand.ReqCooperationContractAdd)
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
return nil, err
}
// 暂停恢复共创合约
... ... @@ -32,7 +38,14 @@ func (cooperationContractService *CooperationContractService) GetCooperationCont
if err := getCooperationContractQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
return nil, nil
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationContractQuery.Operator)
result, err := creationCooperationGateway.CooperationContractGet(allied_creation_cooperation.ReqCooperationContractGet{
CooperationContractId: getCooperationContractQuery.CooperationContractId,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
return result, nil
}
// 返回共创合约管理列表
... ...
... ... @@ -2,11 +2,10 @@ package command
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
)
type RemoveDividendsReturnedOrderCommand struct {
//操作人
Operator domain.Operator `json:"-"`
allied_creation_cooperation.ReqDividendsReturnedOrderRemove
Operator domain.Operator `json:"-"`
DividendsReturnedOrderID []string `json:"dividendsReturnedOrderId"` //分红退货单记录id
}
... ...
package service
import (
"strconv"
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/dividendsReturnedOrder/query"
... ... @@ -37,7 +39,14 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) GetDividends
// 移除分红退货单服务
func (dividendsReturnedOrderService *DividendsReturnedOrderService) RemoveDividendsReturnedOrder(removeDividendsReturnedOrderCommand *command.RemoveDividendsReturnedOrderCommand) (interface{}, error) {
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(removeDividendsReturnedOrderCommand.Operator)
_, err := creationCooperationGateway.DividendsReturnedOrderRemove(removeDividendsReturnedOrderCommand.ReqDividendsReturnedOrderRemove)
ids := []int{}
for _, v := range removeDividendsReturnedOrderCommand.DividendsReturnedOrderID {
id, _ := strconv.Atoi(v)
ids = append(ids, id)
}
_, err := creationCooperationGateway.DividendsReturnedOrderBatchRemove(allied_creation_cooperation.ReqDividendsReturnedOrderBatchRemove{
DividendsReturnedOrderIDs: ids,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
... ...
... ... @@ -40,37 +40,6 @@ func (gateway HttplibAlliedCreationCooperation) DividendsEstimateIncentive(param
return &data, err
}
// DividendsEstimateAdd 创建分红预算
func (gateway HttplibAlliedCreationCooperation) DividendsEstimateAdd(param ReqDividendsEstimateAdd) (*DataDividendsEstimateAdd, error) {
url := gateway.baseUrL + "/dividends-estimates"
method := "POST"
req := gateway.CreateRequest(url, method)
log.Logger.Debug("向业务模块请求数据:创建分红预算。", map[string]interface{}{
"api": method + ":" + url,
"param": param,
})
req, err := req.JSONBody(param)
if err != nil {
return nil, fmt.Errorf("请求创建分红预算失败:%w", err)
}
byteResult, err := req.Bytes()
if err != nil {
return nil, fmt.Errorf("获取创建分红预算失败:%w", err)
}
log.Logger.Debug("获取业务模块请求数据:创建分红预算。", map[string]interface{}{
"result": string(byteResult),
})
var result service_gateway.GatewayResponse
err = json.Unmarshal(byteResult, &result)
if err != nil {
return nil, fmt.Errorf("解析创建分红预算:%w", err)
}
var data DataDividendsEstimateAdd
err = gateway.GetResponseData(result, &data)
return &data, err
}
// DividendsEstimateUpdate 更新分红预算
func (gateway HttplibAlliedCreationCooperation) DividendsEstimateUpdate(param ReqDividendsEstimateUpdate) (*DataDividendsEstimateUpdate, error) {
url := gateway.baseUrL + "/dividends-estimates/{dividendsEstimateId}"
... ...
... ... @@ -198,8 +198,8 @@ func (gateway HttplibAlliedCreationCooperation) DividendsReturnedOrderGet(param
}
// DividendsReturnedOrderBatchRemove 批量移除分红退货单
func (gateway HttplibAlliedCreationCooperation) DividendsReturnedOrderBatchRemove(param ReqDividendsReturnedOrderRemove) (
*DataDividendsReturnedOrderRemove, error) {
func (gateway HttplibAlliedCreationCooperation) DividendsReturnedOrderBatchRemove(param ReqDividendsReturnedOrderBatchRemove) (
*DataDividendsReturnedOrderBatchRemove, error) {
url := gateway.baseUrL + "/dividends-returned-orders/batch-remove"
method := "POST"
req := gateway.CreateRequest(url, method)
... ... @@ -224,7 +224,7 @@ func (gateway HttplibAlliedCreationCooperation) DividendsReturnedOrderBatchRemov
if err != nil {
return nil, fmt.Errorf("解析移除分红退货单:%w", err)
}
var data DataDividendsReturnedOrderRemove
var data DataDividendsReturnedOrderBatchRemove
err = gateway.GetResponseData(result, &data)
return &data, err
}
... ...
package allied_creation_cooperation
import "time"
import (
"time"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
//创建共创合约
type (
//分红激励规则
DividendsIncentivesRule struct {
// 关联的项目合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 推荐人抽成比例
ReferrerPercentage float64 `json:"referrerPercentage"`
// 业务员抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"`
// 分红规则激励百分点
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
// 分红规则激励阶段,
DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string"`
// 分红规则激励阶段结束
DividendsIncentivesStageEnd time.Time `json:"dividendsIncentivesStageEnd"`
// 分红规则激励阶段开始
DividendsIncentivesStageStart time.Time `json:"dividendsIncentivesStageStart"`
}
//金额激励规则
MoneyIncentivesRule struct {
// 金额激励规则ID
MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string"`
// 关联的共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 激励金额
MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"`
// 金额激励阶段
MoneyIncentivesStage int `json:"moneyIncentivesStage"`
// 金额激励规则时间
MoneyIncentivesTime time.Time `json:"moneyIncentivesTime"`
// 推荐人抽成比例
ReferrerPercentage float64 `json:"referrerPercentage"`
// 业务员抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"`
}
//合约承接方
Undertaker struct {
UndertakerId string `json:"undertakerId"` //承接人用户id
RerferrerId string `json:"rerferrerId"` //推荐人用户id
SalesmanId string `json:"salesmanId"` //关联业务员id
Attachment domain.Attachment `json:"attachment"`
}
ReqCooperationContractAdd struct {
// 共创合约描述
CooperationContractDescription string ` json:"cooperationContractDescription"`
CooperationContractDescription string `json:"cooperationContractDescription"`
// 共创合约编号
CooperationContractNumber string ` json:"cooperationContractNumber"`
CooperationContractNumber string `json:"cooperationContractNumber"`
// 共创项目编号,
CooperationProjectNumber string `json:"cooperationProjectNumber" `
// 共创合约发起部门编码
DepartmentNumber string `json:"departmentNumber"`
CooperationProjectNumber string `json:"cooperationProjectNumber"`
// 共创合约发起部门id
DepartmentId string `json:"departmentId"`
// 共创合约承接对象,1员工,2共创用户,3公开
CooperationContractUndertakerType []int ` json:"cooperationContractUndertakerType"`
CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"`
// 共创合约名称
CooperationContractName string `json:"cooperationContractName"`
// 共创模式编码,手动输入,唯一确定
CooperationModeNumber string ` json:"cooperationModeNumber"`
// 共创模式编码,
CooperationModeNumber string `json:"cooperationModeNumber"`
// 共创合约发起人uid
SponsorUid string `json:"sponsorUid,omitempty"`
SponsorUid string `json:"sponsorUid"`
// 业绩分红激励规则列表
DividendsIncentivesRules []struct {
// 关联的项目合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 推荐人抽成比例
ReferrerPercentage float64 `json:"referrerPercentage"`
// 业务员抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"`
// 分红规则激励百分点
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
// 分红规则激励阶段,阶段返回时需要转换为中文数字
DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string"`
// 分红规则激励阶段结束
DividendsIncentivesStageEnd time.Time `json:"dividendsIncentivesStageEnd"`
// 分红规则激励阶段开始
DividendsIncentivesStageStart time.Time `json:"dividendsIncentivesStageStart"`
} `json:"dividendsIncentivesRules"`
DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"`
// 金额激励规则列表
MoneyIncentivesRules []struct {
// 金额激励规则ID
MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string"`
// 关联的共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 激励金额
MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"`
// 金额激励阶段,阶段返回时需要转换为中文数字
MoneyIncentivesStage int64 `json:"moneyIncentivesStage,string"`
// 金额激励阶段有效期结束
MoneyIncentivesStageEnd time.Time `json:"moneyIncentivesStageEnd"`
// 金额激励阶段有效期开始
MoneyIncentivesStageStart time.Time `json:"moneyIncentivesStageStart"`
// 金额激励规则时间
MoneyIncentivesTime time.Time `json:"moneyIncentivesTime"`
// 推荐人抽成比例
ReferrerPercentage float64 `json:"referrerPercentage"`
// 业务员抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"`
} `json:"moneyIncentivesRules"`
MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"`
// 承接方列表
Undertakers []struct {
UserId int64 `json:"userId,string"`
// 用户基本id
UserBaseId int64 `json:"userBaseId,string"`
// 用户所属组织机构
Org struct {
// 组织机构ID
OrgId int64 `json:"orgId,string"`
// 组织名称
OrgName string `json:"orgName"`
}
} `json:"undertakers"`
Undertakers []Undertaker `json:"undertakers"`
//关联业务员
RelevantIds []string `json:"relevantIds"`
}
DataCooperationContractAdd struct {
... ... @@ -81,7 +85,31 @@ type (
//更新共创合约
type (
ReqCooperationContractUpdate struct {
CooperationContractId int
CooperationContractId int `json:"cooperationContractId"`
// 共创合约描述
CooperationContractDescription string `json:"cooperationContractDescription"`
// 共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 共创项目编号,
CooperationProjectNumber string `json:"cooperationProjectNumber"`
// 共创合约发起部门id
DepartmentId string `json:"departmentId"`
// 共创合约承接对象,1员工,2共创用户,3公开
CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"`
// 共创合约名称
CooperationContractName string `json:"cooperationContractName"`
// 共创模式编码,
CooperationModeNumber string `json:"cooperationModeNumber"`
// 共创合约发起人uid
SponsorUid string `json:"sponsorUid,omitempty,"`
// 业绩分红激励规则列表
DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"`
// 金额激励规则列表
MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"`
// 承接方列表
Undertakers []Undertaker `json:"undertakers"`
//关联业务员
RelevantIds []string `json:"relevantIds"`
}
DataCooperationContractUpdate struct {
... ... @@ -100,6 +128,11 @@ type (
//根据承接人查询并返回共创项目合约
type (
ReqCooperationContractSearchByUndertaker struct {
CooperationContractName string //合约名称
SponsorName string //项目发起人姓名
UserId int //合约发起人
PageNumber int
PageIndex int
}
DataCooperationContractSearchByUndertaker struct {
... ...
... ... @@ -9,15 +9,6 @@ type (
}
)
//创建分红预算
type (
ReqDividendsEstimateAdd struct {
}
DataDividendsEstimateAdd struct {
}
)
//更新分红预算
type (
ReqDividendsEstimateUpdate struct {
... ... @@ -39,6 +30,10 @@ type (
//查询分红预算单
type (
ReqDividendsEstimateSearch struct {
DividendsType int `json:"dividendsType"`
DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"`
PageNumber int `json:"pageNumber"`
PageSize int `json:"pageSize"`
}
DataDividendsEstimateSearch struct {
... ...
... ... @@ -110,6 +110,16 @@ type (
}
)
//批量移除分红退货单
type (
ReqDividendsReturnedOrderBatchRemove struct {
DividendsReturnedOrderIDs []int `json:"dividendsReturnedOrderIds"` //分红退货单记录id
}
DataDividendsReturnedOrderBatchRemove struct {
}
)
//返回分红退货单列表
type (
ReqDividendsReturnedOrderList struct {
... ...
... ... @@ -24,7 +24,7 @@ func (controller *CooperationContractController) UpdateCooperationContract() {
updateCooperationContractCommand := &command.UpdateCooperationContractCommand{}
controller.Unmarshal(updateCooperationContractCommand)
contractId, _ := controller.GetInt(":contractId")
updateCooperationContractCommand.CooperationContract.CooperationContractId = contractId
updateCooperationContractCommand.CooperationContractId = contractId
data, err := cooperationContractService.UpdateCooperationContract(updateCooperationContractCommand)
controller.Response(data, err)
}
... ...
... ... @@ -44,8 +44,6 @@ func (controller *DividendsReturnedOrderController) RemoveDividendsReturnedOrder
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
projectId, _ := controller.GetInt(":projectId")
removeDividendsReturnedOrderCommand.DividendsReturnedOrderID = projectId
removeDividendsReturnedOrderCommand.Operator = controller.GetOperator()
data, err := dividendsReturnedOrderService.RemoveDividendsReturnedOrder(removeDividendsReturnedOrderCommand)
controller.Response(data, err)
... ...