Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenchuanwen
my-yaf-project
Commits
3b6a9cb8
Commit
3b6a9cb8
authored
Oct 30, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delivery
parent
c35a04e3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
114 additions
and
22 deletions
+114
-22
DeliveryService.php
application/models/Business/Store/DeliveryService.php
+51
-0
Delivery.php
application/modules/Client/controllers/Delivery.php
+59
-0
Shopkeeper.php
application/modules/Client/controllers/Shopkeeper.php
+2
-20
getDeliveriers.php
public/client/delivery/getDeliveriers.php
+1
-1
searchDelivery.php
public/client/delivery/searchDelivery.php
+1
-1
No files found.
application/models/Business/Store/DeliveryService.php
0 → 100644
View file @
3b6a9cb8
<?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
;
}
}
application/modules/Client/controllers/Delivery.php
0 → 100644
View file @
3b6a9cb8
<?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
(){
}
}
application/modules/Client/controllers/Shopkeeper.php
View file @
3b6a9cb8
...
@@ -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
);
}
}
}
public/client/
shopkeeper
/getDeliveriers.php
→
public/client/
delivery
/getDeliveriers.php
View file @
3b6a9cb8
...
@@ -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
/>
...
...
public/client/
shopkeeper
/searchDelivery.php
→
public/client/
delivery
/searchDelivery.php
View file @
3b6a9cb8
...
@@ -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=
"提交"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment