You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/app/api/controller/Identity.php

46 lines
1.3 KiB

<?php
declare (strict_types=1);
namespace app\api\controller;
use app\common\enum\user\IdentityEnum;
use cores\exception\BaseException;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use think\response\Json;
class Identity extends Controller
{
/**
* @notes:会员身份价格列表
* @return Json
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException|BaseException
* @author: wanghousheng
*/
public function userPriceList(): Json
{
$client = $this->request->post('client');
$model = new \app\api\service\Identity();
$list = $model->center($client, ['type' => IdentityEnum::MEMBER]);
return $this->renderSuccess(compact('list'));
}
/**
* @notes:分销身份价格列表
* @return Json
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException|BaseException
* @author: wanghousheng
*/
public function dealerPriceList(): Json
{
$client = $this->request->post('client');
$model = new \app\api\service\Identity();
$list = $model->center($client, ['type' => IdentityEnum::MEMBER]);
return $this->renderSuccess(compact('list'));
}
}