...
|
...
|
@@ -639,7 +639,7 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
$where['a.pay_time'] = [['>=',$start_time],['<=',$end_time]];
|
|
|
}
|
|
|
/*$indent_goods = Db::name('indent') -> alias('a') -> field("a.*,b.indent_id,b.book_name,b.pricing,b.price,b.number,b.thumbnail") -> join('indent_goods b','a.id=b.indent_id','LEFT') -> where($where) -> where("a.state =2 or a.state=3 or a.state=5") -> select();*/
|
|
|
$indent_money = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,a.pay_time,b.uid,b.money,b.type,b.book_num,b.indent_id,a.school,a.grade,a.class") -> join('money_income b','a.id=b.indent_id','LEFT') -> where($where) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> select() -> toArray();
|
|
|
$indent_money = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,a.pay_time,b.uid,b.money,b.type,b.book_num,b.indent_id,a.school,a.grade,a.class") -> join('money_income b','a.id=b.indent_id','LEFT') -> where($where) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> order('a.pay_time desc') -> select() -> toArray();
|
|
|
|
|
|
if(count($indent_money)!=0){
|
|
|
foreach ($indent_money as $key => $val){
|
...
|
...
|
@@ -650,7 +650,7 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
}else{
|
|
|
|
|
|
/*$indent_goods = Db::name('indent') -> alias('a') -> field("a.*,b.indent_id,b.book_name,b.pricing,b.price,b.number,b.thumbnail") -> join('indent_goods b','a.id=b.indent_id','LEFT') -> where('a.indent_type=2 and a.salesman_uid='.$uid) -> where("a.state =2 or a.state=3 or a.state=5") -> select();*/
|
|
|
$indent_goods = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,a.pay_time,b.uid,b.money,b.type,b.book_num,b.indent_id") -> join('money_income b','a.id=b.indent_id','LEFT') -> where('a.indent_type=2 and a.salesman_uid='.$uid) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> select() -> toArray();
|
|
|
$indent_goods = Db::name('indent') -> alias('a') -> field("a.id,a.order_number,a.pay_time,b.uid,b.money,b.type,b.book_num,b.indent_id") -> join('money_income b','a.id=b.indent_id','LEFT') -> where('a.indent_type=2 and a.salesman_uid='.$uid) -> where("a.state =2 or a.state=3 or a.state=5") -> where("b.uid =".$uid) -> order('a.pay_time desc') -> select() -> toArray();
|
|
|
if(count($indent_goods)!=0){
|
|
|
foreach ($indent_goods as $key => $val){
|
|
|
$indent_goods[$key]['book_name'] = Db::name('indent_goods') -> where('indent_id',$val['id']) -> select() -> toArray();
|
...
|
...
|
|