|
|
@@ -236,7 +236,7 @@ func GetAllEnums(c *gin.Context) {
|
|
|
// @Summary 获取服务器时间
|
|
|
// @Produce json
|
|
|
// @Success 200 {object} app.Response
|
|
|
-// @Failure 500 {object} app.Response
|
|
|
+// @Failure 500 {object} app.Response
|
|
|
// @Router /Common/GetServerTime [get]
|
|
|
// @Tags 通用服务
|
|
|
func GetServerTime(c *gin.Context) {
|
|
|
@@ -310,10 +310,10 @@ func GetWskhOpenAccountConfigs(c *gin.Context) {
|
|
|
// GetI18nConfigs 获取枚举项字典扩展表信息
|
|
|
// @Summary 获取枚举项字典扩展表信息
|
|
|
// @Produce json
|
|
|
-// @Success 200 {array} models.I18nConfig
|
|
|
+// @Success 200 {array} models.I18nConfig
|
|
|
// @Failure 500 {object} app.Response
|
|
|
// @Router /Common/GetI18nConfigs [get]
|
|
|
-// @Tags 通用服务
|
|
|
+// @Tags 通用服务
|
|
|
func GetI18nConfigs(c *gin.Context) {
|
|
|
appG := app.Gin{C: c}
|
|
|
|
|
|
@@ -328,3 +328,38 @@ func GetI18nConfigs(c *gin.Context) {
|
|
|
// 查询成功
|
|
|
appG.Response(http.StatusOK, e.SUCCESS, datas)
|
|
|
}
|
|
|
+
|
|
|
+type GetGetSystemParamsReq struct {
|
|
|
+ Codes string `form:"codes"` // 参数代码,格式:1,2,3
|
|
|
+}
|
|
|
+
|
|
|
+// GetSystemParams 获取系统参数信息
|
|
|
+// @Summary 获取系统参数信息
|
|
|
+// @Produce json
|
|
|
+// @Param codes query string false "参数代码,格式:1,2,3"
|
|
|
+// @Success 200 {array} models.I18nConfig
|
|
|
+// @Failure 500 {object} app.Response
|
|
|
+// @Router /Common/GetSystemParams [get]
|
|
|
+// @Tags 通用服务
|
|
|
+func GetSystemParams(c *gin.Context) {
|
|
|
+ appG := app.Gin{C: c}
|
|
|
+
|
|
|
+ // 获取请求参数
|
|
|
+ var req GetGetSystemParamsReq
|
|
|
+ if err := appG.C.ShouldBindQuery(&req); err != nil {
|
|
|
+ logger.GetLogger().Errorf("GetSystemParams failed: %s", err.Error())
|
|
|
+ appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ datas, err := models.GetSystemParamsByCodes(req.Codes)
|
|
|
+ if err != nil {
|
|
|
+ // 查询失败
|
|
|
+ logger.GetLogger().Errorf("GetSystemParams failed: %s", err.Error())
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 查询成功
|
|
|
+ appG.Response(http.StatusOK, e.SUCCESS, datas)
|
|
|
+}
|