| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 小区服务内部类 |
| | |
| | | protected SqlSessionTemplate sqlSessionTemplate; |
| | | |
| | | @Override |
| | | public int savePropertyWhiteListFlow(@RequestBody List<PropertyWhiteListFlowDto> importOwnerRoomDtos) { |
| | | public int savePropertyWhiteListFlow(@RequestBody PropertyWhiteListFlowDto importOwnerRoomDto) { |
| | | return sqlSessionTemplate.insert("propertyWhiteListFlowDaoImplMapper.savePropertyWhiteListFlow",BeanConvertUtil.beanCovertMap(importOwnerRoomDto)); |
| | | } |
| | | |
| | | int successCount = 0; |
| | | if (importOwnerRoomDtos == null || importOwnerRoomDtos.size() < 1) { |
| | | @Override |
| | | public List<PropertyWhiteListFlowDto> queryPropertyWhiteListFlow(PropertyWhiteListFlowDto importOwnerRoomDtos) { |
| | | importOwnerRoomDtos.setPage((importOwnerRoomDtos.getPage()-1)* importOwnerRoomDtos.getRow()); |
| | | return sqlSessionTemplate.selectList("propertyWhiteListFlowDaoImplMapper.queryPropertyWhiteListFlow",BeanConvertUtil.beanCovertMap(importOwnerRoomDtos)); |
| | | } |
| | | |
| | | public int countPropertyWhiteListFlow(PropertyWhiteListFlowDto importOwnerRoomDtos) { |
| | | List<Map> businessPaymentPoolConfigInfos = sqlSessionTemplate.selectList("propertyWhiteListFlowDaoImplMapper.countPropertyWhiteListFlow", BeanConvertUtil.beanCovertMap(importOwnerRoomDtos)); |
| | | if (businessPaymentPoolConfigInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | // 1.0 查看 楼栋是否存在 |
| | | for (PropertyWhiteListFlowDto importOwnerRoomDto : importOwnerRoomDtos) { |
| | | successCount += sqlSessionTemplate.insert("propertyWhiteListFlowDaoImplMapper.savePropertyWhiteListFlow",BeanConvertUtil.beanCovertMap(importOwnerRoomDto)); |
| | | } |
| | | |
| | | |
| | | return successCount; |
| | | return Integer.parseInt(businessPaymentPoolConfigInfos.get(0).get("count(1)").toString()); |
| | | } |
| | | |
| | | } |