You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
602 B
29 lines
602 B
package service |
|
|
|
import ( |
|
"go-common/app/job/main/passport-game-data/model" |
|
"go-common/library/log" |
|
) |
|
|
|
const ( |
|
_statusOK = 0 |
|
_statusPending = 1 |
|
_statusNo = 2 |
|
) |
|
|
|
func doCompare(cloud *model.AsoAccount, local *model.OriginAsoAccount, pending bool) int { |
|
if cloud == nil || local == nil { |
|
log.Info("either cloud or local aso account is nil, cloud %+v, local: %+v", cloud, local) |
|
return _statusNo |
|
} |
|
if cloud.Mtime.After(local.Mtime) { |
|
if model.Default(local).Equals(cloud) { |
|
return _statusOK |
|
} |
|
return _statusNo |
|
} |
|
if pending { |
|
return _statusPending |
|
} |
|
return _statusNo |
|
}
|
|
|