作者 陈志颖

feat:分红订单仓储删除方法调整

... ... @@ -244,10 +244,27 @@ func (dividendsOrderService *DividendsOrderService) ListDividendsOrders(listDivi
defer func() {
_ = transactionContext.RollbackTransaction()
}()
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
var dividendsOrderRepository domain.DividendsOrderRepository
if value, err := factory.CreateDividendsOrderRepository(map[string]interface{}{
"transactionContext": transactionContext,
}); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
dividendsOrderRepository = value
}
if count, dividendsOrders, err := dividendsOrderRepository.Find(tool_funs.SimpleStructToMap(listDividendsOrdersQuery)); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
return map[string]interface{}{
"grid": map[string]interface{}{
"total": count,
"list": dividendsOrders,
},
}, nil
}
return nil, nil
}
// RemoveDividendsOrder 移除分红订单实体对象
... ... @@ -305,13 +322,30 @@ func (dividendsOrderService *DividendsOrderService) SearchDividendsOrder(searchD
defer func() {
_ = transactionContext.RollbackTransaction()
}()
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
var dividendsOrderRepository domain.DividendsOrderRepository
if value, err := factory.CreateDividendsOrderRepository(map[string]interface{}{
"transactionContext": transactionContext,
}); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
dividendsOrderRepository = value
}
if count, dividendsOrders, err := dividendsOrderRepository.Find(tool_funs.SimpleStructToMap(searchDividendsOrderQuery)); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
return map[string]interface{}{
"grid": map[string]interface{}{
"total": count,
"list": dividendsOrders,
},
}, nil
}
return nil, nil
}
// SearchDividendsOrderNumber 查询分红订单方法
// SearchDividendsOrderNumber 查询分红订单
func (dividendsOrderService *DividendsOrderService) SearchDividendsOrderNumber(searchDividendsOrderNumberQuery *query.SearchDividendsOrderNumberQuery) (interface{}, error) {
if err := searchDividendsOrderNumberQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
... ... @@ -326,10 +360,28 @@ func (dividendsOrderService *DividendsOrderService) SearchDividendsOrderNumber(s
defer func() {
_ = transactionContext.RollbackTransaction()
}()
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
var dividendsOrderRepository domain.DividendsOrderRepository
if value, err := factory.CreateDividendsOrderRepository(map[string]interface{}{
"transactionContext": transactionContext,
}); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
dividendsOrderRepository = value
}
if _, dividendsOrders, err := dividendsOrderRepository.Find(tool_funs.SimpleStructToMap(searchDividendsOrderNumberQuery)); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
var dividendsOrderNumbers []string
for _, dividendsOrder := range dividendsOrders {
dividendsOrderNumbers = append(dividendsOrderNumbers, dividendsOrder.DividendsOrderNumber)
}
return map[string]interface{}{
"dividendsOrderNumber": dividendsOrderNumbers,
}, nil
}
return nil, nil
}
// UpdateDividendsOrder 更新分红订单实体对象
... ...
package domain
type AccountDetail struct {
// 承接人分红预算单号
// 分红预算单号
DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"`
// 分红类型
DividendsType string `json:"dividendsType"`
... ...
... ... @@ -26,6 +26,7 @@ func (repository *DividendsOrderRepository) nextIdentify() (int64, error) {
id, err := IdWorker.NextId()
return id, err
}
func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.DividendsOrder) (*domain.DividendsOrder, error) {
sqlBuildFields := []string{
"dividends_order_id",
... ... @@ -95,7 +96,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend
dividendsOrder.Org,
dividendsOrder.Company,
dividendsOrder.CreatedAt,
dividendsOrder.DeletedAt,
nil,
dividendsOrder.UpdatedAt,
dividendsOrder.OperateTime,
dividendsOrder.Operator,
... ... @@ -159,7 +160,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend
dividendsOrder.Org,
dividendsOrder.Company,
dividendsOrder.CreatedAt,
dividendsOrder.DeletedAt,
nil,
dividendsOrder.UpdatedAt,
dividendsOrder.OperateTime,
dividendsOrder.Operator,
... ... @@ -254,6 +255,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend
}
return dividendsOrder, nil
}
func (repository *DividendsOrderRepository) Remove(dividendsOrder *domain.DividendsOrder) (*domain.DividendsOrder, error) {
tx := repository.transactionContext.PgTx
dividendsOrderModel := new(models.DividendsOrder)
... ... @@ -261,19 +263,15 @@ func (repository *DividendsOrderRepository) Remove(dividendsOrder *domain.Divide
if _, err := tx.Model(dividendsOrderModel).WherePK().Delete(); err != nil {
return dividendsOrder, err
} else {
// 获取订单产品
// 删除订单产品
var orderGoodModels []*models.OrderGood
orderGoodModelQuery := tx.Model(&orderGoodModels)
if err := orderGoodModelQuery.Where("dividends_order_number = ?", dividendsOrderModel.DividendsOrderNumber).Select(); err != nil {
return nil, err
}
// 批量删除订单产品
if _, err := tx.Model(&orderGoodModels).WherePK().Delete(); err != nil {
if _, err := tx.Model(&orderGoodModels).Where("dividends_order_number = ?", dividendsOrder.DividendsOrderNumber).Delete(); err != nil {
return nil, err
}
}
return dividendsOrder, nil
}
func (repository *DividendsOrderRepository) FindOne(queryOptions map[string]interface{}) (*domain.DividendsOrder, error) {
tx := repository.transactionContext.PgTx
dividendsOrderModel := new(models.DividendsOrder)
... ... @@ -299,11 +297,15 @@ func (repository *DividendsOrderRepository) FindOne(queryOptions map[string]inte
return transform.TransformToDividendsOrderDomainModelFromPgModels(dividendsOrderModel, orderGoodModels)
}
}
func (repository *DividendsOrderRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.DividendsOrder, error) {
tx := repository.transactionContext.PgTx
var dividendsOrderModels []*models.DividendsOrder
dividendsOrders := make([]*domain.DividendsOrder, 0)
query := sqlbuilder.BuildQuery(tx.Model(&dividendsOrderModels), queryOptions)
if dividendsOrderNumber, ok := queryOptions["dividendsOrderNumber"]; ok && dividendsOrderNumber != "" {
query.Where("dividends_order_number like ?", fmt.Sprintf("%%%s%%", dividendsOrderNumber))
}
offsetLimitFlag := true
if offsetLimit, ok := queryOptions["offsetLimit"]; ok {
offsetLimitFlag = offsetLimit.(bool)
... ... @@ -332,6 +334,7 @@ func (repository *DividendsOrderRepository) Find(queryOptions map[string]interfa
return int64(count), dividendsOrders, nil
}
}
func NewDividendsOrderRepository(transactionContext *pgTransaction.TransactionContext) (*DividendsOrderRepository, error) {
if transactionContext == nil {
return nil, fmt.Errorf("transactionContext参数不能为nil")
... ...
... ... @@ -14,7 +14,6 @@ func (controller *CooperationProjectController) ReleaseCooperationProject() {
cooperationProjectService := service.NewCooperationProjectService(nil)
releaseCooperationProjectCommand := &command.ReleaseCooperationProjectCommand{}
_ = controller.Unmarshal(releaseCooperationProjectCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
releaseCooperationProjectCommand.CompanyId = header.CompanyId
releaseCooperationProjectCommand.OrgId = header.OrgId
... ... @@ -28,7 +27,6 @@ func (controller *CooperationProjectController) CreateCooperationProject() {
cooperationProjectService := service.NewCooperationProjectService(nil)
createCooperationProjectCommand := &command.CreateCooperationProjectCommand{}
_ = controller.Unmarshal(createCooperationProjectCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
createCooperationProjectCommand.CompanyId = header.CompanyId
createCooperationProjectCommand.OrgId = header.OrgId
... ... @@ -42,7 +40,6 @@ func (controller *CooperationProjectController) UpdateCooperationProject() {
cooperationProjectService := service.NewCooperationProjectService(nil)
updateCooperationProjectCommand := &command.UpdateCooperationProjectCommand{}
_ = controller.Unmarshal(updateCooperationProjectCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
updateCooperationProjectCommand.CompanyId = header.CompanyId
updateCooperationProjectCommand.OrgId = header.OrgId
... ... @@ -57,7 +54,6 @@ func (controller *CooperationProjectController) UpdateCooperationProject() {
func (controller *CooperationProjectController) GetCooperationProject() {
cooperationProjectService := service.NewCooperationProjectService(nil)
getCooperationProjectQuery := &query.GetCooperationProjectQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
getCooperationProjectQuery.CompanyId = header.CompanyId
getCooperationProjectQuery.OrgId = header.OrgId
... ... @@ -73,7 +69,6 @@ func (controller *CooperationProjectController) RemoveCooperationProject() {
cooperationProjectService := service.NewCooperationProjectService(nil)
removeCooperationProjectCommand := &command.RemoveCooperationProjectCommand{}
_ = controller.Unmarshal(removeCooperationProjectCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
removeCooperationProjectCommand.CompanyId = header.CompanyId
removeCooperationProjectCommand.OrgId = header.OrgId
... ... @@ -89,7 +84,6 @@ func (controller *CooperationProjectController) SearchCooperationProject() {
cooperationProjectService := service.NewCooperationProjectService(nil)
searchCooperationProjectQuery := &query.SearchCooperationProjectQuery{}
controller.Unmarshal(searchCooperationProjectQuery)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
searchCooperationProjectQuery.CompanyId = header.CompanyId
searchCooperationProjectQuery.OrgId = header.OrgId
... ... @@ -102,7 +96,6 @@ func (controller *CooperationProjectController) SearchCooperationProject() {
func (controller *CooperationProjectController) CheckUndertaker() {
cooperationProjectService := service.NewCooperationProjectService(nil)
checkUndertakerQuery := &query.CheckUndertakerQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
checkUndertakerQuery.CompanyId = header.CompanyId
checkUndertakerQuery.OrgId = header.OrgId
... ... @@ -115,7 +108,6 @@ func (controller *CooperationProjectController) CheckUndertaker() {
func (controller *CooperationProjectController) ListCooperationProject() {
cooperationProjectService := service.NewCooperationProjectService(nil)
listCooperationProjectQuery := &query.ListCooperationProjectQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
listCooperationProjectQuery.CompanyId = header.CompanyId
listCooperationProjectQuery.OrgId = header.OrgId
... ...
... ... @@ -14,7 +14,6 @@ func (controller *CreditAccountController) CreateCreditAccount() {
creditAccountService := service.NewCreditAccountService(nil)
createCreditAccountCommand := &command.CreateCreditAccountCommand{}
_ = controller.Unmarshal(createCreditAccountCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
createCreditAccountCommand.CompanyId = header.CompanyId
createCreditAccountCommand.OrgId = header.OrgId
... ... @@ -28,7 +27,6 @@ func (controller *CreditAccountController) UpdateCreditAccount() {
creditAccountService := service.NewCreditAccountService(nil)
updateCreditAccountCommand := &command.UpdateCreditAccountCommand{}
_ = controller.Unmarshal(updateCreditAccountCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
updateCreditAccountCommand.CompanyId = header.CompanyId
updateCreditAccountCommand.OrgId = header.OrgId
... ... @@ -43,7 +41,6 @@ func (controller *CreditAccountController) UpdateCreditAccount() {
func (controller *CreditAccountController) GetCreditAccount() {
creditAccountService := service.NewCreditAccountService(nil)
getCreditAccountQuery := &query.GetCreditAccountQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
getCreditAccountQuery.CompanyId = header.CompanyId
getCreditAccountQuery.OrgId = header.OrgId
... ... @@ -59,7 +56,6 @@ func (controller *CreditAccountController) RemoveCreditAccount() {
creditAccountService := service.NewCreditAccountService(nil)
removeCreditAccountCommand := &command.RemoveCreditAccountCommand{}
_ = controller.Unmarshal(removeCreditAccountCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
removeCreditAccountCommand.CompanyId = header.CompanyId
removeCreditAccountCommand.OrgId = header.OrgId
... ... @@ -74,7 +70,6 @@ func (controller *CreditAccountController) RemoveCreditAccount() {
func (controller *CreditAccountController) SearchCreditAccount() {
creditAccountService := service.NewCreditAccountService(nil)
searchCreditAccountQuery := &query.SearchCreditAccountQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
searchCreditAccountQuery.CompanyId = header.CompanyId
searchCreditAccountQuery.OrgId = header.OrgId
... ... @@ -88,7 +83,6 @@ func (controller *CreditAccountController) PayCreditAccount() {
creditAccountService := service.NewCreditAccountService(nil)
payCreditAccountCommand := &command.PayCreditAccountCommand{}
_ = controller.Unmarshal(payCreditAccountCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
payCreditAccountCommand.CompanyId = header.CompanyId
payCreditAccountCommand.OrgId = header.OrgId
... ... @@ -101,7 +95,6 @@ func (controller *CreditAccountController) PayCreditAccount() {
func (controller *CreditAccountController) ListCreditAccount() {
creditAccountService := service.NewCreditAccountService(nil)
listCreditAccountQuery := &query.ListCreditAccountQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
listCreditAccountQuery.CompanyId = header.CompanyId
listCreditAccountQuery.OrgId = header.OrgId
... ...
... ... @@ -14,7 +14,6 @@ func (controller *DividendsEstimateController) CreateDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
createDividendsEstimateCommand := &command.CreateDividendsEstimateCommand{}
_ = controller.Unmarshal(createDividendsEstimateCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
createDividendsEstimateCommand.CompanyId = header.CompanyId
createDividendsEstimateCommand.OrgId = header.OrgId
... ... @@ -28,7 +27,6 @@ func (controller *DividendsEstimateController) UpdateDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
updateDividendsEstimateCommand := &command.UpdateDividendsEstimateCommand{}
_ = controller.Unmarshal(updateDividendsEstimateCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
updateDividendsEstimateCommand.CompanyId = header.CompanyId
updateDividendsEstimateCommand.OrgId = header.OrgId
... ... @@ -43,7 +41,6 @@ func (controller *DividendsEstimateController) UpdateDividendsEstimate() {
func (controller *DividendsEstimateController) GetDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
getDividendsEstimateQuery := &query.GetDividendsEstimateQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
getDividendsEstimateQuery.CompanyId = header.CompanyId
getDividendsEstimateQuery.OrgId = header.OrgId
... ... @@ -59,7 +56,6 @@ func (controller *DividendsEstimateController) RemoveDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
removeDividendsEstimateCommand := &command.RemoveDividendsEstimateCommand{}
_ = controller.Unmarshal(removeDividendsEstimateCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
removeDividendsEstimateCommand.CompanyId = header.CompanyId
removeDividendsEstimateCommand.OrgId = header.OrgId
... ... @@ -75,7 +71,6 @@ func (controller *DividendsEstimateController) CancelDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
cancelDividendsEstimateCommand := &command.CancelDividendsEstimateCommand{}
_ = controller.Unmarshal(cancelDividendsEstimateCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
cancelDividendsEstimateCommand.CompanyId = header.CompanyId
cancelDividendsEstimateCommand.OrgId = header.OrgId
... ... @@ -104,7 +99,6 @@ func (controller *DividendsEstimateController) EstimateDividendsIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
estimateDividendsIncentivesCommand := &command.EstimateDividendsIncentivesCommand{}
_ = controller.Unmarshal(estimateDividendsIncentivesCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
estimateDividendsIncentivesCommand.CompanyId = header.CompanyId
estimateDividendsIncentivesCommand.OrgId = header.OrgId
... ... @@ -118,7 +112,6 @@ func (controller *DividendsEstimateController) EstimateMoneyIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
estimateMoneyIncentivesCommand := &command.EstimateMoneyIncentivesCommand{}
_ = controller.Unmarshal(estimateMoneyIncentivesCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
estimateMoneyIncentivesCommand.CompanyId = header.CompanyId
estimateMoneyIncentivesCommand.OrgId = header.OrgId
... ... @@ -131,7 +124,6 @@ func (controller *DividendsEstimateController) EstimateMoneyIncentives() {
func (controller *DividendsEstimateController) ListMoneyIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
listMoneyIncentivesQuery := &query.ListMoneyIncentivesQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
listMoneyIncentivesQuery.CompanyId = header.CompanyId
listMoneyIncentivesQuery.OrgId = header.OrgId
... ... @@ -144,7 +136,6 @@ func (controller *DividendsEstimateController) ListMoneyIncentives() {
func (controller *DividendsEstimateController) SearchMoneyIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
searchMoneyIncentivesQuery := &query.SearchMoneyIncentivesQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
searchMoneyIncentivesQuery.CompanyId = header.CompanyId
searchMoneyIncentivesQuery.OrgId = header.OrgId
... ... @@ -157,7 +148,6 @@ func (controller *DividendsEstimateController) SearchMoneyIncentives() {
func (controller *DividendsEstimateController) ListDividendsIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
listDividendsIncentivesQuery := &query.ListDividendsIncentivesQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
listDividendsIncentivesQuery.CompanyId = header.CompanyId
listDividendsIncentivesQuery.OrgId = header.OrgId
... ... @@ -170,7 +160,6 @@ func (controller *DividendsEstimateController) ListDividendsIncentives() {
func (controller *DividendsEstimateController) SearchDividendsIncentives() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
searchDividendsIncentivesQuery := &query.SearchDividendsIncentivesQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
searchDividendsIncentivesQuery.CompanyId = header.CompanyId
searchDividendsIncentivesQuery.OrgId = header.OrgId
... ... @@ -183,7 +172,6 @@ func (controller *DividendsEstimateController) SearchDividendsIncentives() {
func (controller *DividendsEstimateController) ListDividendsEstimate() {
dividendsEstimateService := service.NewDividendsEstimateService(nil)
listDividendsEstimateQuery := &query.ListDividendsEstimateQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
listDividendsEstimateQuery.CompanyId = header.CompanyId
listDividendsEstimateQuery.OrgId = header.OrgId
... ...
... ... @@ -14,7 +14,6 @@ func (controller *DividendsOrderController) CreateDividendsOrder() {
dividendsOrderService := service.NewDividendsOrderService(nil)
createDividendsOrderCommand := &command.CreateDividendsOrderCommand{}
_ = controller.Unmarshal(createDividendsOrderCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
createDividendsOrderCommand.CompanyId = header.CompanyId
createDividendsOrderCommand.OrgId = header.OrgId
... ... @@ -28,7 +27,6 @@ func (controller *DividendsOrderController) UpdateDividendsOrder() {
dividendsOrderService := service.NewDividendsOrderService(nil)
updateDividendsOrderCommand := &command.UpdateDividendsOrderCommand{}
_ = controller.Unmarshal(updateDividendsOrderCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
updateDividendsOrderCommand.CompanyId = header.CompanyId
updateDividendsOrderCommand.OrgId = header.OrgId
... ... @@ -43,7 +41,6 @@ func (controller *DividendsOrderController) UpdateDividendsOrder() {
func (controller *DividendsOrderController) GetDividendsOrder() {
dividendsOrderService := service.NewDividendsOrderService(nil)
getDividendsOrderQuery := &query.GetDividendsOrderQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
getDividendsOrderQuery.CompanyId = header.CompanyId
getDividendsOrderQuery.OrgId = header.OrgId
... ... @@ -59,7 +56,6 @@ func (controller *DividendsOrderController) RemoveDividendsOrder() {
dividendsOrderService := service.NewDividendsOrderService(nil)
removeDividendsOrderCommand := &command.RemoveDividendsOrderCommand{}
_ = controller.Unmarshal(removeDividendsOrderCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
removeDividendsOrderCommand.CompanyId = header.CompanyId
removeDividendsOrderCommand.OrgId = header.OrgId
... ... @@ -74,7 +70,6 @@ func (controller *DividendsOrderController) RemoveDividendsOrder() {
func (controller *DividendsOrderController) SearchDividendsOrder() {
dividendsOrderService := service.NewDividendsOrderService(nil)
searchDividendsOrderQuery := &query.SearchDividendsOrderQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
searchDividendsOrderQuery.CompanyId = header.CompanyId
searchDividendsOrderQuery.OrgId = header.OrgId
... ... @@ -87,7 +82,6 @@ func (controller *DividendsOrderController) SearchDividendsOrder() {
func (controller *DividendsOrderController) SearchDividendsOrderNumber() {
dividendsOrderService := service.NewDividendsOrderService(nil)
searchDividendsOrderNumberQuery := &query.SearchDividendsOrderNumberQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
searchDividendsOrderNumberQuery.CompanyId = header.CompanyId
searchDividendsOrderNumberQuery.OrgId = header.OrgId
... ... @@ -100,7 +94,6 @@ func (controller *DividendsOrderController) SearchDividendsOrderNumber() {
func (controller *DividendsOrderController) ListDividendsOrders() {
dividendsOrderService := service.NewDividendsOrderService(nil)
listDividendsOrdersQuery := &query.ListDividendsOrdersQuery{}
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
listDividendsOrdersQuery.CompanyId = header.CompanyId
listDividendsOrdersQuery.OrgId = header.OrgId
... ...