- mtps cancel_reason_id is not mandatory,
- fix check mandatory bug.
This commit is contained in:
@@ -116,10 +116,10 @@ func Bool2String(value bool) string {
|
||||
return "false"
|
||||
}
|
||||
|
||||
func Str2Int(str string) int {
|
||||
retVal, err := strconv.Atoi(str)
|
||||
func Str2Int64WithDefault(str string, defValue int64) int64 {
|
||||
retVal, err := strconv.ParseInt(str, 10, 64)
|
||||
if err != nil {
|
||||
baseapi.SugarLogger.Errorf("error when convert %s to int", str)
|
||||
return defValue
|
||||
}
|
||||
return retVal
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user