|
|
@@ -85,10 +85,19 @@ class StoreOrderCartInfoDao extends BaseDao
|
|
|
->count();
|
|
|
return $count > 0;
|
|
|
}
|
|
|
- public function getUserProduct($uid,$product,$order_ids){
|
|
|
- $res = $this->getModel()->where('uid',$uid)->where('product_id',$product)->where('oid','in',$order_ids)->count();
|
|
|
- $sql = $this->getModel()->getLastSql();
|
|
|
- @file_put_contents("quanju.txt", $sql."sql语句\r\n", 8);
|
|
|
- return $res;
|
|
|
+
|
|
|
+ public function getUserProduct($uid, $product, $order_ids)
|
|
|
+ {
|
|
|
+ try {
|
|
|
+
|
|
|
+
|
|
|
+ $res = $this->getModel()->where('uid', $uid)->where('product_id', $product)->where('oid', 'in', $order_ids)->count();
|
|
|
+ $sql = $this->getModel()->getLastSql();
|
|
|
+ @file_put_contents("quanju.txt", $sql . "sql语句\r\n", 8);
|
|
|
+ return $res;
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ @file_put_contents("quanju.txt", json_encode($e->getMessage()) . "-报错内容\r\n", 8);
|
|
|
+ throw $e;
|
|
|
+ }
|
|
|
}
|
|
|
}
|