|
@@ -241,5 +241,69 @@ return array
|
|
'type' => 'one',
|
|
'type' => 'one',
|
|
'col' => 'id,sum(t_2.num) as total',
|
|
'col' => 'id,sum(t_2.num) as total',
|
|
),
|
|
),
|
|
|
|
+
|
|
|
|
+ # 获取总金额
|
|
|
|
+ 'getCashNum' => array
|
|
|
|
+ (
|
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
|
+ 'option' => array
|
|
|
|
+ (
|
|
|
|
+ 'start' => array('yes-t_2.cdate', '>='),
|
|
|
|
+ 'end' => array('yes-t_2.cdate', '<='),
|
|
|
|
+ 'start_o' => array('yes-t_2.operdate', '>='),
|
|
|
|
+ 'end_o' => array('yes-t_2.operdate', '<='),
|
|
|
|
+ 'type' => array('yes-t_2.type'),
|
|
|
|
+ 'type_id' => array('yes-t_2.type_id'),
|
|
|
|
+ 'source_type' => array('yes-t_2.source_type'),
|
|
|
|
+ 'source_id' => array('yes-t_2.source_id'),
|
|
|
|
+ 'status' => array('yes-t_2.status', 'in'),
|
|
|
|
+ 'state' => array('yes-t_2.state', 1),
|
|
|
|
+ 'state_1' => array('yes-t_1.state', 1),
|
|
|
|
+ ),
|
|
|
|
+ # 联表
|
|
|
|
+ 'join' => array
|
|
|
|
+ (
|
|
|
|
+ array
|
|
|
|
+ (
|
|
|
|
+ 'table' => 'shop/buy_order',
|
|
|
|
+ 'type' => 'left join',
|
|
|
|
+ 'on' => array('order_id','id'),
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+ 'type' => 'one',
|
|
|
|
+ 'col' => 'id,sum(t_1.price*t_1.num) as total',
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ # 获取总金额
|
|
|
|
+ 'getPCashNum' => array
|
|
|
|
+ (
|
|
|
|
+ # 匹配的正则或函数 选填项
|
|
|
|
+ 'option' => array
|
|
|
|
+ (
|
|
|
|
+ 'start' => array('yes-t_2.cdate', '>='),
|
|
|
|
+ 'end' => array('yes-t_2.cdate', '<='),
|
|
|
|
+ 'start_o' => array('yes-t_2.operdate', '>='),
|
|
|
|
+ 'end_o' => array('yes-t_2.operdate', '<='),
|
|
|
|
+ 'type' => array('yes-t_2.type'),
|
|
|
|
+ 'type_id' => array('yes-t_2.type_id'),
|
|
|
|
+ 'source_type' => array('yes-t_2.source_type'),
|
|
|
|
+ 'source_id' => array('yes-t_2.source_id'),
|
|
|
|
+ 'status' => array('yes-t_2.status', 'in'),
|
|
|
|
+ 'state' => array('yes-t_2.state', 1),
|
|
|
|
+ 'state_1' => array('yes-t_1.state', 1),
|
|
|
|
+ ),
|
|
|
|
+ # 联表
|
|
|
|
+ 'join' => array
|
|
|
|
+ (
|
|
|
|
+ array
|
|
|
|
+ (
|
|
|
|
+ 'table' => 'shop/buy_order',
|
|
|
|
+ 'type' => 'left join',
|
|
|
|
+ 'on' => array('order_id','id'),
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+ 'type' => 'one',
|
|
|
|
+ 'col' => 'id,sum(t_1.p_price*t_1.num) as total',
|
|
|
|
+ ),
|
|
),
|
|
),
|
|
);
|
|
);
|