| | |
| | | <!-- 保存小区信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessCommunityInfo" parameterType="Map"> |
| | | insert into business_community(community_id,b_id,name,address,city_code, |
| | | nearby_landmarks,map_x,map_y,month,state,operate,community_area) |
| | | nearby_landmarks,map_x,map_y,month,state,operate,community_area,tel) |
| | | values(#{communityId},#{bId},#{name},#{address},#{cityCode}, |
| | | #{nearbyLandmarks},#{mapX},#{mapY},#{month},#{state},#{operate},#{communityArea}) |
| | | #{nearbyLandmarks},#{mapX},#{mapY},#{month},#{state},#{operate},#{communityArea},#{tel}) |
| | | </insert> |
| | | |
| | | <!-- 保存小区信息 --> |
| | | <insert id="saveCommunity" parameterType="Map"> |
| | | insert into s_community(community_id,b_id,name,address,city_code, |
| | | nearby_landmarks,map_x,map_y,create_time,state,tel,community_area) |
| | | values(#{communityId},#{bId},#{name},#{address},#{cityCode}, |
| | | #{nearbyLandmarks},#{mapX},#{mapY},#{createTime},#{state},#{tel},#{communityArea}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 保存小区属性信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessCommunityAttr" parameterType="Map"> |
| | |
| | | @RequestMapping(value = "/queryCommunitysCount", method = RequestMethod.POST) |
| | | int queryCommunitysCount(@RequestBody CommunityDto communityDto); |
| | | |
| | | /** |
| | | * 保存小区信息 |
| | | * |
| | | * @param communityPo |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/saveCommunity", method = RequestMethod.POST) |
| | | int saveCommunity(@RequestBody CommunityPo communityPo); |
| | | |
| | | /** |
| | | * 修改小区信息 |
| | | * |
| | | * @param communityPo |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/updateCommunity", method = RequestMethod.POST) |
| | | int updateCommunity(@RequestBody CommunityPo communityPo); |
| | | |
| | | /** |
| | | * 查询小区成员表 |
| | |
| | | paramInJson.put("communityId", GenerateCodeFactory.getCommunityId()); |
| | | paramInJson.put("state", "1000"); |
| | | paramInJson.put("communityArea", "0"); |
| | | paramInJson.put("createTime", new Date()); |
| | | paramInJson.put("bId", "-1"); |
| | | CommunityPo communityPo = BeanConvertUtil.covertBean(paramInJson, CommunityPo.class); |
| | | communityInnerServiceSMOImpl.saveCommunity(communityPo); |
| | | super.insert(dataFlowContext, communityPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_COMMUNITY_INFO); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void updateCommunityOne(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | CommunityPo communityPo = BeanConvertUtil.covertBean(paramInJson, CommunityPo.class); |
| | | communityInnerServiceSMOImpl.updateCommunity(communityPo); |
| | | |
| | | super.update(dataFlowContext, communityPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_COMMUNITY_INFO); |
| | | } |
| | | } |
| | |
| | | |
| | | List<Map> getStoreCommunitys(Map beanCovertMap); |
| | | |
| | | int saveCommunity(Map info); |
| | | |
| | | int updateCommunity(Map info); |
| | | } |
| | |
| | | return businessCommunityInfos; |
| | | } |
| | | |
| | | @Override |
| | | public int saveCommunity(Map info) { |
| | | logger.debug("保存小区信息 入参 info : {}", info); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunity", info); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateCommunity(Map info) { |
| | | logger.debug("修改小区信息 入参 info : {}", info); |
| | | int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityInfoInstance", info); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改小区信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | return saveFlag; |
| | | } |
| | | |
| | | } |
| | |
| | | businessCommunityInfo.put("mapY", businessCommunityInfo.get("map_y")); |
| | | businessCommunityInfo.put("state", businessCommunityInfo.get("state")); |
| | | businessCommunityInfo.put("communityArea", businessCommunityInfo.get("community_area")); |
| | | businessCommunityInfo.put("tel", businessCommunityInfo.get("tel")); |
| | | businessCommunityInfo.put("statusCd", statusCd); |
| | | } |
| | | |
| | |
| | | currentCommunityInfo.put("mapY", currentCommunityInfo.get("map_y")); |
| | | currentCommunityInfo.put("state", currentCommunityInfo.get("state")); |
| | | currentCommunityInfo.put("communityArea", currentCommunityInfo.get("community_area")); |
| | | currentCommunityInfo.put("tel", currentCommunityInfo.get("tel")); |
| | | |
| | | currentCommunityInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | getCommunityServiceDaoImpl().saveBusinessCommunityInfo(currentCommunityInfo); |
| | |
| | | return communityServiceDaoImpl.queryCommunitysCount(BeanConvertUtil.beanCovertMap(communityDto)); |
| | | } |
| | | |
| | | @Override |
| | | public int saveCommunity(@RequestBody CommunityPo communityPo) { |
| | | return communityServiceDaoImpl.saveCommunity(BeanConvertUtil.beanCovertMap(communityPo)); |
| | | } |
| | | // @Override |
| | | // public int saveCommunity(@RequestBody CommunityPo communityPo) { |
| | | // return communityServiceDaoImpl.saveCommunity(BeanConvertUtil.beanCovertMap(communityPo)); |
| | | // } |
| | | |
| | | @Override |
| | | public int updateCommunity(@RequestBody CommunityPo communityPo) { |
| | | return communityServiceDaoImpl.updateCommunity(BeanConvertUtil.beanCovertMap(communityPo)); |
| | | } |
| | | |
| | | public ICommunityServiceDao getCommunityServiceDaoImpl() { |
| | | return communityServiceDaoImpl; |