|
|
@@ -153,13 +153,13 @@ type QueryMarketsByLoginIDReq struct {
|
|
|
|
|
|
// QueryMarketsByLoginID 获取登录账号有权限的市场信息
|
|
|
// @Summary 获取登录账号有权限的市场信息
|
|
|
-// @Produce json
|
|
|
+// @Produce json
|
|
|
// @Security ApiKeyAuth
|
|
|
// @Param loginID query int true "登录账号"
|
|
|
// @Success 200 {object} models.Market
|
|
|
// @Failure 500 {object} app.Response
|
|
|
// @Router /Market/QueryMarketsByLoginID [get]
|
|
|
-// @Tags 通用市场
|
|
|
+// @Tags 通用市场
|
|
|
func QueryMarketsByLoginID(c *gin.Context) {
|
|
|
appG := app.Gin{C: c}
|
|
|
|
|
|
@@ -229,7 +229,7 @@ func QueryGoodsesByLoginID(c *gin.Context) {
|
|
|
// @Produce json
|
|
|
// @Security ApiKeyAuth
|
|
|
// @Success 200 {object} models.Goods
|
|
|
-// @Failure 500 {object} app.Response
|
|
|
+// @Failure 500 {object} app.Response
|
|
|
// @Router /Market/GetAllExExchanges [get]
|
|
|
// @Tags 通用市场
|
|
|
func GetAllExExchanges(c *gin.Context) {
|
|
|
@@ -247,3 +247,26 @@ func GetAllExExchanges(c *gin.Context) {
|
|
|
logger.GetLogger().Debugln("GetAllExExchanges successed: %v", rst)
|
|
|
appG.Response(http.StatusOK, e.SUCCESS, rst)
|
|
|
}
|
|
|
+
|
|
|
+// GetMarketSections 查询新板块设置
|
|
|
+// @Summary 查询新板块设置
|
|
|
+// @Produce json
|
|
|
+// @Success 200 {array} models.GetMarketSectionsRsp
|
|
|
+// @Failure 500 {object} app.Response
|
|
|
+// @Router /Market/GetMarketSections [get]
|
|
|
+// @Tags 通用市场
|
|
|
+func GetMarketSections(c *gin.Context) {
|
|
|
+ appG := app.Gin{C: c}
|
|
|
+
|
|
|
+ rst, err := models.GetMarketSections()
|
|
|
+ if err != nil {
|
|
|
+ // 查询失败
|
|
|
+ logger.GetLogger().Errorf("GetMarketSections failed: %s", err.Error())
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 查询成功返回
|
|
|
+ logger.GetLogger().Debugln("GetMarketSections successed: %v", rst)
|
|
|
+ appG.Response(http.StatusOK, e.SUCCESS, rst)
|
|
|
+}
|