MCPcopy Index your code
hub / github.com/TruthHun/DocHub / Insert

Method Insert

models/RemarkModel.go:88–96  ·  view source on GitHub ↗

新增或更改内容,如果TimeCreate为0,表示新增,否则表示更新 @param rm 备注内容 @return err 返回错误,nil表示成功

(rm DocumentRemark)

Source from the content-addressed store, hash-verified

86//@param rm 备注内容
87//@return err 返回错误,nil表示成功
88func (this *DocumentRemark) Insert(rm DocumentRemark) (err error) {
89 if rm.TimeCreate == 0 {
90 rm.TimeCreate = int(time.Now().Unix())
91 _, err = orm.NewOrm().Insert(&rm)
92 } else {
93 _, err = orm.NewOrm().Update(&rm)
94 }
95 return err
96}

Callers 15

SignMethod · 0.80
CreateCollectFolderMethod · 0.80
GetMethod · 0.80
CommentMethod · 0.80
GetMethod · 0.80
GetMethod · 0.80
AddChanelMethod · 0.80
RemarkTplMethod · 0.80
AddMethod · 0.80
RegMethod · 0.80
CanDownloadFileMethod · 0.80
installCfgFunction · 0.80

Calls 1

UpdateMethod · 0.80

Tested by

no test coverage detected