dongqing7789 2016-07-14 20:07
浏览 59
已采纳

多个与多个关系在“FrontEnd \ devis.html.twig”第35行中不存在具有键“0,1”的数组的关键“文章”

I am working on a project and I am blocked in the association ManyToMany. I have an entity called Devis(in eng quotation) and an entity called articles. the problem is when I would like to display the articles of a specific quotation, it doesn't work.

here is the Devis Entity:

<?php

namespace DevisBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Devis
 *
 * @ORM\Table(name="devis")
 * @ORM\Entity(repositoryClass="DevisBundle\Repository\DevisRepository")
 */
class Devis {

    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    //les relations
    /**
     * @ORM\ManyToOne(targetEntity="UserBundle\Entity\User", inversedBy="devis_user", cascade={"persist"})
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     */
    private $user;

    /**
     * @ORM\ManyToOne(targetEntity="UserBundle\Entity\User", inversedBy="devis_enterprise")
     * @ORM\JoinColumn(name="enterprise_id", referencedColumnName="id")
     */
    private $enterprise;

    /**
     * @ORM\ManyToMany(targetEntity="ArticleBundle\Entity\Article", mappedBy="devis")
     */
    private $articles;


    public function __construct() {
        $this->articles = new \Doctrine\Common\Collections\ArrayCollection();
    }


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId() {
        return $this->id;
    }



    /**
     * Set user
     *
     * @param \UserBundle\Entity\User $user
     * @return Devis
     */
    public function setUser(\UserBundle\Entity\User $user = null) {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \UserBundle\Entity\User 
     */
    public function getUser() {
        return $this->user;
    }

    /**
     * Set enterprise
     *
     * @param \UserBundle\Entity\User $enterprise
     * @return Devis
     */
    public function setEnterprise(\UserBundle\Entity\User $enterprise = null) {
        $this->enterprise = $enterprise;

        return $this;
    }

    /**
     * Get enterprise
     *
     * @return \UserBundle\Entity\User 
     */
    public function getEnterprise() {
        return $this->enterprise;
    }

    /**
     * Add articles
     *
     * @param \ArticleBundle\Entity\Article $articles
     * @return Devis
     */
    public function addArticle(\ArticleBundle\Entity\Article $article) {
        $article->addDevi($this);
        $this->articles[] = $article;

        return $this;
    }

    /**
     * Remove articles
     *
     * @param \ArticleBundle\Entity\Article $articles
     */
    public function removeArticle(\ArticleBundle\Entity\Article $articles) {
        $this->articles->removeElement($articles);
    }

    /**
     * Get articles
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getArticles() {
        return $this->articles;
    }



}

Article Entity

<?php

namespace ArticleBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Article
 *
 * @ORM\Table(name="article")
 * @ORM\Entity(repositoryClass="ArticleBundle\Repository\ArticleRepository")
 */
class Article
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=255, nullable=true)
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="description", type="string", length=255, nullable=true)
     */
    private $description;

    /**
     * @var string
     *
     * @ORM\Column(name="prix", type="string", length=255, nullable=true)
     */
    private $prix;

    //les relations

    /**
     * @ORM\ManyToMany(targetEntity="DevisBundle\Entity\Devis", inversedBy="articles")
     * @ORM\JoinTable(name="articles_devis")
     */
    private $devis;


    /**
     * @ORM\ManyToOne(targetEntity="UserBundle\Entity\User", inversedBy="articles")
     * @ORM\JoinColumn(name="utilisateur_id", referencedColumnName="id")
     */
    private $entreprise;

    /**
     * @ORM\ManyToOne(targetEntity="CategoryBundle\Entity\Category", inversedBy="articles")
     * @ORM\JoinColumn(name="category_id", referencedColumnName="id")
     */
    private $category;


    public function __construct() {
        $this->devis = new \Doctrine\Common\Collections\ArrayCollection();
    }

    public function __toString() {
        return $this->name;
    }
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Article
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return Article
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set prix
     *
     * @param string $prix
     * @return Article
     */
    public function setPrix($prix)
    {
        $this->prix = $prix;

        return $this;
    }

    /**
     * Get prix
     *
     * @return string 
     */
    public function getPrix()
    {
        return $this->prix;
    }

    /**
     * Set entreprise
     *
     * @param \UserBundle\Entity\User $entreprise
     * @return Article
     */
    public function setEntreprise(\UserBundle\Entity\User $entreprise = null)
    {
        $this->entreprise = $entreprise;

        return $this;
    }

    /**
     * Get entreprise
     * 
     * @return \UserBundle\Entity\User 
     */
    public function getEntreprise()
    {
        return $this->entreprise;
    }

    /**
     * Set category
     *
     * @param \CategoryBundle\Entity\Category $category
     * @return Article
     */
    public function setCategory(\CategoryBundle\Entity\Category $category = null)
    {
        $this->category = $category;

        return $this;
    }

    /**
     * Get category
     *
     * @return \CategoryBundle\Entity\Category 
     */
    public function getCategory()
    {
        return $this->category;
    }



    /**
     * Add devis
     *
     * @param \DevisBundle\Entity\Devis $devis
     * @return Article
     */
    public function addDevi(\DevisBundle\Entity\Devis $devis)
    {
        $devis->addArticle($this);
        $this->devis[] = $devis;

        return $this;
    }

    /**
     * Remove devis
     *
     * @param \DevisBundle\Entity\Devis $devis
     */
    public function removeDevi(\DevisBundle\Entity\Devis $devis)
    {
        $this->devis->removeElement($devis);
    }

    /**
     * Get devis
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getDevis()
    {
        return $this->devis;
    }
}

Controller

<?php

namespace DevisBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\HttpFoundation\RedirectResponse;
use DevisBundle\Entity\Devis;
use UserBundle\Entity\User;
class DevisController extends Controller {
    /**
     * 
     * @Route("/devis/{user_id}", name="devis")
     * @Method("GET")
     */
    public function devisAction($user_id) {
        $em = $this->getDoctrine()->getManager();
        $entreprise = new User();
        $mes_devis = new Devis();
        $enterprises = new \Doctrine\Common\Collections\ArrayCollection();

        $user = $this->get('security.context')->getToken()->getUser();
        $mes_devis = $em->getRepository('DevisBundle:Devis')->devisByUser($user_id);

        $categories = $em->getRepository('CategoryBundle:Category')->findAll();

        return $this->render('::FrontEnd/devis.html.twig', array(
                    'user' => $user,
                    'categories' => $categories,
                    'mes_devis' => $mes_devis,
        ));
    }
}

