|
|
|
@ -24,9 +24,13 @@ func Routers(r *gin.RouterGroup) {
|
|
|
|
|
//文件表
|
|
|
|
|
rr.POST("/fileUpload", fileUpload)
|
|
|
|
|
rr.POST("/fileUpdate", fileUpdate)
|
|
|
|
|
//rr.POST("/fileCopy", fileCopy)
|
|
|
|
|
rr.POST("/fileCopy", fileCopy)
|
|
|
|
|
//树型结构
|
|
|
|
|
|
|
|
|
|
rr.POST("/addNode", addNode)
|
|
|
|
|
rr.POST("/updateNode", updateNode)
|
|
|
|
|
rr.POST("/delNode", delNode)
|
|
|
|
|
rr.POST("/addNodeFile", addNodeFile)
|
|
|
|
|
rr.POST("/delNodeFile", delNodeFile)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @Summary 文件上传
|
|
|
|
@ -187,7 +191,7 @@ func fileUpdate(c *gin.Context) {
|
|
|
|
|
// @Router /dsSzxy/fileRelate/FileCopy [post]
|
|
|
|
|
// @X-IntRangeLimit [{"source_identity_id":"5"},{"source_person_id":"1,999999999999"},{"target_group_id":"-1,999999999999"},{"target_identity_id":"5"},{"target_person_id":"1,999999999999"}]
|
|
|
|
|
// @X-TableName ["t_zhxy_file"]
|
|
|
|
|
func FileCopy(c *gin.Context) {
|
|
|
|
|
func fileCopy(c *gin.Context) {
|
|
|
|
|
fileId := c.PostForm("file_id")
|
|
|
|
|
sourceIdentityId := CommonUtil.ConvertStringToInt32(c.PostForm("source_identity_id"))
|
|
|
|
|
sourcePersonId := CommonUtil.ConvertStringToInt32(c.PostForm("source_person_id"))
|
|
|
|
@ -208,3 +212,56 @@ func FileCopy(c *gin.Context) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @Summary 增加云盘结点
|
|
|
|
|
// @Description 增加云盘结点
|
|
|
|
|
// @Tags 文件系统管理
|
|
|
|
|
// @Accept application/x-www-form-urlencoded
|
|
|
|
|
// @Produce json
|
|
|
|
|
// @Param identity_id formData string true "创建者身份ID"
|
|
|
|
|
// @Param person_id formData string true "创建者ID"
|
|
|
|
|
// @Param parent_id formData string true "父结点ID"
|
|
|
|
|
// @Param node_name formData string true "结点名称"
|
|
|
|
|
// @Success 200 {object} Model.Res
|
|
|
|
|
// @X-EmptyLimit ["parent_id","node_name"]
|
|
|
|
|
// @Router /dsSzxy/fileRelate/addNode [post]
|
|
|
|
|
// @X-IntRangeLimit [{"identity_id":"5"},{"person_id":"1,999999999999"}]
|
|
|
|
|
// @X-TableName ["t_zhxy_clouddisk_tree"]
|
|
|
|
|
func addNode(c *gin.Context) {
|
|
|
|
|
identityId := CommonUtil.ConvertStringToInt32(c.PostForm("identity_id"))
|
|
|
|
|
personId := CommonUtil.ConvertStringToInt32(c.PostForm("person_id"))
|
|
|
|
|
parentId := c.PostForm("parent_id") //根传入-1
|
|
|
|
|
nodeName := c.PostForm("node_name")
|
|
|
|
|
success, err := FileRelateDao.AddNode(identityId, personId, parentId, nodeName)
|
|
|
|
|
if err != nil {
|
|
|
|
|
c.JSON(200, gin.H{
|
|
|
|
|
"success": success,
|
|
|
|
|
"message": `增加成功!`,
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
c.JSON(200, gin.H{
|
|
|
|
|
"success": success,
|
|
|
|
|
"message": err.Error(),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//增加云盘结点名称
|
|
|
|
|
func updateNode(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//删除云盘结点
|
|
|
|
|
func delNode(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//增加云盘结点文件
|
|
|
|
|
func addNodeFile(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//删除云盘结点文件
|
|
|
|
|
func delNodeFile(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|