1 Star 1 Fork 1

xiaoyutab / xgotool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pv_create.go 436 Bytes
一键复制 编辑 原始数据 按行查看 历史
package xlink
import (
"errors"
"time"
)
// 创建连接信息
//
// bat 连接访问PV信息
func PvCreate(bat *LinkBrow) error {
if _default.DB == nil {
return errors.New("数据库未连接")
}
if bat.UrlId == 0 {
return errors.New("连接ID不能为空")
}
if bat.CreatedAt == "" {
bat.CreatedAt = time.Now().Format(time.DateTime)
}
err := _default.DB.Save(bat).Error
if err != nil {
return err
}
return nil
}
Go
1
https://gitee.com/xiaoyutab/xgotool.git
git@gitee.com:xiaoyutab/xgotool.git
xiaoyutab
xgotool
xgotool
v0.3.13

搜索帮助