|
|
|
@ -41,7 +41,7 @@ func Routers(r *gin.RouterGroup) {
|
|
|
|
|
// @Param target_person_id formData string true "目标人ID"
|
|
|
|
|
// @Success 200 {object} Model.Res
|
|
|
|
|
// @Router /dsSzxy/fileRelate/fileUpload [post]
|
|
|
|
|
// @X-IntRangeLimit [{"identity_id":"5"},{"person_id":"1,999999999999"},{"target_group_id":"1,999999999999"},{"target_identity_id":"5"},{"target_person_id":"1,999999999999"},{"system_id":"1,20"}]
|
|
|
|
|
// @X-IntRangeLimit [{"identity_id":"5"},{"person_id":"1,999999999999"},{"target_group_id":"-1,999999999999"},{"target_identity_id":"5"},{"target_person_id":"1,999999999999"},{"system_id":"1,20"}]
|
|
|
|
|
// @X-TableName ["t_zhxy_file"]
|
|
|
|
|
func fileUpload(c *gin.Context) {
|
|
|
|
|
file, err := c.FormFile("file")
|
|
|
|
@ -170,3 +170,41 @@ func fileUpdate(c *gin.Context) {
|
|
|
|
|
"message": `修改成功!`,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @Summary 文件复制,一般用于文件转发
|
|
|
|
|
// @Description 文件复制,一般用于文件转发
|
|
|
|
|
// @Tags 文件系统管理
|
|
|
|
|
// @Accept application/x-www-form-urlencoded
|
|
|
|
|
// @Produce json
|
|
|
|
|
// @Param file_id formData string true "文件ID"
|
|
|
|
|
// @Param source_identity_id formData string true "原文件所有人身份ID"
|
|
|
|
|
// @Param source_person_id formData string true "原文件所有人ID"
|
|
|
|
|
// @Param target_identity_id formData string true "接收文件所有人身份ID"
|
|
|
|
|
// @Param target_person_id formData string true "接收文件所有人ID"
|
|
|
|
|
// @Param target_group_id formData string true "接收文件群组ID"
|
|
|
|
|
// @Success 200 {object} Model.Res
|
|
|
|
|
// @X-EmptyLimit ["file_id"]
|
|
|
|
|
// @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) {
|
|
|
|
|
fileId := c.PostForm("file_id")
|
|
|
|
|
sourceIdentityId := CommonUtil.ConvertStringToInt32(c.PostForm("source_identity_id"))
|
|
|
|
|
sourcePersonId := CommonUtil.ConvertStringToInt32(c.PostForm("source_person_id"))
|
|
|
|
|
targetIdentityId := CommonUtil.ConvertStringToInt32(c.PostForm("target_identity_id"))
|
|
|
|
|
targetPersonId := CommonUtil.ConvertStringToInt32(c.PostForm("target_person_id"))
|
|
|
|
|
targetGroupId := CommonUtil.ConvertStringToInt32(c.PostForm("target_group_id"))
|
|
|
|
|
//文件复制
|
|
|
|
|
success, err := FileRelateDao.FileCopy(fileId, sourceIdentityId, sourcePersonId, targetIdentityId, targetPersonId, targetGroupId)
|
|
|
|
|
if err != nil {
|
|
|
|
|
c.JSON(200, gin.H{
|
|
|
|
|
"success": success,
|
|
|
|
|
"message": `复制成功!`,
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
c.JSON(200, gin.H{
|
|
|
|
|
"success": success,
|
|
|
|
|
"message": err.Error(),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|