The Devis.html.twig

<div class="cart_main">
        <h2>Mes devis ({{ mes_devis|length }})</h2>
        {% for devis in  mes_devis %}
            <div class="container">

                <div class="cart-items">
                    <h4>Entreprise : {{ devis.enterprise }}</h4>
                    <script>$(document).ready(function (c) {
                            $('.close1').on('click', function (c) {
                                $('.cart-header').fadeOut('slow', function (c) {
                                    $('.cart-header').remove();
                                });
                            });
                        });
                    </script>
                    {% for article in  mes_devis.articles %}
                        <div class="cart-header">
                            <div class="close1"> </div>
                            <div class="cart-sec">
                                <div class="cart-item cyc">
                                    <img src="{{ asset ('bundles/theme_front_end/images/ts4.jpg') }}"/>
                                </div>
                                <div class="cart-item-info">
                                    <h3>Mast & Harbour<span>Model No: 3578</span></h3>
                                    <h4><span>Rs. $ </span>150.00</h4>
                                    <p class="qty">Qty ::</p>
                                    <input min="1" type="number" id="quantity" name="quantity" value="1" class="form-control input-small">
                                </div>
                                <div class="clearfix"></div>
                                <div class="delivery">
                                    <p>Service Charges:: Rs.50.00</p>                            
                                </div>                      
                            </div>
                        </div>
                        <script>$(document).ready(function (c) {
                                $('.close2').on('click', function (c) {
                                    $('.cart-header2').fadeOut('slow', function (c) {
                                        $('.cart-header2').remove();
                                    });
                                });
                            });
                        </script>
                    {% endfor %}    
                </div>

                <div class="cart-total">
                    <a class="continue" href="#">Continue to basket</a>
                    <div class="price-details">
                        <h3>Price Details</h3>
                        <span>Total</span>
                        <span class="total">350.00</span>
                        <span>Discount</span>
                        <span class="total">---</span>
                        <span>Delivery Charges</span>
                        <span class="total">100.00</span>
                        <div class="clearfix"></div>                 
                    </div>  
                    <h4 class="last-price">TOTAL</h4>
                    <span class="total final">450.00</span>
                    <div class="clearfix"></div>
                    <a class="order" href="#">Place Order</a>
                    <div class="total-item">
                        <h3>OPTIONS</h3>
                        <h4>COUPONS</h4>
                        <a class="cpns" href="#">Apply Coupons</a>
                        <p><a href="#">Log In</a> to use accounts - linked coupons</p>
                    </div>
                </div>

            </div>
            <div class="clearfix"></div>
        {% endfor %}
    </div>

