根据文档表的文档id获取文档摘要,默认获取255个字符长度 @param did document_store的id @param length 需要获取的长度 @return desc 返回摘要内容
(did interface{}, length ...int)
| 49 | //@param length 需要获取的长度 |
| 50 | //@return desc 返回摘要内容 |
| 51 | func (this *DocText) GetDescByDid(did interface{}, length ...int) (desc string) { |
| 52 | var dsid = 0 |
| 53 | if docinfo, rows, _ := NewDocument().GetDocInfoById(did); rows > 0 { |
| 54 | dsid = docinfo[0].DsId |
| 55 | } |
| 56 | if dsinfo, rows, _ := NewDocument().GetDocStoreByDsId(dsid); rows > 0 { |
| 57 | return this.GetDescByMd5(dsinfo[0].Md5, length...) |
| 58 | } |
| 59 | return |
| 60 | } |
nothing calls this directly
no test coverage detected