作者 陈志颖

fix:修复金额激励预算承接人检索错误

... ... @@ -8,6 +8,7 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain/service"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/dao"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/utils"
"time"
)
... ... @@ -49,6 +50,7 @@ func (domainService *ConfirmMoneyIncentivesEstimateService) Confirm(contract *do
// 金额激励预算
for _, undertaker := range contract.Undertakers {
if utils.IsContain64(undertakerUIDs, undertaker.UndertakerId) {
// 判断承接人在当前阶段是否已经分红
undertakerEstimated, err := dividendsEstimateDao.UserEstimated(map[string]interface{}{
"undertakerUid": undertaker.UserId,
... ... @@ -154,6 +156,7 @@ func (domainService *ConfirmMoneyIncentivesEstimateService) Confirm(contract *do
}
}
}
}
return dividendsEstimateDetails, nil
}
... ...
... ... @@ -135,3 +135,13 @@ func IsContain(items []int32, item int32) bool {
}
return false
}
// IsContain64 判断int64数组是否包含
func IsContain64(items []int64, item int64) bool {
for _, eachItem := range items {
if eachItem == item {
return true
}
}
return false
}
... ...