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
65ffeedf
Commit
65ffeedf
authored
Oct 30, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc
parent
6f2440ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
11 deletions
+41
-11
DeliveryService.php
application/models/Business/Store/DeliveryService.php
+18
-3
CodeConfig.php
application/models/Error/CodeConfig.php
+5
-0
Delivery.php
application/modules/Client/controllers/Delivery.php
+18
-8
No files found.
application/models/Business/Store/DeliveryService.php
View file @
65ffeedf
...
@@ -4,7 +4,9 @@ namespace Business\Store;
...
@@ -4,7 +4,9 @@ namespace Business\Store;
use
DAO\Order\DiliverymanModel
;
use
DAO\Order\DiliverymanModel
;
use
DAO\StoreModel
;
use
DAO\StoreModel
;
use
Error\CodeConfigModel
;
use
Error\ErrorModel
;
use
Our\ApiConst
;
/**
/**
...
@@ -33,9 +35,22 @@ class DeliveryServiceModel extends \Business\AbstractModel
...
@@ -33,9 +35,22 @@ class DeliveryServiceModel extends \Business\AbstractModel
$orderRes
=
$orderDao
->
updateByOrderId
(
$orderData
,
$data
[
'orderId'
]);
$orderRes
=
$orderDao
->
updateByOrderId
(
$orderData
,
$data
[
'orderId'
]);
if
(
!
$orderRes
){
if
(
!
$orderRes
){
$orderDao
->
db
->
doRollback
();
$orderDao
->
db
->
doRollback
();
ErrorModel
::
throwException
(
CodeConfigModel
::
updateOrderFail
);
}
}
$qmDeliveryManLogData
[
'diliveryman_id'
]
=
$data
[
'id'
];
$qmDeliveryManLogData
[
'store_id'
]
=
$data
[
'storeId'
];
$qmDeliveryManLogData
[
'order_id'
]
=
$data
[
'orderId'
];
$qmDeliveryManLogData
[
'delivery_state'
]
=
ApiConst
::
deliveryStateWait
;
$qmDeliveryManLogData
[
'distribution_fee'
]
=
$data
[
'distributionFee'
];
$qmDeliveryManLogData
[
'order_type'
]
=
$data
[
'orderType'
];
$qmDeliveryManLogData
[
'get_time'
]
=
TIMESTAMP
;
$res
=
$qmDeliveryManLog
->
insert
(
$data
);
if
(
!
res
){
$orderDao
->
db
->
doRollback
();
ErrorModel
::
throwException
(
CodeConfigModel
::
selectDeliveryFail
);
}
$orderDao
->
db
->
doCommit
();
return
$res
;
}
}
/**
/**
* 登录业务
* 登录业务
...
...
application/models/Error/CodeConfig.php
View file @
65ffeedf
...
@@ -285,6 +285,9 @@ class CodeConfigModel
...
@@ -285,6 +285,9 @@ class CodeConfigModel
const
platFormAreadyIn
=
300117
;
const
platFormAreadyIn
=
300117
;
const
confirmReceiveError
=
300118
;
const
confirmReceiveError
=
300118
;
const
alreadyExsitDeliveryMan
=
300119
;
const
alreadyExsitDeliveryMan
=
300119
;
const
updateOrderFail
=
300120
;
const
selectDeliveryFail
=
300121
;
const
noEnoughStorageForBundlingGoods
=
30118
;
const
noEnoughStorageForBundlingGoods
=
30118
;
const
noOrderWaitToPay
=
30119
;
const
noOrderWaitToPay
=
30119
;
const
wrongEvaluation
=
30120
;
const
wrongEvaluation
=
30120
;
...
@@ -756,6 +759,8 @@ class CodeConfigModel
...
@@ -756,6 +759,8 @@ class CodeConfigModel
self
::
notExistOrderGoods
=>
'退款商品不存在'
,
self
::
notExistOrderGoods
=>
'退款商品不存在'
,
self
::
noExpressDeliveryForOrder1
=>
'该店铺未配置快递配送'
,
self
::
noExpressDeliveryForOrder1
=>
'该店铺未配置快递配送'
,
self
::
goodsNoStoreForCartOrOrder1
=>
'商品库存紧张,您的购买数量太多啦'
,
self
::
goodsNoStoreForCartOrOrder1
=>
'商品库存紧张,您的购买数量太多啦'
,
self
::
updateOrderFail
=>
'更新订单表失败'
,
self
::
selectDeliveryFail
=>
'配送员选择失败'
,
self
::
noEnoughStorageForBundlingGoods
=>
'组合销售库存紧张,您购买的数量太多啦'
,
self
::
noEnoughStorageForBundlingGoods
=>
'组合销售库存紧张,您购买的数量太多啦'
,
self
::
noOrderWaitToPay
=>
'您的订单已支付,请勿重复支付'
,
self
::
noOrderWaitToPay
=>
'您的订单已支付,请勿重复支付'
,
self
::
wrongEvaluation
=>
'商品评论应在6-500字之间'
,
self
::
wrongEvaluation
=>
'商品评论应在6-500字之间'
,
...
...
application/modules/Client/controllers/Delivery.php
View file @
65ffeedf
...
@@ -21,11 +21,21 @@ class DeliveryController extends \Our\Controller_AbstractClient {
...
@@ -21,11 +21,21 @@ class DeliveryController extends \Our\Controller_AbstractClient {
public
function
init
(){
public
function
init
(){
parent
::
init
();
parent
::
init
();
$this
->
memberService
=
MemberServiceModel
::
getInstance
();
$this
->
shopkeeperService
=
ShopkeeperServiceModel
::
getInstance
();
$this
->
shopkeeperService
->
clientType
=
NameConst
::
pcClient
;
}
}
/**
* 选择配送员
*/
public
function
selectDeliveryAction
(){
$deliveryService
=
\Business\Store\DeliveryServiceModel
::
getInstance
();
$data
=
$this
->
req
[
'data'
];
$data
[
'storeId'
]
=
$this
->
storeId
;
$result
=
$deliveryService
->
selectDeliveryMan
(
$data
);
if
(
$result
!==
false
){
$this
->
success
(
$result
,
\Our\DescribeConst
::
successMessage
,
\Our\DescribeConst
::
successMessage
);
}
ErrorModel
::
throwException
(
CodeConfigModel
::
commonError
);
}
/**
/**
* 获得配送员列表
* 获得配送员列表
*/
*/
...
@@ -46,14 +56,14 @@ class DeliveryController extends \Our\Controller_AbstractClient {
...
@@ -46,14 +56,14 @@ class DeliveryController extends \Our\Controller_AbstractClient {
$res
=
$res
?
$res
:
new
\stdClass
();
$res
=
$res
?
$res
:
new
\stdClass
();
$this
->
success
(
$res
,
\Our\DescribeConst
::
successMessage
);
$this
->
success
(
$res
,
\Our\DescribeConst
::
successMessage
);
}
}
/**
/**
* 选择配送员
* 添加配送员
*
*/
*/
public
function
select
DeliveryAction
(){
public
function
add
DeliveryAction
(){
}
}
}
}
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