Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	consume/supply_cloud_chain_fenxiao_new_change.go
three
DengBiao 10 ay önce
ebeveyn
işleme
370cf95634
2 değiştirilmiş dosya ile 9 ekleme ve 29 silme
  1. +8
    -28
      app/e/msg.go
  2. +1
    -1
      consume/supply_cloud_chain_fenxiao_new_change.go

+ 8
- 28
app/e/msg.go Dosyayı Görüntüle

@@ -1,8 +1,6 @@
package e

import (
"applet/app/utils"
"encoding/json"
"net/http"

"github.com/gin-gonic/gin"
@@ -34,13 +32,8 @@ func OutSuc(c *gin.Context, data interface{}, fields map[string]interface{}) {
res[k] = v
}
}
if utils.GetApiVersion(c) > 0 { //加了签名校验只返回加密的字符串
jsonData, _ := json.Marshal(res)
str := utils.ResultAes(c, jsonData)
c.Writer.WriteString(str)
} else {
c.AbortWithStatusJSON(200, res)
}

c.AbortWithStatusJSON(200, res)
}

func OutSucPure(c *gin.Context, data interface{}, fields map[string]interface{}) {
@@ -79,25 +72,12 @@ func OutErr(c *gin.Context, code int, err ...interface{}) {
}
}
}
if utils.GetApiVersion(c) > 0 { //加了签名校验只返回加密的字符串
jsonData, _ := json.Marshal(gin.H{
"code": code,
"msg": msg,
"data": []struct{}{},
})
str := utils.ResultAes(c, jsonData)
if code > 100000 {
code = int(utils.FloatFormat(float64(code/1000), 0))
}
c.Status(500)
c.Writer.WriteString(str)
} else {
c.AbortWithStatusJSON(statusCode, gin.H{
"code": code,
"msg": msg,
"data": []struct{}{},
})
}

c.AbortWithStatusJSON(statusCode, gin.H{
"code": code,
"msg": msg,
"data": []struct{}{},
})
}

// 重定向


+ 1
- 1
consume/supply_cloud_chain_fenxiao_new_change.go Dosyayı Görüntüle

@@ -113,7 +113,7 @@ func SupplyCloudChainFenxiaoNewChangeConsume(queue md.MqQueue) {
req.Base.MerchantId = systemMerchant.Id
result, ok := goodsFrom1688["result"].(map[string]interface{})
if !ok {
logx.Error("错误的数据")
fmt.Println("错误的数据", "!!!!!!!!!!!!!!!!!!!!")
return
}
if message, ok := result["message"]; ok {


Yükleniyor…
İptal
Kaydet