123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- /**
- * 前台分销商设置Controller
- * Created by PhpStorm.
- * User: haoren
- * Date: 2020/07/22
- * Time: 15:00
- */
- namespace JinDouYun\Controller\Commission;
- use Exception;
- use Mall\Framework\Core\ErrorCode;
- use Mall\Framework\Core\StatusCode;
- use JinDouYun\Controller\BaseController;
- use JinDouYun\Model\Commission\MCommissionSetting;
- class ApiCommissionSetting extends BaseController
- {
- private $objMCommissionSetting;
- public function __construct($isCheckAcl = false, $isMustLogin = true, $checkToken=true)
- {
- parent::__construct($isCheckAcl, $isMustLogin, $checkToken);
- $this->objMCommissionSetting = new MCommissionSetting($this->onlineEnterpriseId, $this->onlineUserId);
- }
- /**
- * 查询设置
- * @throws Exception
- */
- public function getSetting()
- {
- $modelResult = $this->objMCommissionSetting->getSetting(true, true);
- if(!$modelResult->isSuccess()){
- parent::sendOutput($modelResult->getData(), $modelResult->getErrorCode());
- }
- parent::sendOutput($modelResult->getData());
- }
- /**
- * 查询商品
- * @throws Exception
- */
- public function getBuyGoods()
- {
- $modelResult = $this->objMCommissionSetting->getBuyGoods();
- if(!$modelResult->isSuccess()){
- parent::sendOutput($modelResult->getData(), $modelResult->getErrorCode());
- }
- parent::sendOutput($modelResult->getData());
- }
- /**
- * 查询文字设置
- */
- public function getTxtSetting()
- {
- $modelResult = $this->objMCommissionSetting->getTxtSetting();
- if(!$modelResult->isSuccess()){
- parent::sendOutput($modelResult->getData(), $modelResult->getErrorCode());
- }
- parent::sendOutput($modelResult->getData());
- }
- }
|