Commit cc1aa27a authored by clone's avatar clone

1

parent 2e7b5974
...@@ -83,8 +83,8 @@ class AccountBalance extends Basic ...@@ -83,8 +83,8 @@ class AccountBalance extends Basic
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
$user_id = $params["user_id"]; $user_id = $params["user_id"];
$user_phone = $params["money"]; $user_phone = $params["user_phone"];
$money = $params["user_phone"]; $money = $params["money"];
$user_name = $params["user_name"]; $user_name = $params["user_name"];
if ($money < 30) { if ($money < 30) {
return $this->response("101", "提现金额不能小于30"); return $this->response("101", "提现金额不能小于30");
......
...@@ -45,10 +45,10 @@ class UAccountBalance extends Model ...@@ -45,10 +45,10 @@ class UAccountBalance extends Model
$where_str .= " and a.user_id = {$params['user_id']}"; $where_str .= " and a.user_id = {$params['user_id']}";
} }
$sql = "SELECT * FROM ( $sql = "SELECT * FROM (
( SELECT a.id, a.user_id, a.source_id, a.money,a.user_name, a.create_time, 1 AS is_essay,a.status,c.title ( SELECT a.id, a.user_id, a.source_id, a.money,a.user_name, a.create_time, 1 AS is_essay,a.status,c.title,a.user_phone
FROM `u_account_balance` a left join c_coupon b on a.source_id=b.id FROM `u_account_balance` a left join c_coupon b on a.source_id=b.id
left join c_activity c on b.activity_id=c.id WHERE a.status = 0 and a.source_type = 0 $where_str) UNION left join c_activity c on b.activity_id=c.id WHERE a.status = 0 and a.source_type = 0 $where_str) UNION
( SELECT a.id, a.user_id,0 as source_id , a.money, a.user_name, a.create_time, 2 AS is_essay,a.status,0 as title FROM `u_account_check` a ( SELECT a.id, a.user_id,0 as source_id , a.money, a.user_name, a.create_time, 2 AS is_essay,a.status,0 as title,a.user_phone FROM `u_account_check` a
WHERE a.status IN ( 0, 1, 2 ) $where_str) WHERE a.status IN ( 0, 1, 2 ) $where_str)
) AS aaa ORDER BY `create_time` DESC LIMIT {$indexStart}, {$pageSize}"; ) AS aaa ORDER BY `create_time` DESC LIMIT {$indexStart}, {$pageSize}";
$result = $this->query($sql); $result = $this->query($sql);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment