正在显示
1 个修改的文件
包含
18 行增加
和
11 行删除
@@ -115,11 +115,15 @@ func ValidChancePermission(uid, cid int64, items []*protocol.CommonListItem) (er | @@ -115,11 +115,15 @@ func ValidChancePermission(uid, cid int64, items []*protocol.CommonListItem) (er | ||
115 | var chancePublicStatus = items[i].Chance.PublicStatus | 115 | var chancePublicStatus = items[i].Chance.PublicStatus |
116 | var chanceUserId = items[i].Chance.Provider.UserId | 116 | var chanceUserId = items[i].Chance.Provider.UserId |
117 | var chanceId = items[i].ChanceId | 117 | var chanceId = items[i].ChanceId |
118 | + | ||
119 | + if chanceUserId == uid { | ||
120 | + continue | ||
121 | + } | ||
118 | switch check { | 122 | switch check { |
119 | case OpportunityCheckLv1: | 123 | case OpportunityCheckLv1: |
120 | - if chanceUserId == uid { | ||
121 | - continue | ||
122 | - } | 124 | + //if chanceUserId == uid { |
125 | + // continue | ||
126 | + //} | ||
123 | if _, e := models.ExitsChanceByAuditUser(chanceId, uid); e == nil { | 127 | if _, e := models.ExitsChanceByAuditUser(chanceId, uid); e == nil { |
124 | continue | 128 | continue |
125 | } | 129 | } |
@@ -128,9 +132,9 @@ func ValidChancePermission(uid, cid int64, items []*protocol.CommonListItem) (er | @@ -128,9 +132,9 @@ func ValidChancePermission(uid, cid int64, items []*protocol.CommonListItem) (er | ||
128 | if chancePublicStatus == protocol.PublicToCompany { | 132 | if chancePublicStatus == protocol.PublicToCompany { |
129 | continue | 133 | continue |
130 | } | 134 | } |
131 | - if chanceUserId == uid { | ||
132 | - continue | ||
133 | - } | 135 | + //if chanceUserId == uid { |
136 | + // continue | ||
137 | + //} | ||
134 | if chancePublicStatus == protocol.PublicToDepartment { | 138 | if chancePublicStatus == protocol.PublicToDepartment { |
135 | if len(userDIds) == 0 { | 139 | if len(userDIds) == 0 { |
136 | if e := models.GetUserDepartmentIds(uid, cid, &userDIds); e != nil { | 140 | if e := models.GetUserDepartmentIds(uid, cid, &userDIds); e != nil { |
@@ -138,7 +142,7 @@ func ValidChancePermission(uid, cid int64, items []*protocol.CommonListItem) (er | @@ -138,7 +142,7 @@ func ValidChancePermission(uid, cid int64, items []*protocol.CommonListItem) (er | ||
138 | return | 142 | return |
139 | } | 143 | } |
140 | } | 144 | } |
141 | - if _, e := models.ExitsChanceByPublicDeparmentIds(chanceId, userDIds); e == nil { | 145 | + if _, e := models.ExitsChanceByDeparmentIds(chanceId, userDIds); e == nil { |
142 | continue | 146 | continue |
143 | } | 147 | } |
144 | } | 148 | } |
@@ -147,10 +151,13 @@ func ValidChancePermission(uid, cid int64, items []*protocol.CommonListItem) (er | @@ -147,10 +151,13 @@ func ValidChancePermission(uid, cid int64, items []*protocol.CommonListItem) (er | ||
147 | } | 151 | } |
148 | items[i].ChanceStatus = protocol.ChanceStatusClose | 152 | items[i].ChanceStatus = protocol.ChanceStatusClose |
149 | case OpportunityCheckLv3: | 153 | case OpportunityCheckLv3: |
150 | - if chanceUserId == uid { | ||
151 | - continue | ||
152 | - } | 154 | + //if chanceUserId == uid { |
155 | + // continue | ||
156 | + //} | ||
153 | if _, ok := checkMap[OpportunityCheckLv2]; ok { //同时存在对部门公开的机会 | 157 | if _, ok := checkMap[OpportunityCheckLv2]; ok { //同时存在对部门公开的机会 |
158 | + if chancePublicStatus == protocol.PublicToCompany { | ||
159 | + continue | ||
160 | + } | ||
154 | if chancePublicStatus == protocol.PublicToDepartment { | 161 | if chancePublicStatus == protocol.PublicToDepartment { |
155 | if len(userDIds) == 0 { | 162 | if len(userDIds) == 0 { |
156 | if e := models.GetUserDepartmentIds(uid, cid, &userDIds); e != nil { | 163 | if e := models.GetUserDepartmentIds(uid, cid, &userDIds); e != nil { |
@@ -158,7 +165,7 @@ func ValidChancePermission(uid, cid int64, items []*protocol.CommonListItem) (er | @@ -158,7 +165,7 @@ func ValidChancePermission(uid, cid int64, items []*protocol.CommonListItem) (er | ||
158 | return | 165 | return |
159 | } | 166 | } |
160 | } | 167 | } |
161 | - if _, e := models.ExitsChanceByPublicDeparmentIds(chanceId, userDIds); e == nil { | 168 | + if _, e := models.ExitsChanceByDeparmentIds(chanceId, userDIds); e == nil { |
162 | continue | 169 | continue |
163 | } | 170 | } |
164 | } | 171 | } |
-
请 注册 或 登录 后发表评论