feat/task1-c-wallet
parent
e158c2c928
commit
00c44c0e10
|
|
@ -117,7 +117,7 @@ Page({
|
||||||
user_order_status_list: temp_user_order_status_list,
|
user_order_status_list: temp_user_order_status_list,
|
||||||
customer_service_tel: data.customer_service_tel || null,
|
customer_service_tel: data.customer_service_tel || null,
|
||||||
common_user_center_notice: data.common_user_center_notice || null,
|
common_user_center_notice: data.common_user_center_notice || null,
|
||||||
avatar: (data.avatar != null) ? data.avatar : app.data.default_user_head_src,
|
avatar: (data.avatar != null) ? data.avatar : ((this.data.avatar || null) == null ? app.data.default_user_head_src : this.data.avatar),
|
||||||
nickname: (data.nickname != null) ? data.nickname : this.data.nickname,
|
nickname: (data.nickname != null) ? data.nickname : this.data.nickname,
|
||||||
message_total: ((data.common_message_total || 0) == 0) ? 0 : data.common_message_total,
|
message_total: ((data.common_message_total || 0) == 0) ? 0 : data.common_message_total,
|
||||||
head_nav_list: temp_head_nav_list,
|
head_nav_list: temp_head_nav_list,
|
||||||
|
|
|
||||||
|
|
@ -1223,6 +1223,18 @@ class OrderService
|
||||||
*/
|
*/
|
||||||
public static function OrderStatusStepTotal($params = [])
|
public static function OrderStatusStepTotal($params = [])
|
||||||
{
|
{
|
||||||
|
// 状态数据封装
|
||||||
|
$result = [];
|
||||||
|
$order_status_list = L('common_order_user_status');
|
||||||
|
foreach(L('common_order_user_status') as $v)
|
||||||
|
{
|
||||||
|
$result[] = [
|
||||||
|
'name' => $v['name'],
|
||||||
|
'status' => $v['id'],
|
||||||
|
'count' => 0,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// 用户类型
|
// 用户类型
|
||||||
$user_type = isset($params['user_type']) ? $params['user_type'] : '';
|
$user_type = isset($params['user_type']) ? $params['user_type'] : '';
|
||||||
|
|
||||||
|
|
@ -1238,27 +1250,20 @@ class OrderService
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增用户条件
|
// 用户条件
|
||||||
if($user_type == 'user' && !empty($params['user']))
|
if($user_type == 'user')
|
||||||
{
|
{
|
||||||
$where['user_id'] = $params['user']['id'];
|
if(!empty($params['user']))
|
||||||
|
{
|
||||||
|
$where['user_id'] = $params['user']['id'];
|
||||||
|
} else {
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$field = 'COUNT(DISTINCT id) AS count, status';
|
$field = 'COUNT(DISTINCT id) AS count, status';
|
||||||
$data = M('Order')->where($where)->field($field)->group('status')->select();
|
$data = M('Order')->where($where)->field($field)->group('status')->select();
|
||||||
|
|
||||||
// 状态数据封装
|
|
||||||
$result = [];
|
|
||||||
$order_status_list = L('common_order_user_status');
|
|
||||||
foreach(L('common_order_user_status') as $v)
|
|
||||||
{
|
|
||||||
$result[] = [
|
|
||||||
'name' => $v['name'],
|
|
||||||
'status' => $v['id'],
|
|
||||||
'count' => 0,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 数据处理
|
// 数据处理
|
||||||
if(!empty($data))
|
if(!empty($data))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue