Update cron.go
This commit is contained in:
parent
be5be3c990
commit
a1ee6d3610
@ -258,6 +258,7 @@ func GetImportData(c *gin.Context) {
|
|||||||
service.Error(c, errors.New("用户查询失败"))
|
service.Error(c, errors.New("用户查询失败"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
fmt.Println(res.UserList)
|
||||||
subNameFindExcelData := make(map[string]excelData, len(readExcelResult))
|
subNameFindExcelData := make(map[string]excelData, len(readExcelResult))
|
||||||
for _, v := range subNameFindExcelData {
|
for _, v := range subNameFindExcelData {
|
||||||
subNameFindExcelData[v.SubName] = v
|
subNameFindExcelData[v.SubName] = v
|
||||||
@ -270,6 +271,7 @@ func GetImportData(c *gin.Context) {
|
|||||||
if data, exists := subNameFindExcelData[v.SubNum]; exists {
|
if data, exists := subNameFindExcelData[v.SubNum]; exists {
|
||||||
// 校验名称是否一致
|
// 校验名称是否一致
|
||||||
if data.Name != v.Name {
|
if data.Name != v.Name {
|
||||||
|
fmt.Println(data.Name, v.Name)
|
||||||
service.Error(c, errors.New(fmt.Sprintf("第 %d 行数据错误,请检查数据!", data.Line)))
|
service.Error(c, errors.New(fmt.Sprintf("第 %d 行数据错误,请检查数据!", data.Line)))
|
||||||
return // 直接返回,停止后续执行
|
return // 直接返回,停止后续执行
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user