Browse Source

mvp: 修改获取集团项目id方法

Signed-off-by: Binren Zhnag <zhangbr@elab-plus.com>
Binren Zhnag 4 years ago
parent
commit
e79b59b55e
2 changed files with 2 additions and 2 deletions
  1. 1 1
      jianye_report.py
  2. 1 1
      sql.py

+ 1 - 1
jianye_report.py

@@ -201,7 +201,7 @@ class JianYeReport(object):
                 if str(id) == str(x[0]):
                     sub.extend(x[1:])
             result.append(sub)
-        # result.sort(key=lambda obj: obj[2])
+        result.sort(key=lambda obj: obj[2], reverse=True)
         return result
 
     def house_data(self, house_ids):

+ 1 - 1
sql.py

@@ -3,7 +3,7 @@
 class Sql:
     # 获取项目的城市信息
     sql_1 = """
-        select brand_id, house_id, house_name, city from d_house a where status = 1
+        select IFNULL(brand_id, -1), house_id, house_name, city from d_house a where status = 1
     """
 
     # 根据任务id获取推送客户信息