Browse Source

小修小补

Joey 5 months ago
parent
commit
5290fc7dd2
1 changed files with 4 additions and 4 deletions
  1. 4 4
      modules/returnCalculator.dos

+ 4 - 4
modules/returnCalculator.dos

@@ -114,8 +114,8 @@ def cal_fund_monthly_returns(entity_type, fund_ids, isFromMySQL){
 
     tb_rets = null;
 
-    // 暂时只支持公募和私募基金
-    if(entity_type != 'HF' && entity_type != 'MF' ) return tb_rets;
+    // 暂时只支持公私募和组合
+    if(!(entity_type IN ['HF', 'MF', 'PF'])) return tb_rets;
     
     // 用于保证老基金也能取到所有历史净值
     very_old_price_date = 1990.01.01;
@@ -183,8 +183,8 @@ def cal_weekly_returns(entity_type, entity_info){
 
     tb_rets_1w = null;
 
-    // 暂时只支持公募和私募基金
-    if(entity_type != 'HF' && entity_type != 'MF' ) return tb_rets_1w;
+    // 暂时只支持公私募基金和组合
+    if(!(entity_type IN ['HF', 'MF', 'PF'])) return tb_rets_1w;
     
     // 将每支证券ID+某个日期转为JSON用于调用sp
     s_json = (SELECT entity_id AS sec_id, price_date FROM entity_info).toStdJson();