Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
newShopBack
Project
Project
Details
Activity
Releases
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
newshop
newShopBack
Commits
6f1e5966
Commit
6f1e5966
authored
Dec 04, 2019
by
郭勇志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
o2o配送改价格相关接口
parent
c526b25e
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
203 additions
and
11 deletions
+203
-11
urlmanager.php
backend/config/urlmanager.php
+2
-0
O2oDeliveryController.php
backend/controllers/v1/transport/O2oDeliveryController.php
+195
-5
ShopCityDistributionSetting.php
backend/models/v1/branch/ShopCityDistributionSetting.php
+6
-6
o2o_delivery_import.xls
template/o2o_delivery_import.xls
+0
-0
No files found.
backend/config/urlmanager.php
View file @
6f1e5966
...
...
@@ -250,6 +250,8 @@ return [
'extraPatterns'
=>
[
'GET,OPTIONS o2o-delivery-list'
=>
'o2o-delivery-list'
,
'PUT,OPTIONS o2o-delivery-update'
=>
'o2o-delivery-update'
,
'GET,OPTIONS o2o-delivery-export'
=>
'o2o-delivery-export'
,
'GET,OPTIONS o2o-delivery-view'
=>
'o2o-delivery-view'
,
],
],
//配送方式
...
...
backend/controllers/v1/transport/O2oDeliveryController.php
View file @
6f1e5966
This diff is collapsed.
Click to expand it.
backend/models/v1/branch/ShopCityDistributionSetting.php
View file @
6f1e5966
...
...
@@ -66,12 +66,12 @@ class ShopCityDistributionSetting extends BaseModel
[[
'BRANCH_INFO'
],
'match'
,
'pattern'
=>
'/^[\x{4e00}-\x{9fa5}A-Za-z0-9_]+$/u'
,
'message'
=>
'只能包含中文汉字,字母,数字'
,
'on'
=>
'search'
],
[[
'GUID'
,
'REGION_TYPE'
],
'required'
,
'on'
=>
[
'o2o_update'
],
'message'
=>
'{attribute}不能为空'
],
[[
'REGION_DISTR_DISTANCE'
,
'REGION_DISTR_PRICE'
,
'INCREASE_DISTANCE'
,
'INCREASE_PRICE'
,
'DELIVERY_PRICE'
],
'double'
,
'on'
=>
[
'o2o_update'
]],
[[
'REGION_DISTR_DISTANCE'
,
'REGION_DISTR_PRICE'
,
'INCREASE_DISTANCE'
,
'INCREASE_PRICE'
],
'required'
,
'
on'
=>
[
'o2o_update'
],
'
when'
=>
function
(
$model
)
{
[[
'REGION_DISTR_DISTANCE'
,
'REGION_DISTR_PRICE'
,
'INCREASE_DISTANCE'
,
'INCREASE_PRICE'
],
'required'
,
'when'
=>
function
(
$model
)
{
return
$model
->
REGION_TYPE
==
'2'
;
},
'message'
=>
'{attribute}不能为空'
],
[[
'DELIVERY_PRICE'
],
'required'
,
'
on'
=>
[
'o2o_update'
],
'
when'
=>
function
(
$model
)
{
},
'message'
=>
'{attribute}不能为空'
,
'on'
=>
[
'o2o_update'
]
],
[[
'DELIVERY_PRICE'
],
'required'
,
'when'
=>
function
(
$model
)
{
return
$model
->
REGION_TYPE
==
'1'
;
},
'message'
=>
'{attribute}不能为空'
],
},
'message'
=>
'{attribute}不能为空'
,
'on'
=>
[
'o2o_update'
]
],
];
}
...
...
@@ -94,8 +94,8 @@ class ShopCityDistributionSetting extends BaseModel
'SIMPLE_DISTR_PIC'
=>
'Simple Distr Pic'
,
'SIMPLE_DISTR_INITIAL_PRICE'
=>
'Simple Distr Initial Price'
,
'SIMPLE_DISTR_DELIVERY_PRICE '
=>
'Simple Distr Delivery Price'
,
'REGION_DISTR_DISTANCE'
=>
'
不同距离不同配送费**公里内数值
'
,
'REGION_DISTR_PRICE'
=>
'
不同距离不同配送费*公里内*元数值
'
,
'REGION_DISTR_DISTANCE'
=>
'
基础公里
'
,
'REGION_DISTR_PRICE'
=>
'
基础运费
'
,
'INCREASE_DISTANCE'
=>
'不同距离不同配送费增加*公里数值'
,
'INCREASE_PRICE'
=>
'不同距离不同配送费增加*公里*元数值'
,
'LAT'
=>
'Lat'
,
...
...
template/o2o_delivery_import.xls
0 → 100644
View file @
6f1e5966
File added
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