public function cancel($spid) { $dm = new App_Shop_Promo_Dm(); $dm->setIsActive(0); //mark as not active $this->_getPromoDs()->UpdateShopPromo($spid, $dm); }
public function UpdateShopPromo($spid, App_Shop_Promo_Dm $dm) { return $this->_loadShopPromoDao()->update($spid, $dm->getData()); }
private function addShopPromotion($shopId, $promoTemplateId, $isActive = 1) { $spdm = new App_Shop_Promo_Dm(); $spdm->setShopId($shopId)->setTemplateId($promoTemplateId)->setIsActive($isActive)->setCreateDate(Pw::getTime())->setLastUpdateTime(Pw::getTime()); return $this->_getPromoDs()->insertShopPromo($spdm); }
private function updateShopPromotion($spid, $description = '') { $spdm = new App_Shop_Promo_Dm(); $spdm->setDescription($description)->setLastUpdateTime(Pw::getTime()); return $this->_getPromoDs()->UpdateShopPromo($spid, $spdm); }