mirror of https://github.com/bjdgyc/anylink.git
强转int8
This commit is contained in:
parent
a8d0a39ca0
commit
c68374f4f0
|
@ -129,6 +129,7 @@ func UserUpload(w http.ResponseWriter, r *http.Request) {
|
|||
io.Copy(newFile, file)
|
||||
if err = UploadUser(newFile.Name()); err != nil {
|
||||
RespError(w, RespInternalErr, err)
|
||||
os.Remove(base.Cfg.FilesPath + header.Filename)
|
||||
return
|
||||
}
|
||||
os.Remove(base.Cfg.FilesPath + header.Filename)
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/bjdgyc/anylink/dbdata"
|
||||
"github.com/bjdgyc/anylink/pkg/utils"
|
||||
"github.com/spf13/cast"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
|
@ -39,8 +40,7 @@ func UploadUser(file string) error {
|
|||
limittime, _ := time.Parse("2006-01-02 15:04:05", row[5])
|
||||
disableOtp, _ := strconv.ParseBool(row[7])
|
||||
group := []string{row[8]}
|
||||
s, _ := strconv.Atoi(row[9])
|
||||
status := int8(s)
|
||||
status := cast.ToInt8(row[9])
|
||||
sendmail, _ := strconv.ParseBool(row[10])
|
||||
// createdAt, _ := time.Parse("2006-01-02 03:04:05", row[11])
|
||||
// updatedAt, _ := time.Parse("2006-01-02 03:04:05", row[12])
|
||||
|
|
Loading…
Reference in New Issue