作者 陈志颖

fix:修复金额激励分红确定预算错误

... ... @@ -92,7 +92,7 @@ func (domainService *ConfirmMoneyIncentivesEstimateService) Confirm(contract *do
}
// 判断业务员在当前阶段是否已经分红
if undertaker.Salesman.UserId != 0 {
if undertaker.Salesman != nil {
salesmanEstimated, err := dividendsEstimateDao.UserEstimated(map[string]interface{}{
"undertakerUid": undertaker.Salesman.UserId,
"companyId": contract.Company.CompanyId,
... ... @@ -128,7 +128,7 @@ func (domainService *ConfirmMoneyIncentivesEstimateService) Confirm(contract *do
}
// 判断关联业务员在当前阶段是否已经分红
if undertaker.Referrer.UserId != 0 {
if undertaker.Referrer != nil {
referrerEstimated, err := dividendsEstimateDao.UserEstimated(map[string]interface{}{
"undertakerUid": undertaker.Referrer.UserId,
"companyId": contract.Company.CompanyId,
... ...