优化系统

This commit is contained in:
hoteas 2021-12-27 14:09:49 +08:00
parent 2fb6abf53a
commit b84bd7e16f
3 changed files with 1082 additions and 55 deletions

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,7 @@
"db": {
"mysql": {
"host": "192.168.6.253",
"name": "bzyyweb",
"name": "myhs",
"password": "dasda8454456",
"port": "3306",
"prefix": "",
@ -45,8 +45,5 @@
"mode": 2,
"port": "8080",
"sessionName": "HOTIME",
"smsKey": "b0eb4bf0198b9983cffcb85b69fdf4fa",
"smsLogin": "【恩易办】您的验证码为:{code}请在5分钟内使用切勿将验证码泄露于他人如非本人操作请忽略。",
"smsNotice": "【恩易办】你收到一条新的预约事项,{name}预约办理{ctg}事项,预约办理时间:{date},排号:{sn}。",
"tpt": "tpt"
}

View File

@ -263,55 +263,6 @@ func main() {
appIns.Run(hotime.Router{
"admin": admin.Project,
"app": app.Project,
//"app": hotime.Proj{
// "index": hotime.Ctr{
// "test": func(this *hotime.Context) {
//
// data := this.Db.Get("cached", "*")
// fmt.Println(data)
// fmt.Println(this.Session("test").ToCeilInt())
// this.Session("test1", 98984984)
// fmt.Println(this.Session("test1").Data)
// this.Error.SetError(errors.New("dasdasdas"))
// //fmt.Println(this.Db.GetTag())
// //this.Application.Log.Error("dasdasdas")
// //this.Log.Error("dadasdasd")
// //x:=this.Db.Action(func(db hotime.HoTimeDB) bool {
// //
// // db.Insert("user",hotime.Map{"unickname":"dasdas"})
// //
// // return true
// //})
// //hotime.LogError("dasdasdasdasdas")
// this.Display(5, "dsadas")
// },
// "websocket": func(this *hotime.Context) {
// hdler := websocket.Handler(func(ws *websocket.Conn) {
// for true {
// msg := make([]byte, 5120)
// n, err := ws.Read(msg)
// go func() {
// time.Sleep(time.Second * 5)
// ws.Write([]byte("dsadasdasgregergrerge"))
//
// }()
// if err != nil {
// return
// }
// fmt.Printf("Receive: %s\n", msg[:n])
//
// send_msg := "[" + string(msg[:n]) + "]"
// m, err := ws.Write([]byte(send_msg))
// if err != nil {
// return
// }
// fmt.Printf("Send: %s\n", msg[:m])
// }
// })
// hdler.ServeHTTP(this.Resp, this.Req)
// },
// },
//},
})
}
func Process(conn net.Conn, appIns *hotime.Application) {
@ -353,7 +304,7 @@ func Process(conn net.Conn, appIns *hotime.Application) {
}
}
oldSn := appIns.Db.Get("produce_product", "id", common.Map{"sn": sn, "produce_id": produce.GetCeilInt("id")})
oldSn := appIns.Db.Get("produce_product", "id", common.Map{"AND": common.Map{"sn": sn, "produce_id": produce.GetCeilInt("id")}})
if oldSn != nil {
fmt.Println(client, sn, "已经添加请勿重复添加") // 读到了n个数据
continue