/**
  * @param $id MongoId
  * @param $remark array
  */
 public static function addRemark($id, $remark)
 {
     $record = LuckyDrawRecord::findOne($id);
     if (!empty($record)) {
         $record->remark = array_merge($record->remark, $remark);
         $record->save();
     }
     unset($record);
 }
Example #2
0
 public function actionGetSendSmsInfo($id)
 {
     if (empty($id)) {
         throw new BadRequestHttpException('param is missing.(LuckyDrawRecordId)');
     }
     $drawRecord = LuckyDrawRecord::findByPk(new \MongoId($id));
     $smsRecord = BulkSmsRecord::updateSmsRecordById($drawRecord->remark['smsRecordId']);
     Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
     return ['total' => $smsRecord->total, 'successful' => $smsRecord->successful, 'failed' => $smsRecord->failed, 'process' => $smsRecord->process, 'smsTemplate' => $smsRecord->smsTemplate];
 }