Commit 7e5e9151 authored by liuyuzhen's avatar liuyuzhen

保存地址返回addressId

parent 30aa7261
......@@ -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);
}
......
......@@ -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;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment