Implement the propfind method in tank.

This commit is contained in:
zicla
2019-04-21 00:57:22 +08:00
parent 50c025bd09
commit 74ee6c1bba
4 changed files with 78 additions and 66 deletions

View File

@ -132,31 +132,6 @@ func (this *MatterDao) ListByUserUuidAndPuuidAndDirAndName(userUuid string, puui
return matters
}
//获取某个用户的某个文件夹下的某个名字的文件(或文件夹)列表
func (this *MatterDao) ListByUserUuidAndPath(userUuid string, path string) []*Matter {
var wp = &WherePair{}
if userUuid == "" {
this.PanicBadRequest("userUuid必填")
}
if path == "" {
this.PanicBadRequest("path必填")
}
wp = wp.And(&WherePair{Query: "user_uuid = ?", Args: []interface{}{userUuid}})
wp = wp.And(&WherePair{Query: "path = ?", Args: []interface{}{path}})
var matters []*Matter
db := CONTEXT.DB.Model(&Matter{}).Where(wp.Query, wp.Args...).Find(&matters)
this.PanicError(db.Error)
return matters
}
//获取某个文件夹下所有的文件和子文件
func (this *MatterDao) List(puuid string, userUuid string, sortArray []OrderPair) []*Matter {
var matters []*Matter