fix:优化money股票K线图1H和1D只返回当天数据
This commit is contained in:
@@ -677,14 +677,14 @@ public class MoneyApiController {
|
|||||||
int countback = 5;
|
int countback = 5;
|
||||||
if(StringUtils.equals("H",resolution)){
|
if(StringUtils.equals("H",resolution)){
|
||||||
to = (long) (System.currentTimeMillis() / 1000);
|
to = (long) (System.currentTimeMillis() / 1000);
|
||||||
from = to - (1* 24 * 60 * 60 );
|
from = to - ( 60 * 60 );
|
||||||
countback = 16;
|
countback = 16;
|
||||||
request.setResolution("60");
|
request.setResolution("1");
|
||||||
}else if(StringUtils.equals("D",resolution)){
|
}else if(StringUtils.equals("D",resolution)){
|
||||||
to = (long) (System.currentTimeMillis() / 1000);
|
to = (long) (System.currentTimeMillis() / 1000);
|
||||||
from = to - (24 * 60 * 60 );
|
from = to - (24 * 60 * 60 );
|
||||||
countback = 30;
|
countback = 30;
|
||||||
request.setResolution("60");
|
request.setResolution("1");
|
||||||
}else if(StringUtils.equals("W",resolution)){
|
}else if(StringUtils.equals("W",resolution)){
|
||||||
to = (long) (System.currentTimeMillis() / 1000);
|
to = (long) (System.currentTimeMillis() / 1000);
|
||||||
from = to - (10 * 24 * 60 * 60 );
|
from = to - (10 * 24 * 60 * 60 );
|
||||||
|
|||||||
Reference in New Issue
Block a user