作者 陈志颖

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

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