<?php

class FootprintController extends \Our\Controller_AbstractApi {

    private $FootprintService;
    public function init(){
        parent::init();
        $this->FootprintService = \Business\User\FootprintServiceModel::getInstance();
    }
    /**
     *
     */
    public function getFootprintsAction(){
        $info = $this->FootprintService->getFootprints($this->req[\Our\NameConst::data],$this->memberId);
        $this->success($info);
    }

    public function addBrowseRecordAction(){
        //require APPLICATION_PATH.'/scripts/crontab/user/addBrowse.php';
        \Business\Goods\GoodsCommonServiceModel::getInstance()->addBrowseRecord($this->req[\Our\NameConst::data],$this->memberId);
        $this->success('');
    }

    public function getDateAction(){
        $info = $this->FootprintService->getDate($this->req[\Our\NameConst::data],$this->memberId);
        $this->success($info);
    }

    public function delFootPrintAction(){
        $return = $this->FootprintService->delFootPrint($this->req[\Our\NameConst::data],$this->memberId);
        $this->success('',\Our\DescribeConst::delFootprintSuccess);
    }
}