|
@@ -17,7 +17,8 @@ type Manager struct {
|
|
|
|
|
|
// InitRouterManager 初始化系统代理路由
|
|
|
func InitRouterManager() (*Manager, error) {
|
|
|
- res := db.GateWatMySql.Query("SELECT status,middleground_code,url,function_code,ischeck,ischeck_auth,ischeck_blacklist,timeout,remark,deduct_source,ischeck_status FROM front_proxy")
|
|
|
+
|
|
|
+ res := db.GateWatMySql.Query("SELECT status,middleground_code,url,function_code,check_sess,check_power,check_auth,check_status,check_blacklist,timeout,remark,deduct_source FROM front_proxy")
|
|
|
if res == nil || len(*res) == 0 {
|
|
|
return nil, fmt.Errorf("未发现可用路由")
|
|
|
}
|
|
@@ -30,10 +31,11 @@ func InitRouterManager() (*Manager, error) {
|
|
|
|
|
|
routerRule := &Router{
|
|
|
Status: gconv.Int(row["status"]),
|
|
|
- PowerCheck: gconv.Int(row["ischeck"]),
|
|
|
- AccountCheck: gconv.Int(row["ischeck_status"]),
|
|
|
- AuthCheck: gconv.Int(row["ischeck_auth"]),
|
|
|
- BlackCheck: gconv.Int(row["ischeck_blacklist"]) == 1,
|
|
|
+ SessCheck: gconv.Int(row["check_sess"]),
|
|
|
+ PowerCheck: gconv.Int(row["check_power"]),
|
|
|
+ AccountCheck: gconv.Int(row["check_status"]),
|
|
|
+ AuthCheck: gconv.Int(row["check_auth"]),
|
|
|
+ BlackCheck: gconv.Int(row["check_blacklist"]) == 1,
|
|
|
Deduct: gconv.Int(row["deduct_source"]),
|
|
|
FuncCode: gconv.String(row["function_code"]),
|
|
|
MiddleCode: gconv.String(row["middleground_code"]),
|