作者 陈志颖

fix:修复消息推送参数

... ... @@ -249,6 +249,9 @@ func (creditAccountService *CreditAccountService) CreateCreditAccount(createCred
CompanyId: creditAccount.Company.CompanyId,
})
}
if err15 := estimateDividendsService.Estimate(accountData); err15 != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err15.Error())
}
return creditAccount, nil
}
... ... @@ -452,14 +455,16 @@ func (creditAccountService *CreditAccountService) PayCreditAccount(payCreditAcco
payData = append(payData, service.PayData{
CreditAccountOrderNum: creditAccountSaved.CreditAccountOrderNum,
SettlementAmount: fmt.Sprint(creditAccountSaved.SettlementAmount),
ActuallyPaidAmount: fmt.Sprint(creditAccountSaved.ActuallyPaidAmount),
CreditAccountId: creditAccountSaved.CreditAccountId,
DividendsEstimateId: 0,
DividendsEstimateOrderNumber: "",
UserId: creditAccountSaved.Participator.UserId,
UserBaseId: creditAccountSaved.Participator.UserBaseId,
OrgId: creditAccountSaved.Org.OrgId,
CompanyId: creditAccountSaved.Company.CompanyId,
})
if err5 := payCreditAccountService.Pay(payData); err5 != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err5.Error())
}
return creditAccountSaved, nil
}
... ...
... ... @@ -1075,6 +1075,7 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent
CreationContractNumber: cooperationContractsMap[dividendsEstimateSaved.CooperationContractNumber].CooperationContractNumber,
CreationProjectId: cooperationProjectsMap[cooperationContractsMap[dividendsEstimateSaved.CooperationContractNumber].CooperationProjectNumber].CooperationProjectId,
CreationProjectName: cooperationProjectsMap[cooperationContractsMap[dividendsEstimateSaved.CooperationContractNumber].CooperationProjectNumber].CooperationProjectName,
CreationProjectNumber: cooperationProjectsMap[cooperationContractsMap[dividendsEstimateSaved.CooperationContractNumber].CooperationProjectNumber].CooperationProjectNumber,
ProductName: orderGoodsMap[dividendsEstimateSaved.OrderGoodId].OrderGoodName,
UserId: dividendsEstimateSaved.DividendsUser.UserId,
UserBaseId: dividendsEstimateSaved.DividendsUser.UserBaseId,
... ... @@ -1316,6 +1317,7 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmMoneyIncentives
CreationContractNumber: cooperationContract.CooperationContractNumber,
CreationProjectId: cooperationProject.CooperationProjectId,
CreationProjectName: cooperationProject.CooperationProjectName,
CreationProjectNumber: cooperationProject.CooperationProjectNumber,
ProductName: "",
UserId: dividendsEstimateSaved.DividendsUser.UserId,
UserBaseId: dividendsEstimateSaved.DividendsUser.UserBaseId,
... ...
... ... @@ -97,9 +97,8 @@ func (subscriber *MessageServiceSubscriber) HandleEvent(domainEvent coreDomain.D
data, err4 := messageServiceGateway.PayCreditAccount(
paidData.CreditAccountOrderNum,
paidData.SettlementAmount,
paidData.ActuallyPaidAmount,
paidData.CreditAccountId,
paidData.DividendsEstimateId,
paidData.DividendsEstimateOrderNumber,
paidData.UserId,
paidData.UserBaseId,
paidData.OrgId,
... ... @@ -149,6 +148,7 @@ func (subscriber *MessageServiceSubscriber) HandleEvent(domainEvent coreDomain.D
expectedData.CreationContractNumber,
expectedData.CreationProjectId,
expectedData.CreationProjectName,
expectedData.CreationProjectNumber,
expectedData.ProductName,
expectedData.UserId,
expectedData.UserBaseId,
... ...
... ... @@ -9,12 +9,10 @@ type CreditAccountPaidData struct {
CreditAccountOrderNum string `json:"creditAccountOrderNum"`
// 结算金额
SettlementAmount string `json:"settlementAmount"`
// 实际支付金额
ActuallyPaidAmount string `json:"actuallyPaidAmount"`
// 账期结算单ID
CreditAccountId int64 `json:"creditAccountId"`
// 分红预算单ID
DividendsEstimateId int64 `json:"dividendsEstimateId"`
// 分红预算单编号
DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"`
// 申请人ID
UserId int64 `json:"userId"`
// 申请人基础ID
... ...
... ... @@ -15,6 +15,8 @@ type DividendsExpectedInformData struct {
CreationProjectId int64 `json:"creationProjectId"`
// 共创项目名称
CreationProjectName string `json:"creationProjectName"`
// 共创项目编号
CreationProjectNumber string `json:"creationProjectNumber"`
// 产品名称
ProductName string `json:"productName"`
// 申请人ID
... ...
... ... @@ -8,6 +8,7 @@ type ExpectedData struct {
CreationContractNumber string
CreationProjectId int64
CreationProjectName string
CreationProjectNumber string
ProductName string
UserId int64
UserBaseId int64
... ...
... ... @@ -5,9 +5,8 @@ import coreDomain "github.com/linmadan/egglib-go/core/domain"
type PayData struct {
CreditAccountOrderNum string
SettlementAmount string
ActuallyPaidAmount string
CreditAccountId int64
DividendsEstimateId int64
DividendsEstimateOrderNumber string
UserId int64
UserBaseId int64
OrgId int64
... ...
... ... @@ -22,6 +22,7 @@ func (service *InformDividendsExpectedService) Expect(data []service.ExpectedDat
CreationContractNumber: dividendsExpectedInformedData.CreationContractNumber,
CreationProjectId: dividendsExpectedInformedData.CreationProjectId,
CreationProjectName: dividendsExpectedInformedData.CreationProjectName,
CreationProjectNumber: dividendsExpectedInformedData.CreationProjectNumber,
ProductName: dividendsExpectedInformedData.ProductName,
UserId: dividendsExpectedInformedData.UserId,
UserBaseId: dividendsExpectedInformedData.UserBaseId,
... ...
... ... @@ -20,8 +20,6 @@ func (service *PayCreditAccountService) Pay(data []service.PayData) error {
CreditAccountOrderNum: creditAccountPaidData.CreditAccountOrderNum,
SettlementAmount: creditAccountPaidData.SettlementAmount,
CreditAccountId: creditAccountPaidData.CreditAccountId,
DividendsEstimateId: creditAccountPaidData.DividendsEstimateId,
DividendsEstimateOrderNumber: creditAccountPaidData.DividendsEstimateOrderNumber,
UserId: creditAccountPaidData.UserId,
UserBaseId: creditAccountPaidData.UserBaseId,
OrgId: creditAccountPaidData.OrgId,
... ...
... ... @@ -122,6 +122,7 @@ func (serviceGateway *HttplibBasicServiceGateway) InformDividendsExpected(
creationContractNumber string,
creationProjectId int64,
creationProjectName string,
creationProjectNumber string,
productName string,
userId int64,
userBaseId int64,
... ... @@ -138,6 +139,7 @@ func (serviceGateway *HttplibBasicServiceGateway) InformDividendsExpected(
options["creationContractNumber"] = creationContractNumber
options["creationProjectId"] = creationProjectId
options["creationProjectName"] = creationProjectName
options["creationProjectNumber"] = creationProjectNumber
options["productName"] = productName
options["userId"] = userId
options["userBaseId"] = userBaseId
... ... @@ -199,9 +201,8 @@ func (serviceGateway *HttplibBasicServiceGateway) DividendsEstimate(
func (serviceGateway *HttplibBasicServiceGateway) PayCreditAccount(
creditAccountOrderNum string,
settlementAmount string,
actuallyPaidAmount string,
creditAccountId int64,
dividendsEstimateId int64,
dividendsEstimateOrderNumber string,
userId int64,
userBaseId int64,
orgId int64,
... ... @@ -212,9 +213,8 @@ func (serviceGateway *HttplibBasicServiceGateway) PayCreditAccount(
options := make(map[string]interface{})
options["creditAccountOrderNum"] = creditAccountOrderNum
options["settlementAmount"] = settlementAmount
options["actuallyPaidAmount"] = actuallyPaidAmount
options["creditAccountId"] = creditAccountId
options["dividendsEstimateId"] = dividendsEstimateId
options["dividendsEstimateOrderNumber"] = dividendsEstimateOrderNumber
options["userId"] = userId
options["userBaseId"] = userBaseId
options["orgId"] = orgId
... ...
... ... @@ -15,8 +15,8 @@ type UserServiceGateway interface {
type BasicServiceGateway interface {
AgreeCooperationApplication(creationProjectId int64, creationProjectName string, creationProjectNumber string, userId int64, userBaseId int64, orgId int64, companyId int64) (map[string]interface{}, error)
RejectCooperationApplication(creationProjectId int64, creationProjectName string, creationProjectNumber string, userId int64, userBaseId int64, orgId int64, companyId int64) (map[string]interface{}, error)
InformDividendsExpected(creationContractId int64, creationContractName string, creationContractNumber string, creationProjectId int64, creationProjectName string, productName string, userId int64, userBaseId int64, orgId int64, companyId int64, dividendsEstimateId int64, dividendsAmount string) (map[string]interface{}, error)
InformDividendsExpected(creationContractId int64, creationContractName string, creationContractNumber string, creationProjectId int64, creationProjectName string, creationProjectNumber string, productName string, userId int64, userBaseId int64, orgId int64, companyId int64, dividendsEstimateId int64, dividendsAmount string) (map[string]interface{}, error)
InformJoinCreationContract(creationContractId int64, creationContractName string, creationContractNumber string, creationProjectId int64, creationProjectNumber string, creationProjectName string, userId int64, userBaseId int64, orgId int64, companyId int64) (map[string]interface{}, error)
PayCreditAccount(creditAccountOrderNum string, settlementAmount string, creditAccountId int64, dividendsEstimateId int64, dividendsEstimateOrderNumber string, userId int64, userBaseId int64, orgId int64, companyId int64) (map[string]interface{}, error)
PayCreditAccount(creditAccountOrderNum string, settlementAmount string, actuallyPaidAmount string, creditAccountId int64, userId int64, userBaseId int64, orgId int64, companyId int64) (map[string]interface{}, error)
DividendsEstimate(creditAccountOrderNum string, settlementAmount string, creditAccountId int64, dividendsEstimateId int64, dividendsEstimateOrderNumber string, userId int64, userBaseId int64, orgId int64, companyId int64) (map[string]interface{}, error)
}
... ...