作者 tangxvhui

提交

... ... @@ -88,8 +88,8 @@ var RouterPermission = map[string]PermissionBase{
"/v1/config/score": PermissionBase{CodeName: M_SYSTEM_RATING, ActionName: "default"},
"/v1/config/score/get": PermissionBase{CodeName: M_SYSTEM_RATING, ActionName: "default"},
"/v1/audit/list": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "check"},
"/v1/chance/store/change": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "default"},
//"/v1/chance/export_chance_list": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "default"},
"/v1/chance/store/change": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "chance_store_change"},
"/v1/chance/export_chance_list": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "export_excel"},
"/v1/audit/info": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "check"},
"/v1/audit/allow_forbid": PermissionBase{CodeName: M_SYSTEM_OPPORTUNITY, ActionName: "close_chance"},
"/v1/rank/type/list": PermissionBase{CodeName: M_SYSTEM_RANK, ActionName: "default"},
... ...
... ... @@ -101,6 +101,8 @@ type OptionOpportunity struct {
EditPublicStatus int `json:"edit_public_status"`
CloseChance int `json:"close_chance"`
EditChance int `json:"edit_chance"`
ExportExcel int `json:"export_excel"` //导出数据权限
ChanceStoreChange int `json:"chance_store_chance"` //移到机会池/储备池
}
/*
... ... @@ -138,6 +140,8 @@ func (p *OptionOpportunity) GetValidFunc(k string) bool {
"edit_sorce": p.ValidEditSorce,
"close_chance": p.ValidCloseChance,
"edit_public_status": p.ValidEditPublicStatus,
"export_excel": p.ValidExportExcel,
"chance_store_change": p.ValidChanceStoreChange,
}
if fn, ok := m[k]; ok {
... ... @@ -225,6 +229,20 @@ func (p *OptionOpportunity) ValidEditPublicStatus() bool {
return false
}
func (p *OptionOpportunity) ValidExportExcel() bool {
if p.ExportExcel > 0 {
return true
}
return false
}
func (p *OptionOpportunity) ValidChanceStoreChange() bool {
if p.ChanceStoreChange > 0 {
return true
}
return false
}
func (p *OptionOpportunity) ValidCloseChance() bool {
if p.CloseChance > 0 {
return true
... ...