Exemple #1
0
 /**
  * 發送操作通知
  * 
  * @param array {\Woojin\UserBundle\Entity\AvenueClue}
  * @param array {\Woojin\UserBundle\Entity\User}
  * @param \Woojin\StoreBundle\Entity\Store
  */
 public function clue(array $clues, array $users, Store $store)
 {
     $mails = array();
     $yesterday = new \DateTime();
     foreach ($users as $user) {
         $mails[] = $user->getEmail();
     }
     $message = $this->genMessage($mails, $store->getName() . '操作記錄' . $yesterday->format('Y-m-d'), $this->templating->render('::Email/clue.html.twig', array('clues' => $clues)));
     $this->mailer->send($message);
     return $this;
 }
 public function findBsoProductsUserStoreOwn(Store $store)
 {
     $qb = $this->getEntityManager()->createQueryBuilder();
     $qb->select('gd')->from('WoojinGoodsBundle:GoodsPassport', 'gd')->where($qb->expr()->andX($qb->expr()->eq('SUBSTRING(gd.sn, 1, 1)', $qb->expr()->literal($store->getSn())), $qb->expr()->eq('gd.status', Avenue::GS_BSO_ONBOARD)))->groupBy('gd.id')->orderBy('gd.sn');
     return $qb->getQuery()->getResult();
 }