|
@@ -57,9 +57,7 @@ class Journal
|
|
# 这里就是为了做下sql的实现方式,其实用dever自带的功能完全可以实现。
|
|
# 这里就是为了做下sql的实现方式,其实用dever自带的功能完全可以实现。
|
|
$day = date('Y-m-d', $where['start']);
|
|
$day = date('Y-m-d', $where['start']);
|
|
$sql = 'select * from wonderful_journal_order where type = 1 and product_id = '.$info['id'].' and state = 1 and cdate >= '.$where['start'].' and cdate <= '.$where['end'];
|
|
$sql = 'select * from wonderful_journal_order where type = 1 and product_id = '.$info['id'].' and state = 1 and cdate >= '.$where['start'].' and cdate <= '.$where['end'];
|
|
- echo $sql;
|
|
|
|
$order = Dever::db('journal/order')->fetchAll($sql);
|
|
$order = Dever::db('journal/order')->fetchAll($sql);
|
|
- print_r($order);
|
|
|
|
|
|
|
|
if ($order) {
|
|
if ($order) {
|
|
$order_num = $order_yes_num = $order_no_num = $buy_num = $buy_cash = 0;
|
|
$order_num = $order_yes_num = $order_no_num = $buy_num = $buy_cash = 0;
|
|
@@ -99,9 +97,7 @@ class Journal
|
|
$update['buy_num'] = $buy_num;
|
|
$update['buy_num'] = $buy_num;
|
|
$update['buy_cash'] = $buy_cash;
|
|
$update['buy_cash'] = $buy_cash;
|
|
$update['journal_id'] = $info_id;
|
|
$update['journal_id'] = $info_id;
|
|
-
|
|
|
|
- print_r($update);die;
|
|
|
|
-
|
|
|
|
|
|
+
|
|
$where = array();
|
|
$where = array();
|
|
$where['day_int'] = $update['day_int'];
|
|
$where['day_int'] = $update['day_int'];
|
|
$where['journal_id'] = $update['journal_id'];
|
|
$where['journal_id'] = $update['journal_id'];
|