...
|
...
|
@@ -55,20 +55,26 @@ func ValidChancePermission(uid, cid int64, items []*protocol.CommonListItem) (er |
|
|
specialDIds = append(specialDIds, op.CheckOption.Departments[i].Id)
|
|
|
}
|
|
|
check = op.Check
|
|
|
} else {
|
|
|
log.Error(err)
|
|
|
return
|
|
|
}
|
|
|
if len(specialDIds) == 0 {
|
|
|
specialDIds = append(specialDIds, 0)
|
|
|
}
|
|
|
log.Debug(fmt.Sprintf("user:%v check:%v", uid, check))
|
|
|
for i := range items {
|
|
|
if items[i].ChanceStatus != 0 {
|
|
|
continue
|
|
|
}
|
|
|
if items[i].ChanceId == 0 {
|
|
|
items[i].ChanceStatus = protocol.ChanceStatusClose
|
|
|
log.Debug(fmt.Sprintf("chance_id:%v 关闭原因:%v", items[i].ChanceId, "机会编号0"))
|
|
|
continue
|
|
|
}
|
|
|
if items[i].Chance.Provider == nil {
|
|
|
items[i].ChanceStatus = protocol.ChanceStatusClose
|
|
|
log.Debug(fmt.Sprintf("chance_id:%v 关闭原因:%v", items[i].ChanceId, "机会提交人为null"))
|
|
|
continue
|
|
|
}
|
|
|
var chancePublicStatus = items[i].Chance.PublicStatus
|
...
|
...
|
|