Merge branch 'master' of ssh://10.10.14.176:222/bigdata/dsMin
continuous-integration/drone/push Build is passing Details

# Conflicts:
#	dsSzxy/.idea/workspace.xml
master
kgdxpr 4 years ago
commit 599a7ad0d4

1
.gitignore vendored

@ -48,5 +48,4 @@
/dsSzxy/.idea/ /dsSzxy/.idea/
/dsSzxy/build/ /dsSzxy/build/
/dsSzxy/WinBuild/ /dsSzxy/WinBuild/
*.log *.log

@ -505,21 +505,23 @@ func logout(context *gin.Context) {
//获取所有接入系统的 //获取所有接入系统的
list, _ := ServiceJoinApp.GetAppBaseList(1, Const.Int32Max, "") list, _ := ServiceJoinApp.GetAppBaseList(1, Const.Int32Max, "")
for i := range list { for i := range list {
//每个系统的退出地址 if list[i]["logout_uri"] != nil {
logoutUri := list[i]["logout_uri"].(string) //每个系统的退出地址
//如果注册了退出地址的话 logoutUri := list[i]["logout_uri"].(string)
if len(logoutUri) > 0 { //如果注册了退出地址的话
//开启协程进行调用 if len(logoutUri) > 0 {
go func() { //开启协程进行调用
resp, err := http.Get(logoutUri + "?access_token=" + accessToken) go func() {
if err != nil { resp, err := http.Get(logoutUri + "?access_token=" + accessToken)
fmt.Println(err) if err != nil {
return fmt.Println(err)
} return
defer resp.Body.Close() }
body, _ := ioutil.ReadAll(resp.Body) defer resp.Body.Close()
fmt.Println(string(body)) body, _ := ioutil.ReadAll(resp.Body)
}() fmt.Println(string(body))
}()
}
} }
} }
//清除cookie //清除cookie

@ -2,10 +2,9 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="19c8c37d-a056-451c-a29d-fb612b9a3e2f" name="Default Changelist" comment=""> <list default="true" id="19c8c37d-a056-451c-a29d-fb612b9a3e2f" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/../.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Business/ImRelate/ImRelateController/ImRelateController.go" beforeDir="false" afterPath="$PROJECT_DIR$/Business/ImRelate/ImRelateController/ImRelateController.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../dsSso/Controller/ControllerOauth2/ControllerOauth2.go" beforeDir="false" afterPath="$PROJECT_DIR$/../dsSso/Controller/ControllerOauth2/ControllerOauth2.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Business/ImRelate/ImRelateDao/ImRelateDao.go" beforeDir="false" afterPath="$PROJECT_DIR$/Business/ImRelate/ImRelateDao/ImRelateDao.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Business/FileRelate/FileRelateController/FileReleateController.go" beforeDir="false" afterPath="$PROJECT_DIR$/Business/FileRelate/FileRelateController/FileReleateController.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Config/Config.ini" beforeDir="false" afterPath="$PROJECT_DIR$/Config/Config.ini" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />

