基础整理

This commit is contained in:
hoteas
2022-05-03 08:09:25 +08:00
parent 062e849d44
commit 0b09a13c17
31 changed files with 2501 additions and 618 deletions
+28
View File
@@ -0,0 +1,28 @@
package provider
import (
. "code.hoteas.com/golang/hotime"
. "code.hoteas.com/golang/hotime/common"
"time"
)
// Project 管理端项目
var Project = Proj{
"salesman": Salesman,
"wechat": Wechat,
}
//生成随机码的6位md5
func getSn() string {
x := Rand(8)
return Substr(Md5(ObjToStr(int64(x)+time.Now().UnixNano()+int64(Rand(6)))), 0, 6)
}
//生成随机码的4位随机数
func getCode() string {
//res := ""
//for i := 0; i < 4; i++ {
res := ObjToStr(RandX(1000, 9999))
//}
return res
}