data_center/app/adminapi/controller/finance/AccountLogController.php

73 lines
2.0 KiB
PHP

<?php
namespace app\adminapi\controller\finance;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\finance\AccountLogLists;
use app\common\enum\user\AccountLogEnum;
use think\response\Json;
/***
* 账户流水控制器
* Class AccountLogController
* @package app\adminapi\controller
*/
class AccountLogController extends BaseAdminController
{
/**
* @notes 账户流水明细
* @return \think\response\Json
* @author 段誉
* @date 2023/2/24 15:25
*/
public function lists()
{
return $this->dataLists(new AccountLogLists());
}
public function taskLists(): Json
{
$params = $this->request->get(['company_id', 'change_type', 'user_info', 'type', 'start_time', 'end_time']);
$result = curl_post(env('project.worker_domain').'/middleapi/account_log/lists',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
/**
* @notes 用户余额变动类型
* @return \think\response\Json
* @author 段誉
* @date 2023/2/24 15:25
*/
public function getUmChangeType()
{
return $this->data(AccountLogEnum::getUserMoneyChangeTypeDesc());
}
public function getTaskUmChangeType(): Json
{
$params = $this->request->get();
$result = curl_post(env('project.worker_domain').'/middleapi/account_log/getUmChangeType',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
public function getTaskCompanyUserList(): Json
{
$params = $this->request->get(['company_id']);
$result = curl_post(env('project.worker_domain').'/middleapi/account_log/getCompanyUserList',$params,$this->reqHeader);
if($result['code'] == 0){
return $this->fail($result['msg']);
}
return json($result);
}
}