2021-05-23 23:27:41 +00:00
|
|
|
package common
|
2017-08-23 02:05:47 +00:00
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
2021-05-23 23:27:41 +00:00
|
|
|
type ContextBase struct {
|
2017-08-23 02:05:47 +00:00
|
|
|
Error
|
2020-02-20 06:20:56 +00:00
|
|
|
tag int64
|
2017-08-23 02:05:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//唯一标志
|
2021-05-23 23:27:41 +00:00
|
|
|
func (this *ContextBase) GetTag() int64 {
|
2017-08-23 02:05:47 +00:00
|
|
|
|
|
|
|
if this.tag == int64(0) {
|
|
|
|
this.tag = time.Now().UnixNano()
|
|
|
|
}
|
|
|
|
return this.tag
|
|
|
|
}
|