|
|
@ -1,6 +1,7 @@ |
|
|
|
package sysCloud |
|
|
|
|
|
|
|
import ( |
|
|
|
"GoClouds/cloud" |
|
|
|
"GoClouds/service/userService" |
|
|
|
gocloud "github.com/mgr9525/go-cloud" |
|
|
|
ruisUtil "github.com/mgr9525/go-ruisutil" |
|
|
@ -14,7 +15,7 @@ func ClearCache(key string) (rb bool) { |
|
|
|
|
|
|
|
pers := gocloud.GetNewMaps() |
|
|
|
pers["key"] = key |
|
|
|
code, _, err := SysCloudExec.ExecJSON("/comm/clearCache", &pers) |
|
|
|
code, _, err := cloud.SysCloudExec.ExecJSON("/comm/clearCache", &pers) |
|
|
|
if err != nil { |
|
|
|
return false |
|
|
|
} |
|
|
@ -30,7 +31,7 @@ func ClearUserCache(uid string) (rb bool) { |
|
|
|
|
|
|
|
pers := gocloud.GetNewMaps() |
|
|
|
pers["uid"] = uid |
|
|
|
code, _, err := SysCloudExec.ExecJSON("/comm/clearUserCache", &pers) |
|
|
|
code, _, err := cloud.SysCloudExec.ExecJSON("/comm/clearUserCache", &pers) |
|
|
|
if err != nil { |
|
|
|
return false |
|
|
|
} |
|
|
@ -47,7 +48,7 @@ func CheckPermission(uid, perm string) (rb bool) { |
|
|
|
pers := gocloud.GetNewMaps() |
|
|
|
pers["uid"] = uid |
|
|
|
pers["perm"] = perm |
|
|
|
code, cont, err := SysCloudExec.ExecJSON("/comm/checkPermission", &pers) |
|
|
|
code, cont, err := cloud.SysCloudExec.ExecJSON("/comm/checkPermission", &pers) |
|
|
|
if err != nil { |
|
|
|
return false |
|
|
|
} |
|
|
@ -71,7 +72,7 @@ func GetUserPerms(uid string) map[string]bool { |
|
|
|
ret := make(map[string]bool) |
|
|
|
pers := gocloud.GetNewMaps() |
|
|
|
pers["uid"] = uid |
|
|
|
err := SysCloudExec.ExecObjJSON("/comm/getUserPerms", &pers, &ret) |
|
|
|
err := cloud.SysCloudExec.ExecObjJSON("/comm/getUserPerms", &pers, &ret) |
|
|
|
if err != nil { |
|
|
|
println("getUserPerms err:" + err.Error()) |
|
|
|
return ret |
|
|
@ -83,7 +84,7 @@ func SendSms(phone, ips string) (int, string) { |
|
|
|
pars := ruisUtil.NewMap() |
|
|
|
pars.Set("phone", phone) |
|
|
|
pars.Set("ips", ips) |
|
|
|
code, conts, err := SysCloudExec.ExecJSON("/comm/sendSms", pars) |
|
|
|
code, conts, err := cloud.SysCloudExec.ExecJSON("/comm/sendSms", pars) |
|
|
|
if err != nil { |
|
|
|
println("SendSms err:" + err.Error()) |
|
|
|
} |
|
|
@ -94,7 +95,7 @@ func VaildSms(phone, codes string) (int, string) { |
|
|
|
pars := ruisUtil.NewMap() |
|
|
|
pars.Set("phone", phone) |
|
|
|
pars.Set("code", codes) |
|
|
|
code, conts, err := SysCloudExec.ExecJSON("/comm/vaildSms", pars) |
|
|
|
code, conts, err := cloud.SysCloudExec.ExecJSON("/comm/vaildSms", pars) |
|
|
|
if err != nil { |
|
|
|
println("VaildSms err:" + err.Error()) |
|
|
|
} |
|
|
|