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

Method GetDefaultTpl

models/RemarkModel.go:61–72  ·  view source on GitHub ↗

获取文档备注模板 @param DsId 文档DsId @return rm 生成的文档备注模板

(DsId int)

Source from the content-addressed store, hash-verified

59//@param DsId 文档DsId
60//@return rm 生成的文档备注模板
61func (this *DocumentRemark) GetDefaultTpl(DsId int) (rm DocumentRemark) {
62 rm.Id = DsId
63 rm.Status = false
64 rm.AllowDownload = true
65 rm.TimeCreate = 0
66 if bytes, err := ioutil.ReadFile("./conf/remarktpl.html"); err != nil {
67 rm.Content = fmt.Sprintf("模板文件打开失败:%v", err.Error())
68 } else {
69 rm.Content = string(bytes)
70 }
71 return
72}
73
74//根据dsid判断文档是否已存在备注
75func (this *DocumentRemark) IsRemark(dsid interface{}) bool {

Callers 1

GetContentTplByDsIdMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected