You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.0 KiB
43 lines
1.0 KiB
3 months ago
|
<?php
|
||
|
|
||
|
namespace app\admin\service\setting;
|
||
|
|
||
|
use app\admin\service\AdminBaseService;
|
||
|
use app\admin\validate\setting\StockValidate;
|
||
|
use app\model\StockListModel;
|
||
|
use app\model\StockMarketModel;
|
||
|
use app\model\StockPricesSettingModel;
|
||
|
use PHPMailer\PHPMailer\Exception;
|
||
|
use think\exception\ValidateException;
|
||
|
use think\facade\Validate;
|
||
|
|
||
|
class StockService extends AdminBaseService
|
||
|
{
|
||
|
|
||
|
public function index($param)
|
||
|
{
|
||
|
return (new IPOService())->stockList(3,$param);
|
||
|
}
|
||
|
|
||
|
public function add($param)
|
||
|
{
|
||
|
return (new IPOService())->addStock(3,$param);
|
||
|
}
|
||
|
|
||
|
|
||
|
public function edit($param)
|
||
|
{
|
||
|
return (new IPOService())->editStock(3,$param);
|
||
|
}
|
||
|
|
||
|
// 美股列表
|
||
|
public function getTradeNameList($param)
|
||
|
{
|
||
|
try {
|
||
|
$list = StockListModel::where('status', 1)->order('id', 'desc')->column('stock_name', 'id');
|
||
|
return $this->toData('0', 'SUCCESS', ['list' => $list]);
|
||
|
} catch (\Exception $exception) {
|
||
|
return $this->toData('1', '系统繁忙', []);
|
||
|
}
|
||
|
}
|
||
|
}
|