|
@@ -90,12 +90,12 @@ func (this *EtaBusinessUserController) List() {
|
|
|
pars = append(pars, etaBusinessId)
|
|
|
}
|
|
|
|
|
|
- if positionStatus > 0 {
|
|
|
+ if positionStatus >= 0 {
|
|
|
condition += ` AND position_status = ? `
|
|
|
pars = append(pars, positionStatus)
|
|
|
}
|
|
|
|
|
|
- if enabled > 0 { // 0-禁用 1-启用
|
|
|
+ if enabled >= 0 { // 0-禁用 1-启用
|
|
|
condition += ` AND enabled = ? `
|
|
|
pars = append(pars, enabled)
|
|
|
}
|
|
@@ -574,12 +574,12 @@ func (this *EtaBusinessUserController) ImportList() {
|
|
|
br.ErrMsg = "打开文件失败,Err:" + err.Error() + ";path:" + path
|
|
|
return
|
|
|
}
|
|
|
- existUser := make([]*models.User, 0)
|
|
|
- addUser := make([]*models.User, 0)
|
|
|
+ existUser := make([]*models.BusinessUser, 0)
|
|
|
+ addUser := make([]*models.BusinessUser, 0)
|
|
|
//excel中已经存在的数据,用来判断excel中是否存在相同手机号/邮箱,避免重复提交
|
|
|
excelData := make(map[string]string)
|
|
|
//重复数据
|
|
|
- repeatUser := make([]*models.User, 0)
|
|
|
+ repeatUser := make([]*models.BusinessUser, 0)
|
|
|
|
|
|
// 遍历sheet页读取
|
|
|
for _, sheet := range xlFile.Sheets {
|
|
@@ -705,7 +705,7 @@ func (this *EtaBusinessUserController) ImportList() {
|
|
|
continue
|
|
|
}
|
|
|
|
|
|
- item := new(models.User)
|
|
|
+ item := new(models.BusinessUser)
|
|
|
item.CountryCode = countryCode
|
|
|
item.RealName = userName
|
|
|
if positionStatus == "在职" {
|
|
@@ -731,6 +731,7 @@ func (this *EtaBusinessUserController) ImportList() {
|
|
|
continue
|
|
|
}
|
|
|
item.BusinessCode = businessInfo.BusinessCode
|
|
|
+ item.BusinessName = businessInfo.BusinessName
|
|
|
}
|
|
|
if item.BusinessCode == "" && businessName != "" {
|
|
|
businessObj := new(eta_business.EtaBusiness)
|