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
7e5e9151
Commit
7e5e9151
authored
Aug 31, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存地址返回addressId
parent
30aa7261
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Address.php
application/controllers/Address.php
+1
-2
AddressService.php
application/models/Business/User/AddressService.php
+2
-1
No files found.
application/controllers/Address.php
View file @
7e5e9151
...
...
@@ -27,9 +27,8 @@ class AddressController extends \Our\Controller_AbstractApi {
*/
public
function
saveAddressAction
(){
$result
=
$this
->
addressService
->
saveAddress
(
$this
->
req
[
\Our\NameConst
::
data
],
$this
->
memberId
);
$this
->
success
(
$result
,
\Our\DescribeConst
::
saveAddressSuccess
,
\Our\DescribeConst
::
saveAddressSuccess
);
if
(
$result
){
$this
->
success
(
new
stdClass
(
),
\Our\DescribeConst
::
saveAddressSuccess
,
\Our\DescribeConst
::
saveAddressSuccess
);
$this
->
success
(
array
(
'addressId'
=>
$result
),
\Our\DescribeConst
::
saveAddressSuccess
,
\Our\DescribeConst
::
saveAddressSuccess
);
}
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
saveAddressFailed
);
}
...
...
application/models/Business/User/AddressService.php
View file @
7e5e9151
...
...
@@ -37,11 +37,12 @@ class AddressServiceModel extends \Business\AbstractModel {
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db8\AddressRedisModel
::
getInstance
(),
array
(
&
$addressDao
,
'findByWhereWithColumns'
),
array
(),
array
(
$addressId
));
}
else
{
$result
=
$addressDao
->
insert
(
$address
);
$addressId
=
$result
;
}
if
(
$result
){
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db8\AddressRedisModel
::
getInstance
(),
array
(
&
$addressDao
,
'selectByWhere'
),
array
(),
array
(
$memberId
));
}
return
$
result
;
return
$
addressId
;
}
/**
...
...
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