Commit c20dce3f authored by liuyuzhen's avatar liuyuzhen

地址管理

parent 4d97f9a8
...@@ -454,6 +454,9 @@ class AddressServiceModel extends \Business\AbstractModel { ...@@ -454,6 +454,9 @@ class AddressServiceModel extends \Business\AbstractModel {
if(!($address['address']&&$address['name'])){ if(!($address['address']&&$address['name'])){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyAddressAndName); \Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyAddressAndName);
} }
if(!($address['tag_type']>=\Our\ApiConst::zero&&$address['tag_type']<=3)){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::wrongAddressTagType);
}
if($province){ if($province){
$province = mb_substr($province,0,2); $province = mb_substr($province,0,2);
$provinceList = $areaList[\Our\ApiConst::zero]; $provinceList = $areaList[\Our\ApiConst::zero];
......
...@@ -36,6 +36,7 @@ class StoreOnlineGoodsClassModel extends \DAO\AbstractModel{ ...@@ -36,6 +36,7 @@ class StoreOnlineGoodsClassModel extends \DAO\AbstractModel{
public function insert($data){ public function insert($data){
$this->setDb(\Our\DbNameConst::masterDBConnectName); $this->setDb(\Our\DbNameConst::masterDBConnectName);
$data['gmt_create'] = TIMESTAMP; $data['gmt_create'] = TIMESTAMP;
$data['gmt_update'] = TIMESTAMP;
$result = $this->db->insert($this->_tableName)->rows($data)->execute(); $result = $this->db->insert($this->_tableName)->rows($data)->execute();
if($result){ if($result){
$storeId = $data['store_id']; $storeId = $data['store_id'];
......
...@@ -354,6 +354,7 @@ const notAllowDelete=300114; ...@@ -354,6 +354,7 @@ const notAllowDelete=300114;
const emptyCityId = 140019; const emptyCityId = 140019;
const emptyDistrictId = 140020; const emptyDistrictId = 140020;
const emptyAddressAndName = 140021; const emptyAddressAndName = 140021;
const wrongAddressTagType = 140022;
//消息,推送等 //消息,推送等
const removeMessage=150001; const removeMessage=150001;
...@@ -580,6 +581,7 @@ const notAllowDelete=300114; ...@@ -580,6 +581,7 @@ const notAllowDelete=300114;
self::emptyCityId => '找不到对应城市', self::emptyCityId => '找不到对应城市',
self::emptyDistrictId => '找不到对应区', self::emptyDistrictId => '找不到对应区',
self::emptyAddressAndName => '地址和具体街道不能为空', self::emptyAddressAndName => '地址和具体街道不能为空',
self::wrongAddressTagType => '地址标签传输错误',
self::emptyLatLng => '经纬度不能为空', self::emptyLatLng => '经纬度不能为空',
self::emptyCityCode => '高德地图城市编码不能为空', self::emptyCityCode => '高德地图城市编码不能为空',
......
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