mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-07-05 21:32:31 +08:00
消息
This commit is contained in:
@ -2,6 +2,9 @@
|
||||
|
||||
namespace Home\Controller;
|
||||
|
||||
use Service\OrderService;
|
||||
use Service\GoodsService;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
* @author Devil
|
||||
@ -54,6 +57,18 @@ class UserController extends CommonController
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 订单总数
|
||||
$where = ['user_id'=>$this->user['id'], 'is_delete_time'=>0, 'user_is_delete_time'=>0];
|
||||
$this->assign('user_order_count', OrderService::OrderTotal($where));
|
||||
|
||||
// 商品收藏总数
|
||||
$where = ['user_id'=>$this->user['id']];
|
||||
$this->assign('user_goods_favor_count', GoodsService::FavorGoodsTotal($where));
|
||||
|
||||
// 用户订单状态
|
||||
$user_order_status = OrderService::OrderStatusStepTotal(['user_type'=>'user', 'user'=>$this->user, 'is_comments'=>1]);
|
||||
$this->assign('user_order_status', $user_order_status['data']);
|
||||
|
||||
$this->display('Index');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user