|
@@ -43,13 +43,14 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
|
|
|
|
|
|
@Select("select * from " +
|
|
|
"(" +
|
|
|
- "select count(*) as num,d.user_id as userId from sys_uptown_house a " +
|
|
|
+ "select count(*) as num,d.user_id as userId,e.uptown_name as uptownName from sys_uptown_house a " +
|
|
|
"inner join sys_uptown_unit b on b.unit_id = a.unit_id " +
|
|
|
+ "inner join sys_uptown e on b.uptown_id = e.uptown_id " +
|
|
|
"inner join sys_owner c on c.uptown_id = b.uptown_id " +
|
|
|
"inner join sys_user_role d on d.property_id = c.owner_id and d.role_id = 2 " +
|
|
|
- "GROUP BY d.user_id " +
|
|
|
+ "GROUP BY d.user_id,e.uptown_name " +
|
|
|
"union all " +
|
|
|
- "select DISTINCT count(*) as num,e.user_id as userId from ms_report a " +
|
|
|
+ "select DISTINCT count(*) as num,e.user_id as userId,'' as uptownName from ms_report a " +
|
|
|
"inner join sys_uptown_house b on a.house_id = b.house_id " +
|
|
|
"inner join sys_uptown_unit c on c.unit_id = b.unit_id " +
|
|
|
"inner join sys_owner d on d.uptown_id = c.uptown_id " +
|
|
@@ -57,7 +58,7 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
|
|
|
"where a.report_status = 1 and a.report_date = #{reportDate} " +
|
|
|
"GROUP BY e.user_id " +
|
|
|
"union all " +
|
|
|
- "select DISTINCT count(*) as num,e.user_id as userId from ms_report a " +
|
|
|
+ "select DISTINCT count(*) as num,e.user_id as userId,'' as uptownName from ms_report a " +
|
|
|
"inner join sys_uptown_house b on a.house_id = b.house_id " +
|
|
|
"inner join sys_uptown_unit c on c.unit_id = b.unit_id " +
|
|
|
"inner join sys_owner d on d.uptown_id = c.uptown_id " +
|