|
@@ -56,6 +56,28 @@ func GetRaiAdminMobileMap() (mapItem map[string]string) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+// GetRaiAdminMobileItMap 获取it内部人员手机号
|
|
|
+func GetRaiAdminMobileItMap() (mapItem map[string]string) {
|
|
|
+ var err error
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ go utils.SendAlarmMsg("获取权益内部人员手机号失败 ErrMsg:"+err.Error(), 2)
|
|
|
+
|
|
|
+ }
|
|
|
+ }()
|
|
|
+ adminList, e := models.GetRaiAdminIt()
|
|
|
+ if e != nil {
|
|
|
+ err = e
|
|
|
+ return
|
|
|
+ }
|
|
|
+ mapMobile := make(map[string]string)
|
|
|
+ for _, v := range adminList {
|
|
|
+ mapMobile[v.Mobile] = v.Mobile
|
|
|
+ }
|
|
|
+ mapItem = mapMobile
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
// 根据手机号判断是否属于权益
|
|
|
func GetBelongingRai(mobile string) (isBelong bool) {
|
|
|
mapItem := GetRaiAdminMobileMap()
|
|
@@ -64,3 +86,12 @@ func GetBelongingRai(mobile string) (isBelong bool) {
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// 根据手机号判断是否属于IT人员
|
|
|
+func GetBelongingRaiIt(mobile string) (isBelong bool) {
|
|
|
+ mapItem := GetRaiAdminMobileItMap()
|
|
|
+ if mapItem[mobile] != "" {
|
|
|
+ isBelong = true
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|