old mode 100644
new mode 100755
| | |
| | | import com.java110.core.factory.DataTransactionFactory; |
| | | import com.java110.db.dao.IQueryServiceDAO; |
| | | import com.java110.dto.basePrivilege.BasePrivilegeDto; |
| | | import com.java110.dto.businessDatabus.BusinessDatabusDto; |
| | | import com.java110.entity.center.AppRoute; |
| | | import com.java110.entity.mapping.Mapping; |
| | | import com.java110.entity.order.ServiceBusiness; |
| | |
| | | //5.0 刷新基础权限 |
| | | flushPrivilege(dataQuery); |
| | | |
| | | //刷新databus |
| | | doFlushDatabus(dataQuery); |
| | | |
| | | dataQuery.setResponseInfo(DataTransactionFactory.createBusinessResponseJson(ResponseConstant.RESULT_CODE_SUCCESS, "刷新成功")); |
| | | } |
| | | |
| | |
| | | |
| | | //5.0 刷新基础权限 |
| | | flushPrivilege(headers); |
| | | |
| | | flushDatabus(headers); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | //3.0 分装 ServiceSql |
| | | doFlushServiceSql(); |
| | | |
| | | //5.0 刷新全新 |
| | | doFlushServiceBusiness(); |
| | | |
| | | //5.0 刷新全新 |
| | | |
| | | doFlushPrivilege(); |
| | | |
| | | //刷新databus |
| | | doFlushDatabus(); |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * 刷新 Mapping 数据 |
| | | */ |
| | | private void doFlushDatabus(DataQuery dataQuery) { |
| | | |
| | | JSONObject params = dataQuery.getRequestParams(); |
| | | |
| | | if (!CommonConstant.CACHE_DATABUS.equals(params.getString(CommonConstant.CACHE_PARAM_NAME))) { |
| | | return; |
| | | } |
| | | |
| | | doFlushDatabus(); |
| | | } |
| | | |
| | | /** |
| | | * 刷新 Mapping 数据 |
| | | */ |
| | | private void flushPrivilege(Map<String, String> headers) { |
| | | |
| | | Assert.hasKey(headers, CommonConstant.CACHE_PARAM, "未包含cache参数" + headers.toString()); |
| | |
| | | } |
| | | |
| | | doFlushPrivilege(); |
| | | } |
| | | |
| | | /** |
| | | * 刷新 databus 数据 |
| | | */ |
| | | private void flushDatabus(Map<String, String> headers) { |
| | | |
| | | Assert.hasKey(headers, CommonConstant.CACHE_PARAM, "未包含cache参数" + headers.toString()); |
| | | |
| | | if (!CommonConstant.CACHE_DATABUS.equals(headers.get(CommonConstant.CACHE_PARAM)) |
| | | && !CommonConstant.CACHE_ALL.equals(headers.get(CommonConstant.CACHE_PARAM))) { |
| | | return; |
| | | } |
| | | |
| | | doFlushDatabus(); |
| | | } |
| | | |
| | | /** |
| | |
| | | PrivilegeCache.setValue(basePrivilegeDtos); |
| | | } |
| | | |
| | | private void doFlushDatabus() { |
| | | logger.debug("开始刷新 Mapping数据到redis数据库中"); |
| | | List<BusinessDatabusDto> businessDatabusDtos = centerServiceDAOImpl.getDatabusAll(); |
| | | //删除原始数据 |
| | | DatabusCache.removeData(DatabusCache.DEFAULT_DATABUS); |
| | | DatabusCache.setValue(businessDatabusDtos); |
| | | } |
| | | |
| | | /** |
| | | * 刷新AppRoute数据 |
| | | */ |