parent
d3b8758b67
commit
d03036b43e
|
|
@ -291,6 +291,9 @@ class StoreOrderDao extends BaseDao
|
|||
->when(isset($where['uid']) && $where['uid'] !== '', function ($query) use ($where) {
|
||||
$query->where('uid', $where['uid']);
|
||||
})
|
||||
->when($where['activity_type'] == 20, function ($query) use ($where) {
|
||||
$query->where('mer_id', $where['mer_id'] ?? 0);
|
||||
})
|
||||
->when(isset($where['is_user']) && $where['is_user'] !== '', function ($query) use ($where) {
|
||||
$query->where(function($query) {
|
||||
$query->where('order_type',0)->whereOr(function($query){
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ use app\common\repositories\store\product\ProductPresellSkuRepository;
|
|||
use app\common\repositories\store\product\ProductRepository;
|
||||
use app\common\repositories\store\product\StoreDiscountRepository;
|
||||
use app\common\repositories\system\merchant\MerchantRepository;
|
||||
use app\common\repositories\user\IntegralRepository;
|
||||
use app\common\repositories\user\UserAddressRepository;
|
||||
use app\common\repositories\user\UserBillRepository;
|
||||
use app\common\repositories\user\UserMerchantRepository;
|
||||
|
|
@ -24,7 +25,7 @@ class PointsOrderCreateRepository
|
|||
$key = md5(json_encode(compact('cartId', 'useIntegral', 'addressId'))) . $user->uid;
|
||||
$address = $this->validateAddress($user,$addressId);
|
||||
[$merchantCartList,$order_model,$order_extend,$order_type] = $this->validateCartList($cartId,$user,$address);
|
||||
$successData = $this->validateMerchantList($merchantCartList);
|
||||
$successData = $this->validateMerchantList($user,$merchantCartList);
|
||||
return $successData + [
|
||||
'key' => $key,
|
||||
'order_type' => $order_type,
|
||||
|
|
@ -103,7 +104,7 @@ class PointsOrderCreateRepository
|
|||
* @author Qinii
|
||||
* @day 2023/4/20
|
||||
*/
|
||||
public function validateMerchantList($merchantCartList)
|
||||
public function validateMerchantList($user,$merchantCartList)
|
||||
{
|
||||
$deliveryStatus = true;
|
||||
$order_total_num = 0;
|
||||
|
|
@ -145,6 +146,10 @@ class PointsOrderCreateRepository
|
|||
$cart['extension_two'] = 0;
|
||||
$cart['cost'] = $total_cost;
|
||||
}
|
||||
// 判断:当前商户积分是否充足
|
||||
$holdMerIntegral = app()->make(IntegralRepository::class)->getMerIntegral((int)$user->uid,(int)$merchantCart['mer_id']);// 用户持有的该商户积分总数
|
||||
if($holdMerIntegral < $total_integral) throw new ValidateException("积分不足,剩余{$holdMerIntegral}商户积分");
|
||||
|
||||
unset($cart);
|
||||
if (count($merchantCartList) > 1 || count($merchantCart['list']) > 1) {
|
||||
$orderDeliveryStatus = $orderDeliveryStatus && $deliveryStatus;
|
||||
|
|
@ -328,27 +333,30 @@ class PointsOrderCreateRepository
|
|||
$storeCartRepository->updates($cartId, ['is_pay' => 1]);
|
||||
//创建订单
|
||||
$groupOrder = $storeGroupOrderRepository->create($groupOrder);
|
||||
// 减少积分
|
||||
if ($groupOrder['integral'] > 0) {
|
||||
foreach ($_orderList as $k => $order) {
|
||||
foreach ($order['cartInfo']['list'] as $cart) {
|
||||
// 减少对应的商户积分
|
||||
app()->make(IntegralRepository::class)->changeIntegral((int)$user['uid'],(int)$cart->mer_id,(float)sprintf("%.2f",0 - (int)$cart->integral));
|
||||
}
|
||||
}
|
||||
// 减少总持有积分
|
||||
$user->integral = bcsub($user->integral, $groupOrder['integral'], 0);
|
||||
$userBillRepository->decBill(
|
||||
$user['uid'],
|
||||
'integral',
|
||||
'points_order',
|
||||
[
|
||||
'link_id' => $groupOrder['group_order_id'],
|
||||
'status' => 1,
|
||||
'title' => '积分商城兑换商品',
|
||||
'number' => $groupOrder['integral'],
|
||||
'mark' => '积分商城兑换商品使用积分' . floatval($groupOrder['integral']) ,
|
||||
'balance' => $user->integral
|
||||
]
|
||||
);
|
||||
$userBillRepository->decBill($user['uid'],'integral','points_order',[
|
||||
'link_id' => $groupOrder['group_order_id'],
|
||||
'status' => 1,
|
||||
'title' => '积分商城兑换商品',
|
||||
'number' => $groupOrder['integral'],
|
||||
'mark' => '积分商城兑换商品使用商户积分'.floatval($groupOrder['integral']),
|
||||
'balance' => $user->integral
|
||||
]);
|
||||
$user->save();
|
||||
}
|
||||
|
||||
foreach ($_orderList as $k => $order) {
|
||||
$_orderList[$k]['group_order_id'] = $groupOrder->group_order_id;
|
||||
}
|
||||
|
||||
$orderProduct = [];
|
||||
$orderStatus = [];
|
||||
foreach ($_orderList as $order) {
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ class PointsProductRepository extends BaseRepository
|
|||
'once_max_count' => $data['once_max_count'] ?? 0,
|
||||
'pay_limit' => $data['pay_limit'] ?? 0,
|
||||
'svip_price_type' => $data['svip_price_type'] ?? 0,
|
||||
'mer_id' => $data['mer_id'] ?? 0,
|
||||
];
|
||||
if (isset($data['product_type']))
|
||||
$result['product_type'] = $data['product_type'];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,100 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
namespace app\controller\merchant\points;
|
||||
|
||||
use app\common\repositories\store\StoreCategoryRepository;
|
||||
use app\validate\merchant\StoreCategoryValidate as validate;
|
||||
use think\App;
|
||||
use crmeb\basic\BaseController;
|
||||
|
||||
class Category extends BaseController
|
||||
{
|
||||
protected $repository;
|
||||
|
||||
public function __construct(App $app, StoreCategoryRepository $repository)
|
||||
{
|
||||
parent::__construct($app);
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
public function lst()
|
||||
{
|
||||
return app('json')->success($this->repository->getFormatList($this->request->merId(), null, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author:Qinii
|
||||
* @Date: 2020/5/11
|
||||
* @return mixed
|
||||
*/
|
||||
public function createForm()
|
||||
{
|
||||
return app('json')->success(formToData($this->repository->pointsForm(null)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author:Qinii
|
||||
* @Date: 2020/5/11
|
||||
* @param validate $validate
|
||||
* @return mixed
|
||||
*/
|
||||
public function create(validate $validate)
|
||||
{
|
||||
$data = $this->checkParams($validate);
|
||||
$data['cate_name'] = trim($data['cate_name']);
|
||||
if ($data['cate_name'] == '') return app('json')->fail('分类名不可为空');
|
||||
$data['mer_id'] = $this->request->merId();
|
||||
$this->repository->create($data);
|
||||
return app('json')->success('添加成功');
|
||||
}
|
||||
|
||||
public function updateForm($id)
|
||||
{
|
||||
if (!$this->repository->merExists($this->request->merId(), $id))
|
||||
return app('json')->fail('数据不存在');
|
||||
return app('json')->success(formToData($this->repository->pointsForm($id)));
|
||||
}
|
||||
|
||||
public function update($id, validate $validate)
|
||||
{
|
||||
$data = $this->checkParams($validate);
|
||||
if (!$this->repository->merExists($this->request->merId(), $id))
|
||||
return app('json')->fail('数据不存在');
|
||||
$this->repository->update($id, $data);
|
||||
return app('json')->success('编辑成功');
|
||||
}
|
||||
|
||||
public function switchStatus($id)
|
||||
{
|
||||
$status = $this->request->param('status', 0) == 1 ? 1 : 0;
|
||||
if (!$this->repository->merExists($this->request->merId(), $id))
|
||||
return app('json')->fail('数据不存在');
|
||||
$this->repository->switchStatus($id, $status);
|
||||
return app('json')->success('修改成功');
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
if (!$this->repository->merExists($this->request->merId(), $id))
|
||||
return app('json')->fail('数据不存在');
|
||||
if ($this->repository->hasChild($id))
|
||||
return app('json')->fail('该分类存在子集,请先处理子集');
|
||||
|
||||
$this->repository->delete($id);
|
||||
return app('json')->success('删除成功');
|
||||
}
|
||||
|
||||
public function select()
|
||||
{
|
||||
return app('json')->success($this->repository->getAll($this->request->merId(),1,1));
|
||||
}
|
||||
public function checkParams(validate $validate)
|
||||
{
|
||||
$data = $this->request->params(['cate_name','is_show','pic','sort','type',['pid',0]]);
|
||||
$validate->check($data);
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
namespace app\controller\merchant\points;
|
||||
|
||||
|
||||
use crmeb\jobs\BatchDeliveryJob;
|
||||
use crmeb\services\ExcelService;
|
||||
use think\App;
|
||||
use crmeb\basic\BaseController;
|
||||
use app\common\repositories\store\order\StoreOrderRepository;
|
||||
use think\facade\Queue;
|
||||
|
||||
class Order extends BaseController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var StoreOrderRepository
|
||||
*/
|
||||
protected $repository;
|
||||
|
||||
|
||||
/**
|
||||
* StoreProduct constructor.
|
||||
* @param App $app
|
||||
* @param StoreOrderRepository $repository
|
||||
*/
|
||||
public function __construct(App $app, StoreOrderRepository $repository)
|
||||
{
|
||||
parent::__construct($app);
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author:Qinii
|
||||
* @Date: 2020/5/18
|
||||
* @return mixed
|
||||
*/
|
||||
public function lst()
|
||||
{
|
||||
[$page, $limit] = $this->getPage();
|
||||
$where = $this->request->params(['keyword', 'date','status','order_sn','product_id','nickname','phone','uid','store_name']);
|
||||
$where['activity_type'] = 20;
|
||||
$where['mer_id'] = $this->request->merId();
|
||||
if ($where['status'] == -10) {
|
||||
unset($where['status']);
|
||||
$where['is_del'] = 1;
|
||||
}
|
||||
return app('json')->success($this->repository->pointsOrderAdminList($where, $page, $limit));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @return mixed
|
||||
* @author Qinii
|
||||
* @day 2020-06-11
|
||||
*/
|
||||
public function detail($id)
|
||||
{
|
||||
$data = $this->repository->getOne($id, $this->request->merId());
|
||||
if (!$data) return app('json')->fail('数据不存在');
|
||||
return app('json')->success($data);
|
||||
}
|
||||
|
||||
public function getStatus($id)
|
||||
{
|
||||
[$page, $limit] = $this->getPage();
|
||||
$where['user_type'] = $this->request->param('user_type');
|
||||
$where['date'] = $this->request->param('date');
|
||||
$where['id'] = $id;
|
||||
$data = $this->repository->getOrderStatus($where, $page, $limit);
|
||||
if (!$data) return app('json')->fail('数据不存在');
|
||||
return app('json')->success($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 发货
|
||||
* @param $id
|
||||
* @return mixed
|
||||
* @author Qinii
|
||||
*/
|
||||
public function delivery($id)
|
||||
{
|
||||
$split = $this->request->params(['is_split',['split',[]]]);
|
||||
if (!$this->repository->merDeliveryExists($id, $this->request->merId()))
|
||||
return app('json')->fail('订单信息或状态错误');
|
||||
$data = $this->request->params([
|
||||
'delivery_type',
|
||||
'delivery_name',
|
||||
'delivery_id',
|
||||
'remark',
|
||||
]);
|
||||
if (!$data['delivery_type'] || $data['delivery_type'] != 3 && (!$data['delivery_name'] || !$data['delivery_id']))
|
||||
return app('json')->fail('填写配送信息');
|
||||
|
||||
$this->repository->runDelivery($id,$this->request->merId(), $data, $split, 'delivery');
|
||||
return app('json')->success('发货成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @return \think\response\Json
|
||||
* @author Qinii
|
||||
* @day 7/26/21
|
||||
*/
|
||||
public function batchDelivery()
|
||||
{
|
||||
$params = $this->request->params([
|
||||
'order_id',
|
||||
'delivery_id',
|
||||
'delivery_type',
|
||||
'delivery_name',
|
||||
'remark',
|
||||
]);
|
||||
if (!in_array($params['delivery_type'], [1,2,3]))
|
||||
return app('json')->fail('发货类型错误');
|
||||
if (!$params['order_id'])
|
||||
return app('json')->fail('需要订单ID');
|
||||
$data = ['mer_id' => $this->request->merId(), 'data' => $params];
|
||||
Queue::push(BatchDeliveryJob::class, $data);
|
||||
return app('json')->success('开始批量发货');
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 导出文件
|
||||
* @author Qinii
|
||||
* @day 2020-07-30
|
||||
*/
|
||||
public function excel()
|
||||
{
|
||||
[$page, $limit] = $this->getPage();
|
||||
$where = $this->request->params(['keyword','date','status','order_sn','product_id']);
|
||||
$data = app()->make(ExcelService::class)->pointsOrder($where,$page,$limit);
|
||||
return app('json')->success($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author:Qinii
|
||||
* @Date: 2020/5/18
|
||||
* @param $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
if (!$this->repository->userDelExists($id, $this->request->merId()))
|
||||
return app('json')->fail('订单信息或状态错误');
|
||||
$this->repository->update($id,['is_system_del' => 1]);
|
||||
return app('json')->success('删除成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @return mixed
|
||||
* @author Qinii
|
||||
* @day 2020-06-11
|
||||
*/
|
||||
public function remarkForm($id)
|
||||
{
|
||||
return app('json')->success(formToData($this->repository->pointsMarkForm($id)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @return mixed
|
||||
* @author Qinii
|
||||
* @day 2020-06-11
|
||||
*/
|
||||
public function remark($id)
|
||||
{
|
||||
if (!$this->repository->getOne($id, $this->request->merId()))
|
||||
return app('json')->fail('数据不存在');
|
||||
$data = $this->request->params(['remark']);
|
||||
$this->repository->update($id, $data);
|
||||
|
||||
return app('json')->success('备注成功');
|
||||
}
|
||||
|
||||
public function express($id)
|
||||
{
|
||||
if (!$this->repository->getWhereCount(['order_id' => $id]))
|
||||
return app('json')->fail('订单信息或状态错误');
|
||||
return app('json')->success($this->repository->express($id,$this->request->merId()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
namespace app\controller\merchant\points;
|
||||
|
||||
use app\common\repositories\store\product\ProductRepository;
|
||||
use app\validate\merchant\StoreProductValidate;
|
||||
use think\App;
|
||||
use crmeb\basic\BaseController;
|
||||
use app\validate\merchant\StoreProductAdminValidate as validate;
|
||||
use app\common\repositories\store\pionts\PointsProductRepository;
|
||||
|
||||
class Product extends BaseController
|
||||
{
|
||||
/**
|
||||
* @var PointsProductRepository
|
||||
*/
|
||||
protected $repository;
|
||||
|
||||
|
||||
/**
|
||||
* StoreProduct constructor.
|
||||
* @param App $app
|
||||
* @param PointsProductRepository $repository
|
||||
*/
|
||||
public function __construct(App $app, PointsProductRepository $repository)
|
||||
{
|
||||
parent::__construct($app);
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author:Qinii
|
||||
* @Date: 2020/5/18
|
||||
* @return mixed
|
||||
*/
|
||||
public function lst()
|
||||
{
|
||||
[$page, $limit] = $this->getPage();
|
||||
$where = $this->request->params(['cate_id', 'keyword', 'is_used', 'date','store_name']);
|
||||
return app('json')->success($this->repository->getAdminList($this->request->merId(), $where, $page, $limit));
|
||||
}
|
||||
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data = $this->checkParams();
|
||||
$this->repository->create($data, $this->repository::PRODUCT_TYPE_POINTS);
|
||||
return app('json')->success('添加成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author:Qinii
|
||||
* @Date: 2020/5/18
|
||||
* @return mixed
|
||||
*/
|
||||
public function getStatusFilter()
|
||||
{
|
||||
return app('json')->success($this->repository->getFilter(null,'商品',0));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author:Qinii
|
||||
* @Date: 2020/5/18
|
||||
* @param $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function detail($id)
|
||||
{
|
||||
return app('json')->success($this->repository->detail($id));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author:Qinii
|
||||
* @Date: 2020/5/11
|
||||
* @param $id
|
||||
* @param validate $validate
|
||||
* @return mixed
|
||||
*/
|
||||
public function update($id)
|
||||
{
|
||||
$data = $this->checkParams();
|
||||
$this->repository->edit($id,$data,$this->request->merId(),$this->repository::PRODUCT_TYPE_POINTS);
|
||||
return app('json')->success('编辑成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 上 / 下架
|
||||
* @Author:Qinii
|
||||
* @Date: 2020/5/18
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function switchStatus($id)
|
||||
{
|
||||
if(!$this->repository->merExists(null,$id))
|
||||
return app('json')->fail('数据不存在');
|
||||
$status = $this->request->param('status',0) == 1 ? 1 : 0;
|
||||
$this->repository->switchShow($id,$status,'is_used');
|
||||
return app('json')->success('修改成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author:Qinii
|
||||
* @Date: 2020/5/18
|
||||
* @param $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
if(!$this->repository->merExists($this->request->merId(),$id))
|
||||
return app('json')->fail('数据不存在');
|
||||
$this->repository->destory($id);
|
||||
return app('json')->success('删除成功');
|
||||
}
|
||||
/**
|
||||
* @Author:Qinii
|
||||
* @Date: 2020/5/11
|
||||
* @param validate $validate
|
||||
* @return array
|
||||
*/
|
||||
public function checkParams()
|
||||
{
|
||||
$data = $this->request->params($this->repository::CREATE_PARAMS);
|
||||
$data['mer_status'] = 1;
|
||||
$data['delivery_way'] = [2];
|
||||
$data['delivery_free'] = 1;
|
||||
$data['is_used'] = $this->request->param('is_used',0);
|
||||
$data['is_hot'] = $this->request->param('is_hot',0);
|
||||
$data['is_show'] = 1;
|
||||
$data['status'] = 1;
|
||||
$data['pay_limit'] = 2;
|
||||
$data['product_type'] = $this->repository::PRODUCT_TYPE_POINTS;
|
||||
$data['mer_id'] = $this->request->merId();
|
||||
app()->make(StoreProductValidate::class)->check($data);
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @param $id
|
||||
* @return \think\response\Json
|
||||
* @author Qinii
|
||||
* @day 3/17/21
|
||||
*/
|
||||
public function updateSort($id)
|
||||
{
|
||||
$sort = $this->request->param('sort');
|
||||
$this->repository->updateSort($id,null,['rank' => $sort]);
|
||||
return app('json')->success('修改成功');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TODO 批量显示隐藏
|
||||
* @return \think\response\Json
|
||||
* @author Qinii
|
||||
* @day 2022/11/14
|
||||
*/
|
||||
public function batchShow()
|
||||
{
|
||||
$ids = $this->request->param('ids');
|
||||
$status = $this->request->param('status') == 1 ? 1 : 0;
|
||||
$this->repository->batchSwitchShow($ids,$status,'is_used',0);
|
||||
return app('json')->success('修改成功');
|
||||
}
|
||||
|
||||
public function isFormatAttr($id)
|
||||
{
|
||||
$data = $this->request->params([
|
||||
['attrs', []],
|
||||
['items', []],
|
||||
['product_type', 0]
|
||||
]);
|
||||
$data = app()->make(ProductRepository::class)->isFormatAttr($data['attrs'],$id,$data['product_type']);
|
||||
return app('json')->success($data);
|
||||
}
|
||||
|
||||
public function preview()
|
||||
{
|
||||
$data = $this->request->param();
|
||||
return app('json')->success($this->repository->preview($data));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
namespace app\validate\merchant;
|
||||
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class StoreCategoryValidate extends Validate
|
||||
{
|
||||
protected $failException = true;
|
||||
|
||||
protected $rule = [
|
||||
'pid|上级分类' => 'require|integer',
|
||||
'cate_name|分类名称' => 'require|max:12',
|
||||
'is_show|状态' => 'require|in:0,1',
|
||||
'pic|分类图标' => 'max:128',
|
||||
'sort|排序' => 'require|integer'
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
<?php
|
||||
|
||||
use app\common\middleware\AllowOriginMiddleware;
|
||||
use app\common\middleware\LogMiddleware;
|
||||
use app\common\middleware\MerchantAuthMiddleware;
|
||||
use app\common\middleware\MerchantTokenMiddleware;
|
||||
use think\facade\Route;
|
||||
use app\common\middleware\MerchantCheckBaseInfoMiddleware;
|
||||
|
||||
Route::group(function () {
|
||||
|
||||
// 积分商品分类
|
||||
Route::group('points/cate', function () {
|
||||
Route::get('lst', '/lst')->name('pointsCateLst')->option([
|
||||
'_alias' => '列表',
|
||||
]);
|
||||
Route::get('detail/:id', '/detail')->name('pointsCateDetail')->option([
|
||||
'_alias' => '详情',
|
||||
]);
|
||||
Route::get('select', '/select')->option([
|
||||
'_alias' => '筛选',
|
||||
]);
|
||||
Route::post('create', '/create')->name('pointsCateCreate')->option([
|
||||
'_alias' => '添加',
|
||||
]);
|
||||
Route::post('update/:id', '/update')->name('pointsCateUpdate')->option([
|
||||
'_alias' => '编辑',
|
||||
]);
|
||||
Route::get('create/form', '/createForm')->name('pointsCateCreateForm')->option([
|
||||
'_alias' => '添加表单',
|
||||
'_auth' => false,
|
||||
'_form' => 'pointsCateCreate',
|
||||
]);
|
||||
Route::get('update/form/:id', '/updateForm')->name('pointsCateUpdateForm')->option([
|
||||
'_alias' => '编辑表单',
|
||||
'_auth' => false,
|
||||
'_form' => 'pointsCateUpdate',
|
||||
]);
|
||||
Route::post('status/:id', '/switchStatus')->name('pointsCateStatus')->option([
|
||||
'_alias' => '修改状态',
|
||||
]);
|
||||
Route::delete('delete/:id', '/delete')->name('pointsCateStatus')->option([
|
||||
'_alias' => '修改状态',
|
||||
]);
|
||||
})->prefix('merchant.points.Category')->option([
|
||||
'_path' => '/marketing/integral/classify',
|
||||
'_auth' => true,
|
||||
]);
|
||||
// 积分商品管理
|
||||
Route::group('points/product', function () {
|
||||
Route::get('lst', '/lst')->name('pointsProductLst')->option([
|
||||
'_alias' => '列表',
|
||||
]);
|
||||
Route::post('get_attr_value/:id', '/isFormatAttr')->name('pointsCateFormatAttr')->option([
|
||||
'_alias' => '获取规格',
|
||||
]);
|
||||
Route::get('detail/:id', '/detail')->name('pointsProductDetail')->option([
|
||||
'_alias' => '编辑',
|
||||
]);
|
||||
Route::post('create', '/create')->name('pointsProductCreate')->option([
|
||||
'_alias' => '添加',
|
||||
]);
|
||||
Route::post('update/:id', '/update')->name('pointsProductUpdate')->option([
|
||||
'_alias' => '编辑',
|
||||
]);
|
||||
Route::post('status/:id', '/switchStatus')->name('pointsProductStatus')->option([
|
||||
'_alias' => '修改状态',
|
||||
]);
|
||||
Route::delete('delete/:id', '/delete')->name('pointsProductStatus')->option([
|
||||
'_alias' => '修改状态',
|
||||
]);
|
||||
Route::post('preview', '/preview')->name('pointsProductPreview')->option([
|
||||
'_alias' => '预览',
|
||||
]);
|
||||
})->prefix('merchant.points.Product')->option([
|
||||
'_path' => '/marketing/integral/proList',
|
||||
'_auth' => true,
|
||||
]);
|
||||
// 积分商品订单
|
||||
Route::group('points/order', function () {
|
||||
Route::get('lst', '/lst')->name('pointsOrderLst')->option([
|
||||
'_alias' => '列表',
|
||||
]);
|
||||
Route::get('detail/:id', '/detail')->name('pointsOrderDetail')->option([
|
||||
'_alias' => '编辑',
|
||||
]);
|
||||
Route::post('delivery/:id', '/delivery')->name('pointsOrderDelivery')->option([
|
||||
'_alias' => '发货',
|
||||
]);
|
||||
Route::post('delivery_batch', '/batchDelivery')->name('pointsOrderBatchDelivery')->option([
|
||||
'_alias' => '批量发货',
|
||||
]);
|
||||
Route::get('express/:id', '/express')->name('pointsOrderExpress')->option([
|
||||
'_alias' => '快递查询',
|
||||
]);
|
||||
Route::get('excel', '/Excel')->name('pointsOrderExcel')->option([
|
||||
'_alias' => '导出',
|
||||
]);
|
||||
Route::get('mark/:id/form', '/remarkForm')->name('pointsOrderMarkForm')->option([
|
||||
'_alias' => '备注表单',
|
||||
'_auth' => false,
|
||||
'_form' => 'pointsOrderMark',
|
||||
]);
|
||||
Route::post('mark/:id', '/remark')->name('pointsOrderMark')->option([
|
||||
'_alias' => '备注',
|
||||
]);
|
||||
Route::get('status/:id', '/getStatus')->name('pointsOrderStatus')->option([
|
||||
'_alias' => '记录',
|
||||
]);
|
||||
Route::delete('delete/:id', '/delete')->name('pointsOrderDelete')->option([
|
||||
'_alias' => '删除',
|
||||
]);
|
||||
})->prefix('merchant.points.Order')->option([
|
||||
'_path' => '/marketing/integral/orderList',
|
||||
'_auth' => true,
|
||||
]);
|
||||
|
||||
})->middleware(AllowOriginMiddleware::class)
|
||||
->middleware(MerchantTokenMiddleware::class, true)
|
||||
->middleware(MerchantAuthMiddleware::class)
|
||||
->middleware(MerchantCheckBaseInfoMiddleware::class)
|
||||
->middleware(LogMiddleware::class);
|
||||
Loading…
Reference in New Issue