|
@@ -9,7 +9,7 @@ class UserConveyCate extends Base
|
|
|
|
|
|
// 更新用户常用运送类型
|
|
|
public function updateCate($userId,$conveyCateId){
|
|
|
- $info = Db::name('user_convey_cate')->where('user_id',$userId)->where($conveyCateId)->find();
|
|
|
+ $info = Db::name('user_convey_cate')->where('user_id',$userId)->where('convey_cate_id',$conveyCateId)->find();
|
|
|
if($info){
|
|
|
$ret = Db::name('user_convey_cate')->where('id',$info['id'])->setInc('nums',1);
|
|
|
}else{
|
|
@@ -30,6 +30,7 @@ class UserConveyCate extends Base
|
|
|
|
|
|
public function sortUserCates($lists,$userId){
|
|
|
$cates = $this->getUserCates($userId);
|
|
|
+ $cates = $cates?array_unique($cates):[];
|
|
|
if(!$cates){
|
|
|
return $lists;
|
|
|
}
|