Commit 0cf64032 by mushishixian

修改数据库链接

parent da8c97ff
Showing with 2 additions and 2 deletions
......@@ -54,7 +54,7 @@ func initLog() {
//初始化数据库
func initDB() {
dsn := util.Configs.Liexin_databases.Dns
orderDsn := util.Configs.Liexin_order_databases.Dns
orderDsn := util.Configs.Liexin_databases.Dns
specialDsn := util.Configs.Special_databases.Dns
//engine.GetLogger().
engine, err = gorose.Open(&gorose.Config{Driver: "mysql", Dsn: dsn})
......@@ -216,7 +216,7 @@ func main() {
//价格促销活动统计***********************************************************************************************
var priceActivityList []model.PriceActivity
err = specialDb.Reset().Table(&priceActivityList).Fields("id,start_time,end_time").
Where("end_time", ">", updateTime).Where("id", "=", 30).Select()
Where("end_time", ">", updateTime).Select()
if err != nil {
logger.Error(err.Error())
fmt.Println(err.Error())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment