Pārlūkot izejas kodu

feat(admin): 添加分红积分基准价格设置并进行有效性验证

- 在系统配置中添加"award_integral_price"字段,用于设置分红积分基准价格
- 添加对分红积分基准价格的验证,确保其值大于 0
- 优化了代码格式,调整了数组元素的缩进
kirin 5 mēneši atpakaļ
vecāks
revīzija
616dc45061
1 mainītis faili ar 50 papildinājumiem un 0 dzēšanām
  1. 50 0
      app/command/Test.php

+ 50 - 0
app/command/Test.php

@@ -0,0 +1,50 @@
+<?php
+// +----------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +----------------------------------------------------------------------
+// | Author: CRMEB Team <admin@crmeb.com>
+// +----------------------------------------------------------------------
+
+declare (strict_types=1);
+
+namespace app\command;
+
+use app\common\repositories\user\AwardIntegralPriceRepository;
+use Swoole\Coroutine\MySQL\Exception;
+use think\console\Command;
+use think\console\Input;
+use think\console\input\Argument;
+use think\console\input\Option;
+use think\console\Output;
+use think\event\RouteLoaded;
+use think\facade\Route;
+use app\common\repositories\system\auth\MenuRepository;
+
+class Test extends Command
+{
+
+    protected function configure()
+    {
+        // 指令配置
+        $this->setName('test')
+            ->setDescription('测试');
+    }
+
+    /**
+     * 更新路由
+     * @Author:Qinii
+     * @Date: 2020/5/15
+     * @param Input $input
+     * @param Output $output
+     * @return int|void|null
+     */
+    protected function execute(Input $input, Output $output)
+    {
+        $price = app()->make(AwardIntegralPriceRepository::class)->awardIntegralPrice();
+        $output->info(json_encode($price));
+    }
+}