重新索引

This commit is contained in:
hoteas 2022-10-31 01:18:19 +08:00
parent 67a31c83c2
commit 951802ed7a
17 changed files with 222 additions and 211 deletions

View File

@ -1,11 +1,11 @@
package admin package admin
import ( import (
. "../../../iedc-go" . "code.hoteas.com/golang/hotime"
. "../../common" . "code.hoteas.com/golang/hotime/common"
"fmt" "fmt"
"github.com/chain-zhang/pinyin" "github.com/Chain-Zhang/pinyin"
"github.com/xuri/excelize" "github.com/xuri/excelize/v2"
"io" "io"
"os" "os"
"strings" "strings"

View File

@ -1,11 +1,11 @@
package admin package admin
import ( import (
. "../../../iedc-go" . "code.hoteas.com/golang/hotime"
. "../../common" . "code.hoteas.com/golang/hotime/common"
"fmt" "fmt"
"github.com/chain-zhang/pinyin" "github.com/Chain-Zhang/pinyin"
"github.com/xuri/excelize" "github.com/xuri/excelize/v2"
"os" "os"
"sort" "sort"
"strings" "strings"

View File

@ -1,7 +1,7 @@
package admin package admin
import ( import (
. "../../common" . "code.hoteas.com/golang/hotime/common"
"fmt" "fmt"
"sort" "sort"
"strings" "strings"

View File

@ -1,12 +1,12 @@
package admin package admin
import ( import (
. "../../../iedc-go" . "code.hoteas.com/golang/hotime"
. "../../common" . "code.hoteas.com/golang/hotime/common"
"../../dri/baidu" "code.hoteas.com/golang/hotime/dri/baidu"
"fmt" "fmt"
"github.com/robertkrimen/otto" "github.com/robertkrimen/otto"
"github.com/xuri/excelize" "github.com/xuri/excelize/v2"
"io/ioutil" "io/ioutil"
"os" "os"
"sort" "sort"
@ -987,7 +987,7 @@ console.log("845458454" ); // 4
// return // return
//} //}
data1, _ := baidu.DefaultBaiDuMap.GetPosition("简阳市东溪镇奎星路28号", "") data1, _ := baidu.BaiDuMap.GetPosition("简阳市东溪镇奎星路28号", "")
this.Display(0, ObjToMap(data1)) this.Display(0, ObjToMap(data1))

View File

@ -1,7 +1,7 @@
package admin package admin
import ( import (
. "../../common" . "code.hoteas.com/golang/hotime/common"
) )
var Org = map[int]OrgInterface{ var Org = map[int]OrgInterface{

View File

@ -1,10 +1,10 @@
package app package app
import ( import (
. "../../../iedc-go" . "code.hoteas.com/golang/hotime"
. "../../common" . "code.hoteas.com/golang/hotime/common"
"fmt" "fmt"
"github.com/xuri/excelize" "github.com/xuri/excelize/v2"
"os" "os"
"sort" "sort"
"time" "time"

View File

@ -1,8 +1,8 @@
package app package app
import ( import (
. "../../../iedc-go" . "code.hoteas.com/golang/hotime"
. "../../common" . "code.hoteas.com/golang/hotime/common"
//"strings" //"strings"
) )

View File

@ -1,13 +1,12 @@
package app package app
import ( import (
. "../../../iedc-go" . "code.hoteas.com/golang/hotime"
. "../../common" . "code.hoteas.com/golang/hotime/common"
"../../dri/aliyun" "code.hoteas.com/golang/hotime/dri/aliyun"
"../../dri/tencent" "code.hoteas.com/golang/hotime/dri/tencent"
"fmt" "fmt"
"github.com/silenceper/wechat" "github.com/silenceper/wechat"
"github.com/silenceper/wechat/cache"
"gopkg.in/chanxuehong/wechat.v2/mch/core" "gopkg.in/chanxuehong/wechat.v2/mch/core"
"gopkg.in/chanxuehong/wechat.v2/mch/pay" "gopkg.in/chanxuehong/wechat.v2/mch/pay"
"io/ioutil" "io/ioutil"
@ -42,7 +41,8 @@ func getCode() string {
func getCompany(name, path string) Map { func getCompany(name, path string) Map {
os.Setenv("ZONEINFO", "config/data.zip") os.Setenv("ZONEINFO", "config/data.zip")
res := tencent.GetCompany("AKIDklZa1qBr3B0x1G643cg8B6UO5JZm2KX8o43G", "tdda7oro526h96dvicYkep1xsWFmHkt33xvqs2K", name)
res := tencent.Company.GetCompany(name)
c := Map{} c := Map{}
base := Map{} base := Map{}
if res.GetInt("code") != 200 { if res.GetInt("code") != 200 {
@ -74,8 +74,7 @@ func getCompany(name, path string) Map {
base["liquidation"] = c["liquidation"] base["liquidation"] = c["liquidation"]
} }
aliyun.DefaultCompany.Init("06c6a07e89dd45c88de040ee1489eef7") data := aliyun.Company.GetCompanyOtherAll(name)
data := aliyun.DefaultCompany.GetCompanyOtherAll(name)
base["OtherCopyrightsInfo"] = data.GetMap("OtherCopyrightsInfo").GetInt("total") base["OtherCopyrightsInfo"] = data.GetMap("OtherCopyrightsInfo").GetInt("total")
base["PatentsInfo"] = data.GetMap("PatentsInfo").GetInt("total") base["PatentsInfo"] = data.GetMap("PatentsInfo").GetInt("total")
@ -94,15 +93,15 @@ func getCompany(name, path string) Map {
} }
//微信获取个人信息 //微信获取个人信息
func Weixin(this *Context) *wechat.Wechat { //func Weixin(this *Context) *wechat.Wechat {
if weixin == nil { // if weixin == nil {
cache1 := cache.Cache(WechatCache{this.CacheIns}) // cache1 := cache.Cache(WechatCache{this.CacheIns})
config := wechat.Config{Cache: cache1, AppID: this.Config.GetString("wechatAppID"), AppSecret: this.Config.GetString("wechatAppSecret")} // config := wechat.Config{Cache: cache1, AppID: this.Config.GetString("wechatAppID"), AppSecret: this.Config.GetString("wechatAppSecret")}
weixin = wechat.NewWechat(&config) // weixin = wechat.NewWechat(&config)
} // }
//
return weixin // return weixin
} //}
//微信获取个人信息 //微信获取个人信息
func WxPayClient(this *Context, sn string, money int64, openid string) Map { func WxPayClient(this *Context, sn string, money int64, openid string) Map {

View File

@ -1,8 +1,8 @@
package app package app
import ( import (
. "../../../iedc-go" . "code.hoteas.com/golang/hotime"
. "../../common" . "code.hoteas.com/golang/hotime/common"
"fmt" "fmt"
"time" "time"
//"strings" //"strings"

View File

@ -1,8 +1,8 @@
package app package app
import ( import (
. "../../../iedc-go" . "code.hoteas.com/golang/hotime"
"../../dri/ddsms" "code.hoteas.com/golang/hotime/dri/ddsms"
) )
var Sms = Ctr{ var Sms = Ctr{
@ -26,7 +26,7 @@ var Sms = Ctr{
this.Session("phone", phone) this.Session("phone", phone)
this.Session("code", code) this.Session("code", code)
ddsms.DefaultDDY.SendYZM(phone, this.Config.GetString("smsLogin"), map[string]string{"code": code}) ddsms.DDY.SendYZM(phone, this.Config.GetString("smsLogin"), map[string]string{"code": code})
this.Display(0, "发送成功") this.Display(0, "发送成功")
}, },

View File

@ -1,8 +1,8 @@
package app package app
import ( import (
. "../../../iedc-go" . "code.hoteas.com/golang/hotime"
. "../../common" . "code.hoteas.com/golang/hotime/common"
) )
var tagCtr = Ctr{ var tagCtr = Ctr{

View File

@ -1,7 +1,7 @@
package app package app
import ( import (
. "../../common" . "code.hoteas.com/golang/hotime/common"
) )
var ADataType = Map{ var ADataType = Map{

View File

@ -1,10 +1,10 @@
package app package app
import ( import (
. "../../../iedc-go" . "code.hoteas.com/golang/hotime"
. "../../common" . "code.hoteas.com/golang/hotime/common"
"../../dri/download" "code.hoteas.com/golang/hotime/dri/download"
"../../dri/tencent" "code.hoteas.com/golang/hotime/dri/tencent"
"encoding/base64" "encoding/base64"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
@ -297,7 +297,8 @@ var User = Ctr{
tp := this.Req.FormValue("type") tp := this.Req.FormValue("type")
if tp == "company" { if tp == "company" {
data := tencent.OCRCOMPANY(file) //data := tencent.OCRCOMPANY(file)
data := tencent.Tencent.OCRCOMPANY(file)
c := ObjToMap(data) c := ObjToMap(data)
if c != nil { if c != nil {
c = c.GetMap("Response") c = c.GetMap("Response")
@ -310,7 +311,8 @@ var User = Ctr{
return return
} }
if tp == "common" { if tp == "common" {
data := tencent.OCR(file) //data := tencent.OCR(file)
data := tencent.Tencent.OCR(file)
c := ObjToMap(data) c := ObjToMap(data)
if c != nil { if c != nil {
c = c.GetMap("Response") c = c.GetMap("Response")

View File

@ -1,12 +1,11 @@
package app package app
import ( import (
. "../../../iedc-go" . "code.hoteas.com/golang/hotime"
. "../../../iedc-go/cache" . "code.hoteas.com/golang/hotime/cache"
. "../../../iedc-go/common" . "code.hoteas.com/golang/hotime/common"
"fmt" //"github.com/silenceper/wechat"
"github.com/silenceper/wechat" //"github.com/silenceper/wechat/cache"
"github.com/silenceper/wechat/cache"
"time" "time"
) )
@ -45,133 +44,135 @@ var Wechat = Ctr{
this.Display(0, this.Session("wechatInfo").ToMap()) this.Display(0, this.Session("wechatInfo").ToMap())
}, },
//微信注册0已经完整的注册了1还没有注册 //微信注册0已经完整的注册了1还没有注册
"codebase": func(this *Context) { //"codebase": func(this *Context) {
wx := Weixin(this) // wx := Weixin(this)
auth := wx.GetOauth(this.Req, this.Resp) // //auth := wx.GetOauth(this.Req, this.Resp)
resToken, err := auth.GetUserAccessToken(this.Req.FormValue("code")) //auth :=wx.GetOauth()
if err != nil { // resToken, err := auth.GetUserAccessToken(this.Req.FormValue("code"))
this.Display(6, "code错误") // if err != nil {
return // this.Display(6, "code错误")
}
//判断用户是否已经注册
user := this.Db.Get("wechat", Map{"[><]user": "wechat.user_id=user.id"}, "user.id,user.state", Map{"openid": resToken.OpenID})
if user != nil {
this.Session("user_id", user.Get("id"))
this.Display(0, 0)
return
}
user_id := this.Db.Insert("user", Map{"time": time.Now().Unix(), "state": 2})
if user_id == 0 {
this.Display(4, "创建用户失败")
return
}
wid := this.Db.Insert("wechat", Map{"openid": resToken.OpenID, "appid": this.Config.GetString("wechatAppID"), "state": 1, "user_id": user_id})
if wid == 0 {
this.Display(4, "关联微信失败!")
return
}
this.Session("user_id", user.Get("id"))
this.Display(0, 1)
},
//微信注册0已经完整的注册了1还没有注册
"code": func(this *Context) {
orgId := ObjToInt(this.Req.FormValue("org_id"))
//if orgId==0{
// this.Display(3, "缺少组织id")
// return // return
//} // }
//
wx := Weixin(this) // //判断用户是否已经注册
auth := wx.GetOauth(this.Req, this.Resp) // user := this.Db.Get("wechat", Map{"[><]user": "wechat.user_id=user.id"}, "user.id,user.state", Map{"openid": resToken.OpenID})
resToken, err := auth.GetUserAccessToken(this.Req.FormValue("code")) // if user != nil {
if err != nil { // this.Session("user_id", user.Get("id"))
this.Display(5, "code错误") // this.Display(0, 0)
return // return
} // }
//
//判断用户是否已经注册 // user_id := this.Db.Insert("user", Map{"time": time.Now().Unix(), "state": 2})
user := this.Db.Get("wechat", Map{"[><]user": "wechat.user_id=user.id"}, "user.id,user.state", Map{"openid": resToken.OpenID}) // if user_id == 0 {
if user != nil && user.GetCeilInt("id") != 0 && user.GetCeilInt("state") == 0 { // this.Display(4, "创建用户失败")
this.Session("user_id", user.Get("id")) // return
this.Display(0, Map{"type": 0, "token": this.SessionId}) // }
return //
} // wid := this.Db.Insert("wechat", Map{"openid": resToken.OpenID, "appid": this.Config.GetString("wechatAppID"), "state": 1, "user_id": user_id})
//getUserInfo // if wid == 0 {
userInfo, err := auth.GetUserInfo(resToken.AccessToken, resToken.OpenID) // this.Display(4, "关联微信失败!")
if err != nil { // return
this.Display(6, "微信个人信息无法获取") // }
return //
} // this.Session("user_id", user.Get("id"))
//
//wechatInfo := ObjToMap(userInfo) // this.Display(0, 1)
t := time.Now().Unix() //},
wechatInfo := Map{ ////微信注册0已经完整的注册了1还没有注册
"openid": userInfo.OpenID, //"code": func(this *Context) {
"acttoken": resToken.AccessToken, //
"retoken": resToken.RefreshToken, // orgId := ObjToInt(this.Req.FormValue("org_id"))
"appid": this.Config.GetString("wechatAppID"), // //if orgId==0{
"unionid": userInfo.Unionid, // // this.Display(3, "缺少组织id")
"nickname": userInfo.Nickname, // // return
"avatar": userInfo.HeadImgURL, // //}
} //
if orgId != 0 { // wx := Weixin(this)
wechatInfo["org_id"] = orgId // //auth := wx.GetOauth(this.Req, this.Resp)
wechatInfo["status"] = 0 // auth := wx.GetOauth()
} // resToken, err := auth.GetUserAccessToken(this.Req.FormValue("code"))
// if err != nil {
wechatDb := this.Db.Get("wechat", "*", Map{"openid": wechatInfo.GetString("openid")}) // this.Display(5, "code错误")
// return
if wechatDb != nil { // }
//
this.Db.Update("wechat", wechatInfo, Map{"id": wechatDb.GetCeilInt("id")}) // //判断用户是否已经注册
//userInfo["wid"]=wechatDb.GetCeilInt("wid") // user := this.Db.Get("wechat", Map{"[><]user": "wechat.user_id=user.id"}, "user.id,user.state", Map{"openid": resToken.OpenID})
} else { // if user != nil && user.GetCeilInt("id") != 0 && user.GetCeilInt("state") == 0 {
wechatInfo["create_time"] = t // this.Session("user_id", user.Get("id"))
wechatInfo["id"] = this.Db.Insert("wechat", wechatInfo) // this.Display(0, Map{"type": 0, "token": this.SessionId})
} // return
wechatDb = this.Db.Get("wechat", "*", Map{"openid": wechatInfo.GetString("openid")}) // }
// //getUserInfo
this.Session("wechatInfo", wechatDb) // userInfo, err := auth.GetUserInfo(resToken.AccessToken, resToken.OpenID)
fmt.Println(wechatDb) // if err != nil {
fmt.Println(this.Session("wechatInfo")) // this.Display(6, "微信个人信息无法获取")
//this.Display(0, 1) // return
this.Display(0, Map{"type": 1, "token": this.SessionId}) // }
}, //
// //wechatInfo := ObjToMap(userInfo)
// t := time.Now().Unix()
// wechatInfo := Map{
// "openid": userInfo.OpenID,
// "acttoken": resToken.AccessToken,
// "retoken": resToken.RefreshToken,
// "appid": this.Config.GetString("wechatAppID"),
// "unionid": userInfo.Unionid,
// "nickname": userInfo.Nickname,
// "avatar": userInfo.HeadImgURL,
// }
// if orgId != 0 {
// wechatInfo["org_id"] = orgId
// wechatInfo["status"] = 0
// }
//
// wechatDb := this.Db.Get("wechat", "*", Map{"openid": wechatInfo.GetString("openid")})
//
// if wechatDb != nil {
//
// this.Db.Update("wechat", wechatInfo, Map{"id": wechatDb.GetCeilInt("id")})
// //userInfo["wid"]=wechatDb.GetCeilInt("wid")
// } else {
// wechatInfo["create_time"] = t
// wechatInfo["id"] = this.Db.Insert("wechat", wechatInfo)
// }
// wechatDb = this.Db.Get("wechat", "*", Map{"openid": wechatInfo.GetString("openid")})
//
// this.Session("wechatInfo", wechatDb)
// fmt.Println(wechatDb)
// fmt.Println(this.Session("wechatInfo"))
// //this.Display(0, 1)
// this.Display(0, Map{"type": 1, "token": this.SessionId})
//},
//网页签名 //网页签名
"sign": func(this *Context) { "sign": func(this *Context) {
if this.Req.FormValue("sign_url") == "" { //if this.Req.FormValue("sign_url") == "" {
this.Display(2, "参数不足") // this.Display(2, "参数不足")
return // return
} //}
//
if weixin == nil { //if weixin == nil {
cache1 := cache.Cache(WechatCache{this.CacheIns}) // cache1 := cache.Cache(WechatCache{this.CacheIns})
config := wechat.Config{Cache: cache1, AppID: this.Config.GetString("wechatAppID"), AppSecret: this.Config.GetString("wechatAppSecret")} // config := wechat.Config{Cache: cache1, AppID: this.Config.GetString("wechatAppID"), AppSecret: this.Config.GetString("wechatAppSecret")}
weixin = wechat.NewWechat(&config) // weixin = wechat.NewWechat(&config)
} //}
//
js := weixin.GetJs(this.Req, this.Resp) //js := weixin.GetJs(this.Req, this.Resp)
cfg, e := js.GetConfig(this.Req.FormValue("sign_url")) //cfg, e := js.GetConfig(this.Req.FormValue("sign_url"))
if e != nil { //if e != nil {
this.Display(7, e) // this.Display(7, e)
return // return
} //}
//
sign := Map{ //sign := Map{
"appId": cfg.AppID, // "appId": cfg.AppID,
"timestamp": cfg.TimeStamp, // "timestamp": cfg.TimeStamp,
"nonceStr": cfg.NonceStr, // "nonceStr": cfg.NonceStr,
"signature": cfg.Signature, // "signature": cfg.Signature,
} //}
//
this.Display(0, sign) //this.Display(0, sign)
}, },
} }

View File

@ -11,16 +11,14 @@
"timeout": 7200 "timeout": 7200
} }
}, },
"codeConfig": { "codeConfig": [
"admin": "config/app.json" {
}, "config": "config/admin.json",
"codeConfig1": { "configDB": "config/adminDB.json",
"admin": { "rule": "config/rule.json",
"config": "config/app.json", "table": "admin"
"package": "admin",
"rule": "config/rule.json"
} }
}, ],
"crossDomain": "auto", "crossDomain": "auto",
"db": { "db": {
"mysql": { "mysql": {

View File

@ -20,10 +20,17 @@
}, },
"注释": "可配置memorydbredis默认启用memory默认优先级为memory\u003eredis\u003edb,memory与数据库缓存设置项一致缓存数据填充会自动反方向反哺加入memory缓存过期将自动从redis更新但memory永远不会更新redis如果是集群建议不要开启memory配置即启用" "注释": "可配置memorydbredis默认启用memory默认优先级为memory\u003eredis\u003edb,memory与数据库缓存设置项一致缓存数据填充会自动反方向反哺加入memory缓存过期将自动从redis更新但memory永远不会更新redis如果是集群建议不要开启memory配置即启用"
}, },
"codeConfig": { "codeConfig": [
"packageName": "默认无必须包名称以及应用名生成代码的配置文件地址比如config/app.json数据库有更新时自动更新配置文件以及对应的生成文件", "注释:配置即启用,非必须,默认无",
"注释": "配置即启用,非必须,默认无" {
}, "config": "默认config/app.json必须接口描述配置文件",
"configDB": "默认无,非必须,有则每次将数据库数据生成到此目录用于配置读写,无则不生成",
"mode": "默认0非必须0为内嵌代码模式1为生成代码模式",
"name": "默认无非必须有则生成代码到此目录无则采用缺省模式使用表名如设置为admin将在admin目录生成包名为admin的代码",
"rule": "默认config/rule.json非必须有则按改规则生成接口无则按系统内嵌方式生成",
"table": "默认admin必须根据数据库内当前表名做为用户生成数据"
}
],
"crossDomain": "默认空 非必须空字符串为不开启如果需要跨域设置auto为智能开启所有网站允许跨域http://www.baidu.com为指定域允许跨域", "crossDomain": "默认空 非必须空字符串为不开启如果需要跨域设置auto为智能开启所有网站允许跨域http://www.baidu.com为指定域允许跨域",
"db": { "db": {
"mysql": { "mysql": {

38
main.go
View File

@ -1,15 +1,17 @@
package main package main
import ( import (
"../../iedc-go" "code.hoteas.com/golang/hotime"
"code.hoteas.com/golang/hotime/dri/aliyun"
"code.hoteas.com/golang/hotime/dri/tencent"
"strings" "strings"
//"../dri/aliyun" //"../dri/aliyun"
"../dri/baidu" "code.hoteas.com/golang/hotime/dri/baidu"
"../dri/ddsms" "code.hoteas.com/golang/hotime/dri/ddsms"
"./admin"
"./app"
"fmt" "fmt"
"iedc-go/admin"
"iedc-go/app"
"time" "time"
) )
@ -17,7 +19,7 @@ func main() {
date, _ := time.Parse("2006-01-02 15:04", time.Now().Format("2006-01-02")+" 14:00") date, _ := time.Parse("2006-01-02 15:04", time.Now().Format("2006-01-02")+" 14:00")
fmt.Println(date, date.Unix()) fmt.Println(date, date.Unix())
baidu.DefaultBaiDuMap.Init("ZeT902EZvVgIoGVWEFK3osUm") baidu.BaiDuMap.Init("ZeT902EZvVgIoGVWEFK3osUm")
//fmt.Println("0123456"[1:7]) //fmt.Println("0123456"[1:7])
appIns := hotime.Init("config/config.json") appIns := hotime.Init("config/config.json")
notNeedLogin := []string{"token", "login", "test", "auth", "upload", "info"} //不需要登录的操作 notNeedLogin := []string{"token", "login", "test", "auth", "upload", "info"} //不需要登录的操作
@ -25,7 +27,7 @@ func main() {
appIns.SetConnectListener(func(context *hotime.Context) bool { appIns.SetConnectListener(func(context *hotime.Context) bool {
if len(context.RouterString) > 0 && context.RouterString[0] == "admin" { if len(context.RouterString) > 0 && context.RouterString[0] == "admin" {
return true return false
} }
//判断是否需要登录不需要登录则直接执行mtd //判断是否需要登录不需要登录则直接执行mtd
if len(context.RouterString) == 3 && !strings.Contains(context.RouterString[2], ".") { if len(context.RouterString) == 3 && !strings.Contains(context.RouterString[2], ".") {
@ -38,48 +40,50 @@ func main() {
} }
} }
if !isNeedLogin { if !isNeedLogin {
return true return false
} }
} }
//微信操作无需登录 //微信操作无需登录
if context.RouterString[0] == "app" && context.RouterString[1] == "wechat" { if context.RouterString[0] == "app" && context.RouterString[1] == "wechat" {
return true return false
} }
//微信操作无需登录 //微信操作无需登录
if context.RouterString[0] == "app" && context.RouterString[1] == "sms" { if context.RouterString[0] == "app" && context.RouterString[1] == "sms" {
return true return false
} }
//微信操作无需登录 //微信操作无需登录
if context.RouterString[0] == "app" && context.RouterString[1] == "tag" { if context.RouterString[0] == "app" && context.RouterString[1] == "tag" {
return true return false
} }
//微信操作无需登录 //微信操作无需登录
if context.RouterString[0] == "app" && context.RouterString[1] == "analyse" { if context.RouterString[0] == "app" && context.RouterString[1] == "analyse" {
return true return false
} }
//微信操作无需登录 //微信操作无需登录
if context.RouterString[0] == "app" && context.RouterString[1] == "category" { if context.RouterString[0] == "app" && context.RouterString[1] == "category" {
return true return false
} }
//没有登录 //没有登录
if context.Session("user_id").Data == nil { if context.Session("user_id").Data == nil {
context.Display(2, "没有登录") context.Display(2, "没有登录")
return false return true
} }
} }
//支撑权限设置 //支撑权限设置
return true return false
}) })
appIns.Router["admin"]["company_inout"] = admin.CompanyInOutCtr appIns.Router["admin"]["company_inout"] = admin.CompanyInOutCtr
appIns.Router["admin"]["test"] = admin.TestCtr appIns.Router["admin"]["test"] = admin.TestCtr
//makeCode := code.MakeCode{} //makeCode := code.MakeCode{}
//fmt.Println(common.ObjToStr(makeCode.Db2JSON("admin","test",appIns.Db))) //fmt.Println(common.ObjToStr(makeCode.Db2JSON("admin","test",appIns.Db)))
if ddsms.DefaultDDY.ApiKey == "" { if ddsms.DDY.ApiKey == "" {
ddsms.DefaultDDY.Init(appIns.Config.GetString("smsKey")) ddsms.DDY.Init(appIns.Config.GetString("smsKey"))
} }
tencent.Company.Init("AKIDklZa1qBr3B0x1G643cg8B6UO5JZm2KX8o43G", "tdda7oro526h96dvicYkep1xsWFmHkt33xvqs2K")
aliyun.Company.Init("06c6a07e89dd45c88de040ee1489eef7")
appIns.Run(hotime.Router{ appIns.Run(hotime.Router{
"app": app.Project, "app": app.Project,
}) })