导入数据脚本-1
This commit is contained in:
parent
c20e90d45a
commit
3c964140f3
@ -188,9 +188,9 @@ func NewRouter() *gin.Engine {
|
||||
{
|
||||
importRoute := v1.Group("/import")
|
||||
importRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
v1.POST("data/bind", imports.ImportBind)
|
||||
v1.POST("data/publish", imports.ImportPublish)
|
||||
v1.POST("data/confirm", imports.WorkConfirm)
|
||||
importRoute.POST("data/bind", imports.ImportBind)
|
||||
importRoute.POST("data/publish", imports.ImportPublish)
|
||||
importRoute.POST("data/confirm", imports.WorkConfirm)
|
||||
}
|
||||
//静态文件
|
||||
r.StaticFS("/api/static", http.Dir("./runtime"))
|
||||
|
@ -168,16 +168,16 @@ func readArtistAccountInfo(excelPath string) ([]ArtistAccount, error) {
|
||||
log.Println("start read excel...")
|
||||
var artists []ArtistAccount
|
||||
for i, row := range rows {
|
||||
tmp := ArtistAccount{
|
||||
Account: make(map[apiCast.PlatformIDENUM]string),
|
||||
Name: strings.TrimSpace(row[1]),
|
||||
}
|
||||
if i == 0 || len(row) < 2 {
|
||||
continue
|
||||
}
|
||||
if i == 58 {
|
||||
break
|
||||
}
|
||||
tmp := ArtistAccount{
|
||||
Account: make(map[apiCast.PlatformIDENUM]string),
|
||||
Name: strings.TrimSpace(row[1]),
|
||||
}
|
||||
youtube, _ := f.GetCellValue(sheetName, fmt.Sprintf("C%d", i+1))
|
||||
if youtube != "" {
|
||||
tmp.Account[2] = strings.TrimSpace(youtube)
|
||||
|
Loading…
Reference in New Issue
Block a user