Commit 3b6a9cb8 authored by wwccw0591's avatar wwccw0591

delivery

parent c35a04e3
<?php
namespace Business\Store;
use DAO\Order\DiliverymanModel;
use DAO\StoreModel;
/**
* 店主service
*
* @date 2018-5-11
* @author csw
*/
class DeliveryServiceModel extends \Business\AbstractModel
{
public $clientType = false;
public function init()
{
$this->storeDao = StoreModel::getInstance();
}
/**
* 登录业务
*
* @var \Business\User\LoginV2Model
*/
private
static $_instance = null;
/**
* 单例模式获取类实例
*
* @return \Business\User\LoginV2Model
*/
public
static function getInstance()
{
if (!(self::$_instance instanceof self)) {
self::$_instance = new self();
}
return self::$_instance;
}
}
<?php
use Error\ErrorModel;
use Error\CodeConfigModel;
use Our\NameConst;
use Our\Common;
use Business\User\MemberServiceModel;
use Business\Store\ShopkeeperServiceModel;
/**
* 我是店主
*
* @date 2018-5-10
* @author csw <993768343@qq.com>
*/
class DeliveryController extends \Our\Controller_AbstractClient {
public $memberService;
public $shopkeeperService;
public function init(){
parent::init();
$this->memberService = MemberServiceModel::getInstance();
$this->shopkeeperService = ShopkeeperServiceModel::getInstance();
$this->shopkeeperService->clientType=NameConst::pcClient;
}
/**
* 获得配送员列表
*/
public function getDeliveriersAction(){
$result = $this->shopkeeperService->getDiliveryManByStoreId($this->memberId);
if($result!==false){
$this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
}
ErrorModel::throwException(CodeConfigModel::commonError);
}
/**
* 查询配送员
*
*/
public function searchDeliveryAction(){
$shopkeeperService=\Business\Store\ShopkeeperServiceModel::getInstance();
$res=$shopkeeperService->getDiliveryMan($this->req['data']['mobile']);
$res=$res?$res:new \stdClass();
$this->success($res,\Our\DescribeConst::successMessage);
}
/**
* 选择配送员
*
*/
public function selectDeliveryAction(){
}
}
...@@ -152,16 +152,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient { ...@@ -152,16 +152,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
// } // }
} }
/**
* 获得配送员列表
*/
public function getDeliveriersAction(){
$result = $this->shopkeeperService->getDiliveryManByStoreId($this->memberId);
if($result!==false){
$this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
}
ErrorModel::throwException(CodeConfigModel::commonError);
}
/** /**
* 订单详情 * 订单详情
...@@ -211,16 +202,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient { ...@@ -211,16 +202,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
} }
} }
/**
* 查询配送员
*
*/
public function searchDeliveryAction(){
$shopkeeperService=\Business\Store\ShopkeeperServiceModel::getInstance();
$res=$shopkeeperService->getDiliveryMan($this->req['data']['mobile']);
$res=$res?$res:new \stdClass();
$this->success($res,\Our\DescribeConst::successMessage);
}
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</head> </head>
<body> <body>
<form action="/client/shopkeeper/getDeliveriers" method="post"> <form action="/client/Delivery/getDeliveriers" method="post">
用户登录状态key:<input name="data[key]" value="681c788e2d5a1a67bb4432aebe67c35b"/><br /> 用户登录状态key:<input name="data[key]" value="681c788e2d5a1a67bb4432aebe67c35b"/><br />
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</head> </head>
<body> <body>
<form action="/client/shopkeeper/searchDelivery" method="post"> <form action="/client/Delivery/searchDelivery" method="post">
用户登录状态key:<input name="data[key]" value="73526b0db474f2a0e5f80c67301be73d"/><br /> 用户登录状态key:<input name="data[key]" value="73526b0db474f2a0e5f80c67301be73d"/><br />
配送员电话:<input name="data[mobile]" value="18305954587"/><br /> 配送员电话:<input name="data[mobile]" value="18305954587"/><br />
<input type="submit" value="提交"> <input type="submit" value="提交">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment