mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-10-14 01:08:36 +00:00
不全多删除的部分
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -58,6 +59,7 @@ func HasError(err error, msg string, code ...int) {
|
||||
func GenerateMsgIDFromContext(c *gin.Context) string {
|
||||
requestId := c.GetHeader(TrafficKey)
|
||||
if requestId == "" {
|
||||
requestId = uuid.New().String()
|
||||
c.Header(TrafficKey, requestId)
|
||||
}
|
||||
return requestId
|
||||
|
||||
Reference in New Issue
Block a user