mirror of
				https://github.com/bjdgyc/anylink.git
				synced 2025-11-04 11:06:22 +08:00 
			
		
		
		
	强转int8
This commit is contained in:
		@@ -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])
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user