@ -55,6 +55,12 @@ func Routers(r *gin.RouterGroup) {
// @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"] // @X-TableName ["t_zhxy_file"]
func fileUpload(c *gin.Context) { func fileUpload(c *gin.Context) {
//异常处理
defer func() {
if err := recover(); err != nil {
fmt.Printf("%s\n", err)
}
}()
file, err := c.FormFile("file") file, err := c.FormFile("file")
if err != nil { if err != nil {
c.String(http.StatusBadRequest, fmt.Sprintf("get form err: %s", err.Error())) c.String(http.StatusBadRequest, fmt.Sprintf("get form err: %s", err.Error()))
@ -107,7 +113,7 @@ func fileUpload(c *gin.Context) {
targetIdentityId := CommonUtil.ConvertStringToInt32(c.PostForm("target_identity_id")) //目标人身份ID targetIdentityId := CommonUtil.ConvertStringToInt32(c.PostForm("target_identity_id")) //目标人身份ID
targetPersonId := CommonUtil.ConvertStringToInt32(c.PostForm("target_person_id")) //目标人员ID targetPersonId := CommonUtil.ConvertStringToInt32(c.PostForm("target_person_id")) //目标人员ID
systemId := CommonUtil.ConvertStringToInt32(c.PostForm("system_id")) //系统id systemId := CommonUtil.ConvertStringToInt32(c.PostForm("system_id")) //系统id
FileRelateDao.FileRecord(uuid,filename, identityId, personId, targetGroupId, targetIdentityId, targetPersonId, systemId, int32(size), ext) FileRelateDao.FileRecord(uuid, filename, identityId, personId, targetGroupId, targetIdentityId, targetPersonId, systemId, int32(size), ext)
//返回 //返回
s := FileRelateDao.GetFileDownLoadUrl(trueName[0:2]+"/"+trueName, file.Filename) s := FileRelateDao.GetFileDownLoadUrl(trueName[0:2]+"/"+trueName, file.Filename)
@ -175,6 +181,13 @@ func fileUpload(c *gin.Context) {
// @X-EmptyLimit ["file_id","file_name"] // @X-EmptyLimit ["file_id","file_name"]
// @X-TableName ["t_zhxy_file"] // @X-TableName ["t_zhxy_file"]
func fileUpdate(c *gin.Context) { func fileUpdate(c *gin.Context) {
//异常处理
defer func() {
if err := recover(); err != nil {
fmt.Printf("%s\n", err)
}
}()
fileId := c.PostForm("file_id") fileId := c.PostForm("file_id")
fileName := c.PostForm("file_name") fileName := c.PostForm("file_name")
FileRelateDao.FileUpdate(fileId, fileName) FileRelateDao.FileUpdate(fileId, fileName)
@ -201,6 +214,13 @@ func fileUpdate(c *gin.Context) {
// @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-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"] // @X-TableName ["t_zhxy_file"]
func fileCopy(c *gin.Context) { func fileCopy(c *gin.Context) {
//异常处理
defer func() {
if err := recover(); err != nil {
fmt.Printf("%s\n", err)
}
}()
fileId := c.PostForm("file_id") fileId := c.PostForm("file_id")
sourceIdentityId := CommonUtil.ConvertStringToInt32(c.PostForm("source_identity_id")) sourceIdentityId := CommonUtil.ConvertStringToInt32(c.PostForm("source_identity_id"))
sourcePersonId := CommonUtil.ConvertStringToInt32(c.PostForm("source_person_id")) sourcePersonId := CommonUtil.ConvertStringToInt32(c.PostForm("source_person_id"))
@ -237,6 +257,13 @@ func fileCopy(c *gin.Context) {
// @X-IntRangeLimit [{"identity_id":"5"},{"person_id":"1,999999999999"}] // @X-IntRangeLimit [{"identity_id":"5"},{"person_id":"1,999999999999"}]
// @X-TableName ["t_zhxy_clouddisk_tree"] // @X-TableName ["t_zhxy_clouddisk_tree"]
func addNode(c *gin.Context) { func addNode(c *gin.Context) {
//异常处理
defer func() {
if err := recover(); err != nil {
fmt.Printf("%s\n", err)
}
}()
identityId := CommonUtil.ConvertStringToInt32(c.PostForm("identity_id")) identityId := CommonUtil.ConvertStringToInt32(c.PostForm("identity_id"))
personId := CommonUtil.ConvertStringToInt32(c.PostForm("person_id")) personId := CommonUtil.ConvertStringToInt32(c.PostForm("person_id"))
parentId := c.PostForm("parent_id") //根传入-1 parentId := c.PostForm("parent_id") //根传入-1
@ -267,6 +294,13 @@ func addNode(c *gin.Context) {
// @Router /dsSzxy/fileRelate/updateNode [post] // @Router /dsSzxy/fileRelate/updateNode [post]
// @X-TableName ["t_zhxy_clouddisk_tree"] // @X-TableName ["t_zhxy_clouddisk_tree"]
func updateNode(c *gin.Context) { func updateNode(c *gin.Context) {
//异常处理
defer func() {
if err := recover(); err != nil {
fmt.Printf("%s\n", err)
}
}()
nodeName := c.PostForm("nodeName") nodeName := c.PostForm("nodeName")
nodeId := c.PostForm("node_id") nodeId := c.PostForm("node_id")
success, err := FileRelateDao.UpdateNode(nodeId, nodeName) success, err := FileRelateDao.UpdateNode(nodeId, nodeName)
@ -294,6 +328,13 @@ func updateNode(c *gin.Context) {
// @Router /dsSzxy/fileRelate/delNode [post] // @Router /dsSzxy/fileRelate/delNode [post]
// @X-TableName ["t_zhxy_clouddisk_tree"] // @X-TableName ["t_zhxy_clouddisk_tree"]
func delNode(c *gin.Context) { func delNode(c *gin.Context) {
//异常处理
defer func() {
if err := recover(); err != nil {
fmt.Printf("%s\n", err)
}
}()
nodeId := c.PostForm("node_id") nodeId := c.PostForm("node_id")
success, err := FileRelateDao.DelNode(nodeId) success, err := FileRelateDao.DelNode(nodeId)
if err != nil { if err != nil {
@ -321,6 +362,13 @@ func delNode(c *gin.Context) {
// @Router /dsSzxy/fileRelate/addNodeFile [post] // @Router /dsSzxy/fileRelate/addNodeFile [post]
// @X-TableName ["t_zhxy_clouddisk_tree"] // @X-TableName ["t_zhxy_clouddisk_tree"]
func addNodeFile(c *gin.Context) { func addNodeFile(c *gin.Context) {
//异常处理
defer func() {
if err := recover(); err != nil {
fmt.Printf("%s\n", err)
}
}()
nodeId := c.PostForm("node_id") nodeId := c.PostForm("node_id")
fileId := c.PostForm("file_id") fileId := c.PostForm("file_id")
success, err := FileRelateDao.AddNodeFile(nodeId, fileId) success, err := FileRelateDao.AddNodeFile(nodeId, fileId)
@ -349,6 +397,13 @@ func addNodeFile(c *gin.Context) {
// @Router /dsSzxy/fileRelate/delNodeFile [post] // @Router /dsSzxy/fileRelate/delNodeFile [post]
// @X-TableName ["t_zhxy_clouddisk_tree"] // @X-TableName ["t_zhxy_clouddisk_tree"]
func delNodeFile(c *gin.Context) { func delNodeFile(c *gin.Context) {
//异常处理
defer func() {
if err := recover(); err != nil {
fmt.Printf("%s\n", err)
}
}()
nodeId := c.PostForm("node_id") nodeId := c.PostForm("node_id")
fileId := c.PostForm("file_id") fileId := c.PostForm("file_id")
success, err := FileRelateDao.DelNodeFile(nodeId, fileId) success, err := FileRelateDao.DelNodeFile(nodeId, fileId)
@ -365,6 +420,7 @@ func delNodeFile(c *gin.Context) {
} }
} }
// GetFileList
// @Summary 获取指定结点下的文件列表 // @Summary 获取指定结点下的文件列表
// @Description 获取指定结点下的文件列表 // @Description 获取指定结点下的文件列表
// @Tags 文件系统管理 // @Tags 文件系统管理
@ -378,6 +434,13 @@ func delNodeFile(c *gin.Context) {
// @X-EmptyLimit ["node_id"] // @X-EmptyLimit ["node_id"]
// @Router /dsSzxy/fileRelate/GetFileList [get] // @Router /dsSzxy/fileRelate/GetFileList [get]
func GetFileList(c *gin.Context) { func GetFileList(c *gin.Context) {
//异常处理
defer func() {
if err := recover(); err != nil {
fmt.Printf("%s\n", err)
}
}()
identityId := CommonUtil.ConvertStringToInt32(c.PostForm("identity_id")) identityId := CommonUtil.ConvertStringToInt32(c.PostForm("identity_id"))
personId := CommonUtil.ConvertStringToInt32(c.PostForm("person_id")) personId := CommonUtil.ConvertStringToInt32(c.PostForm("person_id"))
nodeId := c.PostForm("node_id") nodeId := c.PostForm("node_id")
@ -390,6 +453,7 @@ func GetFileList(c *gin.Context) {
}) })
} }
// GetSyncTree
// @Summary 获取指定树型结构下的子目录(同步) // @Summary 获取指定树型结构下的子目录(同步)
// @Description 获取指定树型结构下的子目录(同步) // @Description 获取指定树型结构下的子目录(同步)
// @Tags 文件系统管理 // @Tags 文件系统管理
@ -401,6 +465,12 @@ func GetFileList(c *gin.Context) {
// @X-IntRangeLimit [{"identity_id":"5"},{"person_id":"1,999999999999"}] // @X-IntRangeLimit [{"identity_id":"5"},{"person_id":"1,999999999999"}]
// @Router /dsSzxy/fileRelate/GetSyncTree [get] // @Router /dsSzxy/fileRelate/GetSyncTree [get]
func GetSyncTree(c *gin.Context) { func GetSyncTree(c *gin.Context) {
//异常处理
defer func() {
if err := recover(); err != nil {
fmt.Printf("%s\n", err)
}
}()
identityId := CommonUtil.ConvertStringToInt32(c.PostForm("identity_id")) identityId := CommonUtil.ConvertStringToInt32(c.PostForm("identity_id"))
personId := CommonUtil.ConvertStringToInt32(c.PostForm("person_id")) personId := CommonUtil.ConvertStringToInt32(c.PostForm("person_id"))
success, list := FileRelateDao.GetSyncTree(identityId, personId) success, list := FileRelateDao.GetSyncTree(identityId, personId)
@ -410,6 +480,7 @@ func GetSyncTree(c *gin.Context) {
}) })
} }
// GetAsyncTree
// @Summary 获取指定树型结构下的子目录(异步) // @Summary 获取指定树型结构下的子目录(异步)
// @Description 获取指定树型结构下的子目录(异步) // @Description 获取指定树型结构下的子目录(异步)
// @Tags 文件系统管理 // @Tags 文件系统管理
@ -423,6 +494,12 @@ func GetSyncTree(c *gin.Context) {
// @X-EmptyLimit ["node_id"] // @X-EmptyLimit ["node_id"]
// @Router /dsSzxy/fileRelate/GetAsyncTree [get] // @Router /dsSzxy/fileRelate/GetAsyncTree [get]
func GetAsyncTree(c *gin.Context) { func GetAsyncTree(c *gin.Context) {
//异常处理
defer func() {
if err := recover(); err != nil {
fmt.Printf("%s\n", err)
}
}()
identityId := CommonUtil.ConvertStringToInt32(c.PostForm("identity_id")) identityId := CommonUtil.ConvertStringToInt32(c.PostForm("identity_id"))
personId := CommonUtil.ConvertStringToInt32(c.PostForm("person_id")) personId := CommonUtil.ConvertStringToInt32(c.PostForm("person_id"))
nodeId := c.PostForm("node_id") nodeId := c.PostForm("node_id")

Loading…
Cancel
Save