icesimba.mail.go 1.05 KB
package main

import (
	"common"
	"fmt"

	//	. "sdkredis"
	"flag"

	. "client/icesimba.mail/apis"
	db "client/icesimba.mail/database"
)

func main() {
	//	defer db.SqlDB.Close()
	//redis 初始化
	//RedisInit(nil)
	//// 连接redis
	//redisConn := RedisClient.GetConn()
	//defer RedisClose(redisConn)

	//RedisRPush(redisConn, "test", "555555")

	//config := common.NewConfig("/root/sdkPlatform/bin/sdkRoute.conf") //C:/GoProject/src/sdkPlatform/bin/sdkRoute.conf
	configPath := flag.String("config", "./sdkRoute.conf", "config path")
	flag.Parse()
	fmt.Printf("config[%v]", *configPath)
	config := common.NewConfig(*configPath)

	//数据库
	db.Init(config.DBMysql)

	sdkhttp := common.NewHttp(config)
	sdkhttp.RegisterFunc("RefreshReward", RefreshRewardsApi)
	sdkhttp.RegisterFunc("IsRewardExist", IsRewardExistApi)
	sdkhttp.RegisterFunc("QueryReward", QueryRewardsApi)
	sdkhttp.RegisterFunc("GainReward", GainRewardsApi)
	sdkhttp.RegisterFunc("CheckReward", CheckRewardsApi)
	sdkhttp.RegisterFunc("AlmanacReward", AlmanacRewardApi)
	sdkhttp.Activate("icesimba.mail")
}