and the errors is:

Key "articles" for array with keys "0, 1" does not exist in ::FrontEnd\devis.html.twig at line 35 

when I do var_dump($mes_devis) I got

array (size=2)
  0 => 
    object(DevisBundle\Entity\Devis)[1024]
      private 'id' => int 7
      private 'isConfirmed' => boolean false
      private 'articleadded' => null
      private 'user' => 
        object(UserBundle\Entity\User)[856]
          protected 'id' => int 5
          private 'nom' => string 'kamel' (length=5)
          private 'prenom' => string 'bouslama' (length=8)
          private 'date_naissance' => string '14/10/1992' (length=10)
          private 'sexe' => string 'Homme' (length=5)
          private 'mobile' => string '50966301' (length=8)
          private 'ville' => string 'monastir' (length=8)
          private 'site_web' => string 'www.rochdi.com' (length=14)
          private 'logo_entreprise' => null
          private 'raison_social_entreprise' => null
          private 'denomination_entreprise' => null
          private 'slogan_entreprise' => null
          private 'presentation_entreprise' => null
          private 'code_postal_entreprise' => null
          private 'longitude_entreprise' => null
          private 'laltitude_entreprise' => null
          private 'registre_commerce_entreprise' => null
          private 'date_creation_entreprise' => null
          private 'effectif_entreprise' => null
          private 'capital_social_entreprise' => null
          private 'fax_entreprise' => null
          private 'pack_commercial_entreprise' => null
          private 'nom_entreprise' => null
          private 'adresse' => string 'Adresse' (length=7)
          private 'articles' => 
            object(Doctrine\ORM\PersistentCollection)[881]
              ...
          private 'devis_user' => 
            object(Doctrine\ORM\PersistentCollection)[904]
              ...
          private 'devis_enterprise' => 
            object(Doctrine\ORM\PersistentCollection)[906]
              ...
          protected 'username' => string 'kamel' (length=5)
          protected 'usernameCanonical' => string 'kamel' (length=5)
          protected 'email' => string 'kamel@gmail.com' (length=15)
          protected 'emailCanonical' => string 'kamel@gmail.com' (length=15)
          protected 'enabled' => boolean true
          protected 'salt' => string 'koikc9294lws8wgwgo8ss4owg84swg8' (length=31)
          protected 'password' => string '$2y$13$koikc9294lws8wgwgo8ssu.9zbRplUObbvJEIyuVZvbE9VnateEOi' (length=60)
          protected 'plainPassword' => null
          protected 'lastLogin' => 
            object(DateTime)[854]
              ...
          protected 'confirmationToken' => null
          protected 'passwordRequestedAt' => null
          protected 'groups' => null
          protected 'locked' => boolean false
          protected 'expired' => boolean false
          protected 'expiresAt' => null
          protected 'roles' => 
            array (size=1)
              ...
          protected 'credentialsExpired' => boolean false
          protected 'credentialsExpireAt' => null
      private 'enterprise' => 
        object(Proxies\__CG__\UserBundle\Entity\User)[1122]
          public '__initializer__' => 
            object(Closure)[1023]
              ...
          public '__cloner__' => 
            object(Closure)[1022]
              ...
          public '__isInitialized__' => boolean false
          protected 'id' => string '6' (length=1)
          private 'nom' (UserBundle\Entity\User) => null
          private 'prenom' (UserBundle\Entity\User) => null
          private 'date_naissance' (UserBundle\Entity\User) => null
          private 'sexe' (UserBundle\Entity\User) => null
          private 'mobile' (UserBundle\Entity\User) => null
          private 'ville' (UserBundle\Entity\User) => null
          private 'site_web' (UserBundle\Entity\User) => null
          private 'logo_entreprise' (UserBundle\Entity\User) => null
          private 'raison_social_entreprise' (UserBundle\Entity\User) => null
          private 'denomination_entreprise' (UserBundle\Entity\User) => null
          private 'slogan_entreprise' (UserBundle\Entity\User) => null
          private 'presentation_entreprise' (UserBundle\Entity\User) => null
          private 'code_postal_entreprise' (UserBundle\Entity\User) => null
          private 'longitude_entreprise' (UserBundle\Entity\User) => null
          private 'laltitude_entreprise' (UserBundle\Entity\User) => null
          private 'registre_commerce_entreprise' (UserBundle\Entity\User) => null
          private 'date_creation_entreprise' (UserBundle\Entity\User) => null
          private 'effectif_entreprise' (UserBundle\Entity\User) => null
          private 'capital_social_entreprise' (UserBundle\Entity\User) => null
          private 'fax_entreprise' (UserBundle\Entity\User) => null
          private 'pack_commercial_entreprise' (UserBundle\Entity\User) => null
          private 'nom_entreprise' (UserBundle\Entity\User) => null
          private 'adresse' (UserBundle\Entity\User) => null
          private 'articles' (UserBundle\Entity\User) => null
          private 'devis_user' (UserBundle\Entity\User) => null
          private 'devis_enterprise' (UserBundle\Entity\User) => null
          protected 'username' => null
          protected 'usernameCanonical' => null
          protected 'email' => null
          protected 'emailCanonical' => null
          protected 'enabled' => null
          protected 'salt' => null
          protected 'password' => null
          protected 'plainPassword' => null
          protected 'lastLogin' => null
          protected 'confirmationToken' => null
          protected 'passwordRequestedAt' => null
          protected 'groups' => null
          protected 'locked' => null
          protected 'expired' => null
          protected 'expiresAt' => null
          protected 'roles' => null
          protected 'credentialsExpired' => null
          protected 'credentialsExpireAt' => null
      private 'articles' => 
        object(Doctrine\ORM\PersistentCollection)[1121]
          private 'snapshot' => 
            array (size=0)
              ...
          private 'owner' => 
            &object(DevisBundle\Entity\Devis)[1024]
          private 'association' => 
            array (size=16)
              ...
          private 'em' => 
            object(Doctrine\ORM\EntityManager)[686]
              ...
          private 'backRefFieldName' => string 'devis' (length=5)
          private 'typeClass' => 
            object(Doctrine\ORM\Mapping\ClassMetadata)[857]
              ...
          private 'isDirty' => boolean false
          private 'initialized' => boolean false
          private 'coll' => 
            object(Doctrine\Common\Collections\ArrayCollection)[1120]
              ...
  1 => 
    object(DevisBundle\Entity\Devis)[1119]
      private 'id' => int 8
      private 'isConfirmed' => boolean false
      private 'articleadded' => null
      private 'user' => 
        object(UserBundle\Entity\User)[856]
          protected 'id' => int 5
          private 'nom' => string 'kamel' (length=5)
          private 'prenom' => string 'bouslama' (length=8)
          private 'date_naissance' => string '14/10/1992' (length=10)
          private 'sexe' => string 'Homme' (length=5)
          private 'mobile' => string '50966301' (length=8)
          private 'ville' => string 'monastir' (length=8)
          private 'site_web' => string 'www.rochdi.com' (length=14)
          private 'logo_entreprise' => null
          private 'raison_social_entreprise' => null
          private 'denomination_entreprise' => null
          private 'slogan_entreprise' => null
          private 'presentation_entreprise' => null
          private 'code_postal_entreprise' => null
          private 'longitude_entreprise' => null
          private 'laltitude_entreprise' => null
          private 'registre_commerce_entreprise' => null
          private 'date_creation_entreprise' => null
          private 'effectif_entreprise' => null
          private 'capital_social_entreprise' => null
          private 'fax_entreprise' => null
          private 'pack_commercial_entreprise' => null
          private 'nom_entreprise' => null
          private 'adresse' => string 'Adresse' (length=7)
          private 'articles' => 
            object(Doctrine\ORM\PersistentCollection)[881]
              ...
          private 'devis_user' => 
            object(Doctrine\ORM\PersistentCollection)[904]
              ...
          private 'devis_enterprise' => 
            object(Doctrine\ORM\PersistentCollection)[906]
              ...
          protected 'username' => string 'kamel' (length=5)
          protected 'usernameCanonical' => string 'kamel' (length=5)
          protected 'email' => string 'kamel@gmail.com' (length=15)
          protected 'emailCanonical' => string 'kamel@gmail.com' (length=15)
          protected 'enabled' => boolean true
          protected 'salt' => string 'koikc9294lws8wgwgo8ss4owg84swg8' (length=31)
          protected 'password' => string '$2y$13$koikc9294lws8wgwgo8ssu.9zbRplUObbvJEIyuVZvbE9VnateEOi' (length=60)
          protected 'plainPassword' => null
          protected 'lastLogin' => 
            object(DateTime)[854]
              ...
          protected 'confirmationToken' => null
          protected 'passwordRequestedAt' => null
          protected 'groups' => null
          protected 'locked' => boolean false
          protected 'expired' => boolean false
          protected 'expiresAt' => null
          protected 'roles' => 
            array (size=1)
              ...
          protected 'credentialsExpired' => boolean false
          protected 'credentialsExpireAt' => null
      private 'enterprise' => 
        object(Proxies\__CG__\UserBundle\Entity\User)[1118]
          public '__initializer__' => 
            object(Closure)[1023]
              ...
          public '__cloner__' => 
            object(Closure)[1022]
              ...
          public '__isInitialized__' => boolean false
          protected 'id' => string '8' (length=1)
          private 'nom' (UserBundle\Entity\User) => null
          private 'prenom' (UserBundle\Entity\User) => null
          private 'date_naissance' (UserBundle\Entity\User) => null
          private 'sexe' (UserBundle\Entity\User) => null
          private 'mobile' (UserBundle\Entity\User) => null
          private 'ville' (UserBundle\Entity\User) => null
          private 'site_web' (UserBundle\Entity\User) => null
          private 'logo_entreprise' (UserBundle\Entity\User) => null
          private 'raison_social_entreprise' (UserBundle\Entity\User) => null
          private 'denomination_entreprise' (UserBundle\Entity\User) => null
          private 'slogan_entreprise' (UserBundle\Entity\User) => null
          private 'presentation_entreprise' (UserBundle\Entity\User) => null
          private 'code_postal_entreprise' (UserBundle\Entity\User) => null
          private 'longitude_entreprise' (UserBundle\Entity\User) => null
          private 'laltitude_entreprise' (UserBundle\Entity\User) => null
          private 'registre_commerce_entreprise' (UserBundle\Entity\User) => null
          private 'date_creation_entreprise' (UserBundle\Entity\User) => null
          private 'effectif_entreprise' (UserBundle\Entity\User) => null
          private 'capital_social_entreprise' (UserBundle\Entity\User) => null
          private 'fax_entreprise' (UserBundle\Entity\User) => null
          private 'pack_commercial_entreprise' (UserBundle\Entity\User) => null
          private 'nom_entreprise' (UserBundle\Entity\User) => null
          private 'adresse' (UserBundle\Entity\User) => null
          private 'articles' (UserBundle\Entity\User) => null
          private 'devis_user' (UserBundle\Entity\User) => null
          private 'devis_enterprise' (UserBundle\Entity\User) => null
          protected 'username' => null
          protected 'usernameCanonical' => null
          protected 'email' => null
          protected 'emailCanonical' => null
          protected 'enabled' => null
          protected 'salt' => null
          protected 'password' => null
          protected 'plainPassword' => null
          protected 'lastLogin' => null
          protected 'confirmationToken' => null
          protected 'passwordRequestedAt' => null
          protected 'groups' => null
          protected 'locked' => null
          protected 'expired' => null
          protected 'expiresAt' => null
          protected 'roles' => null
          protected 'credentialsExpired' => null
          protected 'credentialsExpireAt' => null
      private 'articles' => 
        object(Doctrine\ORM\PersistentCollection)[1117]
          private 'snapshot' => 
            array (size=0)
              ...
          private 'owner' => 
            &object(DevisBundle\Entity\Devis)[1119]
          private 'association' => 
            array (size=16)
              ...
          private 'em' => 
            object(Doctrine\ORM\EntityManager)[686]
              ...
          private 'backRefFieldName' => string 'devis' (length=5)
          private 'typeClass' => 
            object(Doctrine\ORM\Mapping\ClassMetadata)[857]
              ...
          private 'isDirty' => boolean false
          private 'initialized' => boolean false
          private 'coll' => 
            object(Doctrine\Common\Collections\ArrayCollection)[1116]
              ...
  • 写回答

