|
|
@@ -127,3 +127,27 @@ func QueryGoodsesByLoginID(c *gin.Context) {
|
|
|
logger.GetLogger().Debugln("QueryGoodsesByLoginID successed: %v", goodses)
|
|
|
appG.Response(http.StatusOK, e.SUCCESS, goodses)
|
|
|
}
|
|
|
+
|
|
|
+// GetAllExExchanges 获取所有外部交易所信息
|
|
|
+// @Summary 获取所有外部交易所信息
|
|
|
+// @Produce json
|
|
|
+// @Security ApiKeyAuth
|
|
|
+// @Success 200 {object} models.Goods
|
|
|
+// @Failure 500 {object} app.Response
|
|
|
+// @Router /Market/GetAllExExchanges [get]
|
|
|
+// @Tags 通用市场
|
|
|
+func GetAllExExchanges(c *gin.Context) {
|
|
|
+ appG := app.Gin{C: c}
|
|
|
+
|
|
|
+ rst, err := models.GetAllExExchanges()
|
|
|
+ if err != nil {
|
|
|
+ // 查询失败
|
|
|
+ logger.GetLogger().Errorf("GetAllExExchanges failed: %s", err.Error())
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 查询成功返回
|
|
|
+ logger.GetLogger().Debugln("GetAllExExchanges successed: %v", rst)
|
|
|
+ appG.Response(http.StatusOK, e.SUCCESS, rst)
|
|
|
+}
|