Commit a79066d1 authored by liuyuzhen's avatar liuyuzhen

保存用户个人信息

parent a84597b9
...@@ -34,10 +34,10 @@ class MemberController extends \Our\Controller_AbstractApi { ...@@ -34,10 +34,10 @@ class MemberController extends \Our\Controller_AbstractApi {
public function saveMemberInfoAction(){ public function saveMemberInfoAction(){
$data = $this->req[\Our\NameConst::data]; $data = $this->req[\Our\NameConst::data];
$result = $this->memberService->saveMemberInfo($data,$this->memberId); $result = $this->memberService->saveMemberInfo($data,$this->memberId);
if(!$result){ if($result===false){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::saveMemberFailed); \Error\ErrorModel::throwException(\Error\CodeConfigModel::saveMemberFailed);
} }
$this->success(array('sql'=>$result),\Our\DescribeConst::saveMemberSuccess,\Our\DescribeConst::saveMemberSuccess); $this->success(new stdClass(),\Our\DescribeConst::saveMemberSuccess,\Our\DescribeConst::saveMemberSuccess);
} }
/** /**
......
...@@ -43,7 +43,6 @@ class AdvMobileModel extends \DAO\AbstractModel{ ...@@ -43,7 +43,6 @@ class AdvMobileModel extends \DAO\AbstractModel{
} }
} }
$result = $this->db->fetchAll(); $result = $this->db->fetchAll();
//echo $this->db->getLastSql();
return $result; return $result;
} }
......
...@@ -269,14 +269,14 @@ class MemberModel extends \DAO\AbstractModel ...@@ -269,14 +269,14 @@ class MemberModel extends \DAO\AbstractModel
\Error\ErrorModel::throwException(\Error\CodeConfigModel::memberNameLengthLimit); \Error\ErrorModel::throwException(\Error\CodeConfigModel::memberNameLengthLimit);
} }
} }
if ($where['memberBirthday']) { /*if ($where['memberBirthday']) {
if (!\Our\Validate::checkDateStr($where['memberBirthday'])) { if (!\Our\Validate::checkDateStr($where['memberBirthday'])) {
\Error\ErrorModel::throwException(\Error\CodeConfigModel::memberBirthdayError); \Error\ErrorModel::throwException(\Error\CodeConfigModel::memberBirthdayError);
} }
if (strtotime($where['memberBirthday']) > strtotime(date('Y-m-d'))) { if (strtotime($where['memberBirthday']) > strtotime(date('Y-m-d'))) {
\Error\ErrorModel::throwException(\Error\CodeConfigModel::illegalMemberBirthday); \Error\ErrorModel::throwException(\Error\CodeConfigModel::illegalMemberBirthday);
} }
} }*/
if (!($where['memberSex'] && in_array($where['memberSex'], array(\Our\ApiConst::woman, \Our\ApiConst::man)))) { if (!($where['memberSex'] && in_array($where['memberSex'], array(\Our\ApiConst::woman, \Our\ApiConst::man)))) {
\Error\ErrorModel::throwException(\Error\CodeConfigModel::wrongMemberSex); \Error\ErrorModel::throwException(\Error\CodeConfigModel::wrongMemberSex);
} }
......
...@@ -200,7 +200,6 @@ class StoreModel extends \DAO\AbstractModel ...@@ -200,7 +200,6 @@ class StoreModel extends \DAO\AbstractModel
}else{ }else{
$result = $this->db->select($field)->from($this->_tableName)->where($where)->fetchAll(); $result = $this->db->select($field)->from($this->_tableName)->where($where)->fetchAll();
} }
//echo $this->db->getLastSql();
return $result; return $result;
} }
......
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