public function actionSendSmsByTemplate()
 {
     $smsTag = $this->getQuery('smsTag');
     $operator = $this->getUser()->email;
     $condition = ['isDeleted' => false];
     if (empty($smsTag)) {
         throw new BadRequestHttpException('param is missing.(smsTag)');
     }
     if ($smsTag == 'sms_three') {
         $condition = array_merge($condition, ['score' => ['$gt' => 0]]);
     }
     $result = EarlybirdSmsUtil::createSmsJob($condition, $operator, $smsTag);
     Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
     return $result;
 }
 public function actionSendDrawSms()
 {
     $operator = $this->getUser()->email;
     $params = $this->getParams();
     if (empty($params) || count($params) < 8) {
         throw new BadRequestHttpException('params are missing');
     }
     $condition = $params;
     $result = EarlybirdSmsUtil::createSmsJob($condition, $operator, 'sms_four');
     Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
     return $result;
 }