作者 tangxvhui

提交

@@ -88,8 +88,8 @@ var RouterPermission = map[string]PermissionBase{ @@ -88,8 +88,8 @@ var RouterPermission = map[string]PermissionBase{
88 "/v1/config/score": PermissionBase{CodeName: M_SYSTEM_RATING, ActionName: "default"}, 88 "/v1/config/score": PermissionBase{CodeName: M_SYSTEM_RATING, ActionName: "default"},
89 "/v1/config/score/get": PermissionBase{CodeName: M_SYSTEM_RATING, ActionName: "default"}, 89 "/v1/config/score/get": PermissionBase{CodeName: M_SYSTEM_RATING, ActionName: "default"},
90 "/v1/audit/list": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "check"}, 90 "/v1/audit/list": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "check"},
91 - "/v1/chance/store/change": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "default"},  
92 - //"/v1/chance/export_chance_list": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "default"}, 91 + "/v1/chance/store/change": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "chance_store_change"},
  92 + "/v1/chance/export_chance_list": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "export_excel"},
93 "/v1/audit/info": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "check"}, 93 "/v1/audit/info": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "check"},
94 "/v1/audit/allow_forbid": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "close_chance"}, 94 "/v1/audit/allow_forbid": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "close_chance"},
95 "/v1/rank/type/list": PermissionBase{CodeName: M_SYSTEM_RANK, ActionName: "default"}, 95 "/v1/rank/type/list": PermissionBase{CodeName: M_SYSTEM_RANK, ActionName: "default"},
@@ -101,6 +101,8 @@ type OptionOpportunity struct { @@ -101,6 +101,8 @@ type OptionOpportunity struct {
101 EditPublicStatus int `json:"edit_public_status"` 101 EditPublicStatus int `json:"edit_public_status"`
102 CloseChance int `json:"close_chance"` 102 CloseChance int `json:"close_chance"`
103 EditChance int `json:"edit_chance"` 103 EditChance int `json:"edit_chance"`
  104 + ExportExcel int `json:"export_excel"` //导出数据权限
  105 + ChanceStoreChange int `json:"chance_store_chance"` //移到机会池/储备池
104 } 106 }
105 107
106 /* 108 /*
@@ -138,6 +140,8 @@ func (p *OptionOpportunity) GetValidFunc(k string) bool { @@ -138,6 +140,8 @@ func (p *OptionOpportunity) GetValidFunc(k string) bool {
138 "edit_sorce": p.ValidEditSorce, 140 "edit_sorce": p.ValidEditSorce,
139 "close_chance": p.ValidCloseChance, 141 "close_chance": p.ValidCloseChance,
140 "edit_public_status": p.ValidEditPublicStatus, 142 "edit_public_status": p.ValidEditPublicStatus,
  143 + "export_excel": p.ValidExportExcel,
  144 + "chance_store_change": p.ValidChanceStoreChange,
141 } 145 }
142 146
143 if fn, ok := m[k]; ok { 147 if fn, ok := m[k]; ok {
@@ -225,6 +229,20 @@ func (p *OptionOpportunity) ValidEditPublicStatus() bool { @@ -225,6 +229,20 @@ func (p *OptionOpportunity) ValidEditPublicStatus() bool {
225 return false 229 return false
226 } 230 }
227 231
  232 +func (p *OptionOpportunity) ValidExportExcel() bool {
  233 + if p.ExportExcel > 0 {
  234 + return true
  235 + }
  236 + return false
  237 +}
  238 +
  239 +func (p *OptionOpportunity) ValidChanceStoreChange() bool {
  240 + if p.ChanceStoreChange > 0 {
  241 + return true
  242 + }
  243 + return false
  244 +}
  245 +
228 func (p *OptionOpportunity) ValidCloseChance() bool { 246 func (p *OptionOpportunity) ValidCloseChance() bool {
229 if p.CloseChance > 0 { 247 if p.CloseChance > 0 {
230 return true 248 return true