|
@@ -529,14 +529,15 @@ class My extends Core
|
|
|
$shop = Dever::db('shop/info')->find($shop_id);
|
|
|
$data = array();
|
|
|
$data['price'] = $shop['price'];
|
|
|
- if($month){
|
|
|
- $start = $month .'-01 00:00:00';
|
|
|
- $end = date('Y-m-d', strtotime($start. ' +1 month -1 day')).' 23:59:59';
|
|
|
- }else{
|
|
|
- $start = strtotime(date('Y-m'));
|
|
|
- $end = strtotime(date('Y-m-d 23:59:59',strtotime(date('Y-m-01', $start)."+1 month - 1 day")));
|
|
|
- }
|
|
|
- $data['list'] = Dever::db('shop/record')->getAll(array('start'=>$start,'end'=>$end,'shop_id'=>$shop_id,'state'=>1));
|
|
|
+ if ($month) {
|
|
|
+ $start = $month . '-01 00:00:00';
|
|
|
+ $end = strtotime("$start +1 month -1 day");
|
|
|
+ $where['start'] = Dever::maketime($start);
|
|
|
+ $where['end'] = $end;
|
|
|
+ }
|
|
|
+ $where['shop_id'] = $shop_id;
|
|
|
+ $where['state'] = 1;
|
|
|
+ $data['list'] = Dever::db('shop/record')->getAll($where);
|
|
|
foreach($data['list'] as $k=>$v){
|
|
|
if($v['type'] == 1 || $v['type'] == 3 || $v['type'] == 6 || $v['type'] == 7 || $v['type'] == 8){
|
|
|
$data['list'][$k]['price'] = '+'.$v['price'];
|