|
@@ -5,6 +5,7 @@ import (
|
|
"fmt"
|
|
"fmt"
|
|
"hongze/hongze_task/models"
|
|
"hongze/hongze_task/models"
|
|
"hongze/hongze_task/utils"
|
|
"hongze/hongze_task/utils"
|
|
|
|
+ "strings"
|
|
"time"
|
|
"time"
|
|
)
|
|
)
|
|
|
|
|
|
@@ -28,7 +29,7 @@ func ETATrialDisabled(cont context.Context) (err error) {
|
|
disableMobiles := make([]string, 0)
|
|
disableMobiles := make([]string, 0)
|
|
for _, v := range items {
|
|
for _, v := range items {
|
|
disableIds = append(disableIds, v.EtaTrialId)
|
|
disableIds = append(disableIds, v.EtaTrialId)
|
|
- disableMobiles = append(disableMobiles, "`" + v.Mobile + "`")
|
|
|
|
|
|
+ disableMobiles = append(disableMobiles, "'" + v.Mobile + "'")
|
|
}
|
|
}
|
|
|
|
|
|
if len(disableIds) > 0 {
|
|
if len(disableIds) > 0 {
|
|
@@ -36,7 +37,10 @@ func ETATrialDisabled(cont context.Context) (err error) {
|
|
if err != nil {
|
|
if err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
- err = models.UpdateETATrialAdminDisable(disableMobiles)
|
|
|
|
|
|
+ }
|
|
|
|
+ if len(disableMobiles) > 0 {
|
|
|
|
+ mobiles := strings.Join(disableMobiles, ",")
|
|
|
|
+ err = models.UpdateETATrialAdminDisable(mobiles)
|
|
if err != nil {
|
|
if err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|