获取文档备注模板 @param DsId 文档DsId @return rm 生成的文档备注模板
(DsId int)
| 59 | //@param DsId 文档DsId |
| 60 | //@return rm 生成的文档备注模板 |
| 61 | func (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判断文档是否已存在备注 |
| 75 | func (this *DocumentRemark) IsRemark(dsid interface{}) bool { |