public function actionDelete($id)
 {
     $ids = [];
     $ids[] = new MongoId($id);
     $membershipDiscount = MembershipDiscount::findByPk($ids);
     if (empty($membershipDiscount)) {
         throw new BadRequestHttpException(Yii::t('product', 'membershipDiscount_is_deleted'));
     }
     $isDeMembershipDiscount = MembershipDiscount::deleteAll(['_id' => $ids]);
     if (!$isDeMembershipDiscount) {
         throw new ServerErrorHttpException(Yii::t('content', 'delete_fail'));
     }
     // Update the relate of couponLog collection.
     $field = ['status' => MembershipDiscount::DELETED, 'operationTime' => new \MongoDate()];
     $where = ['_id' => $membershipDiscount->couponLogId];
     CouponLog::updateAll($field, $where);
 }