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
34a45774
Commit
34a45774
authored
Jan 02, 2020
by
孙磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提示优化
Signed-off-by:
sunlei
<
sunlei@romens.cn
>
parent
563e7c1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
17 deletions
+1
-17
AuthorityRoleController.php
backend/controllers/v1/authority/AuthorityRoleController.php
+1
-3
BranchController.php
backend/controllers/v1/branch/BranchController.php
+0
-5
BranchServiceTypeController.php
...end/controllers/v1/branch/BranchServiceTypeController.php
+0
-6
TransportInitialPriceController.php
...trollers/v1/transport/TransportInitialPriceController.php
+0
-3
No files found.
backend/controllers/v1/authority/AuthorityRoleController.php
View file @
34a45774
...
...
@@ -6,7 +6,7 @@ use Yii;
use
backend\controllers\v1\BaseController
;
use
backend\helpers\Func
;
use
yii\web\BadRequestHttpException
;
use
yii\web\
ServerError
HttpException
;
use
yii\web\HttpException
;
use
app\models\v1\rbacuser\ShopRbacRoleAccess
;
class
AuthorityRoleController
extends
BaseController
...
...
@@ -116,7 +116,6 @@ class AuthorityRoleController extends BaseController
if
(
$model
->
save
())
{
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
201
);
}
elseif
(
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to create the object for unknown reason.');
throw
new
HttpException
(
500
,
'添加失败'
);
}
return
$model
;
...
...
@@ -163,7 +162,6 @@ class AuthorityRoleController 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
,
'修改失败'
);
}
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
202
);
...
...
backend/controllers/v1/branch/BranchController.php
View file @
34a45774
...
...
@@ -12,7 +12,6 @@ use app\models\v1\transport\ShopTransportType;
use
app\models\v1\branch\ShopBranchService
;
use
yii\web\BadRequestHttpException
;
use
backend\helpers\Func
;
use
yii\web\ServerErrorHttpException
;
use
yidas\phpSpreadsheet\Helper
;
use
yii\data\ActiveDataProvider
;
use
app\models\v1\rbacuser\ShopRbacUser
;
...
...
@@ -265,7 +264,6 @@ class BranchController extends BaseController
if
(
$model
->
save
())
{
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
201
);
}
elseif
(
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to create the object for unknown reason.');
throw
new
HttpException
(
500
,
'添加失败'
);
}
return
$model
;
...
...
@@ -547,7 +545,6 @@ 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
,
'修改失败'
);
}
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
202
);
...
...
@@ -582,7 +579,6 @@ class BranchController extends BaseController
if
(
!
$branchservice
)
{
throw
new
BadRequestHttpException
(
'没有找到要删除的记录'
);
}
else
if
(
$branchservice
->
delete
()
===
false
)
{
// throw new ServerErrorHttpException('Failed to delete the object for unknown reason.');
throw
new
HttpException
(
500
,
'删除失败'
);
}
...
...
@@ -1104,7 +1100,6 @@ class BranchController extends BaseController
$model
->
setAttributes
(
$other_param
);
$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
,
'修改失败'
);
}
return
$model
;
...
...
backend/controllers/v1/branch/BranchServiceTypeController.php
View file @
34a45774
...
...
@@ -9,10 +9,7 @@ use backend\helpers\Func;
use
backend\helpers\UploadFiles
;
use
yidas\phpSpreadsheet\Helper
;
use
yii\web\HttpException
;
use
yii\web\ServerErrorHttpException
;
use
yii\web\UploadedFile
;
use
app\models\v1\branch\BranchServiceType
;
use
app\models\v1\rbacuser\ShopRbacUser
;
class
BranchServiceTypeController
extends
BaseController
...
...
@@ -145,7 +142,6 @@ class BranchServiceTypeController extends BaseController
if
(
$model
->
save
())
{
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
201
);
}
elseif
(
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to create the object for unknown reason.');
throw
new
HttpException
(
500
,
'添加失败'
);
}
return
$model
;
...
...
@@ -186,7 +182,6 @@ class BranchServiceTypeController 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
,
'修改失败'
);
}
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
202
);
...
...
@@ -221,7 +216,6 @@ class BranchServiceTypeController extends BaseController
if
(
!
$branchservice
)
{
throw
new
BadRequestHttpException
(
'没有找到要删除的记录'
);
}
else
if
(
$branchservice
->
delete
()
===
false
)
{
// throw new ServerErrorHttpException('Failed to delete the object for unknown reason.');
throw
new
HttpException
(
500
,
'删除失败'
);
}
...
...
backend/controllers/v1/transport/TransportInitialPriceController.php
View file @
34a45774
...
...
@@ -6,11 +6,9 @@ use Yii;
use
backend\controllers\v1\BaseController
;
use
app\models\v1\branch\ShopCityDistributionRegion
;
use
yii\web\BadRequestHttpException
;
use
yii\web\ServerErrorHttpException
;
use
yii\web\UploadedFile
;
use
backend\helpers\UploadFiles
;
use
yidas\phpSpreadsheet\Helper
;
use
backend\helpers\Func
;
use
yii\web\HttpException
;
use
app\models\v1\rbacuser\ShopRbacUser
;
use
app\models\v1\branch\ShopBranch
;
...
...
@@ -135,7 +133,6 @@ class TransportInitialPriceController extends BaseController
$model
->
setAttributes
(
$param
);
if
(
$model
->
save
()
===
false
&&
!
$model
->
hasErrors
())
{
// throw new ServerErrorHttpException('Failed to update the object for unknown reason.');
throw
new
HttpException
(
500
,
'修改失败'
);
}
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
202
);
...
...
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