master
wubin 5 years ago
parent 85fde55232
commit c9b6045821

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

@ -7,6 +7,7 @@ import (
"fmt"
"github.com/gin-gonic/gin"
"net/http"
"os"
"strings"
)
@ -38,7 +39,7 @@ func Routers(r *gin.RouterGroup) {
// @Param page query int true "第几页"
// @Param limit query int true "一页显示多少条"
// @Success 200 {object} Model.Res
// @Router /base/support/PageAccessSystemInfo [get]
// @Router /support/accessSystem/PageAccessSystemInfo [get]
// @X-EmptyLimit ["page","limit"]
// @X-IntRangeLimit [{"page":"1,1000"},{"limit":"1,1000"}]
// @X-TableName ["t_app_base"]
@ -75,7 +76,7 @@ func PageAccessSystemInfo(c *gin.Context) {
// @Param appCode formData string true "系统编码"
// @Param sortId formData int false "排序号"
// @Success 200 {object} Model.Res
// @Router /base/support/AddAccessSystemInfo [post]
// @Router /support/accessSystem/AddAccessSystemInfo [post]
// @X-EmptyLimit ["appName","appCode"]
// @X-LengthLimit [{"appName":"2,30"},{"appCode":"2,20"}]
// @X-TableName ["t_app_base"]
@ -111,7 +112,7 @@ func AddAccessSystemInfo(c *gin.Context) {
// @Param appCode formData string true "系统编码"
// @Param sortId formData int false "排序号"
// @Success 200 {object} Model.Res
// @Router /base/support/UpdateAccessSystemInfo [post]
// @Router /support/accessSystem/UpdateAccessSystemInfo [post]
// @X-EmptyLimit ["appId","appName","appCode"]
// @X-LengthLimit [{"appId":"36,36"},{"appName":"2,30"},{"appCode":"2,20"}]
// @X-TableName ["t_app_base"]
@ -146,7 +147,7 @@ func UpdateAccessSystemInfo(c *gin.Context) {
// @Produce json
// @Param appId formData string true "系统ID"
// @Success 200 {object} Model.Res
// @Router /base/support/DeleteAccessSystemInfo [post]
// @Router /support/accessSystem/DeleteAccessSystemInfo [post]
// @X-EmptyLimit ["appId"]
// @X-LengthLimit [{"appId":"36,36"}]
// @X-TableName ["t_app_base"]
@ -175,7 +176,7 @@ func DeleteAccessSystemInfo(c *gin.Context) {
// @Produce json
// @Param appId query string true "系统ID"
// @Success 200 {object} Model.Res
// @Router /base/support/GetAccessSystemRangeInfo [get]
// @Router /support/accessSystem/GetAccessSystemRangeInfo [get]
// @X-EmptyLimit ["appId"]
// @X-LengthLimit [{"appId":"36,36"}]
// @X-TableName ["t_app_base"]
@ -183,6 +184,7 @@ func DeleteAccessSystemInfo(c *gin.Context) {
func GetAccessSystemRangeInfo(c *gin.Context) {
//系统ID
appId := c.Query("appId")
fmt.Println(appId)
}
// @Summary 设置接入系统的使用范围
@ -193,7 +195,7 @@ func GetAccessSystemRangeInfo(c *gin.Context) {
// @Param appId formData string true "系统ID"
// @Param rangeCode formData string true "使用范围的行政区划码、单位ID多个用逗号分隔"
// @Success 200 {object} Model.Res
// @Router /base/support/SettingAccessSystemRange [post]
// @Router /support/accessSystem/SettingAccessSystemRange [post]
// @X-EmptyLimit ["orgId","rangeCode"]
// @X-LengthLimit [{"orgId":"36,36"},{"rangeCode":"1,3700"}]
// @X-TableName ["t_app_base"]
@ -229,7 +231,7 @@ func SettingAccessSystemRangeInfo(c *gin.Context) {
// @Produce json
// @Param appId query string true "系统ID"
// @Success 200 {object} Model.Res
// @Router /base/support/GetAccessSystemSsoInfo [get]
// @Router /support/accessSystem/GetAccessSystemSsoInfo [get]
// @X-EmptyLimit ["appId"]
// @X-LengthLimit [{"appId":"36,36"}]
// @X-TableName ["t_app_base"]
@ -261,7 +263,7 @@ func GetAccessSystemSsoInfo(c *gin.Context) {
// @Param redirectUri formData string true "统一认证回调地址"
// @Param logoutUri formData string false "统一认证登出地址"
// @Success 200 {object} Model.Res
// @Router /base/support/SettingAccessSystemSsoInfo [post]
// @Router /support/accessSystem/SettingAccessSystemSsoInfo [post]
// @X-EmptyLimit ["appId","redirectUri"]
// @X-LengthLimit [{"appId":"36,36"},{"redirectUri":"2,300"},{"logoutUri":"2,300"}]
// @X-TableName ["t_app_base"]
@ -297,7 +299,7 @@ func SettingAccessSystemSsoInfo(c *gin.Context) {
// @Produce json
// @Param appId formData string true "系统ID"
// @Success 200 {object} Model.Res
// @Router /base/support/EmptyAccessSystemSsoInfo [post]
// @Router /support/accessSystem/EmptyAccessSystemSsoInfo [post]
// @X-EmptyLimit ["orgId"]
// @X-LengthLimit [{"orgId":"36,36"}]
// @X-TableName ["t_app_base"]
@ -327,7 +329,7 @@ func EmptyAccessSystemSsoInfo(c *gin.Context) {
// @Produce json
// @Param appId query string true "系统ID"
// @Success 200 {object} Model.Res
// @Router /base/support/GetAccessSystemIntegratedInfo [get]
// @Router /support/accessSystem/GetAccessSystemIntegratedInfo [get]
// @X-EmptyLimit ["appId"]
// @X-LengthLimit [{"appId":"36,36"}]
// @X-TableName ["t_app_base"]
@ -360,7 +362,7 @@ func GetAccessSystemIntegratedInfo(c *gin.Context) {
// @Param appUrl formData string true "接入系统在集成页面的调用地址"
// @Param appIcon formData file true "接入系统在集成页面的图标"
// @Success 200 {object} Model.Res
// @Router /base/support/SettingAccessSystemIntegratedInfo [post]
// @Router /support/accessSystem/SettingAccessSystemIntegratedInfo [post]
// @X-EmptyLimit ["appId","redirectUri"]
// @X-LengthLimit [{"appId":"36,36"},{"redirectUri":"2,300"},{"logoutUri":"2,300"}]
// @X-TableName ["t_app_base"]
@ -371,12 +373,17 @@ func SettingAccessSystemIntegratedInfo(c *gin.Context) {
//接入系统在集成页面的调用地址
redirectUri := c.PostForm("redirectUri")
//接入系统在集成页面的图标
header, _ := c.FormFile("excelFile")
header, _ := c.FormFile("icon")
rootPath, _ := os.Getwd()
iconDir := rootPath + "/Html/Icon/"
//生成图标的ID
//iconFileId := CommonUtil.GetUUID()
fmt.Println(header)
iconFileId := CommonUtil.GetUUID()
iconFileName := strings.Split(header.Filename, ".")[1]
iconPath := iconDir + iconFileId + "." + iconFileName
//保存图标
c.SaveUploadedFile(header, iconPath)
err := AccessSystemDao.UpdateIntegration(appId, redirectUri, "")
err := AccessSystemDao.UpdateIntegration(appId, redirectUri, "/dsSupport/Icon/"+iconFileName)
if err != nil {
c.JSON(http.StatusOK, Model.Res{
@ -399,7 +406,7 @@ func SettingAccessSystemIntegratedInfo(c *gin.Context) {
// @Produce json
// @Param appId formData string true "系统ID"
// @Success 200 {object} Model.Res
// @Router /base/support/EmptyAccessSystemIntegratedInfo [post]
// @Router /support/accessSystem/EmptyAccessSystemIntegratedInfo [post]
// @X-EmptyLimit ["orgId"]
// @X-LengthLimit [{"orgId":"36,36"}]
// @X-TableName ["t_app_base"]

@ -32,8 +32,8 @@ var (
StartPathWindows string
StartPathLinux string
// rpc 服务器的暴露地址
RpcServerPort string
//服务器的端口
ServerPort string
//项目名称
ProjectName string
@ -88,7 +88,7 @@ func init() {
RedisExpireTime = iniParser.GetInt64("redis", "expireTime")
//rpc连接池大小
RpcServerPort = iniParser.GetString("rpcServer", "port")
ServerPort = iniParser.GetString("server", "port")
//项目名称
ProjectName = iniParser.GetString("project", "project_name")

Loading…
Cancel
Save