|
|
@@ -128,12 +128,12 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
if err != nil {
|
|
|
// 查询失败
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed: %s", err.Error())
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_EXEXCHANGE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
if exchange == nil {
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed")
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_EXEXCHANGE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
item.ExExehangeName = exchange.Exchangefullname
|
|
|
@@ -141,7 +141,7 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
quoteDays, err := models.GetQuoteDays("'" + goods.Outgoodscode + "'")
|
|
|
if err != nil {
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed: %s", err.Error())
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_GOODS_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_QUOTE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
if len(quoteDays) > 0 {
|
|
|
@@ -194,12 +194,12 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
if err != nil {
|
|
|
// 查询失败
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed: %s", err.Error())
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_EXEXCHANGE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
if exchange == nil {
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed")
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_EXEXCHANGE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
item.ExExehangeName = exchange.Exchangefullname
|
|
|
@@ -207,7 +207,7 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
quoteDays, err := models.GetQuoteDays("'" + goods.Outgoodscode + "'")
|
|
|
if err != nil {
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed: %s", err.Error())
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_GOODS_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_QUOTE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
if len(quoteDays) > 0 {
|
|
|
@@ -253,12 +253,12 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
if err != nil {
|
|
|
// 查询失败
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed: %s", err.Error())
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_GOODS_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
if market == nil {
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed")
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_GOODS_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
item.Marketid = int64(market.Marketid)
|
|
|
@@ -284,12 +284,12 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
if err != nil {
|
|
|
// 查询失败
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed: %s", err.Error())
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_EXEXCHANGE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
if exchange == nil {
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed")
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_EXEXCHANGE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
item.ExExehangeName = exchange.Exchangefullname
|
|
|
@@ -297,7 +297,7 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
quoteDays, err := models.GetQuoteDays("'" + goods.Outgoodscode + "'")
|
|
|
if err != nil {
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed: %s", err.Error())
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_GOODS_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_QUOTE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
if len(quoteDays) > 0 {
|
|
|
@@ -339,12 +339,12 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
if err != nil {
|
|
|
// 查询失败
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed: %s", err.Error())
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_GOODS_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
if market == nil {
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed")
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_GOODS_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
item.Marketid = int64(market.Marketid)
|
|
|
@@ -370,12 +370,12 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
if err != nil {
|
|
|
// 查询失败
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed: %s", err.Error())
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_EXEXCHANGE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
if exchange == nil {
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed")
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_MARKET_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_EXEXCHANGE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
item.ExExehangeName = exchange.Exchangefullname
|
|
|
@@ -383,7 +383,7 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
quoteDays, err := models.GetQuoteDays("'" + goods.Outgoodscode + "'")
|
|
|
if err != nil {
|
|
|
logger.GetLogger().Errorf("QueryErmcpTradePosition failed: %s", err.Error())
|
|
|
- appG.Response(http.StatusBadRequest, e.ERROR_GET_GOODS_FAILED, nil)
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_GET_QUOTE_FAILED, nil)
|
|
|
return
|
|
|
}
|
|
|
if len(quoteDays) > 0 {
|