PSMList 0.4.0 PSM-040-036
| Ordre affichage : | 34 | Création : | 16/06/2023 15h54 |
| Index BL : | 36 | Modification : | - |
| BL : | PSM-040-036 | ||
| Source : | Aucune | Soeurs : | - |
| Fin dev : | D (Done) | Ticket : | - |
| Contrôle dev effectué : | Fiche : | - | |
| C.Qualif. : | #000000 | ||
| Activé : | Icône FA : | Par défaut | |
| Contact : | ARS - Arshellan | Qualification : | Optimisation |
| Répartition : | - | Module : | Custom |
| Dev : | ARS - Arshellan | Sous module : | - |
| Provenance : | 0.4.0 New | Constat : | - |
| Début : | S.24 | Charge j. : | - |
| Fin : | S.24 | Délai j. : | - |
| Priorité : | - | Pokercard : | - |
| Estimatif j. : | - | ||
| Description : | Add the ship, crew, and treasure count into the db so the calculations are done far less often | ||
| Texte Commit : | - | ||
| Description client : | Changed the way the number of ships, crew, and treasure inside of an expansion is calculated. it may result in slightly faster loading times on some pages. | ||
| Fascicule : | Ne pas communiquer : | ||
| Alerte Mailing : |
| Statut PreP : | OK - Validé | Testeur : | ARS - Arshellan |
entity/extension<br/><br/><br/> <br/> <br/> public function getShipcount() {<br/> return $this->shipcount;<br/> }<br/> public function setShipcount($shipcount): self {<br/> $this->shipcount = $shipcount;<br/> return $this;<br/> }<br/> <br/> <br/> public function getCrewcount() {<br/> return $this->crewcount;<br/> }<br/> public function setCrewcount($crewcount): self {<br/> $this->crewcount = $crewcount;<br/> return $this;<br/> }<br/> <br/> <br/> public function getTreasurecount() {<br/> return $this->treasurecount;<br/> }<br/> public function setTreasurecount($treasurecount): self {<br/> $this->treasurecount = $treasurecount;<br/> return $this;<br/> }
/**<br/> * @ORM\Column(type="integer", nullable=true)<br/> */<br/> private $shipcount;<br/><br/> /**<br/> * @ORM\Column(type="integer", nullable=true)<br/> */<br/> private $crewcount;<br/><br/> /**<br/> * @ORM\Column(type="integer", nullable=true)<br/> */<br/> private $treasurecount;
public function updateCountValues(string $slugname): void<br/> {<br/> $entityManager = $this->getEntityManager();<br/><br/> $qb = $entityManager->createQueryBuilder();<br/> $qb->update('Extension', 'e')<br/> ->set('e.shipCount', $qb->expr()->count('s'))<br/> ->set('e.crewCount', $qb->expr()->count('c'))<br/> ->set('e.treasureCount', $qb->expr()->count('t'))<br/> ->leftJoin('e.ships', 's')<br/> ->leftJoin('e.crews', 'c')<br/> ->leftJoin('e.treasures', 't')<br/> ->where('e.slugname = :slugname')<br/> ->setParameter('slugname', $slugname);<br/><br/> $qb->getQuery()->execute();<br/> }