| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?php
- /*
- * @Author: your name
- * @Date: 2021-04-22 17:20:17
- * @LastEditTime: 2021-06-22 16:34:34
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: \10dsm\app\Http\Controllers\Admins\AccountLogController.php
- */
- namespace App\Http\Controllers\Admins;
- use App\Modes\AccountLog;
- use Illuminate\Http\Request;
- use App\Http\Controllers\Controller;
- class AccountLogController extends Controller
- {
- /**
- * 点币转账记录
- * @author lyh
- * @date 2019/4/9
- * @modify 确认已区分系统管理员与地区管理员权限
- * @param Request $request
- * @description
- */
- public function changeCoin(Request $request)
- {
- $validator = \Validator::make($param = $request->all(), [
- 'required' => 'id|exists:user,id',
- ]);
- if ($validator->fails()) {
- return showJsonErr($validator->errors()->first());
- }
- // 区分系统管理员与地区管理员数据-2019-4-26 11:26:31
- if (\Auth::user()->is_super == 3 && !in_array($param['id'], getIds())) {
- return showJsonErr('抱歉,您没有权限查看该用户信息');
- }
-
- $result = AccountLog::whereUid($param['id'])
- //->whereIn('type', [3, 2])
- ->whereIn('type', [31, 30,32,45])
- ->whereStatus(1)
- ->select(['id', 'uid','source_uid','money', 'created_at', 'type','remark'])
- ->orderBy('created_at','desc')
- ->paginate(perPage());
- return showJsonSucc(1001, $result);
- }
- /*
- * 代理费缴费记录
- * wsl
- * 20190807
- * */
- public function agentPayLog(Request $request){
- $validator = \Validator::make($param = $request->all(), [
- 'required' => 'id|exists:user,id',
- ]);
- if ($validator->fails()) {
- return showJsonErr($validator->errors()->first());
- }
- // 区分系统管理员与地区管理员数据-2019-4-26 11:26:31
- if (\Auth::user()->is_super == 3 && !in_array($param['id'], getIds())) {
- return showJsonErr('抱歉,您没有权限查看该用户信息');
- }
- $result = AccountLog::whereUid($param['id'])
- //->whereIn('type', [3, 2])
- ->whereIn('type', [7, 8])
- ->whereStatus(1)
- ->select(['id', 'uid', 'money', 'created_at', 'type'])
- ->orderBy('created_at','desc')
- ->paginate(perPage());
- return showJsonSucc(1001, $result);
- }
- }
|