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
167efba8
Commit
167efba8
authored
Jan 02, 2020
by
姚书霞
🐘
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' of
http://gitlab-ebiz.yiyao365.cn/newshop/newshopback
into development
parents
7502971d
563e7c1f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
20 deletions
+66
-20
urlmanager.php
backend/config/urlmanager.php
+1
-0
AuthorityRoleController.php
backend/controllers/v1/authority/AuthorityRoleController.php
+2
-2
BranchController.php
backend/controllers/v1/branch/BranchController.php
+24
-9
BranchServiceTypeController.php
...end/controllers/v1/branch/BranchServiceTypeController.php
+3
-3
TransportInitialPriceController.php
...trollers/v1/transport/TransportInitialPriceController.php
+2
-2
TransportMethodController.php
...nd/controllers/v1/transport/TransportMethodController.php
+33
-1
ShopBranch.php
backend/models/v1/branch/ShopBranch.php
+1
-3
No files found.
backend/config/urlmanager.php
View file @
167efba8
...
...
@@ -279,6 +279,7 @@ return [
'GET,OPTIONS make-use'
=>
'make-use'
,
'POST,OPTIONS transport-method-insert'
=>
'transport-method-insert'
,
'PUT,OPTIONS transport-method-update'
=>
'transport-method-update'
,
'GET,OPTIONS get-transport-detail'
=>
'get-transport-detail'
,
],
],
//权限-角色
...
...
backend/controllers/v1/authority/AuthorityRoleController.php
View file @
167efba8
...
...
@@ -117,7 +117,7 @@ class AuthorityRoleController extends BaseController
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
201
);
}
elseif
(
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to create the object for unknown reason.');
throw
new
HttpException
(
500
,
'添加失败'
);
throw
new
HttpException
(
500
,
'添加失败'
);
}
return
$model
;
}
...
...
@@ -164,7 +164,7 @@ class AuthorityRoleController extends BaseController
if
(
$model
->
save
()
===
false
&&
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to update the object for unknown reason.');
throw
new
HttpException
(
500
,
'修改失败'
);
throw
new
HttpException
(
500
,
'修改失败'
);
}
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
202
);
return
$model
;
...
...
backend/controllers/v1/branch/BranchController.php
View file @
167efba8
...
...
@@ -266,7 +266,7 @@ class BranchController extends BaseController
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
201
);
}
elseif
(
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to create the object for unknown reason.');
throw
new
HttpException
(
500
,
'添加失败'
);
throw
new
HttpException
(
500
,
'添加失败'
);
}
return
$model
;
}
...
...
@@ -296,7 +296,10 @@ class BranchController extends BaseController
if
(
!
$info
)
{
throw
new
BadRequestHttpException
(
'未找到符合的门店服务类目信息'
);
}
return
$info
;
return
new
ActiveDataProvider
([
'models'
=>
$info
,
'pagination'
=>
false
]);
}
/**
* @OA\Get(
...
...
@@ -318,7 +321,10 @@ class BranchController extends BaseController
if
(
!
$info
)
{
throw
new
BadRequestHttpException
(
'未找到符合的门店门店配送方式'
);
}
return
$info
;
return
new
ActiveDataProvider
([
'models'
=>
$info
,
'pagination'
=>
false
]);
}
/**
* @OA\Get(
...
...
@@ -340,7 +346,10 @@ class BranchController extends BaseController
if
(
!
$info
)
{
throw
new
BadRequestHttpException
(
'未找到符合的分公司信息'
);
}
return
$info
;
return
new
ActiveDataProvider
([
'models'
=>
$info
,
'pagination'
=>
false
]);
}
/**
* @OA\Get(
...
...
@@ -374,7 +383,10 @@ class BranchController extends BaseController
throw
new
BadRequestHttpException
(
'未找到符合的门店区域信息'
);
}
$info
[
0
][
'ROLE_ID'
]
=
$authRole
;
return
$info
;
return
new
ActiveDataProvider
([
'models'
=>
$info
,
'pagination'
=>
false
]);
}
else
{
//验证失败:$errors 是一个包含错误信息的数组
Yii
::
$app
->
response
->
statusCode
=
422
;
...
...
@@ -413,7 +425,10 @@ class BranchController extends BaseController
throw
new
BadRequestHttpException
(
'未找到符合的门店区域信息'
);
}
$info
[
0
][
'ROLE_ID'
]
=
$authRole
;
return
$info
;
return
new
ActiveDataProvider
([
'models'
=>
$info
,
'pagination'
=>
false
]);
}
else
{
//验证失败:$errors 是一个包含错误信息的数组
Yii
::
$app
->
response
->
statusCode
=
422
;
...
...
@@ -533,7 +548,7 @@ class BranchController extends BaseController
if
(
$model
->
save
()
===
false
&&
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to update the object for unknown reason.');
throw
new
HttpException
(
500
,
'修改失败'
);
throw
new
HttpException
(
500
,
'修改失败'
);
}
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
202
);
return
$model
;
...
...
@@ -568,7 +583,7 @@ class BranchController extends BaseController
throw
new
BadRequestHttpException
(
'没有找到要删除的记录'
);
}
else
if
(
$branchservice
->
delete
()
===
false
)
{
// throw new ServerErrorHttpException('Failed to delete the object for unknown reason.');
throw
new
HttpException
(
500
,
'删除失败'
);
throw
new
HttpException
(
500
,
'删除失败'
);
}
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
203
);
...
...
@@ -1090,7 +1105,7 @@ class BranchController extends BaseController
$model
->
setAttributes
(
Yii
::
$app
->
getRequest
()
->
post
());
if
(
$model
->
save
()
===
false
&&
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to update the object for unknown reason.');
throw
new
HttpException
(
500
,
'修改失败'
);
throw
new
HttpException
(
500
,
'修改失败'
);
}
return
$model
;
}
...
...
backend/controllers/v1/branch/BranchServiceTypeController.php
View file @
167efba8
...
...
@@ -146,7 +146,7 @@ class BranchServiceTypeController extends BaseController
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
201
);
}
elseif
(
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to create the object for unknown reason.');
throw
new
HttpException
(
500
,
'添加失败'
);
throw
new
HttpException
(
500
,
'添加失败'
);
}
return
$model
;
}
...
...
@@ -187,7 +187,7 @@ class BranchServiceTypeController extends BaseController
if
(
$model
->
save
()
===
false
&&
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to update the object for unknown reason.');
throw
new
HttpException
(
500
,
'修改失败'
);
throw
new
HttpException
(
500
,
'修改失败'
);
}
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
202
);
return
$model
;
...
...
@@ -222,7 +222,7 @@ class BranchServiceTypeController extends BaseController
throw
new
BadRequestHttpException
(
'没有找到要删除的记录'
);
}
else
if
(
$branchservice
->
delete
()
===
false
)
{
// throw new ServerErrorHttpException('Failed to delete the object for unknown reason.');
throw
new
HttpException
(
500
,
'删除失败'
);
throw
new
HttpException
(
500
,
'删除失败'
);
}
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
203
);
...
...
backend/controllers/v1/transport/TransportInitialPriceController.php
View file @
167efba8
...
...
@@ -136,7 +136,7 @@ class TransportInitialPriceController extends BaseController
if
(
$model
->
save
()
===
false
&&
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to update the object for unknown reason.');
throw
new
HttpException
(
500
,
'修改失败'
);
throw
new
HttpException
(
500
,
'修改失败'
);
}
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
202
);
return
$model
;
...
...
backend/controllers/v1/transport/TransportMethodController.php
View file @
167efba8
...
...
@@ -48,8 +48,40 @@ class TransportMethodController extends BaseController{
// ]);
return
$query
;
}
/**
* @OA\GET(
* path="/backend/web/v1/transport/transport-methods/get-transport-detail",
* tags={"配送管理"},
* summary="获取配送方式详情(张晓林)",
* description="获取配送方式详情",
* @OA\Parameter(name="GUID",in="query",description="配送方式GUID",@OA\Schema(type="int")),
* @OA\Response(response="200",description="
* GUID:配送方式GUID,
* CODE:配送方式CODE
* NAME:名称,
* DESCRIPTION:描述,
* STATE:是否启用:1 启用 0 不启用,
* IS_UNDERLINE_PAY:是否支持线下付款 1 支持 0 不支持,
* POINTS_STATE:在积分商城中是否启用:1 启用 0 不启用,
* ROMENS_RENT_STATE:在小程序中是否启用:1 启用 0 不启用,
* DSDINTERVAL:定时达时间间隔,
* TRANSPOR_TYPE:配送方式类型:1 门店B2C配送 2 门店O2O配送方式 3 DC仓B2C,
* EXTRA_MONEY:额外费用,
* DELIVERY_TIME:配送时间,
* ORDER_INDEX:排序序号"),
* security={{"Authorization":{}}}
* )
*/
public
function
actionGetTransportDetail
(){
$param
=
Yii
::
$app
->
request
->
get
();
$model
=
new
TransportMethod
();
$columnArr
=
array
(
'GUID'
,
'CODE'
,
'NAME'
,
'DESCRIPTION'
,
'STATE'
,
'IS_UNDERLINE_PAY'
,
'POINTS_STATE'
,
'ROMENS_RENT_STATE'
,
'DSDINTERVAL'
,
'TRANSPOR_TYPE'
,
'EXTRA_MONEY'
,
'DELIVERY_TIME'
,
'ORDER_INDEX'
);
$query
=
$model
::
find
()
->
select
(
$columnArr
)
->
where
([
'ORG_GUID'
=>
100
,
'GUID'
=>
$param
[
'GUID'
]])
->
one
();
return
$query
;
}
/**
* @OA\GET(
* path="/backend/web/v1/transport/transport-methods/make-use",
* tags={"配送管理"},
...
...
backend/models/v1/branch/ShopBranch.php
View file @
167efba8
...
...
@@ -359,9 +359,7 @@ class ShopBranch extends BaseModel
return
new
ActiveDataProvider
([
'query'
=>
$query
->
asArray
(),
'pagination'
=>
[
'pageSize'
=>
PAGE_SIZE
],
'pagination'
=>
false
]);
}
//获取门店(权限下的)
...
...
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