Merge branch 'master' of https://github.com/java110/MicroCommunity
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiDataFlowListener; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.CommonConstant; |
| | | import com.java110.common.constant.ServiceCodeConstant; |
| | | import com.java110.common.cache.MappingCache; |
| | | import com.java110.common.constant.*; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.http.HttpHeaders; |
| | |
| | | /** |
| | | * 添加小区成员 |
| | | * |
| | | * @param paramInJson |
| | | * @return |
| | | * @param paramInJson 接口请求数据封装 |
| | | * @return 封装好的 data数据 |
| | | */ |
| | | private JSONObject addCommunityMember(JSONObject paramInJson) { |
| | | |
| | |
| | | businessCommunityMember.put("communityId", paramInJson.getString("communityId")); |
| | | businessCommunityMember.put("memberId", paramInJson.getString("memberId")); |
| | | businessCommunityMember.put("memberTypeCd", paramInJson.getString("memberTypeCd")); |
| | | String auditStatusCd = MappingCache.getValue(MappingConstant.DOMAIN_COMMUNITY_MEMBER_AUDIT, paramInJson.getString("memberTypeCd")); |
| | | auditStatusCd = StringUtils.isEmpty(auditStatusCd) ? StatusConstant.STATUS_CD_AUDIT_COMPLETE : auditStatusCd; |
| | | businessCommunityMember.put("auditStatusCd", auditStatusCd); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessCommunityMember", businessCommunityMember); |
| | | |
| | | return business; |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiDataFlowListener; |
| | | import com.java110.common.constant.BusinessTypeConstant; |
| | | import com.java110.common.constant.CommonConstant; |
| | | import com.java110.common.constant.CommunityMemberTypeConstant; |
| | | import com.java110.common.constant.ServiceCodeConstant; |
| | | import com.java110.common.cache.MappingCache; |
| | | import com.java110.common.constant.*; |
| | | import com.java110.common.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.http.HttpHeaders; |
| | |
| | | businessCommunityMember.put("communityId", paramInJson.getString("communityId")); |
| | | businessCommunityMember.put("memberId", paramInJson.getString("floorId")); |
| | | businessCommunityMember.put("memberTypeCd", CommunityMemberTypeConstant.FLOOR); |
| | | businessCommunityMember.put("auditStatusCd", StatusConstant.STATUS_CD_AUDIT_COMPLETE); |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessCommunityMember", businessCommunityMember); |
| | | |
| | | return business; |
| | |
| | | |
| | | /** |
| | | * 小区信息封装 |
| | | * |
| | | * @param businessCommunityInfo 小区信息 封装 |
| | | * @throws DAOException |
| | | */ |
| | |
| | | public void saveBusinessCommunityInfo(Map businessCommunityInfo) throws DAOException { |
| | | businessCommunityInfo.put("month", DateUtil.getCurrentMonth()); |
| | | // 查询business_user 数据是否已经存在 |
| | | logger.debug("保存小区信息 入参 businessCommunityInfo : {}",businessCommunityInfo); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityInfo",businessCommunityInfo); |
| | | logger.debug("保存小区信息 入参 businessCommunityInfo : {}", businessCommunityInfo); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityInfo", businessCommunityInfo); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存小区数据失败:"+ JSONObject.toJSONString(businessCommunityInfo)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区数据失败:" + JSONObject.toJSONString(businessCommunityInfo)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 小区属性信息分装 |
| | | * |
| | | * @param businessCommunityAttr 小区属性信息封装 |
| | | * @throws DAOException |
| | | */ |
| | |
| | | public void saveBusinessCommunityAttr(Map businessCommunityAttr) throws DAOException { |
| | | businessCommunityAttr.put("month", DateUtil.getCurrentMonth()); |
| | | // 查询business_user 数据是否已经存在 |
| | | logger.debug("保存小区属性信息 入参 businessCommunityAttr : {}",businessCommunityAttr); |
| | | logger.debug("保存小区属性信息 入参 businessCommunityAttr : {}", businessCommunityAttr); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityAttr",businessCommunityAttr); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityAttr", businessCommunityAttr); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存小区属性数据失败:"+ JSONObject.toJSONString(businessCommunityAttr)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区属性数据失败:" + JSONObject.toJSONString(businessCommunityAttr)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存小区照片信息 |
| | | * |
| | | * @param businessCommunityPhoto 小区照片 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void saveBusinessCommunityPhoto(Map businessCommunityPhoto) throws DAOException { |
| | | businessCommunityPhoto.put("month", DateUtil.getCurrentMonth()); |
| | | logger.debug("保存小区照片信息 入参 businessCommunityPhoto : {}",businessCommunityPhoto); |
| | | logger.debug("保存小区照片信息 入参 businessCommunityPhoto : {}", businessCommunityPhoto); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityPhoto",businessCommunityPhoto); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityPhoto", businessCommunityPhoto); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存小区照片数据失败:"+ JSONObject.toJSONString(businessCommunityPhoto)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区照片数据失败:" + JSONObject.toJSONString(businessCommunityPhoto)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存小区证件信息 |
| | | * |
| | | * @param businessCommunityCerdentials 小区证件 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void saveBusinessCommunityCerdentials(Map businessCommunityCerdentials) throws DAOException { |
| | | businessCommunityCerdentials.put("month", DateUtil.getCurrentMonth()); |
| | | logger.debug("保存小区证件信息 入参 businessCommunityCerdentials : {}",businessCommunityCerdentials); |
| | | logger.debug("保存小区证件信息 入参 businessCommunityCerdentials : {}", businessCommunityCerdentials); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityCerdentials",businessCommunityCerdentials); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityCerdentials", businessCommunityCerdentials); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存小区证件数据失败:"+ JSONObject.toJSONString(businessCommunityCerdentials)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区证件数据失败:" + JSONObject.toJSONString(businessCommunityCerdentials)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询小区信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | |
| | | @Override |
| | | public Map getBusinessCommunityInfo(Map info) throws DAOException { |
| | | |
| | | logger.debug("查询小区信息 入参 info : {}",info); |
| | | logger.debug("查询小区信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityInfo",info); |
| | | if(businessCommunityInfos == null){ |
| | | List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityInfo", info); |
| | | if (businessCommunityInfos == null) { |
| | | return null; |
| | | } |
| | | if(businessCommunityInfos.size() >1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:businessCommunityInfos,"+ JSONObject.toJSONString(info)); |
| | | if (businessCommunityInfos.size() > 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:businessCommunityInfos," + JSONObject.toJSONString(info)); |
| | | } |
| | | |
| | | return businessCommunityInfos.get(0); |
| | |
| | | |
| | | /** |
| | | * 查询小区属性 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 小区属性 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessCommunityAttrs(Map info) throws DAOException { |
| | | logger.debug("查询小区属性信息 入参 info : {}",info); |
| | | logger.debug("查询小区属性信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessCommunityAttrs = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityAttrs",info); |
| | | List<Map> businessCommunityAttrs = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityAttrs", info); |
| | | |
| | | return businessCommunityAttrs; |
| | | } |
| | | |
| | | /** |
| | | * 查询小区照片 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessCommunityPhoto(Map info) throws DAOException { |
| | | logger.debug("查询小区照片信息 入参 info : {}",info); |
| | | logger.debug("查询小区照片信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessCommunityPhotos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityPhoto",info); |
| | | List<Map> businessCommunityPhotos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityPhoto", info); |
| | | |
| | | return businessCommunityPhotos; |
| | | } |
| | | |
| | | /** |
| | | * 查询小区证件 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessCommunityCerdentials(Map info) throws DAOException { |
| | | logger.debug("查询小区证件信息 入参 info : {}",info); |
| | | logger.debug("查询小区证件信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessCommunityCerdentialses = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityCerdentials",info); |
| | | List<Map> businessCommunityCerdentialses = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityCerdentials", info); |
| | | |
| | | return businessCommunityCerdentialses; |
| | | } |
| | | |
| | | /** |
| | | * 保存小区信息 到 instance |
| | | * @param info bId 信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void saveCommunityInfoInstance(Map info) throws DAOException { |
| | | logger.debug("保存小区信息Instance 入参 info : {}",info); |
| | | logger.debug("保存小区信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityInfoInstance",info); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityInfoInstance", info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存小区信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void saveCommunityAttrsInstance(Map info) throws DAOException { |
| | | logger.debug("保存小区属性信息Instance 入参 info : {}",info); |
| | | logger.debug("保存小区属性信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityAttrsInstance",info); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityAttrsInstance", info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存小区属性信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区属性信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void saveCommunityPhotoInstance(Map info) throws DAOException { |
| | | logger.debug("保存小区照片信息Instance 入参 info : {}",info); |
| | | logger.debug("保存小区照片信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityPhotoInstance",info); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityPhotoInstance", info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存小区照片信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区照片信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询小区信息(instance) |
| | | * |
| | | * @param info bId 信息 |
| | | * @return |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public Map getCommunityInfo(Map info) throws DAOException { |
| | | logger.debug("查询小区信息 入参 info : {}",info); |
| | | logger.debug("查询小区信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityInfo",info); |
| | | if(businessCommunityInfos == null || businessCommunityInfos.size() == 0){ |
| | | List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityInfo", info); |
| | | if (businessCommunityInfos == null || businessCommunityInfos.size() == 0) { |
| | | return null; |
| | | } |
| | | if(businessCommunityInfos.size() >1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:getCommunityInfo,"+ JSONObject.toJSONString(info)); |
| | | if (businessCommunityInfos.size() > 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:getCommunityInfo," + JSONObject.toJSONString(info)); |
| | | } |
| | | |
| | | return businessCommunityInfos.get(0); |
| | |
| | | |
| | | /** |
| | | * 小区属性查询(instance) |
| | | * |
| | | * @param info bId 信息 |
| | | * @return |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public List<Map> getCommunityAttrs(Map info) throws DAOException { |
| | | logger.debug("查询小区属性信息 入参 info : {}",info); |
| | | logger.debug("查询小区属性信息 入参 info : {}", info); |
| | | |
| | | List<Map> communityAttrs = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityAttrs",info); |
| | | List<Map> communityAttrs = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityAttrs", info); |
| | | |
| | | return communityAttrs; |
| | | } |
| | | |
| | | /** |
| | | * 小区照片查询(instance) |
| | | * |
| | | * @param info bId 信息 |
| | | * @return |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public List<Map> getCommunityPhoto(Map info) throws DAOException { |
| | | logger.debug("查询小区照片信息 入参 info : {}",info); |
| | | logger.debug("查询小区照片信息 入参 info : {}", info); |
| | | |
| | | List<Map> communityPhotos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityPhoto",info); |
| | | List<Map> communityPhotos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityPhoto", info); |
| | | |
| | | return communityPhotos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改小区信息 |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void updateCommunityInfoInstance(Map info) throws DAOException { |
| | | logger.debug("修改小区信息Instance 入参 info : {}",info); |
| | | logger.debug("修改小区信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityInfoInstance",info); |
| | | int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityInfoInstance", info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改小区信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改小区信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改小区属性信息(instance) |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void updateCommunityAttrInstance(Map info) throws DAOException { |
| | | logger.debug("修改小区属性信息Instance 入参 info : {}",info); |
| | | logger.debug("修改小区属性信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityAttrInstance",info); |
| | | int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityAttrInstance", info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改小区属性信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改小区属性信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改 小区照片信息 |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void updateCommunityPhotoInstance(Map info) throws DAOException { |
| | | logger.debug("修改小区照片信息Instance 入参 info : {}",info); |
| | | logger.debug("修改小区照片信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityPhotoInstance",info); |
| | | int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityPhotoInstance", info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改小区照片信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改小区照片信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 小区成员加入信息 |
| | | * |
| | | * @param businessCommunityMember 小区成员信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | public void saveBusinessCommunityMember(Map businessCommunityMember) throws DAOException{ |
| | | logger.debug("小区成员加入 入参 businessCommunityMember : {}",businessCommunityMember); |
| | | public void saveBusinessCommunityMember(Map businessCommunityMember) throws DAOException { |
| | | logger.debug("小区成员加入 入参 businessCommunityMember : {}", businessCommunityMember); |
| | | businessCommunityMember.put("month", DateUtil.getCurrentMonth()); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityMember",businessCommunityMember); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveBusinessCommunityMember", businessCommunityMember); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"小区成员加入失败:"+ JSONObject.toJSONString(businessCommunityMember)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "小区成员加入失败:" + JSONObject.toJSONString(businessCommunityMember)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 成员加入 保存信息至instance |
| | | * |
| | | * @param info |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void saveCommunityMemberInstance(Map info) throws DAOException { |
| | | logger.debug("小区成员加入Instance 入参 info : {}",info); |
| | | logger.debug("小区成员加入Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityMemberInstance",info); |
| | | int saveFlag = sqlSessionTemplate.insert("communityServiceDaoImpl.saveCommunityMemberInstance", info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存小区照片信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存小区照片信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询小区成员加入信息(business过程) |
| | | * 根据bId 查询小区信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | | */ |
| | | public Map getBusinessCommunityMember(Map info) throws DAOException{ |
| | | logger.debug("查询小区成员加入信息 入参 info : {}",info); |
| | | public Map getBusinessCommunityMember(Map info) throws DAOException { |
| | | logger.debug("查询小区成员加入信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessCommunityMembers = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityMember",info); |
| | | if(businessCommunityMembers == null || businessCommunityMembers.size() == 0){ |
| | | List<Map> businessCommunityMembers = sqlSessionTemplate.selectList("communityServiceDaoImpl.getBusinessCommunityMember", info); |
| | | if (businessCommunityMembers == null || businessCommunityMembers.size() == 0) { |
| | | return null; |
| | | } |
| | | if(businessCommunityMembers.size() >1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:businessCommunityMember,"+ JSONObject.toJSONString(info)); |
| | | if (businessCommunityMembers.size() > 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:businessCommunityMember," + JSONObject.toJSONString(info)); |
| | | } |
| | | |
| | | return businessCommunityMembers.get(0); |
| | |
| | | /** |
| | | * 查询小区成员加入信息(instance过程) |
| | | * 根据bId 查询小区信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 小区信息 |
| | | * @throws DAOException |
| | | */ |
| | | public Map getCommunityMember(Map info) throws DAOException{ |
| | | logger.debug("查询小区成员加入信息 入参 info : {}",info); |
| | | public Map getCommunityMember(Map info) throws DAOException { |
| | | logger.debug("查询小区成员加入信息 入参 info : {}", info); |
| | | |
| | | List<Map> memberCommunitys = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityMember",info); |
| | | if(memberCommunitys == null || memberCommunitys.size() == 0){ |
| | | List<Map> memberCommunitys = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityMember", info); |
| | | if (memberCommunitys == null || memberCommunitys.size() == 0) { |
| | | return null; |
| | | } |
| | | if(memberCommunitys.size() >1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:getCommunityMember,"+ JSONObject.toJSONString(info)); |
| | | if (memberCommunitys.size() > 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "根据条件查询有多条数据,数据异常,请检查:getCommunityMember," + JSONObject.toJSONString(info)); |
| | | } |
| | | |
| | | return memberCommunitys.get(0); |
| | | } |
| | | |
| | | /** |
| | | * 修改小区成员加入信息 |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException |
| | | */ |
| | | public void updateCommunityMemberInstance(Map info) throws DAOException{ |
| | | logger.debug("修改小区成员加入信息Instance 入参 info : {}",info); |
| | | public void updateCommunityMemberInstance(Map info) throws DAOException { |
| | | logger.debug("修改小区成员加入信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityMemberInstance",info); |
| | | int saveFlag = sqlSessionTemplate.update("communityServiceDaoImpl.updateCommunityMemberInstance", info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改小区成员加入信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改小区成员加入信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | | * 小区 服务侦听 父类 |
| | | * Created by wuxw on 2018/7/4. |
| | | */ |
| | | public abstract class AbstractCommunityBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener{ |
| | | public abstract class AbstractCommunityBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(AbstractCommunityBusinessServiceDataFlowListener.class); |
| | | |
| | | |
| | | /** |
| | | * 获取 DAO工具类 |
| | | * |
| | | * @return |
| | | */ |
| | | public abstract ICommunityServiceDao getCommunityServiceDaoImpl(); |
| | |
| | | /** |
| | | * 刷新 businessCommunityInfo 数据 |
| | | * 主要将 数据库 中字段和 接口传递字段建立关系 |
| | | * |
| | | * @param businessCommunityInfo |
| | | */ |
| | | protected void flushBusinessCommunityInfo(Map businessCommunityInfo,String statusCd){ |
| | | businessCommunityInfo.put("newBId",businessCommunityInfo.get("b_id")); |
| | | businessCommunityInfo.put("communityId",businessCommunityInfo.get("community_id")); |
| | | businessCommunityInfo.put("cityCode",businessCommunityInfo.get("city_code")); |
| | | businessCommunityInfo.put("nearbyLandmarks",businessCommunityInfo.get("nearby_landmarks")); |
| | | businessCommunityInfo.put("mapX",businessCommunityInfo.get("map_x")); |
| | | businessCommunityInfo.put("mapY",businessCommunityInfo.get("map_y")); |
| | | protected void flushBusinessCommunityInfo(Map businessCommunityInfo, String statusCd) { |
| | | businessCommunityInfo.put("newBId", businessCommunityInfo.get("b_id")); |
| | | businessCommunityInfo.put("communityId", businessCommunityInfo.get("community_id")); |
| | | businessCommunityInfo.put("cityCode", businessCommunityInfo.get("city_code")); |
| | | businessCommunityInfo.put("nearbyLandmarks", businessCommunityInfo.get("nearby_landmarks")); |
| | | businessCommunityInfo.put("mapX", businessCommunityInfo.get("map_x")); |
| | | businessCommunityInfo.put("mapY", businessCommunityInfo.get("map_y")); |
| | | businessCommunityInfo.put("statusCd", statusCd); |
| | | } |
| | | |
| | | /** |
| | | 刷新 businessCommunityAttr 数据 |
| | | * 刷新 businessCommunityAttr 数据 |
| | | * 主要将 数据库 中字段和 接口传递字段建立关系 |
| | | * |
| | | * @param businessCommunityAttr |
| | | * @param statusCd |
| | | */ |
| | | protected void flushBusinessCommunityAttr(Map businessCommunityAttr,String statusCd){ |
| | | businessCommunityAttr.put("attrId",businessCommunityAttr.get("attr_id")); |
| | | businessCommunityAttr.put("specCd",businessCommunityAttr.get("spec_cd")); |
| | | businessCommunityAttr.put("communityId",businessCommunityAttr.get("community_id")); |
| | | businessCommunityAttr.put("newBId",businessCommunityAttr.get("b_id")); |
| | | businessCommunityAttr.put("statusCd",statusCd); |
| | | protected void flushBusinessCommunityAttr(Map businessCommunityAttr, String statusCd) { |
| | | businessCommunityAttr.put("attrId", businessCommunityAttr.get("attr_id")); |
| | | businessCommunityAttr.put("specCd", businessCommunityAttr.get("spec_cd")); |
| | | businessCommunityAttr.put("communityId", businessCommunityAttr.get("community_id")); |
| | | businessCommunityAttr.put("newBId", businessCommunityAttr.get("b_id")); |
| | | businessCommunityAttr.put("statusCd", statusCd); |
| | | } |
| | | |
| | | /** |
| | | * 刷新 businessCommunityPhoto 数据 |
| | | * |
| | | * @param businessCommunityPhoto |
| | | * @param statusCd |
| | | */ |
| | | protected void flushBusinessCommunityPhoto(Map businessCommunityPhoto,String statusCd){ |
| | | businessCommunityPhoto.put("communityId",businessCommunityPhoto.get("community_id")); |
| | | businessCommunityPhoto.put("communityPhotoId",businessCommunityPhoto.get("community_photo_id")); |
| | | businessCommunityPhoto.put("communityPhotoTypeCd",businessCommunityPhoto.get("community_photo_type_cd")); |
| | | businessCommunityPhoto.put("newBId",businessCommunityPhoto.get("b_id")); |
| | | businessCommunityPhoto.put("statusCd",statusCd); |
| | | protected void flushBusinessCommunityPhoto(Map businessCommunityPhoto, String statusCd) { |
| | | businessCommunityPhoto.put("communityId", businessCommunityPhoto.get("community_id")); |
| | | businessCommunityPhoto.put("communityPhotoId", businessCommunityPhoto.get("community_photo_id")); |
| | | businessCommunityPhoto.put("communityPhotoTypeCd", businessCommunityPhoto.get("community_photo_type_cd")); |
| | | businessCommunityPhoto.put("newBId", businessCommunityPhoto.get("b_id")); |
| | | businessCommunityPhoto.put("statusCd", statusCd); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 刷新 businessCommunityMember 数据 |
| | | * 主要将 数据库 中字段和 接口传递字段建立关系 |
| | | * |
| | | * @param businessCommunityMember |
| | | */ |
| | | protected void flushBusinessCommunityMember(Map businessCommunityMember,String statusCd){ |
| | | businessCommunityMember.put("newBId",businessCommunityMember.get("b_id")); |
| | | businessCommunityMember.put("communityId",businessCommunityMember.get("community_id")); |
| | | businessCommunityMember.put("communityMemberId",businessCommunityMember.get("community_member_id")); |
| | | businessCommunityMember.put("memberId",businessCommunityMember.get("member_id")); |
| | | businessCommunityMember.put("memberTypeCd",businessCommunityMember.get("member_type_cd")); |
| | | protected void flushBusinessCommunityMember(Map businessCommunityMember, String statusCd) { |
| | | businessCommunityMember.put("newBId", businessCommunityMember.get("b_id")); |
| | | businessCommunityMember.put("communityId", businessCommunityMember.get("community_id")); |
| | | businessCommunityMember.put("communityMemberId", businessCommunityMember.get("community_member_id")); |
| | | businessCommunityMember.put("memberId", businessCommunityMember.get("member_id")); |
| | | businessCommunityMember.put("memberTypeCd", businessCommunityMember.get("member_type_cd")); |
| | | businessCommunityMember.put("auditStatusCd", businessCommunityMember.get("audit_status_cd")); |
| | | businessCommunityMember.put("statusCd", statusCd); |
| | | } |
| | | |
| | | /** |
| | | * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中 |
| | | * |
| | | * @param businessCommunity 小区信息 |
| | | */ |
| | | protected void autoSaveDelBusinessCommunity(Business business, JSONObject businessCommunity){ |
| | | protected void autoSaveDelBusinessCommunity(Business business, JSONObject businessCommunity) { |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("communityId",businessCommunity.getString("communityId")); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | info.put("communityId", businessCommunity.getString("communityId")); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | Map currentCommunityInfo = getCommunityServiceDaoImpl().getCommunityInfo(info); |
| | | if(currentCommunityInfo == null || currentCommunityInfo.isEmpty()){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info); |
| | | if (currentCommunityInfo == null || currentCommunityInfo.isEmpty()) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "未找到需要修改数据信息,入参错误或数据有问题,请检查" + info); |
| | | } |
| | | currentCommunityInfo.put("bId",business.getbId()); |
| | | currentCommunityInfo.put("communityId",currentCommunityInfo.get("community_id")); |
| | | currentCommunityInfo.put("cityCode",currentCommunityInfo.get("city_code")); |
| | | currentCommunityInfo.put("nearbyLandmarks",currentCommunityInfo.get("nearby_landmarks")); |
| | | currentCommunityInfo.put("mapX",currentCommunityInfo.get("map_x")); |
| | | currentCommunityInfo.put("mapY",currentCommunityInfo.get("map_y")); |
| | | currentCommunityInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | currentCommunityInfo.put("bId", business.getbId()); |
| | | currentCommunityInfo.put("communityId", currentCommunityInfo.get("community_id")); |
| | | currentCommunityInfo.put("cityCode", currentCommunityInfo.get("city_code")); |
| | | currentCommunityInfo.put("nearbyLandmarks", currentCommunityInfo.get("nearby_landmarks")); |
| | | currentCommunityInfo.put("mapX", currentCommunityInfo.get("map_x")); |
| | | currentCommunityInfo.put("mapY", currentCommunityInfo.get("map_y")); |
| | | currentCommunityInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | getCommunityServiceDaoImpl().saveBusinessCommunityInfo(currentCommunityInfo); |
| | | } |
| | | |
| | | /** |
| | | * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中 |
| | | * @param business 当前业务 |
| | | * |
| | | * @param business 当前业务 |
| | | * @param communityAttr 小区属性 |
| | | */ |
| | | protected void autoSaveDelBusinessCommunityAttr(Business business, JSONObject communityAttr){ |
| | | protected void autoSaveDelBusinessCommunityAttr(Business business, JSONObject communityAttr) { |
| | | Map info = new HashMap(); |
| | | info.put("attrId",communityAttr.getString("attrId")); |
| | | info.put("communityId",communityAttr.getString("communityId")); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | info.put("attrId", communityAttr.getString("attrId")); |
| | | info.put("communityId", communityAttr.getString("communityId")); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | List<Map> currentCommunityAttrs = getCommunityServiceDaoImpl().getCommunityAttrs(info); |
| | | if(currentCommunityAttrs == null || currentCommunityAttrs.size() != 1){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info); |
| | | if (currentCommunityAttrs == null || currentCommunityAttrs.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "未找到需要修改数据信息,入参错误或数据有问题,请检查" + info); |
| | | } |
| | | Map currentCommunityAttr = currentCommunityAttrs.get(0); |
| | | currentCommunityAttr.put("bId",business.getbId()); |
| | | currentCommunityAttr.put("attrId",currentCommunityAttr.get("attr_id")); |
| | | currentCommunityAttr.put("communityId",currentCommunityAttr.get("community_id")); |
| | | currentCommunityAttr.put("specCd",currentCommunityAttr.get("spec_cd")); |
| | | currentCommunityAttr.put("operate",StatusConstant.OPERATE_DEL); |
| | | currentCommunityAttr.put("bId", business.getbId()); |
| | | currentCommunityAttr.put("attrId", currentCommunityAttr.get("attr_id")); |
| | | currentCommunityAttr.put("communityId", currentCommunityAttr.get("community_id")); |
| | | currentCommunityAttr.put("specCd", currentCommunityAttr.get("spec_cd")); |
| | | currentCommunityAttr.put("operate", StatusConstant.OPERATE_DEL); |
| | | getCommunityServiceDaoImpl().saveBusinessCommunityAttr(currentCommunityAttr); |
| | | } |
| | | |
| | | /** |
| | | * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中 |
| | | * |
| | | * @param business |
| | | * @param businessCommunityPhoto 小区照片 |
| | | */ |
| | | protected void autoSaveDelBusinessCommunityPhoto(Business business,JSONObject businessCommunityPhoto){ |
| | | Map info = new HashMap(); |
| | | info.put("communityPhotoId",businessCommunityPhoto.getString("communityPhotoId")); |
| | | info.put("communityId",businessCommunityPhoto.getString("communityId")); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | protected void autoSaveDelBusinessCommunityPhoto(Business business, JSONObject businessCommunityPhoto) { |
| | | Map info = new HashMap(); |
| | | info.put("communityPhotoId", businessCommunityPhoto.getString("communityPhotoId")); |
| | | info.put("communityId", businessCommunityPhoto.getString("communityId")); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | List<Map> currentCommunityPhotos = getCommunityServiceDaoImpl().getCommunityPhoto(info); |
| | | if(currentCommunityPhotos == null || currentCommunityPhotos.size() != 1){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info); |
| | | if (currentCommunityPhotos == null || currentCommunityPhotos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "未找到需要修改数据信息,入参错误或数据有问题,请检查" + info); |
| | | } |
| | | Map currentCommunityPhoto = currentCommunityPhotos.get(0); |
| | | currentCommunityPhoto.put("bId",business.getbId()); |
| | | currentCommunityPhoto.put("communityPhotoId",currentCommunityPhoto.get("community_photo_id")); |
| | | currentCommunityPhoto.put("communityId",currentCommunityPhoto.get("community_id")); |
| | | currentCommunityPhoto.put("communityPhotoTypeCd",currentCommunityPhoto.get("community_photo_type_cd")); |
| | | currentCommunityPhoto.put("operate",StatusConstant.OPERATE_DEL); |
| | | currentCommunityPhoto.put("bId", business.getbId()); |
| | | currentCommunityPhoto.put("communityPhotoId", currentCommunityPhoto.get("community_photo_id")); |
| | | currentCommunityPhoto.put("communityId", currentCommunityPhoto.get("community_id")); |
| | | currentCommunityPhoto.put("communityPhotoTypeCd", currentCommunityPhoto.get("community_photo_type_cd")); |
| | | currentCommunityPhoto.put("operate", StatusConstant.OPERATE_DEL); |
| | | getCommunityServiceDaoImpl().saveBusinessCommunityPhoto(currentCommunityPhoto); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中 |
| | | * |
| | | * @param businessCommunityMember 小区信息 |
| | | */ |
| | | protected void autoSaveDelBusinessCommunityMember(Business business, JSONObject businessCommunityMember){ |
| | | protected void autoSaveDelBusinessCommunityMember(Business business, JSONObject businessCommunityMember) { |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("communityMemberId",businessCommunityMember.getString("communityMemberId")); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | info.put("communityMemberId", businessCommunityMember.getString("communityMemberId")); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | Map currentCommunityMember = getCommunityServiceDaoImpl().getCommunityMember(info); |
| | | if(currentCommunityMember == null || currentCommunityMember.isEmpty()){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info); |
| | | if (currentCommunityMember == null || currentCommunityMember.isEmpty()) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "未找到需要修改数据信息,入参错误或数据有问题,请检查" + info); |
| | | } |
| | | currentCommunityMember.put("bId",business.getbId()); |
| | | currentCommunityMember.put("communityId",currentCommunityMember.get("community_id")); |
| | | currentCommunityMember.put("communityMemberId",currentCommunityMember.get("community_member_id")); |
| | | currentCommunityMember.put("memberId",currentCommunityMember.get("member_id")); |
| | | currentCommunityMember.put("memberTypeCd",currentCommunityMember.get("member_type_cd")); |
| | | currentCommunityMember.put("operate",StatusConstant.OPERATE_DEL); |
| | | currentCommunityMember.put("bId", business.getbId()); |
| | | currentCommunityMember.put("communityId", currentCommunityMember.get("community_id")); |
| | | currentCommunityMember.put("communityMemberId", currentCommunityMember.get("community_member_id")); |
| | | currentCommunityMember.put("memberId", currentCommunityMember.get("member_id")); |
| | | currentCommunityMember.put("memberTypeCd", currentCommunityMember.get("member_type_cd")); |
| | | currentCommunityMember.put("auditStatusCd", currentCommunityMember.get("audit_status_cd")); |
| | | currentCommunityMember.put("operate", StatusConstant.OPERATE_DEL); |
| | | getCommunityServiceDaoImpl().saveBusinessCommunityMember(currentCommunityMember); |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 小区成员加入 侦听 |
| | | * |
| | | * <p> |
| | | * businessCommunityMember |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("memberJoinedCommunityListener") |
| | | @Transactional |
| | | public class MemberJoinedCommunityListener extends AbstractCommunityBusinessServiceDataFlowListener{ |
| | | public class MemberJoinedCommunityListener extends AbstractCommunityBusinessServiceDataFlowListener { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(MemberJoinedCommunityListener.class); |
| | | private static final int CURRENT_ORDER = 5; |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(MemberJoinedCommunityListener.class); |
| | | |
| | | @Autowired |
| | | ICommunityServiceDao communityServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 5; |
| | | return CURRENT_ORDER; |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 保存小区信息 business 表中 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | if(data.containsKey("businessCommunityMember")){ |
| | | if (data.containsKey("businessCommunityMember")) { |
| | | JSONObject businessCommunityMember = data.getJSONObject("businessCommunityMember"); |
| | | doBusinessCommunityMember(business,businessCommunityMember); |
| | | doBusinessCommunityMember(business, businessCommunityMember); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * business 数据转移到 instance |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | info.put("bId", business.getbId()); |
| | | info.put("operate", StatusConstant.OPERATE_ADD); |
| | | |
| | | //小区信息 |
| | | Map businessCommunityMember = communityServiceDaoImpl.getBusinessCommunityMember(info); |
| | | if( businessCommunityMember != null && !businessCommunityMember.isEmpty()) { |
| | | if (businessCommunityMember != null && !businessCommunityMember.isEmpty()) { |
| | | communityServiceDaoImpl.saveCommunityMemberInstance(info); |
| | | dataFlowContext.addParamOut("communityId",businessCommunityMember.get("community_id")); |
| | | dataFlowContext.addParamOut("memberId",businessCommunityMember.get("member_id")); |
| | | dataFlowContext.addParamOut("communityId", businessCommunityMember.get("community_id")); |
| | | dataFlowContext.addParamOut("memberId", businessCommunityMember.get("member_id")); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | info.put("bId", bId); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | Map paramIn = new HashMap(); |
| | | paramIn.put("bId",bId); |
| | | paramIn.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | paramIn.put("bId", bId); |
| | | paramIn.put("statusCd", StatusConstant.STATUS_CD_INVALID); |
| | | //小区信息 |
| | | Map communityMember = communityServiceDaoImpl.getCommunityMember(info); |
| | | if(communityMember != null && !communityMember.isEmpty()){ |
| | | paramIn.put("communityMemberId",communityMember.get("member_community_id").toString()); |
| | | if (communityMember != null && !communityMember.isEmpty()) { |
| | | paramIn.put("communityMemberId", communityMember.get("member_community_id").toString()); |
| | | communityServiceDaoImpl.updateCommunityMemberInstance(paramIn); |
| | | dataFlowContext.addParamOut("communityMemberId",communityMember.get("member_community_id")); |
| | | dataFlowContext.addParamOut("communityMemberId", communityMember.get("member_community_id")); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 处理 businessCommunityMember 节点 |
| | | * @param business 总的数据节点 |
| | | * |
| | | * @param business 总的数据节点 |
| | | * @param businessCommunityMember 小区成员节点 |
| | | */ |
| | | private void doBusinessCommunityMember(Business business,JSONObject businessCommunityMember){ |
| | | private void doBusinessCommunityMember(Business business, JSONObject businessCommunityMember) { |
| | | |
| | | Assert.jsonObjectHaveKey(businessCommunityMember,"communityId","businessCommunityMember 节点下没有包含 communityId 节点"); |
| | | Assert.jsonObjectHaveKey(businessCommunityMember,"memberId","businessCommunityMember 节点下没有包含 memberId 节点"); |
| | | Assert.jsonObjectHaveKey(businessCommunityMember,"memberTypeCd","businessCommunityMember 节点下没有包含 memberTypeCd 节点"); |
| | | Assert.jsonObjectHaveKey(businessCommunityMember, "communityId", "businessCommunityMember 节点下没有包含 communityId 节点"); |
| | | Assert.jsonObjectHaveKey(businessCommunityMember, "memberId", "businessCommunityMember 节点下没有包含 memberId 节点"); |
| | | Assert.jsonObjectHaveKey(businessCommunityMember, "memberTypeCd", "businessCommunityMember 节点下没有包含 memberTypeCd 节点"); |
| | | |
| | | if(businessCommunityMember.getString("communityId").startsWith("-") || businessCommunityMember.getString("memberId").startsWith("-")){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"传入参数 communityId 或 communityId 必须是已有小区ID,"+businessCommunityMember); |
| | | if (businessCommunityMember.getString("communityId").startsWith("-") || businessCommunityMember.getString("memberId").startsWith("-")) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "传入参数 communityId 或 communityId 必须是已有小区ID," + businessCommunityMember); |
| | | } |
| | | |
| | | if(businessCommunityMember.getString("communityMemberId").startsWith("-")){ |
| | | if (businessCommunityMember.getString("communityMemberId").startsWith("-")) { |
| | | //刷新缓存 |
| | | flushCommunityMemberId(business.getDatas()); |
| | | } |
| | | |
| | | businessCommunityMember.put("bId",business.getbId()); |
| | | businessCommunityMember.put("bId", business.getbId()); |
| | | businessCommunityMember.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存小区信息 |
| | | communityServiceDaoImpl.saveBusinessCommunityMember(businessCommunityMember); |
| | |
| | | |
| | | /** |
| | | * 刷新 小区ID |
| | | * |
| | | * @param data |
| | | */ |
| | | private void flushCommunityMemberId(JSONObject data) { |
| | | |
| | | String communityMemberId = GenerateCodeFactory.getCommunityMemberId(); |
| | | JSONObject businessCommunityMember = data.getJSONObject("businessCommunityMember"); |
| | | businessCommunityMember.put("communityMemberId",communityMemberId); |
| | | businessCommunityMember.put("communityMemberId", communityMemberId); |
| | | |
| | | } |
| | | |
| | | public ICommunityServiceDao getCommunityServiceDaoImpl() { |
| | | return communityServiceDaoImpl; |
| | | } |
| | |
| | | ResponseEntity<String> responseEntity = null; |
| | | JSONObject _paramObj = JSONObject.parseObject(pd.getReqData()); |
| | | //权限校验 |
| | | checkUserHasPrivilege(pd,restTemplate, PrivilegeCodeConstant.PRIVILEGE_ENTER_COMMUNITY); |
| | | responseEntity = super.getStoreInfo(pd,restTemplate); |
| | | if(responseEntity.getStatusCode() != HttpStatus.OK){ |
| | | checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.PRIVILEGE_ENTER_COMMUNITY); |
| | | responseEntity = super.getStoreInfo(pd, restTemplate); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | return responseEntity; |
| | | } |
| | | Assert.jsonObjectHaveKey(responseEntity.getBody().toString(),"storeId","根据用户ID查询商户ID失败,未包含storeId节点"); |
| | | Assert.jsonObjectHaveKey(responseEntity.getBody().toString(), "storeId", "根据用户ID查询商户ID失败,未包含storeId节点"); |
| | | |
| | | String storeId = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeId"); |
| | | String storeTypeCd = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeTypeCd"); |
| | | |
| | | //修改用户信息 |
| | | responseEntity = this.callCenterService(restTemplate,pd,"", |
| | | ServiceConstant.SERVICE_API_URL+"/api/query.myCommunity.byMember?memberId="+storeId+ |
| | | "&memberTypeCd="+MappingCache.getValue(MappingConstant.DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE,storeTypeCd), |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | ServiceConstant.SERVICE_API_URL + "/api/query.myCommunity.byMember?memberId=" + storeId + |
| | | "&memberTypeCd=" + MappingCache.getValue(MappingConstant.DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE, storeTypeCd), |
| | | HttpMethod.GET); |
| | | |
| | | if(responseEntity.getStatusCode() != HttpStatus.OK){ |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | return responseEntity; |
| | | } |
| | | JSONArray tmpCommunitys = JSONObject.parseObject(responseEntity.getBody().toString()).getJSONArray("communitys"); |
| | |
| | | |
| | | /** |
| | | * 查询未入驻的小区 |
| | | * |
| | | * @param pd |
| | | * @return |
| | | */ |
| | |
| | | ResponseEntity<String> responseEntity = null; |
| | | JSONObject _paramObj = JSONObject.parseObject(pd.getReqData()); |
| | | //权限校验 |
| | | checkUserHasPrivilege(pd,restTemplate, PrivilegeCodeConstant.PRIVILEGE_ENTER_COMMUNITY); |
| | | responseEntity = super.getStoreInfo(pd,restTemplate); |
| | | if(responseEntity.getStatusCode() != HttpStatus.OK){ |
| | | checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.PRIVILEGE_ENTER_COMMUNITY); |
| | | responseEntity = super.getStoreInfo(pd, restTemplate); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | return responseEntity; |
| | | } |
| | | Assert.jsonObjectHaveKey(responseEntity.getBody().toString(),"storeId","根据用户ID查询商户ID失败,未包含storeId节点"); |
| | | Assert.jsonObjectHaveKey(responseEntity.getBody().toString(), "storeId", "根据用户ID查询商户ID失败,未包含storeId节点"); |
| | | |
| | | String storeId = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeId"); |
| | | String storeTypeCd = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeTypeCd"); |
| | | String communityName = !_paramObj.containsKey("communityName")?"":_paramObj.getString("communityName"); |
| | | String communityName = !_paramObj.containsKey("communityName") ? "" : _paramObj.getString("communityName"); |
| | | //修改用户信息 |
| | | if(StringUtils.isEmpty(communityName)) { |
| | | if (StringUtils.isEmpty(communityName)) { |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | ServiceConstant.SERVICE_API_URL + "/api/query.noEnterCommunity.byMember?memberId=" + storeId + |
| | | "&memberTypeCd=" + MappingCache.getValue(MappingConstant.DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE, storeTypeCd), |
| | | HttpMethod.GET); |
| | | }else{ |
| | | } else { |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | ServiceConstant.SERVICE_API_URL + "/api/query.noEnterCommunity.byMemberAndName?memberId=" + storeId + |
| | | "&memberTypeCd=" + MappingCache.getValue(MappingConstant.DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE, storeTypeCd) |
| | | +"&name="+communityName, |
| | | + "&name=" + communityName, |
| | | HttpMethod.GET); |
| | | } |
| | | |
| | | if(responseEntity.getStatusCode() != HttpStatus.OK){ |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | return responseEntity; |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 商户入驻申请接口 |
| | | * |
| | | * @param pd |
| | | * @return |
| | | */ |
| | |
| | | public ResponseEntity<String> _saveEnterCommunity(IPageData pd) { |
| | | |
| | | ResponseEntity<String> responseEntity = null; |
| | | Assert.jsonObjectHaveKey(pd.getReqData(),"communityId","请求信息中未包含communityId"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "communityId", "请求信息中未包含communityId"); |
| | | JSONObject _paramObj = JSONObject.parseObject(pd.getReqData()); |
| | | |
| | | String communityId = _paramObj.getString("communityId"); |
| | | |
| | | //权限校验 |
| | | checkUserHasPrivilege(pd,restTemplate, PrivilegeCodeConstant.PRIVILEGE_ENTER_COMMUNITY); |
| | | responseEntity = super.getStoreInfo(pd,restTemplate); |
| | | if(responseEntity.getStatusCode() != HttpStatus.OK){ |
| | | checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.PRIVILEGE_ENTER_COMMUNITY); |
| | | responseEntity = super.getStoreInfo(pd, restTemplate); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | return responseEntity; |
| | | } |
| | | Assert.jsonObjectHaveKey(responseEntity.getBody().toString(),"storeId","根据用户ID查询商户ID失败,未包含storeId节点"); |
| | | Assert.jsonObjectHaveKey(responseEntity.getBody().toString(), "storeId", "根据用户ID查询商户ID失败,未包含storeId节点"); |
| | | |
| | | String storeId = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeId"); |
| | | String storeTypeCd = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeTypeCd"); |
| | | _paramObj.put("memberId",storeId); |
| | | _paramObj.put("memberTypeCd",MappingCache.getValue(MappingConstant.DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE,storeTypeCd)); |
| | | _paramObj.put("memberId", storeId); |
| | | _paramObj.put("memberTypeCd", MappingCache.getValue(MappingConstant.DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE, storeTypeCd)); |
| | | |
| | | responseEntity = this.callCenterService(restTemplate, pd, _paramObj.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/member.join.community", |
| | |
| | | |
| | | /** |
| | | * 退出小区 |
| | | * |
| | | * @param pd |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResponseEntity<String> exitCommunity(IPageData pd) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | Assert.jsonObjectHaveKey(pd.getReqData(),"communityId","请求信息中未包含communityId"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "communityId", "请求信息中未包含communityId"); |
| | | JSONObject _paramObj = JSONObject.parseObject(pd.getReqData()); |
| | | |
| | | String communityId = _paramObj.getString("communityId"); |
| | | |
| | | Assert.hasLength(communityId,"请求报文中communityId为空"); |
| | | Assert.hasLength(communityId, "请求报文中communityId为空"); |
| | | |
| | | //权限校验 |
| | | checkUserHasPrivilege(pd,restTemplate, PrivilegeCodeConstant.PRIVILEGE_ENTER_COMMUNITY); |
| | | responseEntity = super.getStoreInfo(pd,restTemplate); |
| | | if(responseEntity.getStatusCode() != HttpStatus.OK){ |
| | | checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.PRIVILEGE_ENTER_COMMUNITY); |
| | | responseEntity = super.getStoreInfo(pd, restTemplate); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | return responseEntity; |
| | | } |
| | | Assert.jsonObjectHaveKey(responseEntity.getBody().toString(),"storeId","根据用户ID查询商户ID失败,未包含storeId节点"); |
| | | Assert.jsonObjectHaveKey(responseEntity.getBody().toString(), "storeId", "根据用户ID查询商户ID失败,未包含storeId节点"); |
| | | |
| | | String storeId = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeId"); |
| | | String storeTypeCd = JSONObject.parseObject(responseEntity.getBody().toString()).getString("storeTypeCd"); |
| | | JSONObject paramInObj = new JSONObject(); |
| | | paramInObj.put("communityId",communityId); |
| | | paramInObj.put("memberId",storeId); |
| | | paramInObj.put("memberTypeCd",MappingCache.getValue(MappingConstant.DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE,storeTypeCd)); |
| | | paramInObj.put("communityId", communityId); |
| | | paramInObj.put("memberId", storeId); |
| | | paramInObj.put("memberTypeCd", MappingCache.getValue(MappingConstant.DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE, storeTypeCd)); |
| | | |
| | | responseEntity = this.callCenterService(restTemplate, pd, paramInObj.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/member.quit.community", |
| | |
| | | } |
| | | |
| | | |
| | | private void freshCommunityAttr(JSONArray community){ |
| | | for(int _communityIndex = 0 ;_communityIndex < community.size();_communityIndex++){ |
| | | private void freshCommunityAttr(JSONArray community) { |
| | | for (int _communityIndex = 0; _communityIndex < community.size(); _communityIndex++) { |
| | | JSONObject _community = community.getJSONObject(_communityIndex); |
| | | if(!_community.containsKey("attrs")){ |
| | | if (!_community.containsKey("attrs")) { |
| | | continue; |
| | | } |
| | | JSONArray _attrs = _community.getJSONArray("attrs"); |
| | | for(int _cAttrIndex = 0;_cAttrIndex < _attrs.size();_cAttrIndex++){ |
| | | if(AttrCdConstant.SPEC_CD_COMMUNITY_TEL.equals(_attrs.getJSONObject(_cAttrIndex).getString("specCd"))){ |
| | | _community.put("tel",_attrs.getJSONObject(_cAttrIndex).getString("value")); |
| | | for (int _cAttrIndex = 0; _cAttrIndex < _attrs.size(); _cAttrIndex++) { |
| | | if (AttrCdConstant.SPEC_CD_COMMUNITY_TEL.equals(_attrs.getJSONObject(_cAttrIndex).getString("specCd"))) { |
| | | _community.put("tel", _attrs.getJSONObject(_cAttrIndex).getString("value")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | |
| | | for (int communityIndex = 0; communityIndex < communitys.size(); communityIndex++) { |
| | | tempCommunity = communitys.getJSONObject(communityIndex); |
| | | |
| | | if (!StatusConstant.STATUS_CD_VALID.equals(tempCommunity.getString("statusCd"))) { |
| | | if (!StatusConstant.STATUS_CD_AUDIT_COMPLETE.equals(tempCommunity.getString("auditStatusCd"))) { |
| | | continue; |
| | | } |
| | | newCommunity = new JSONObject(); |
| | |
| | | }); |
| | | }, |
| | | saveFloorInfo:function(){ |
| | | vc.loading('open'); |
| | | if(!vc.component.addFloorValidate()){ |
| | | vc.component.addFloorInfo.errorInfo = vc.validate.errInfo; |
| | | vc.loading('close'); |
| | | |
| | | return ; |
| | | } |
| | | |
| | |
| | | //关闭model |
| | | $('#addFloorModel').modal('hide'); |
| | | vc.component.clearAddFloorInfo(); |
| | | vc.component.$emit('addFloor_reload_event',{}); |
| | | vc.emit('listFloor','listFloorData',{}); |
| | | vc.loading('close'); |
| | | |
| | | return ; |
| | | } |
| | | vc.component.addFloorInfo.errorInfo = json; |
| | | vc.loading('close'); |
| | | |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.component.addFloorInfo.errorInfo = errInfo; |
| | | vc.loading('close'); |
| | | |
| | | }); |
| | | }, |
| | | clearAddFloorInfo:function(){ |
| | |
| | | {{community.cityCode}} |
| | | </td> |
| | | <td> |
| | | {{_showCommunityStatus(community.statusCd)}} |
| | | {{_showCommunityStatus(community.auditStatusCd)}} |
| | | </td> |
| | | <td class="text-right"> |
| | | <div class="btn-group" v-if="community.statusCd == 0"> |
| | | <div class="btn-group" v-if="community.auditStatusCd == '0000'"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openExitCommunityModel(community)">申请退出</button> |
| | | </div> |
| | | </td> |
| | |
| | | return "入驻审核"; |
| | | }else if(_statusCd == '1001'){ |
| | | return "退出审核"; |
| | | }else if(_statusCd == '0000'){ |
| | | return "入驻成功"; |
| | | } |
| | | |
| | | return "在用"; |
| | | return "未知"; |
| | | } |
| | | } |
| | | }); |
| | |
| | | </td> |
| | | <td class="text-right"> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openDelFloorModel(floor)">修改</button> |
| | | </div> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openDelFloorModel(floor)">删除</button> |
| | | </div> |
| | | </td> |
| | |
| | | vc.component._listFloorData(); |
| | | }, |
| | | _initEvent:function(){ |
| | | |
| | | vc.on('listFloor','listFloorData',function(){ |
| | | vc.component._listFloorData(); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _listFloorData:function(){ |
| | |
| | | ); |
| | | }, |
| | | _saveEnterCommunity:function(_communityInfo){ |
| | | vc.loading('open'); |
| | | var _param = { |
| | | communityId:_communityInfo.communityId |
| | | }; |
| | |
| | | function(json,res){ |
| | | if(res.status == 200){ |
| | | vc.emit('enterCommunity','listMyCommunity',{ |
| | | }) |
| | | }); |
| | | $('#storeEnterCommunityModel').modal('hide'); |
| | | |
| | | vc.loading('close'); |
| | | return ; |
| | | } |
| | | vc.component.storeEnterCommunityInfo.errorInfo = json; |
| | | },function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | vc.component.storeEnterCommunityInfo.errorInfo = json; |
| | | vc.loading('close'); |
| | | |
| | | } |
| | | ); |
| | | |
| | |
| | | |memberId|1|String|30|小区成员ID|-| |
| | | |communityId|1|String|30|小区ID|-| |
| | | |memberTypeCd|1|String|12|成员角色|-| |
| | | |auditStatusCd|1|String|4|审核状态|不需要审核时写0000| |
| | | |
| | | ###### 返回协议 |
| | | |
| | |
| | | SIGN:aabdncdhdbd878sbdudn898 |
| | | 请求报文: |
| | | |
| | | 无 |
| | | |
| | | 返回报文: |
| | | { |
| | | "memberId": "390001200001", |
| | | "communityId": "1234444", |
| | | "memberTypeCd": "12221222" |
| | | } |
| | | |
| | | 返回报文: |
| | | |
| | | 成功 |
| | | |
| | | ``` |
| | |
| | | |businessCommunityMember|communityId|1|String|30|小区ID|小区ID| |
| | | |businessCommunityMember|memberId|1|String|30|成员ID|成员ID| |
| | | |businessCommunityMember|memberTypeCd|1|String|30|成员类型|成员类型| |
| | | |businessCommunityMember|auditStatusCd|1|String|4|审核状态|不需要审核的时直接写成0000| |
| | | |
| | | ###### 返回协议 |
| | | |
| | |
| | | "communityMemberId": "-1", |
| | | "communityId": "7020181217000001", |
| | | "memberId": "3456789", |
| | | "memberTypeCd": "390001200001" |
| | | "memberTypeCd": "390001200001", |
| | | "auditStatusCd":"0000" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | |
| | | * 映射表配置 |
| | | * Created by wuxw on 2018/4/14. |
| | | */ |
| | | public class MappingConstant { |
| | | public final class MappingConstant { |
| | | |
| | | private MappingConstant(){ |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public final static String KEY_LOG_ON_OFF = "LOG_ON_OFF"; |
| | | public final static String KEY_COST_TIME_ON_OFF = "COST_TIME_ON_OFF"; |
| | | public static final String KEY_LOG_ON_OFF = "LOG_ON_OFF"; |
| | | public static final String KEY_COST_TIME_ON_OFF = "COST_TIME_ON_OFF"; |
| | | |
| | | //私钥 |
| | | public final static String KEY_PRIVATE_STRING = "PRIVATE_STRING"; |
| | | public static final String KEY_PRIVATE_STRING = "PRIVATE_STRING"; |
| | | |
| | | //公钥 |
| | | public final static String KEY_PUBLIC_STRING = "PUBLIC_STRING"; |
| | | public static final String KEY_PUBLIC_STRING = "PUBLIC_STRING"; |
| | | |
| | | //私钥(外部系统) |
| | | public final static String KEY_OUT_PRIVATE_STRING = "OUT_PRIVATE_STRING"; |
| | | public static final String KEY_OUT_PRIVATE_STRING = "OUT_PRIVATE_STRING"; |
| | | |
| | | //公钥(外部系统) |
| | | public final static String KEY_OUT_PUBLIC_STRING = "OUT_PUBLIC_STRING"; |
| | | public static final String KEY_OUT_PUBLIC_STRING = "OUT_PUBLIC_STRING"; |
| | | //解密 KEY_SIZE |
| | | public final static String KEY_DEFAULT_DECRYPT_KEY_SIZE = "DEFAULT_DECRYPT_KEY_SIZE"; |
| | | public static final String KEY_DEFAULT_DECRYPT_KEY_SIZE = "DEFAULT_DECRYPT_KEY_SIZE"; |
| | | |
| | | public final static String KEY_RULE_ON_OFF = "RULE_ON_OFF"; |
| | | public final static String VALUE_ON = "ON"; |
| | | public final static String VALUE_OFF = "OFF"; |
| | | public static final String KEY_RULE_ON_OFF = "RULE_ON_OFF"; |
| | | public static final String VALUE_ON = "ON"; |
| | | public static final String VALUE_OFF = "OFF"; |
| | | |
| | | //不用调用规则校验的配置 |
| | | public final static String KEY_NO_NEED_RULE_VALDATE_ORDER = "NO_NEED_RULE_VALDATE_ORDER";//Q |
| | | public static final String KEY_NO_NEED_RULE_VALDATE_ORDER = "NO_NEED_RULE_VALDATE_ORDER";//Q |
| | | |
| | | //不用保存订单也订单项信息的配置 |
| | | public final static String KEY_NO_SAVE_ORDER = "NO_SAVE_ORDER";//Q |
| | | public static final String KEY_NO_SAVE_ORDER = "NO_SAVE_ORDER";//Q |
| | | |
| | | // 不用调用 下游系统的配置(一般不存在这种情况,这里主要是在没有下游系统的情况下测试中心服务用) |
| | | public final static String KEY_NO_INVOKE_BUSINESS_SYSTEM = "NO_INVOKE_BUSINESS_SYSTEM";// |
| | | public static final String KEY_NO_INVOKE_BUSINESS_SYSTEM = "NO_INVOKE_BUSINESS_SYSTEM";// |
| | | |
| | | // 不用调用 作废下游系统的配置(一般不存在这种情况,这里主要是在没有下游系统的情况下测试中心服务用) |
| | | public final static String KEY_NO_INVALID_BUSINESS_SYSTEM = "NO_INVALID_BUSINESS_SYSTEM";// |
| | | public static final String KEY_NO_INVALID_BUSINESS_SYSTEM = "NO_INVALID_BUSINESS_SYSTEM";// |
| | | |
| | | //需要调用服务生成各个ID |
| | | public final static String KEY_NEED_INVOKE_GENERATE_ID = "NEED_INVOKE_SERVICE_GENERATE_ID"; |
| | | public static final String KEY_NEED_INVOKE_GENERATE_ID = "NEED_INVOKE_SERVICE_GENERATE_ID"; |
| | | |
| | | //默认掩码 |
| | | public final static String KEY_DEFAULT_SECURITY_CODE = "DEFAULT_SECURITY_CODE"; |
| | | public static final String KEY_DEFAULT_SECURITY_CODE = "DEFAULT_SECURITY_CODE"; |
| | | |
| | | // 生成 编码路径 |
| | | public final static String KEY_CODE_PATH = "CODE_PATH"; |
| | | public static final String KEY_CODE_PATH = "CODE_PATH"; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 中心服务地址 |
| | | */ |
| | | public final static String KEY_CENTER_SERVICE_URL = "CENTER_SERVICE_URL"; |
| | | public static final String KEY_CENTER_SERVICE_URL = "CENTER_SERVICE_URL"; |
| | | |
| | | public final static String KEY_API_SERVICE_URL = "API_SERVICE_URL"; |
| | | public static final String KEY_API_SERVICE_URL = "API_SERVICE_URL"; |
| | | |
| | | /** |
| | | * 控制中心服务APP_ID |
| | | */ |
| | | public final static String KEY_CONSOLE_SERVICE_APP_ID = "CONSOLE_SERVICE_APP_ID"; |
| | | public static final String KEY_CONSOLE_SERVICE_APP_ID = "CONSOLE_SERVICE_APP_ID"; |
| | | |
| | | public final static String KEY_CONSOLE_SECURITY_CODE = "CONSOLE_SECURITY_CODE"; |
| | | public static final String KEY_CONSOLE_SECURITY_CODE = "CONSOLE_SECURITY_CODE"; |
| | | |
| | | /** |
| | | * 控制服务是否调用接口解密处理 |
| | | */ |
| | | public final static String KEY_CONSOLE_SERVICE_SECURITY_ON_OFF = "CONSOLE_SERVICE_SECURITY_ON_OFF"; |
| | | public static final String KEY_CONSOLE_SERVICE_SECURITY_ON_OFF = "CONSOLE_SERVICE_SECURITY_ON_OFF"; |
| | | |
| | | /** |
| | | * 用户秘钥 |
| | | */ |
| | | public final static String KEY_USER_PASSWORD_SECRET = "USER_PASSWORD_SECRET"; |
| | | public static final String KEY_USER_PASSWORD_SECRET = "USER_PASSWORD_SECRET"; |
| | | |
| | | /** |
| | | * JWT 秘钥 |
| | | */ |
| | | public final static String KEY_JWT_SECRET = "JWT_SECRET"; |
| | | public static final String KEY_JWT_SECRET = "JWT_SECRET"; |
| | | |
| | | /** |
| | | * JWT 秘钥 |
| | | */ |
| | | public final static String KEY_JWT_EXPIRE_TIME = "JWT_EXPIRE_TIME"; |
| | | public static final String KEY_JWT_EXPIRE_TIME = "JWT_EXPIRE_TIME"; |
| | | |
| | | /** |
| | | * 员工默认密码 |
| | | */ |
| | | public final static String KEY_STAFF_DEFAULT_PASSWORD = "STAFF_DEFAULT_PASSWORD"; |
| | | public static final String KEY_STAFF_DEFAULT_PASSWORD = "STAFF_DEFAULT_PASSWORD"; |
| | | |
| | | |
| | | /** |
| | | * 默认权限 |
| | | */ |
| | | public final static String DOMAIN_DEFAULT_PRIVILEGE_ADMIN = "DEFAULT_PRIVILEGE_ADMIN"; |
| | | public static final String DOMAIN_DEFAULT_PRIVILEGE_ADMIN = "DEFAULT_PRIVILEGE_ADMIN"; |
| | | |
| | | |
| | | /** |
| | | * 默认权限 |
| | | */ |
| | | public final static String DOMAIN_DEFAULT_PRIVILEGE = "DEFAULT_PRIVILEGE"; |
| | | public static final String DOMAIN_DEFAULT_PRIVILEGE = "DEFAULT_PRIVILEGE"; |
| | | |
| | | |
| | | /** |
| | | * 商户类型转 小区成员角色 |
| | | */ |
| | | public final static String DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE = "STORE_TYPE_2_COMMUNITY_MEMBER_TYPE"; |
| | | public static final String DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE = "STORE_TYPE_2_COMMUNITY_MEMBER_TYPE"; |
| | | |
| | | |
| | | /** |
| | | * 小区成员审核 |
| | | */ |
| | | public static final String DOMAIN_COMMUNITY_MEMBER_AUDIT = "COMMUNITY_MEMBER_AUDIT"; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public final static String STATUS_CD_AUDIT_INVALID = "1001"; |
| | | |
| | | /** |
| | | * 入驻成功 |
| | | */ |
| | | public final static String STATUS_CD_AUDIT_COMPLETE = "0000"; |
| | | |
| | | public final static String REQUEST_BUSINESS_TYPE = "Q"; |
| | | public final static String REQUEST_BUSINESS_TYPE_BUSINESS = "B"; |
| | | public final static String REQUEST_BUSINESS_TYPE_INSTANCE = "I"; |
| | |
| | | |
| | | <!--小区成员加入 add by wuxw 2018-10-27 saveBusinessCommunityMember--> |
| | | <insert id="saveBusinessCommunityMember" parameterType="Map"> |
| | | insert into business_community_member(community_member_id,b_id,community_id,member_id,member_type_cd,month,operate) |
| | | values(#{communityMemberId},#{bId},#{communityId},#{memberId},#{memberTypeCd},#{month},#{operate}) |
| | | insert into business_community_member(community_member_id,b_id,community_id,member_id,member_type_cd,month,operate,audit_status_cd) |
| | | values(#{communityMemberId},#{bId},#{communityId},#{memberId},#{memberTypeCd},#{month},#{operate},#{auditStatusCd}) |
| | | </insert> |
| | | |
| | | <!-- 小区成员加入 instance表中 add by wuxw 2018-10-27 --> |
| | | <insert id="saveCommunityMemberInstance" parameterType="Map"> |
| | | insert into s_community_member(community_member_id,b_id,community_id,member_id,member_type_cd,status_cd) |
| | | select ms.community_member_id,ms.b_id,ms.community_id,ms.member_id,ms.member_type_cd,'1000' |
| | | insert into s_community_member(community_member_id,b_id,community_id,member_id,member_type_cd,status_cd,audit_status_cd) |
| | | select ms.community_member_id,ms.b_id,ms.community_id,ms.member_id,ms.member_type_cd,'0',ms.audit_status_cd |
| | | from business_community_member ms where |
| | | ms.operate = 'ADD' and ms.b_id=#{bId} |
| | | </insert> |
| | | |
| | | <!-- 查询小区成员 add by wuxw 2018-10-27 getBusinessCommunityMember--> |
| | | <select id="getBusinessCommunityMember" parameterType="Map" resultType="Map"> |
| | | select ms.community_member_id,ms.b_id,ms.community_id,ms.member_id,ms.member_type_cd,ms.operate |
| | | select ms.community_member_id,ms.b_id,ms.community_id,ms.member_id,ms.member_type_cd,ms.operate,ms.audit_status_cd |
| | | from business_community_member ms where 1 = 1 |
| | | <if test="operate != null and operate != ''"> |
| | | and ms.operate = #{operate} |
| | |
| | | |
| | | <!-- 查询小区成员 add by wuxw 2018-07-03 --> |
| | | <select id="getCommunityMember" parameterType="Map" resultType="Map"> |
| | | select ms.community_member_id,ms.b_id,ms.community_id,ms.member_id,ms.member_type_cd,ms.status_cd |
| | | select ms.community_member_id,ms.b_id,ms.community_id,ms.member_id,ms.member_type_cd,ms.status_cd,ms.audit_status_cd |
| | | from s_community_member ms |
| | | where 1=1 |
| | | <if test="statusCd != null and statusCd != ''"> |
| | |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,ms.b_id = #{newBId} |
| | | </if> |
| | | <if test="auditStatusCd !=null and auditStatusCd !=''"> |
| | | ,ms.audit_status_cd = #{auditStatusCd} |
| | | </if> |
| | | where 1=1 |
| | | <if test="bId != null and bId !=''"> |
| | | and ms.b_id = #{bId} |