1条回答 默认 最新

  • dqed19166 2016-07-14 21:20
    关注

    You have made a mistake in your second loop, it's not mes_devis.articles but devis.articles :

    {% for article in  devis.articles %}
        <div class="cart-header">
            <div class="close1"> </div>
            <div class="cart-sec">
                <div class="cart-item cyc">
                    <img src="{{ asset ('bundles/theme_front_end/images/ts4.jpg') }}"/>
                </div>
                <div class="cart-item-info">
                    <h3>Mast & Harbour<span>Model No: 3578</span></h3>
                    <h4><span>Rs. $ </span>150.00</h4>
                    <p class="qty">Qty ::</p>
                    <input min="1" type="number" id="quantity" name="quantity" value="1" class="form-control input-small">
                </div>
                <div class="clearfix"></div>
                <div class="delivery">
                    <p>Service Charges:: Rs.50.00</p>                            
                </div>                      
            </div>
        </div>
        <script>$(document).ready(function (c) {
            $('.close2').on('click', function (c) {
                $('.cart-header2').fadeOut('slow', function (c) {
                    $('.cart-header2').remove();
                });
            });
        });
        </script>
    {% endfor %}    
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 stm32f407使用DMA问题
  • ¥15 您好 这个API接口该怎么弄 网站搭建好了 API也有 现在就不知道该怎么填写API 不知道怎么用
  • ¥88 用uniapp写一个多端的程序,用到高德地图,用高德的JSAPI吗?
  • ¥20 关于#c++#的问题:水果店管理系统
  • ¥30 dbLinq最新版linq sqlite
  • ¥20 对D盘进行分盘之前没有将visual studio2022卸载掉,现在该如何下载回来
  • ¥15 完成虚拟机环境配置,还有安装kettle
  • ¥15 2024年全国大学生数据分析大赛A题:直播带货与电商产品的大数据分析 问题5. 请设计一份优惠券的投放策略,需要考虑优惠券的数量、优惠券的金额、投放时间段和投放商品种类等因素。求具体的python代码
  • ¥15 有人会搭建生鲜配送自营+平台的管理系统吗
  • ¥15 用matlab写代码