Browse Source

排序调整

Signed-off-by: binren <zhangbr@elab-plus.com>
binren 4 years ago
parent
commit
7d823050db
1 changed files with 3 additions and 3 deletions
  1. 3 3
      sql.py

+ 3 - 3
sql.py

@@ -268,13 +268,13 @@ class Sql:
     """
 
     sql_16 = """
-          SELECT b.region, b.city, a.house_name, a.advi_name, a.org_name, a.mobile, IFNULL(a.fx_mobile,0), IFNULL(a.zc_mobile, 0), IFNULL(a.bb_mobile, 0) FROM f_dm_jianye_agent_house_day a left join d_jianye_house_city_region_rlat b on a.house_id = b.house_id  where a.report_d = %s and a.house_id in %s order by a.org_name, a.fx_mobile desc
+          SELECT b.region, b.city, a.house_name, a.advi_name, a.org_name, a.mobile, IFNULL(a.fx_mobile,0), IFNULL(a.zc_mobile, 0), IFNULL(a.bb_mobile, 0) FROM f_dm_jianye_agent_house_day a left join d_jianye_house_city_region_rlat b on a.house_id = b.house_id  where a.report_d = %s and a.house_id in %s order by a.org_name, CAST(a.fx_mobile AS SIGNED) desc
     """
     sql_17 = """
-          SELECT b.region, b.city, a.house_name, a.advi_name, a.org_name, a.mobile, IFNULL(a.fx_mobile,0), IFNULL(a.zc_mobile, 0), IFNULL(a.bb_mobile, 0) FROM f_dm_jianye_agent_house_month a left join d_jianye_house_city_region_rlat b on a.house_id = b.house_id  where a.report_d = %s and a.house_id in %s order by a.org_name, a.fx_mobile desc
+          SELECT b.region, b.city, a.house_name, a.advi_name, a.org_name, a.mobile, IFNULL(a.fx_mobile,0), IFNULL(a.zc_mobile, 0), IFNULL(a.bb_mobile, 0) FROM f_dm_jianye_agent_house_month a left join d_jianye_house_city_region_rlat b on a.house_id = b.house_id  where a.report_d = %s and a.house_id in %s order by a.org_name, CAST(a.fx_mobile AS SIGNED) desc
     """
     sql_18 = """
-          SELECT b.region, b.city, a.house_name, a.advi_name, a.org_name,a.mobile, IFNULL(a.fx_mobile,0), IFNULL(a.zc_mobile, 0), IFNULL(a.bb_mobile, 0) FROM f_dm_jianye_agent_house_all a left join d_jianye_house_city_region_rlat b on a.house_id = b.house_id where a.report_d = %s and a.house_id in %s order by a.org_name, a.fx_mobile desc
+          SELECT b.region, b.city, a.house_name, a.advi_name, a.org_name,a.mobile, IFNULL(a.fx_mobile,0), IFNULL(a.zc_mobile, 0), IFNULL(a.bb_mobile, 0) FROM f_dm_jianye_agent_house_all a left join d_jianye_house_city_region_rlat b on a.house_id = b.house_id where a.report_d = %s and a.house_id in %s order by a.org_name, CAST(a.fx_mobile AS SIGNED) desc
     """