Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
stock_new
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
stock_new
Commits
7e699245
Commit
7e699245
authored
Jun 19, 2024
by
董先生
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://rungit.jxdsy.cn:10000/sugar/stock_new
into dev
parents
b612d1f4
3cd45ec0
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
285 deletions
+12
-285
application/function.php
application/function.php
+2
-2
application/market/home/Trade.php
application/market/home/Trade.php
+1
-1
application/market/model/Deal_stock.php
application/market/model/Deal_stock.php
+2
-1
application/market/model/Delivery.php
application/market/model/Delivery.php
+2
-1
application/market/model/StockPosition.php
application/market/model/StockPosition.php
+0
-277
application/market/model/Trust.php
application/market/model/Trust.php
+4
-2
application/market/validate/Trade.php
application/market/validate/Trade.php
+1
-1
No files found.
application/function.php
View file @
7e699245
...
...
@@ -247,9 +247,9 @@ if (!function_exists('getEndDay')) {
$res
=
\think\Db
::
name
(
'admin_config'
)
->
where
(
array
(
'name'
=>
'market_data_in'
))
->
value
(
'value'
);
//判断股票前缀
if
(
toMarket
(
$code
)){
/*
if(toMarket($code)){
$market = toMarket($code);
};
};
*/
$code
=
strtolower
(
$market
)
.
$code
;
//判断股票是否
...
...
application/market/home/Trade.php
View file @
7e699245
This diff is collapsed.
Click to expand it.
application/market/model/Deal_stock.php
View file @
7e699245
...
...
@@ -69,7 +69,7 @@ class Deal_stock extends Model{
* 返回子账号成交
* $sub_id 子账号
*/
public
function
get_deal_stock
(
$sub_id
,
$beginday
,
$endday
){
public
function
get_deal_stock
(
$sub_id
,
$beginday
,
$endday
,
$offset
=
15
){
if
(
empty
(
$endday
)){
$endday
=
time
();}
else
{
$endday
=
strtotime
(
$endday
);}
if
(
empty
(
$beginday
)){
$beginday
=
strtotime
(
date
(
"Y-m-d"
,
time
()));}
else
{
$beginday
=
strtotime
(
$beginday
);}
...
...
@@ -80,6 +80,7 @@ class Deal_stock extends Model{
->
where
(
'deal_date'
,
'>='
,
$beginday
)
->
where
(
'deal_date'
,
'<='
,
$endday
)
->
order
(
'id desc'
)
->
paginate
(
$offset
,
false
,
[
'query'
=>
request
()
->
param
()])
->
select
();
if
(
!
$res
||
count
(
$res
)
===
0
){
...
...
application/market/model/Delivery.php
View file @
7e699245
...
...
@@ -57,7 +57,7 @@ class Delivery extends Model{
* 返回对应交割单
* $sub_id 子账号
*/
public
function
get_delivery_order
(
$sub_id
,
$beginday
=
""
,
$endday
=
""
){
public
function
get_delivery_order
(
$sub_id
,
$beginday
=
""
,
$endday
=
""
,
$offset
=
15
){
if
(
empty
(
$endday
)){
$endday
=
time
();}
else
{
$endday
=
strtotime
(
$endday
)
+
86400
;}
if
(
empty
(
$beginday
)){
$beginday
=
strtotime
(
date
(
"Y-m-d"
,
time
()));}
else
{
$beginday
=
strtotime
(
$beginday
);}
$res
=
Db
::
name
(
'stock_delivery_order'
)
...
...
@@ -66,6 +66,7 @@ class Delivery extends Model{
->
where
(
'deal_date'
,
'>='
,
$beginday
)
->
where
(
'deal_date'
,
'<='
,
$endday
)
->
order
(
'id desc'
)
->
paginate
(
$offset
,
false
,
[
'query'
=>
request
()
->
param
()])
->
select
();
return
$res
;
}
...
...
application/market/model/StockPosition.php
deleted
100644 → 0
View file @
b612d1f4
This diff is collapsed.
Click to expand it.
application/market/model/Trust.php
View file @
7e699245
...
...
@@ -234,13 +234,15 @@ class Trust extends Model{
* 返回子账号委托
* $sub_id 子账号
*/
public
function
get_trust
(
$sub_id
,
$beginday
,
$endday
){
public
function
get_trust
(
$sub_id
,
$beginday
,
$endday
,
$offset
=
15
){
if
(
empty
(
$endday
)){
$endday
=
time
();}
else
{
$endday
=
strtotime
(
$endday
);}
if
(
empty
(
$beginday
)){
$beginday
=
strtotime
(
date
(
"Y-m-d"
,
time
()));}
else
{
$beginday
=
strtotime
(
$beginday
);}
$res
=
Db
::
name
(
'stock_trust'
)
->
where
([
'sub_id'
=>
$sub_id
])
->
where
(
'trust_date'
,
'>='
,
$beginday
)
->
where
(
'trust_date'
,
'<='
,
$endday
)
->
order
(
'id desc'
)
->
paginate
(
$offset
,
false
,
[
'query'
=>
request
()
->
param
()])
->
select
();
return
$res
;
}
...
...
@@ -300,7 +302,7 @@ class Trust extends Model{
if
(
$res
)
return
[
'status'
=>
0
,
'message'
=>
'该股票禁止交易'
];
//判断购买数量书否正确
if
((
$data
[
'count'
]
%
100
)
!=
0
)
return
[
'status'
=>
0
,
'message'
=>
'交易数量必须是100的整数倍'
];
$bs_res
=
Db
::
name
(
'stock_borrow'
)
->
where
(
array
(
'stock_subaccount_id'
=>
$data
[
'subid'
]))
->
find
();
$bs_res
=
Db
::
name
(
'stock_borrow'
)
->
where
(
array
(
'stock_subaccount_id'
=>
$data
[
'sub
_
id'
]))
->
find
();
if
(
empty
(
$bs_res
))
{
return
[
'status'
=>
0
,
'message'
=>
'没有对应的配资'
];
}
...
...
application/market/validate/Trade.php
View file @
7e699245
<?php
namespace
app\
apicom
\validate
;
namespace
app\
market
\validate
;
use
think\Validate
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment