Merge branch 'release'

This commit is contained in:
mzl
2025-11-03 18:16:51 +08:00
parent a0935c4332
commit 359755fdf1
38 changed files with 2339 additions and 36 deletions
+16 -2
View File
@@ -172,7 +172,7 @@ class AuthLogic
$payload = $this->buildJwtPayload($user, $system);
$token = $this->generateAccessToken($payload);
$refreshToken = $this->generateRefreshToken($user->id, $data['system_code']);
$homeUrl = $this->getHome($system->id);
$homeUrl = $this->getHome($system->id, $payload);
// 记录 token 到 Redis 和 MySQL
$this->recordUserToken($user->id, $token, $data['system_code']);
@@ -537,8 +537,22 @@ class AuthLogic
}
public function getHome($systemId)
public function getHome($systemId, $data)
{
// 2025.10.30 临时处理 ====== start
if ($systemId == 1) {
if (in_array(1, $data['role_ids'])) {
return '/dashboard/console';
}
if (count($data['role_ids']) == 1 && in_array(5, $data['role_ids'])) {
return '/dashboard/console/backoffice';
}
if (count($data['role_ids']) == 1 && in_array(6, $data['role_ids'])) {
return '/dashboard/console/finance';
}
}
// 2025.10.30 临时处理 ====== end
$info = Resource::where('system_id', $systemId)
->where('is_home', 1)
->first();
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace app\common\logic;
use app\common\traits\crud\CrudLogicTrait;
use app\common\model\FinPaymentApply;
class FinPaymentApplyLogic
{
use CrudLogicTrait;
/**
* 指定当前要操作的模型
*/
protected string $modelClass = FinPaymentApply::class;
}
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace app\common\logic;
use app\common\traits\crud\CrudLogicTrait;
use app\common\model\FinReceiptHis;
class FinReceiptHisLogic
{
use CrudLogicTrait;
/**
* 指定当前要操作的模型
*/
protected string $modelClass = FinReceiptHis::class;
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace app\common\logic;
use app\common\traits\crud\CrudLogicTrait;
use app\common\model\FinReceipt;
class FinReceiptLogic
{
use CrudLogicTrait;
/**
* 指定当前要操作的模型
*/
protected string $modelClass = FinReceipt::class;
public function credit($id)
{
return FinReceipt::where('id', $id)->update(['received_at' => time()]);
}
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace app\common\logic;
use app\common\model\SysConfig;
use app\common\model\SysCurrency;
use app\common\traits\crud\CrudLogicTrait;
class SysConfigLogic
{
use CrudLogicTrait;
/**
* 指定当前要操作的模型
*/
protected string $modelClass = SysCurrency::class;
public function findByKey(string $key)
{
return SysConfig::where('status', 1)->where('config_key', $key)->get(['id', 'config_key', 'config_value']);
}
}