GetDecodedID 从上下文中获取解码后的ID
(c *gin.Context, paramName string)
| 44 | |
| 45 | // GetDecodedID 从上下文中获取解码后的ID |
| 46 | func GetDecodedID(c *gin.Context, paramName string) (int64, bool) { |
| 47 | if value, exists := c.Get("decoded_" + paramName); exists { |
| 48 | if id, ok := value.(int64); ok { |
| 49 | return id, true |
| 50 | } |
| 51 | } |
| 52 | return 0, false |
| 53 | } |
| 54 | |
| 55 | // GetOriginalID 从上下文中获取原始ID字符串 |
| 56 | func GetOriginalID(c *gin.Context, paramName string) (string, bool) { |