开始新增代码生成配置2.0功能,配置文件格式规定完成
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
. "../../../hotime/common"
|
||||
)
|
||||
|
||||
var ID = "3c5fc9732b8ddcb0a91b428976f2ce86"
|
||||
var ID = "7d33119d7fef7daa5b9be2e1c75e5392"
|
||||
|
||||
// Project 管理端项目
|
||||
var Project = Proj{
|
||||
@@ -17,6 +17,7 @@ var Project = Proj{
|
||||
"org": orgCtr,
|
||||
"role": roleCtr,
|
||||
"user": userCtr,
|
||||
|
||||
"hotime": Ctr{
|
||||
"login": func(this *Context) {
|
||||
name := this.Req.FormValue("name")
|
||||
|
||||
@@ -3,7 +3,6 @@ package app
|
||||
import (
|
||||
. "../../../hotime"
|
||||
. "../../../hotime/common"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -19,8 +18,8 @@ var ctg_order_dateCtr = Ctr{
|
||||
return
|
||||
}
|
||||
|
||||
todayPMTime, _ := time.Parse("2006-01-02 15:04", time.Now().Format("2006-01-02")+" 14:00")
|
||||
todayAMTime, _ := time.Parse("2006-01-02 15:04", time.Now().Format("2006-01-02"+" 09:00"))
|
||||
todayPMTime, _ := time.ParseInLocation("2006-01-02 15:04", time.Now().Format("2006-01-02")+" 14:00", time.Local)
|
||||
todayAMTime, _ := time.ParseInLocation("2006-01-02 15:04", time.Now().Format("2006-01-02")+" 09:00", time.Local)
|
||||
|
||||
weekDay := 1
|
||||
|
||||
@@ -74,9 +73,9 @@ var ctg_order_dateCtr = Ctr{
|
||||
}
|
||||
|
||||
dayPM := that.Db.Get("ctg_order_date", "*", Map{"AND": Map{"category_id": category.GetCeilInt("id"), "date": todayPMTime.Unix() + int64(24*60*60*(i+1))}})
|
||||
fmt.Println(that.Db.LastQuery, that.Db.LastData, dayPM, that.Db.LastErr)
|
||||
//fmt.Println(that.Db.LastQuery, that.Db.LastData, dayPM, that.Db.LastErr)
|
||||
if dayPM == nil {
|
||||
fmt.Println("dasdasdasda")
|
||||
//fmt.Println("dasdasdasda")
|
||||
dayPM = Map{"name": "14:00-16:00",
|
||||
"date": todayPMTime.Unix() + int64(24*60*60*(i+1)),
|
||||
"create_time": time.Now().Unix(),
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -42,7 +42,7 @@
|
||||
"4": "数据处理异常",
|
||||
"5": "数据结果异常"
|
||||
},
|
||||
"mode": 0,
|
||||
"mode": 2,
|
||||
"port": "80",
|
||||
"sessionName": "HOTIME",
|
||||
"tpt": "tpt"
|
||||
|
||||
+6
-2
@@ -13,15 +13,19 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println(time.Now().Weekday().String())
|
||||
date, _ := time.Parse("2006-01-02 15:04", time.Now().Format("2006-01-02")+" 14:00")
|
||||
fmt.Println(date, date.Unix())
|
||||
appIns := hotime.Init("config/config.json")
|
||||
//RESTfull接口适配
|
||||
appIns.SetConnectListener(func(context *hotime.Context) bool {
|
||||
|
||||
if len(context.RouterString)>1&& context.RouterString[0] == "admin" {
|
||||
if len(context.RouterString) > 1 && context.RouterString[0] == "admin" {
|
||||
if context.RouterString[1] == "hotime" && context.RouterString[2] == "login" {
|
||||
return true
|
||||
}
|
||||
if context.RouterString[1] == "hotime" && context.RouterString[2] == "logout" {
|
||||
return true
|
||||
}
|
||||
|
||||
if context.Session("admin_id").Data == nil {
|
||||
context.Display(2, "你还没有登录")
|
||||
|
||||
Reference in New Issue
Block a user