初始版本
This commit is contained in:
67
server/app/adminapi/logic/setting/TransactionSettingsLogic.php
Executable file
67
server/app/adminapi/logic/setting/TransactionSettingsLogic.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\logic\setting;
|
||||
|
||||
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\service\ConfigService;
|
||||
|
||||
class TransactionSettingsLogic extends BaseLogic
|
||||
{
|
||||
/**
|
||||
* @notes 获取交易设置
|
||||
* @return array
|
||||
* @author ljj
|
||||
* @date 2022/2/15 11:40 上午
|
||||
*/
|
||||
public static function getConfig()
|
||||
{
|
||||
$config = [
|
||||
'cancel_unpaid_orders' => ConfigService::get('transaction', 'cancel_unpaid_orders',1),
|
||||
'cancel_unpaid_orders_times' => ConfigService::get('transaction', 'cancel_unpaid_orders_times',30),
|
||||
'verification_orders' => ConfigService::get('transaction', 'verification_orders',1),
|
||||
'verification_orders_times' => ConfigService::get('transaction', 'verification_orders_times',24),
|
||||
'is_auth_dispatch' => ConfigService::get('transaction', 'is_auth_dispatch',1),
|
||||
];
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置交易设置
|
||||
* @param $params
|
||||
* @author ljj
|
||||
* @date 2022/2/15 11:49 上午
|
||||
*/
|
||||
public static function setConfig($params)
|
||||
{
|
||||
ConfigService::set('transaction', 'cancel_unpaid_orders', $params['cancel_unpaid_orders']);
|
||||
ConfigService::set('transaction', 'verification_orders', $params['verification_orders']);
|
||||
ConfigService::set('transaction', 'is_auth_dispatch', $params['is_auth_dispatch']);
|
||||
|
||||
if(isset($params['cancel_unpaid_orders_times'])) {
|
||||
ConfigService::set('transaction', 'cancel_unpaid_orders_times', $params['cancel_unpaid_orders_times']);
|
||||
}
|
||||
|
||||
if(isset($params['verification_orders_times'])) {
|
||||
ConfigService::set('transaction', 'verification_orders_times', $params['verification_orders_times']);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user