|
@@ -104,7 +104,7 @@ class Data extends Core
|
|
|
|
|
|
$info = Dever::db('shop/sell_order')->find(array('code' => $code, 'id' => $order_id));
|
|
|
|
|
|
- if ($info && $info['shop_id'] == $this->shop_id && $infn['status'] <= 3) {
|
|
|
+ if ($info && $info['shop_id'] == $this->shop_id && $info['status'] <= 3) {
|
|
|
|
|
|
$state = Dever::db('shop/sell_order')->update(array('where_id' => $info['id'], 'status' => 4, 'operdate' => time()));
|
|
|
|
|
@@ -183,7 +183,7 @@ class Data extends Core
|
|
|
|
|
|
public function getCoupon()
|
|
|
{
|
|
|
- $this->data = Dever::db('shop/coupon')->getAllPage(array('shop_id' => $this->shop_id));
|
|
|
+ $this->data = Dever::db('shop/coupon')->getAllPage(array('shop_id' => $this->shop_id, 'method' => 3));
|
|
|
|
|
|
if ($this->data) {
|
|
|
$time = time();
|
|
@@ -196,19 +196,18 @@ class Data extends Core
|
|
|
$shop = Dever::db('shop/info')->getOne(array('id' => $v1['shop_id'], 'city' => $v['city'], 'coupon_city' => 1));
|
|
|
if ($shop) {
|
|
|
$this->data[$k]['shop'][] = $shop;
|
|
|
-
|
|
|
- if ($k1 > 0) {
|
|
|
- $city = Dever::db('area/city')->find($v['city']);
|
|
|
- $this->data[$k]['shop_name'] = $city['name'] . '多店通用';
|
|
|
- } else {
|
|
|
- $this->data[$k]['shop_name'] = $shop['name'];
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (!$this->data[$k]['shop']) {
|
|
|
- $shop = Dever::db('shop/info')->getOne($v['shop_id']);
|
|
|
- $this->data[$k]['shop'][] = $shop;
|
|
|
+ $shop = Dever::db('shop/info')->getOne($v['shop_id']);
|
|
|
+ if ($this->data[$k]['info']['method'] == 1) {
|
|
|
+ $this->data[$k]['shop_name'] = '平台通用';
|
|
|
+ } elseif ($this->data[$k]['info']['method'] == 2) {
|
|
|
+ $this->data[$k]['shop_name'] = $shop['name'];
|
|
|
+ if (count($this->data[$k]['shop']) > 1) {
|
|
|
+ $this->data[$k]['shop_name'] .= '多店通用';
|
|
|
+ }
|
|
|
+ } elseif ($this->data[$k]['info']['method'] == 3) {
|
|
|
$this->data[$k]['shop_name'] = $shop['name'];
|
|
|
}
|
|
|
}
|
|
@@ -233,7 +232,7 @@ class Data extends Core
|
|
|
if ($info['uid'] && $info['uid'] > 0) {
|
|
|
foreach ($coupon as $k => $v) {
|
|
|
$num = isset($coupon_num[$k]) ? $coupon_num[$k] : 1;
|
|
|
- Dever::load('shop/lib/coupon')->getOne($info['uid'], $this->shop, $v, $num, false);
|
|
|
+ Dever::load('shop/lib/coupon')->getOne($info['uid'], $this->shop, $v, 1, $num, false);
|
|
|
}
|
|
|
}
|
|
|
|