用户资金明细修改
This commit is contained in:
@@ -28,6 +28,45 @@ class UserScore extends Controller
|
||||
\exportToCsv('test.csv',['创建时间','会员号','操作人员','资金项目','操作前余额','金额','操作后余额','备注'],$list);
|
||||
}
|
||||
|
||||
public function get_all_list() {
|
||||
$data = $_GET;
|
||||
$page = 0;
|
||||
if (isset($data['PageIndex'])) {
|
||||
$page = ($data['PageIndex'] - 1) * 50;
|
||||
}
|
||||
$where_str = '';
|
||||
if (!empty($data)) {
|
||||
if (!empty($data['st'])) {
|
||||
$date1 = date('Y-m-d', strtotime($data['st']));
|
||||
$date2 = date('Y-m-d', strtotime($data['et']));
|
||||
$where_str = " CreateTime>='" . $date1 . "' and CreateTime<='" . $date2 . "' ";
|
||||
}
|
||||
|
||||
if (!empty($data['type'])) {
|
||||
if (!empty($where_str)) {
|
||||
$where_str .= ' AND ';
|
||||
}
|
||||
$where_str .= " ScoreType='" . $data['type'] . "' ";
|
||||
}
|
||||
|
||||
if (!empty($data['keyWord'])) {
|
||||
if (!empty($where_str)) {
|
||||
$where_str .= ' AND ';
|
||||
}
|
||||
$where_str .= " UserName='" . $data['keyWord'] . "' ";
|
||||
}
|
||||
}
|
||||
$user_score_model = new UserScoreModel;
|
||||
|
||||
$list = $user_score_model->field('*')->where($where_str)->order('Id desc')->limit("$page,50")->fetchAll();;
|
||||
|
||||
echo json_encode([
|
||||
'Code' => 10000,
|
||||
'Data' => $list,
|
||||
'TotalCount' => (int)$user_score_model->getCount($where_str)['count'],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取资金明细列表
|
||||
* @param {*}
|
||||
|
||||
Reference in New Issue
Block a user