@ -20,6 +20,9 @@ func Routers(r *gin.RouterGroup) {
rr . POST ( "/AddAccessSystemInfo" , AddAccessSystemInfo )
rr . POST ( "/UpdateAccessSystemInfo" , UpdateAccessSystemInfo )
rr . POST ( "/DeleteAccessSystemInfo" , DeleteAccessSystemInfo )
rr . POST ( "/EnableAccessSystemInfo" , EnableAccessSystemInfo )
rr . POST ( "/DisableAccessSystemInfo" , DisableAccessSystemInfo )
rr . GET ( "/GetAccessSystemRangeInfo" , GetAccessSystemRangeInfo )
rr . POST ( "/SettingAccessSystemRangeInfo" , SettingAccessSystemRangeInfo )
rr . GET ( "/GetAccessSystemSsoInfo" , GetAccessSystemSsoInfo )
@ -178,6 +181,64 @@ func DeleteAccessSystemInfo(c *gin.Context) {
} )
}
// @Summary 启用接入系统
// @Description 启用接入系统
// @Tags 接入系统
// @Accept application/x-www-form-urlencoded
// @Produce json
// @Param appId formData string true "系统ID"
// @Success 200 {object} Model.Res
// @Router /support/accessSystem/EnableAccessSystemInfo [post]
// @X-EmptyLimit ["appId"]
// @X-LengthLimit [{"appId":"36,36"}]
// @X-TableName ["t_app_base"]
// @X-Sort [4]
func EnableAccessSystemInfo ( c * gin . Context ) {
//系统ID
appId := c . PostForm ( "appId" )
err := AccessSystemDao . ChangeAppStatus ( appId , 1 )
if err != nil {
c . JSON ( http . StatusOK , Model . Res {
Success : false ,
Message : err . Error ( ) ,
} )
return
}
c . JSON ( http . StatusOK , Model . Res {
Success : true ,
Message : "操作成功!" ,
} )
}
// @Summary 禁用接入系统
// @Description 禁用接入系统
// @Tags 接入系统
// @Accept application/x-www-form-urlencoded
// @Produce json
// @Param appId formData string true "系统ID"
// @Success 200 {object} Model.Res
// @Router /support/accessSystem/DisableAccessSystemInfo [post]
// @X-EmptyLimit ["appId"]
// @X-LengthLimit [{"appId":"36,36"}]
// @X-TableName ["t_app_base"]
// @X-Sort [5]
func DisableAccessSystemInfo ( c * gin . Context ) {
//系统ID
appId := c . PostForm ( "appId" )
err := AccessSystemDao . ChangeAppStatus ( appId , - 2 )
if err != nil {
c . JSON ( http . StatusOK , Model . Res {
Success : false ,
Message : err . Error ( ) ,
} )
return
}
c . JSON ( http . StatusOK , Model . Res {
Success : true ,
Message : "操作成功!" ,
} )
}
// @Summary 获取接入系统的使用范围
// @Description 获取接入系统的使用范围
// @Tags 接入系统
@ -189,7 +250,7 @@ func DeleteAccessSystemInfo(c *gin.Context) {
// @X-EmptyLimit ["appId"]
// @X-LengthLimit [{"appId":"36,36"}]
// @X-TableName ["t_app_base"]
// @X-Sort [ 5 ]
// @X-Sort [ 6 ]
func GetAccessSystemRangeInfo ( c * gin . Context ) {
//系统ID
appId := c . Query ( "appId" )
@ -202,17 +263,10 @@ func GetAccessSystemRangeInfo(c *gin.Context) {
} )
return
}
arr := make ( [ ] string , 0 )
if len ( res ) > 0 {
for i := range res {
arr = append ( arr , res [ i ] [ "range_code" ] . ( string ) )
}
}
c . JSON ( http . StatusOK , Model . Res {
Success : true ,
Message : "操作成功!" ,
List : ar r,
List : res ,
} )
}
@ -229,7 +283,7 @@ func GetAccessSystemRangeInfo(c *gin.Context) {
// @X-EmptyLimit ["orgId","rangeCode"]
// @X-LengthLimit [{"orgId":"36,36"},{"rangeCode":"1,3700"}]
// @X-TableName ["t_app_base"]
// @X-Sort [ 4 ]
// @X-Sort [ 7 ]
func SettingAccessSystemRangeInfo ( c * gin . Context ) {
//系统ID
appId := c . PostForm ( "appId" )
@ -265,7 +319,7 @@ func SettingAccessSystemRangeInfo(c *gin.Context) {
// @X-EmptyLimit ["appId"]
// @X-LengthLimit [{"appId":"36,36"}]
// @X-TableName ["t_app_base"]
// @X-Sort [ 6 ]
// @X-Sort [ 8 ]
func GetAccessSystemSsoInfo ( c * gin . Context ) {
//系统ID
appId := c . Query ( "appId" )
@ -297,7 +351,7 @@ func GetAccessSystemSsoInfo(c *gin.Context) {
// @X-EmptyLimit ["appId","redirectUri"]
// @X-LengthLimit [{"appId":"36,36"},{"redirectUri":"2,300"},{"logoutUri":"2,300"}]
// @X-TableName ["t_app_base"]
// @X-Sort [ 7 ]
// @X-Sort [ 9 ]
func SettingAccessSystemSsoInfo ( c * gin . Context ) {
//系统ID
appId := c . PostForm ( "appId" )
@ -333,7 +387,7 @@ func SettingAccessSystemSsoInfo(c *gin.Context) {
// @X-EmptyLimit ["orgId"]
// @X-LengthLimit [{"orgId":"36,36"}]
// @X-TableName ["t_app_base"]
// @X-Sort [ 8 ]
// @X-Sort [ 10 ]
func EmptyAccessSystemSsoInfo ( c * gin . Context ) {
//系统ID
appId := c . PostForm ( "appId" )
@ -363,7 +417,7 @@ func EmptyAccessSystemSsoInfo(c *gin.Context) {
// @X-EmptyLimit ["appId"]
// @X-LengthLimit [{"appId":"36,36"}]
// @X-TableName ["t_app_base"]
// @X-Sort [ 6 ]
// @X-Sort [ 11 ]
func GetAccessSystemIntegratedInfo ( c * gin . Context ) {
//系统ID
appId := c . Query ( "appId" )
@ -396,7 +450,7 @@ func GetAccessSystemIntegratedInfo(c *gin.Context) {
// @X-EmptyLimit ["appId","redirectUri"]
// @X-LengthLimit [{"appId":"36,36"},{"redirectUri":"2,300"},{"logoutUri":"2,300"}]
// @X-TableName ["t_app_base"]
// @X-Sort [ 7 ]
// @X-Sort [ 12 ]
func SettingAccessSystemIntegratedInfo ( c * gin . Context ) {
//系统ID
appId := c . PostForm ( "appId" )
@ -440,7 +494,7 @@ func SettingAccessSystemIntegratedInfo(c *gin.Context) {
// @X-EmptyLimit ["orgId"]
// @X-LengthLimit [{"orgId":"36,36"}]
// @X-TableName ["t_app_base"]
// @X-Sort [ 8 ]
// @X-Sort [ 13 ]
func EmptyAccessSystemIntegratedInfo ( c * gin . Context ) {
//系统ID
appId := c . PostForm ( "appId" )
@ -467,8 +521,8 @@ func EmptyAccessSystemIntegratedInfo(c *gin.Context) {
// @Success 200 {object} Model.Res
// @Router /support/accessSystem/GetPositionTreeInfo [get]
// @X-RemoveSwaggerField ["id_int","b_use","last_updated_time","postion_flag"]
// @X-Sort [1 1 ]
func GetPositionTreeInfo ( c * gin . Context ) {
// @X-Sort [1 4 ]
func GetPositionTreeInfo ( c * gin . Context ) {
r , err := BasePositionService . TreePositionInfo ( )
if err != nil {
c . JSON ( http . StatusOK , Model . Res {
@ -495,7 +549,7 @@ func GetPositionTreeInfo(c *gin.Context) {
// @X-EmptyLimit ["appId"]
// @X-LengthLimit [{"appId":"36,36"}]
// @X-TableName ["t_app_base"]
// @X-Sort [ 9 ]
// @X-Sort [ 15 ]
func GetAccessSystemIdentityPositionInfo ( c * gin . Context ) {
//系统ID
appId := c . Query ( "appId" )
@ -570,7 +624,7 @@ func GetAccessSystemIdentityPositionInfo(c *gin.Context) {
// @X-LengthLimit [{"appId":"36,36"}]
// @X-IntRangeLimit [{"teacherFlag":"1,3"},{"studentFlag":"1,2"},{"parentFlag":"1,2"}]
// @X-TableName ["t_app_base"]
// @X-Sort [1 0 ]
// @X-Sort [1 6 ]
func SettingAccessSystemIdentityPositionInfo ( c * gin . Context ) {
//系统ID
appId := c . PostForm ( "appId" )
@ -631,7 +685,7 @@ func SettingAccessSystemIdentityPositionInfo(c *gin.Context) {
// @X-EmptyLimit ["appId"]
// @X-LengthLimit [{"appId":"36,36"}]
// @X-TableName ["t_app_base"]
// @X-Sort [ 9 ]
// @X-Sort [ 17 ]
func GetAccessSystemStageInfo ( c * gin . Context ) {
//系统ID
appId := c . Query ( "appId" )
@ -672,7 +726,7 @@ func GetAccessSystemStageInfo(c *gin.Context) {
// @X-LengthLimit [{"appId":"36,36"}]
// @X-IntRangeLimit [{"teacherFlag":"1,3"},{"studentFlag":"1,2"},{"parentFlag":"1,2"}]
// @X-TableName ["t_app_base"]
// @X-Sort [1 0 ]
// @X-Sort [1 8 ]
func SettingAccessSystemStageInfo ( c * gin . Context ) {
//系统ID
appId := c . PostForm ( "appId" )
@ -693,7 +747,6 @@ func SettingAccessSystemStageInfo(c *gin.Context) {
} )
}
// @Summary 获取行政区划信息
// @Description 获取行政区划信息
// @Tags 接入系统
@ -707,7 +760,7 @@ func SettingAccessSystemStageInfo(c *gin.Context) {
// @X-EmptyLimit ["page","limit","areaCode"]
// @X-IntLimit ["page","limit","areaCode"]
// @X-LengthLimit [{"areaCode":"6,6"}]
// @X-Sort [1 1 ]
// @X-Sort [1 9 ]
func PageGovArea ( c * gin . Context ) {
page := CommonUtil . ConvertStringToInt32 ( c . Query ( "page" ) )
limit := CommonUtil . ConvertStringToInt32 ( c . Query ( "limit" ) )
@ -727,4 +780,4 @@ func PageGovArea(c *gin.Context) {
Message : "获取成功" ,
Count : r . Count ,
} )
}
}