diff --git a/src/main/java/com/cm/population/controller/app/api/building/BuildingAppController.java b/src/main/java/com/cm/population/controller/app/api/building/BuildingAppController.java index b8f97fe..506e717 100644 --- a/src/main/java/com/cm/population/controller/app/api/building/BuildingAppController.java +++ b/src/main/java/com/cm/population/controller/app/api/building/BuildingAppController.java @@ -90,6 +90,7 @@ public class BuildingAppController extends AbstractController { @GetMapping("list") public List list(@RequestHeader("token") String token) { Map params = requestParams(); + params.put("token", token); return buildingService.list(params); } @@ -106,6 +107,7 @@ public class BuildingAppController extends AbstractController { @GetMapping("listpage") public SuccessResultList> listPage(@RequestHeader("token") String token, ListPage page) { Map params = requestParams(); + params.put("token", token); page.setParams(params); return buildingService.listPage(page); } diff --git a/src/main/java/com/cm/population/controller/app/api/house/HouseAppController.java b/src/main/java/com/cm/population/controller/app/api/house/HouseAppController.java index 578b800..08f5462 100644 --- a/src/main/java/com/cm/population/controller/app/api/house/HouseAppController.java +++ b/src/main/java/com/cm/population/controller/app/api/house/HouseAppController.java @@ -90,6 +90,7 @@ public class HouseAppController extends AbstractController { @GetMapping("list") public List list(@RequestHeader("token") String token) { Map params = requestParams(); + params.put("token", token); return houseService.list(params); } @@ -106,6 +107,7 @@ public class HouseAppController extends AbstractController { @GetMapping("listpage") public SuccessResultList> listPage(@RequestHeader("token") String token, ListPage page) { Map params = requestParams(); + params.put("token", token); page.setParams(params); return houseService.listPage(page); } diff --git a/src/main/java/com/cm/population/controller/app/api/rental/RentalAppController.java b/src/main/java/com/cm/population/controller/app/api/rental/RentalAppController.java index 9a6c8eb..011af3f 100644 --- a/src/main/java/com/cm/population/controller/app/api/rental/RentalAppController.java +++ b/src/main/java/com/cm/population/controller/app/api/rental/RentalAppController.java @@ -90,6 +90,7 @@ public class RentalAppController extends AbstractController { @GetMapping("list") public List list(@RequestHeader("token") String token) { Map params = requestParams(); + params.put("token", token); return rentalService.list(params); } @@ -106,6 +107,7 @@ public class RentalAppController extends AbstractController { @GetMapping("listpage") public SuccessResultList> listPage(@RequestHeader("token") String token, ListPage page) { Map params = requestParams(); + params.put("token", token); page.setParams(params); return rentalService.listPage(page); } diff --git a/src/main/java/com/cm/population/controller/app/api/residential/ResidentialAppController.java b/src/main/java/com/cm/population/controller/app/api/residential/ResidentialAppController.java index b9884c9..cc3585f 100644 --- a/src/main/java/com/cm/population/controller/app/api/residential/ResidentialAppController.java +++ b/src/main/java/com/cm/population/controller/app/api/residential/ResidentialAppController.java @@ -105,6 +105,7 @@ public class ResidentialAppController extends AbstractController { @GetMapping("list") public List list(@RequestHeader("token") String token) { Map params = requestParams(); + params.put("token", token); return residentialService.list(params); } @@ -121,6 +122,7 @@ public class ResidentialAppController extends AbstractController { @GetMapping("listpage") public SuccessResultList> listPage(@RequestHeader("token") String token, ListPage page) { Map params = requestParams(); + params.put("token", token); page.setParams(params); return residentialService.listPage(page); } diff --git a/src/main/java/com/cm/population/controller/route/building/BuildingRouteController.java b/src/main/java/com/cm/population/controller/route/building/BuildingRouteController.java index 0593e9b..d2782eb 100644 --- a/src/main/java/com/cm/population/controller/route/building/BuildingRouteController.java +++ b/src/main/java/com/cm/population/controller/route/building/BuildingRouteController.java @@ -45,4 +45,9 @@ public class BuildingRouteController extends AbstractController { return new ModelAndView("residential/map-view"); } + @GetMapping("list-myself") + public ModelAndView listMyself() { + return new ModelAndView("building/list-myself"); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java b/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java index 1f73556..c9931de 100644 --- a/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java +++ b/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java @@ -45,4 +45,9 @@ public class HouseRouteController extends AbstractController { return new ModelAndView("house/list-check"); } + @GetMapping("list-myself") + public ModelAndView listMyself() { + return new ModelAndView("house/list-myself"); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/route/rental/RentalRouteController.java b/src/main/java/com/cm/population/controller/route/rental/RentalRouteController.java index af11bf2..9bc830c 100644 --- a/src/main/java/com/cm/population/controller/route/rental/RentalRouteController.java +++ b/src/main/java/com/cm/population/controller/route/rental/RentalRouteController.java @@ -35,4 +35,9 @@ public class RentalRouteController extends AbstractController { return new ModelAndView("rental/list"); } + @GetMapping("list-myself") + public ModelAndView listMyself() { + return new ModelAndView("rental/list-myself"); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/route/residential/ResidentialRouteController.java b/src/main/java/com/cm/population/controller/route/residential/ResidentialRouteController.java index d926729..0940df9 100644 --- a/src/main/java/com/cm/population/controller/route/residential/ResidentialRouteController.java +++ b/src/main/java/com/cm/population/controller/route/residential/ResidentialRouteController.java @@ -46,4 +46,9 @@ public class ResidentialRouteController extends AbstractController { return new ModelAndView("residential/map-view"); } + @GetMapping("list-myself") + public ModelAndView listMyself() { + return new ModelAndView("residential/list-myself"); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/building/impl/BuildingServiceImpl.java b/src/main/java/com/cm/population/service/building/impl/BuildingServiceImpl.java index 13d4cf2..204a1d8 100644 --- a/src/main/java/com/cm/population/service/building/impl/BuildingServiceImpl.java +++ b/src/main/java/com/cm/population/service/building/impl/BuildingServiceImpl.java @@ -2,7 +2,10 @@ package com.cm.population.service.building.impl; import com.cm.common.base.AbstractService; import com.cm.common.pojo.ListPage; +import com.cm.common.pojo.bos.UserInfoBO; import com.cm.common.result.SuccessResultList; +import com.cm.common.token.app.AppTokenManager; +import com.cm.common.token.app.entity.AppTokenUser; import com.cm.common.utils.HashMapUtil; import com.cm.common.utils.UUIDUtil; import com.cm.population.dao.building.IBuildingDao; @@ -154,6 +157,10 @@ public class BuildingServiceImpl extends AbstractService implements IBuildingSer @Override public List list(Map params) { + if(null != params.get("myself")) { + UserInfoBO userInfoBO = this.securityComponent.getCurrentUser(); + params.put("creator", userInfoBO.getUserId()); + } List list = buildingDao.list(params); for (BuildingDTO buildingDTO : list) { ResidentialDTO residentialDTO = residentialService.get(buildingDTO.getResidentialId()); diff --git a/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java b/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java index 0f91eca..fa6d9be 100644 --- a/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java +++ b/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java @@ -2,7 +2,10 @@ package com.cm.population.service.house.impl; import com.cm.common.base.AbstractService; import com.cm.common.pojo.ListPage; +import com.cm.common.pojo.bos.UserInfoBO; import com.cm.common.result.SuccessResultList; +import com.cm.common.token.app.AppTokenManager; +import com.cm.common.token.app.entity.AppTokenUser; import com.cm.common.utils.HashMapUtil; import com.cm.common.utils.UUIDUtil; import com.cm.population.dao.house.IHouseDao; @@ -168,6 +171,10 @@ public class HouseServiceImpl extends AbstractService implements IHouseService { @Override public List list(Map params) { + if(null != params.get("myself")) { + UserInfoBO userInfoBO = this.securityComponent.getCurrentUser(); + params.put("creator", userInfoBO.getUserId()); + } List list = houseDao.list(params); for (HouseDTO houseDTO : list) { ResidentialDTO residentialDTO = residentialService.get(houseDTO.getResidentialId()); diff --git a/src/main/java/com/cm/population/service/rental/impl/RentalServiceImpl.java b/src/main/java/com/cm/population/service/rental/impl/RentalServiceImpl.java index 16cab0d..95650df 100644 --- a/src/main/java/com/cm/population/service/rental/impl/RentalServiceImpl.java +++ b/src/main/java/com/cm/population/service/rental/impl/RentalServiceImpl.java @@ -2,7 +2,10 @@ package com.cm.population.service.rental.impl; import com.cm.common.base.AbstractService; import com.cm.common.pojo.ListPage; +import com.cm.common.pojo.bos.UserInfoBO; import com.cm.common.result.SuccessResultList; +import com.cm.common.token.app.AppTokenManager; +import com.cm.common.token.app.entity.AppTokenUser; import com.cm.common.utils.HashMapUtil; import com.cm.common.utils.UUIDUtil; import com.cm.population.dao.rental.IRentalDao; @@ -150,6 +153,10 @@ public class RentalServiceImpl extends AbstractService implements IRentalService @Override public List list(Map params) { + if(null != params.get("myself")) { + UserInfoBO userInfoBO = this.securityComponent.getCurrentUser(); + params.put("creator", userInfoBO.getUserId()); + } return rentalDao.list(params); } diff --git a/src/main/java/com/cm/population/service/residential/impl/ResidentialServiceImpl.java b/src/main/java/com/cm/population/service/residential/impl/ResidentialServiceImpl.java index de5cd33..5a6dc45 100644 --- a/src/main/java/com/cm/population/service/residential/impl/ResidentialServiceImpl.java +++ b/src/main/java/com/cm/population/service/residential/impl/ResidentialServiceImpl.java @@ -2,7 +2,10 @@ package com.cm.population.service.residential.impl; import com.cm.common.base.AbstractService; import com.cm.common.pojo.ListPage; +import com.cm.common.pojo.bos.UserInfoBO; import com.cm.common.result.SuccessResultList; +import com.cm.common.token.app.AppTokenManager; +import com.cm.common.token.app.entity.AppTokenUser; import com.cm.common.utils.HashMapUtil; import com.cm.common.utils.UUIDUtil; import com.cm.population.dao.residential.IResidentialDao; @@ -150,6 +153,10 @@ public class ResidentialServiceImpl extends AbstractService implements IResident @Override public List list(Map params) { + if(null != params.get("myself")) { + UserInfoBO userInfoBO = this.securityComponent.getCurrentUser(); + params.put("creator", userInfoBO.getUserId()); + } return residentialDao.list(params); } diff --git a/src/main/resources/mybatis/mapper/building/building-mapper.xml b/src/main/resources/mybatis/mapper/building/building-mapper.xml index 8882093..5c01312 100644 --- a/src/main/resources/mybatis/mapper/building/building-mapper.xml +++ b/src/main/resources/mybatis/mapper/building/building-mapper.xml @@ -320,6 +320,9 @@ house_building t1 WHERE t1.is_delete = 0 + + AND t1.creator = #{creator} + AND t1.residential_id = #{residentialId} diff --git a/src/main/resources/mybatis/mapper/house/house-mapper.xml b/src/main/resources/mybatis/mapper/house/house-mapper.xml index ded768b..489cd7b 100644 --- a/src/main/resources/mybatis/mapper/house/house-mapper.xml +++ b/src/main/resources/mybatis/mapper/house/house-mapper.xml @@ -721,6 +721,9 @@ house_house t1 WHERE t1.is_delete = 0 + + AND t1.creator = #{creator} + AND street = #{street} diff --git a/src/main/resources/mybatis/mapper/rental/rental-mapper.xml b/src/main/resources/mybatis/mapper/rental/rental-mapper.xml index 81385b7..8256800 100644 --- a/src/main/resources/mybatis/mapper/rental/rental-mapper.xml +++ b/src/main/resources/mybatis/mapper/rental/rental-mapper.xml @@ -239,7 +239,12 @@ t1.longitude, t1.latitude, t1.image, - t1.rental_id + t1.rental_id, + t1.creator, + t1.gmt_create, + t1.modifier, + t1.gmt_modified, + t1.is_delete FROM house_rental t1 WHERE @@ -350,9 +355,11 @@ house_rental t1 WHERE t1.is_delete = 0 + + AND t1.creator = #{creator} + AND ( - t1.id LIKE CONCAT('%', #{keywords}, '%') ) diff --git a/src/main/resources/mybatis/mapper/residential/residential-mapper.xml b/src/main/resources/mybatis/mapper/residential/residential-mapper.xml index da78f6c..fbd6644 100644 --- a/src/main/resources/mybatis/mapper/residential/residential-mapper.xml +++ b/src/main/resources/mybatis/mapper/residential/residential-mapper.xml @@ -284,6 +284,9 @@ house_residential t1 WHERE t1.is_delete = 0 + + AND t1.creator = #{creator} + AND ( t1.name LIKE CONCAT('%', #{keywords}, '%') diff --git a/src/main/resources/templates/building/list-myself.html b/src/main/resources/templates/building/list-myself.html new file mode 100644 index 0000000..8cef4cb --- /dev/null +++ b/src/main/resources/templates/building/list-myself.html @@ -0,0 +1,302 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ 新增时间 +
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/building/list.html b/src/main/resources/templates/building/list.html index e225c60..67e5024 100644 --- a/src/main/resources/templates/building/list.html +++ b/src/main/resources/templates/building/list.html @@ -87,15 +87,6 @@ [ {type:'checkbox', fixed: 'left'}, {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, - {field: 'community', width: 180, title: '所在社区', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, {field: 'communityName', width: 180, title: '社区名称', align:'center', templet: function(row) { var rowData = row[this.field]; diff --git a/src/main/resources/templates/house/list-myself.html b/src/main/resources/templates/house/list-myself.html new file mode 100644 index 0000000..b84d893 --- /dev/null +++ b/src/main/resources/templates/house/list-myself.html @@ -0,0 +1,528 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ 新增时间 +
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/rental/list-myself.html b/src/main/resources/templates/rental/list-myself.html new file mode 100644 index 0000000..c5ab931 --- /dev/null +++ b/src/main/resources/templates/rental/list-myself.html @@ -0,0 +1,326 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ 新增时间 +
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/residential/list-myself.html b/src/main/resources/templates/residential/list-myself.html new file mode 100644 index 0000000..610bd94 --- /dev/null +++ b/src/main/resources/templates/residential/list-myself.html @@ -0,0 +1,274 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ 新增时间 +
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file