17个文件已修改
1 文件已重命名
9个文件已添加
| New file |
| | |
| | | #!/bin/bash |
| | | #### debug model prod |
| | | #nohup java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -jar -Dspring.profiles.active=dev CenterService.jar $1 > center.log 2>&1 & |
| | | |
| | | #### normal prod model |
| | | #nohup java -jar -Dspring.profiles.active=prod $1 CenterService.jar > center.log $1 2>&1 & |
| | | |
| | | #### normal test model |
| | | #nohup java -jar -Dspring.profiles.active=test $1 CenterService.jar > center.log $1 2>&1 & |
| | | |
| | | #### normal dev model |
| | | nohup java -jar -Dspring.profiles.active=dev $1 CenterService.jar > center.log $1 2>&1 & |
| | | |
| | | tail -100f center.log |
| | |
| | | package com.java110.center; |
| | | |
| | | import com.java110.event.center.init.CenterServiceStartInit; |
| | | import com.java110.center.smo.ICenterServiceCacheSMO; |
| | | import com.java110.common.factory.ApplicationContextFactory; |
| | | import com.java110.common.factory.DataQueryFactory; |
| | | import com.java110.entity.service.DataQuery; |
| | | import com.java110.event.center.init.EventConfigInit; |
| | | import com.java110.service.init.ServiceStartInit; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.web.client.RestTemplateBuilder; |
| | |
| | | public static void main(String[] args) throws Exception{ |
| | | ApplicationContext context = SpringApplication.run(CenterServiceApplicationStart.class, args); |
| | | |
| | | CenterServiceStartInit centerServiceStartInit = new CenterServiceStartInit(); |
| | | //服务启动加载 |
| | | ServiceStartInit.initSystemConfig(context); |
| | | |
| | | centerServiceStartInit.initSystemConfig(context); |
| | | //加载事件数据 |
| | | EventConfigInit.initSystemConfig(); |
| | | |
| | | //刷新缓存 |
| | | flushMainCache(args); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 刷新主要的缓存 |
| | | * @param args |
| | | */ |
| | | private static void flushMainCache(String []args) { |
| | | if (args == null || args.length == 0) { |
| | | return; |
| | | } |
| | | for (int i = 0; i < args.length; i++) { |
| | | if (args[i].equalsIgnoreCase("-Dcache")) { |
| | | ICenterServiceCacheSMO centerServiceCacheSMO = (ICenterServiceCacheSMO) ApplicationContextFactory.getBean("centerServiceCacheSMOImpl"); |
| | | centerServiceCacheSMO.startFlush(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | * 刷新 缓存 |
| | | */ |
| | | public void flush(DataQuery dataQuery); |
| | | |
| | | /** |
| | | * 系统启动刷新 |
| | | */ |
| | | public void startFlush(); |
| | | } |
| | |
| | | dataQuery.setResponseInfo(DataTransactionFactory.createBusinessResponseJson(ResponseConstant.RESULT_CODE_SUCCESS,"刷新成功")); |
| | | } |
| | | |
| | | /** |
| | | * 用来系统启动刷新 |
| | | */ |
| | | @Override |
| | | public void startFlush() { |
| | | //1.0 封装 AppRoute |
| | | doFlushAppRoute(); |
| | | |
| | | //2.0 分装 Mapping |
| | | doFlushMapping(); |
| | | |
| | | //3.0 分装 ServiceSql |
| | | doFlushServiceSql(); |
| | | } |
| | | |
| | | private void checkCacheParam(DataQuery dataQuery) throws SMOException{ |
| | | JSONObject params = dataQuery.getRequestParams(); |
| | | if(params == null || !params.containsKey(CommonConstant.CACHE_PARAM_NAME)){ |
| | |
| | | if(!CommonConstant.CACHE_SERVICE_SQL.equals(params.getString(CommonConstant.CACHE_PARAM_NAME))){ |
| | | return ; |
| | | } |
| | | // 刷新 |
| | | doFlushServiceSql(); |
| | | } |
| | | |
| | | private void doFlushServiceSql() { |
| | | List<ServiceSql> serviceSqls = queryServiceDAOImpl.qureyServiceSqlAll(); |
| | | |
| | | if(serviceSqls == null || serviceSqls.size() == 0){ |
| | |
| | | ServiceSqlCache.setServiceSql(serviceSql); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 刷新 Mapping 数据 |
| | |
| | | return ; |
| | | } |
| | | |
| | | doFlushMapping(); |
| | | } |
| | | |
| | | private void doFlushMapping() { |
| | | List<Mapping> mappings = centerServiceDAOImpl.getMappingInfoAll(); |
| | | |
| | | for(Mapping mapping : mappings){ |
| | |
| | | if(!CommonConstant.CACHE_APP_ROUTE_SERVICE.equals(params.getString(CommonConstant.CACHE_PARAM_NAME))){ |
| | | return ; |
| | | } |
| | | doFlushAppRoute(); |
| | | |
| | | } |
| | | |
| | | private void doFlushAppRoute() { |
| | | List<Map> appInfos = centerServiceDAOImpl.getAppRouteAndServiceInfoAll(); |
| | | Map<String,List<AppRoute>> appRoustsMap = new HashMap<String,List<AppRoute>>(); |
| | | List<AppRoute> appRoutes = null; |
| | |
| | | for (String appId : appRoustsMap.keySet()) { |
| | | AppRouteCache.setAppRoute(appRoustsMap.get(appId)); |
| | | } |
| | | |
| | | } |
| | | |
| | | public ICenterServiceDAO getCenterServiceDAOImpl() { |
| New file |
| | |
| | | jedis: |
| | | pool: |
| | | config: |
| | | maxTotal: 100 |
| | | maxIdle: 20 |
| | | maxWaitMillis: 20000 |
| | | host: 192.168.31.199 |
| | | port: 6379 |
| | | |
| | | eureka: |
| | | instance: |
| | | leaseRenewalIntervalInSeconds: 10 |
| | | leaseExpirationDurationInSeconds: 30 |
| | | client: |
| | | serviceUrl: |
| | | defaultZone: http://192.168.31.199:8761/eureka/ |
| | | #defaultZone: http://localhost:8761/eureka/ |
| | | server: |
| | | port: 8001 |
| | | spring: |
| | | application: |
| | | name: center-service |
| | | redis: |
| | | database: 0 |
| | | host: 192.168.31.199 |
| | | port: 6379 |
| | | pool: |
| | | max-active: 300 |
| | | max-wait: 10000 |
| | | max-idle: 100 |
| | | min-idle: 0 |
| | | timeout: 0 |
| | | datasource: |
| | | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
| | | minIdle: 5 |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | initialSize: 5 |
| | | maxWait: 60000 |
| | | filters: stat,wall,log4j |
| | | poolPreparedStatements: true |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | url: jdbc:mysql://192.168.31.199:3306/TT |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | password: TT@12345678 |
| | | testOnBorrow: false |
| | | testWhileIdle: true |
| | | minEvictableIdleTimeMillis: 300000 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | testOnReturn: false |
| | | driverClassName: com.mysql.jdbc.Driver |
| | | maxActive: 20 |
| | | username: TT |
| | | |
| | | #============== kafka =================== |
| | | kafka: |
| | | consumer: |
| | | zookeeper: |
| | | connect: 192.168.31.199:2181 |
| | | servers: 192.168.31.199:9092 |
| | | enable: |
| | | auto: |
| | | commit: true |
| | | session: |
| | | timeout: 6000 |
| | | auto: |
| | | commit: |
| | | interval: 100 |
| | | offset: |
| | | reset: latest |
| | | topic: test |
| | | group: |
| | | id: notifyBusinessStatus |
| | | concurrency: 10 |
| | | |
| | | producer: |
| | | zookeeper: |
| | | connect: 192.168.31.199:2181 |
| | | servers: 192.168.31.199:9092 |
| | | retries: 0 |
| | | batch: |
| | | size: 4096 |
| | | linger: 1 |
| | | buffer: |
| | | memory: 40960 |
| New file |
| | |
| | | jedis: |
| | | pool: |
| | | config: |
| | | maxTotal: 100 |
| | | maxIdle: 20 |
| | | maxWaitMillis: 20000 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | |
| | | eureka: |
| | | instance: |
| | | leaseRenewalIntervalInSeconds: 10 |
| | | leaseExpirationDurationInSeconds: 30 |
| | | client: |
| | | serviceUrl: |
| | | defaultZone: http://135.192.86.200:8761/eureka/ |
| | | #defaultZone: http://localhost:8761/eureka/ |
| | | server: |
| | | port: 8001 |
| | | spring: |
| | | application: |
| | | name: center-service |
| | | redis: |
| | | database: 0 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | pool: |
| | | max-active: 300 |
| | | max-wait: 10000 |
| | | max-idle: 100 |
| | | min-idle: 0 |
| | | timeout: 0 |
| | | datasource: |
| | | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
| | | minIdle: 5 |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | initialSize: 5 |
| | | maxWait: 60000 |
| | | filters: stat,wall,log4j |
| | | poolPreparedStatements: true |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | url: jdbc:mysql://135.192.86.200:3306/TT |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | password: TT@12345678 |
| | | testOnBorrow: false |
| | | testWhileIdle: true |
| | | minEvictableIdleTimeMillis: 300000 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | testOnReturn: false |
| | | driverClassName: com.mysql.jdbc.Driver |
| | | maxActive: 20 |
| | | username: TT |
| | | |
| | | #============== kafka =================== |
| | | kafka: |
| | | consumer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | enable: |
| | | auto: |
| | | commit: true |
| | | session: |
| | | timeout: 6000 |
| | | auto: |
| | | commit: |
| | | interval: 100 |
| | | offset: |
| | | reset: latest |
| | | topic: test |
| | | group: |
| | | id: notifyBusinessStatus |
| | | concurrency: 10 |
| | | |
| | | producer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | retries: 0 |
| | | batch: |
| | | size: 4096 |
| | | linger: 1 |
| | | buffer: |
| | | memory: 40960 |
| New file |
| | |
| | | jedis: |
| | | pool: |
| | | config: |
| | | maxTotal: 100 |
| | | maxIdle: 20 |
| | | maxWaitMillis: 20000 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | |
| | | eureka: |
| | | instance: |
| | | leaseRenewalIntervalInSeconds: 10 |
| | | leaseExpirationDurationInSeconds: 30 |
| | | client: |
| | | serviceUrl: |
| | | defaultZone: http://135.192.86.200:8761/eureka/ |
| | | #defaultZone: http://localhost:8761/eureka/ |
| | | server: |
| | | port: 8001 |
| | | spring: |
| | | application: |
| | | name: center-service |
| | | redis: |
| | | database: 0 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | pool: |
| | | max-active: 300 |
| | | max-wait: 10000 |
| | | max-idle: 100 |
| | | min-idle: 0 |
| | | timeout: 0 |
| | | datasource: |
| | | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
| | | minIdle: 5 |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | initialSize: 5 |
| | | maxWait: 60000 |
| | | filters: stat,wall,log4j |
| | | poolPreparedStatements: true |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | url: jdbc:mysql://135.192.86.200:3306/TT |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | password: TT@12345678 |
| | | testOnBorrow: false |
| | | testWhileIdle: true |
| | | minEvictableIdleTimeMillis: 300000 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | testOnReturn: false |
| | | driverClassName: com.mysql.jdbc.Driver |
| | | maxActive: 20 |
| | | username: TT |
| | | |
| | | #============== kafka =================== |
| | | kafka: |
| | | consumer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | enable: |
| | | auto: |
| | | commit: true |
| | | session: |
| | | timeout: 6000 |
| | | auto: |
| | | commit: |
| | | interval: 100 |
| | | offset: |
| | | reset: latest |
| | | topic: test |
| | | group: |
| | | id: notifyBusinessStatus |
| | | concurrency: 10 |
| | | |
| | | producer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | retries: 0 |
| | | batch: |
| | | size: 4096 |
| | | linger: 1 |
| | | buffer: |
| | | memory: 40960 |
| | |
| | | jedis: |
| | | pool: |
| | | config: |
| | | maxTotal: 100 |
| | | maxIdle: 20 |
| | | maxWaitMillis: 20000 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | |
| | | eureka: |
| | | instance: |
| | | leaseRenewalIntervalInSeconds: 10 |
| | | leaseExpirationDurationInSeconds: 30 |
| | | client: |
| | | serviceUrl: |
| | | defaultZone: http://135.192.86.200:8761/eureka/ |
| | | #defaultZone: http://localhost:8761/eureka/ |
| | | server: |
| | | port: 8001 |
| | | spring: |
| | | application: |
| | | name: center-service |
| | | redis: |
| | | database: 0 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | pool: |
| | | max-active: 300 |
| | | max-wait: 10000 |
| | | max-idle: 100 |
| | | min-idle: 0 |
| | | timeout: 0 |
| | | datasource: |
| | | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
| | | minIdle: 5 |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | initialSize: 5 |
| | | maxWait: 60000 |
| | | filters: stat,wall,log4j |
| | | poolPreparedStatements: true |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | url: jdbc:mysql://135.192.86.200:3306/TT |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | password: TT@12345678 |
| | | testOnBorrow: false |
| | | testWhileIdle: true |
| | | minEvictableIdleTimeMillis: 300000 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | testOnReturn: false |
| | | driverClassName: com.mysql.jdbc.Driver |
| | | maxActive: 20 |
| | | username: TT |
| | | |
| | | #============== kafka =================== |
| | | kafka: |
| | | consumer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | enable: |
| | | auto: |
| | | commit: true |
| | | session: |
| | | timeout: 6000 |
| | | auto: |
| | | commit: |
| | | interval: 100 |
| | | offset: |
| | | reset: latest |
| | | topic: test |
| | | group: |
| | | id: notifyBusinessStatus |
| | | concurrency: 10 |
| | | |
| | | producer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | retries: 0 |
| | | batch: |
| | | size: 4096 |
| | | linger: 1 |
| | | buffer: |
| | | memory: 40960 |
| | | profiles: |
| | | active: dev |
| New file |
| | |
| | | #!/bin/bash |
| | | #### debug model prod |
| | | #nohup java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -jar -Dspring.profiles.active=dev ConsoleService.jar > console.log 2>&1 & |
| | | |
| | | #### normal prod model |
| | | #nohup java -jar -Dspring.profiles.active=prod ConsoleService.jar > console.log 2>&1 & |
| | | |
| | | #### normal test model |
| | | #nohup java -jar -Dspring.profiles.active=test ConsoleService.jar > console.log 2>&1 & |
| | | |
| | | #### normal dev model |
| | | nohup java -jar -Dspring.profiles.active=dev ConsoleService.jar > console.log 2>&1 & |
| | | |
| | | tail -100f console.log |
| | |
| | | return pd.getResJson().toJSONString(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(path = "/console/flushCache",method = RequestMethod.POST) |
| | | public String flushCache(HttpServletRequest request){ |
| | | PageData pd = null; |
| | |
| | | |
| | | return pd.getResJson().toJSONString(); |
| | | } |
| | | |
| | | /** |
| | | * 编辑模板数据 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @RequestMapping(path = "/console/editTemplateData",method = RequestMethod.POST) |
| | | public String editTemplateData(HttpServletRequest request){ |
| | | PageData pd = null; |
| | | try { |
| | | pd = this.getPageData(request); |
| | | // 判断用户是否登录 |
| | | checkLogin(pd); |
| | | consoleServiceSMOImpl.editTemplateData(pd); |
| | | }catch (IllegalArgumentException e){ |
| | | return DataTransactionFactory.pageResponseJson(pd, ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null); |
| | | }catch (SMOException e){ |
| | | return DataTransactionFactory.pageResponseJson(pd,e.getResult().getCode(),e.getMessage(),null); |
| | | }catch (Exception e){ |
| | | logger.error("异常信息:",e); |
| | | return DataTransactionFactory.pageResponseJson(pd,ResponseConstant.RESULT_CODE_ERROR,"请求参数出错 ",null); |
| | | } |
| | | |
| | | return pd.getResJson().toJSONString(); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | public void queryCacheOne(PageData pd) throws SMOException; |
| | | |
| | | /** |
| | | * 编辑模板数据 |
| | | * @param pd |
| | | * @throws SMOException |
| | | */ |
| | | public void editTemplateData(PageData pd) throws SMOException; |
| | | |
| | | |
| | | } |
| | |
| | | pd.setResJson(DataTransactionFactory.pageResponseJson(pd.getTransactionId(),ResponseConstant.RESULT_CODE_SUCCESS,"查询成功 ",templateObj)); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 编辑模板数据 |
| | | * @param pd |
| | | * @throws SMOException |
| | | */ |
| | | public void editTemplateData(PageData pd) throws SMOException{ |
| | | |
| | | //查询模板信息 |
| | | getTemplate(pd); |
| | | JSONObject template = pd.getData().getJSONObject("template"); |
| | | String oper = pd.getParam().getString("oper"); |
| | | Assert.hasLength(oper,"oper 字段不能为空"); |
| | | String templateUrl = template.getString("templateUrl"); |
| | | if(StringUtil.isNullOrNone(templateUrl)){ |
| | | throw new SMOException(ResponseConstant.RESULT_CODE_CONFIG_ERROR,"配置错误,模板中url 没有被配置"); |
| | | } |
| | | String serviceCode = ""; |
| | | if(CommonConstant.TEMPLATE_OPER_ADD.equals(oper)){ |
| | | serviceCode = CommonConstant.TEMPLATE_URL_INSERT; |
| | | }else if(CommonConstant.TEMPLATE_OPER_EDIT.equals(oper)){ |
| | | serviceCode = CommonConstant.TEMPLATE_URL_UPDATE; |
| | | }else if(CommonConstant.TEMPLATE_OPER_DEL.equals(oper)){ |
| | | serviceCode = CommonConstant.TEMPLATE_URL_DELETE; |
| | | }else{ |
| | | throw new SMOException(ResponseConstant.RESULT_PARAM_ERROR,"入参错误oper 只能为 add edit del 中的一种"); |
| | | } |
| | | Map paramIn = new HashMap(); |
| | | paramIn.putAll(pd.getParam()); |
| | | paramIn.put("userId", pd.getUserId()); |
| | | paramIn.put(CommonConstant.ORDER_USER_ID,pd.getUserId()); |
| | | paramIn.put(ServiceCodeConstant.SERVICE_CODE,getServiceCode(templateUrl,serviceCode)); |
| | | paramIn.put(ServiceCodeConstant.SERVICE_CODE_NAME,"数据操作"); |
| | | //paramIn.put("userPwd", userPwd); |
| | | JSONObject businessObj = doExecute(paramIn); |
| | | |
| | | pd.setResJson(businessObj); |
| | | } |
| | | |
| | | /** |
| | | * 获取serviceCode |
| | | * @param templateUrl |
| New file |
| | |
| | | project: |
| | | name: dev |
| | | |
| | | jedis: |
| | | pool: |
| | | config: |
| | | maxTotal: 100 |
| | | maxIdle: 20 |
| | | maxWaitMillis: 20000 |
| | | host: 192.168.31.199 |
| | | port: 6379 |
| | | |
| | | eureka: |
| | | instance: |
| | | leaseRenewalIntervalInSeconds: 10 |
| | | leaseExpirationDurationInSeconds: 30 |
| | | client: |
| | | serviceUrl: |
| | | defaultZone: http://192.168.31.199:8761/eureka/ |
| | | #defaultZone: http://localhost:8761/eureka/ |
| | | server: |
| | | port: 8443 |
| | | ssl: |
| | | keyStoreType: PKCS12 |
| | | keyAlias: tomcat |
| | | key-store: classpath:keystore.p12 |
| | | key-store-password: 12345678 |
| | | session: |
| | | cookie: |
| | | http-only: true |
| | | spring: |
| | | application: |
| | | name: console-service |
| | | redis: |
| | | database: 0 |
| | | host: 192.168.31.199 |
| | | port: 6379 |
| | | pool: |
| | | max-active: 300 |
| | | max-wait: 10000 |
| | | max-idle: 100 |
| | | min-idle: 0 |
| | | timeout: 0 |
| | | datasource: |
| | | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
| | | minIdle: 5 |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | initialSize: 5 |
| | | maxWait: 60000 |
| | | filters: stat,wall,log4j |
| | | poolPreparedStatements: true |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | url: jdbc:mysql://192.168.31.199:3306/TT |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | password: TT@12345678 |
| | | testOnBorrow: false |
| | | testWhileIdle: true |
| | | minEvictableIdleTimeMillis: 300000 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | testOnReturn: false |
| | | driverClassName: com.mysql.jdbc.Driver |
| | | maxActive: 20 |
| | | username: TT |
| | | |
| | | freemarker: |
| | | charset: UTF-8 |
| | | cache: false |
| | | expose-request-attributes: true |
| | | request-context-attribute: request |
| | | expose-session-attributes: true |
| | | content-type: text/html |
| | | template-loader-path: classpath:/html/ |
| | | suffix: .html |
| | | check-template-location: true |
| | | |
| | | #============== kafka =================== |
| | | kafka: |
| | | consumer: |
| | | zookeeper: |
| | | connect: 192.168.31.199:2181 |
| | | servers: 192.168.31.199:9092 |
| | | enable: |
| | | auto: |
| | | commit: true |
| | | session: |
| | | timeout: 6000 |
| | | auto: |
| | | commit: |
| | | interval: 100 |
| | | offset: |
| | | reset: latest |
| | | topic: test |
| | | group: |
| | | id: consoleService |
| | | concurrency: 10 |
| | | |
| | | producer: |
| | | zookeeper: |
| | | connect: 192.168.31.199:2181 |
| | | servers: 192.168.31.199:9092 |
| | | retries: 0 |
| | | batch: |
| | | size: 4096 |
| | | linger: 1 |
| | | buffer: |
| | | memory: 40960 |
| | | |
| | | |
| New file |
| | |
| | | project: |
| | | name: prod |
| | | |
| | | jedis: |
| | | pool: |
| | | config: |
| | | maxTotal: 100 |
| | | maxIdle: 20 |
| | | maxWaitMillis: 20000 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | |
| | | eureka: |
| | | instance: |
| | | leaseRenewalIntervalInSeconds: 10 |
| | | leaseExpirationDurationInSeconds: 30 |
| | | client: |
| | | serviceUrl: |
| | | defaultZone: http://135.192.86.200:8761/eureka/ |
| | | #defaultZone: http://localhost:8761/eureka/ |
| | | server: |
| | | port: 8443 |
| | | ssl: |
| | | keyStoreType: PKCS12 |
| | | keyAlias: tomcat |
| | | key-store: classpath:keystore.p12 |
| | | key-store-password: 12345678 |
| | | session: |
| | | cookie: |
| | | http-only: true |
| | | spring: |
| | | application: |
| | | name: console-service |
| | | redis: |
| | | database: 0 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | pool: |
| | | max-active: 300 |
| | | max-wait: 10000 |
| | | max-idle: 100 |
| | | min-idle: 0 |
| | | timeout: 0 |
| | | datasource: |
| | | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
| | | minIdle: 5 |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | initialSize: 5 |
| | | maxWait: 60000 |
| | | filters: stat,wall,log4j |
| | | poolPreparedStatements: true |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | url: jdbc:mysql://135.192.86.200:3306/TT |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | password: TT@12345678 |
| | | testOnBorrow: false |
| | | testWhileIdle: true |
| | | minEvictableIdleTimeMillis: 300000 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | testOnReturn: false |
| | | driverClassName: com.mysql.jdbc.Driver |
| | | maxActive: 20 |
| | | username: TT |
| | | |
| | | freemarker: |
| | | charset: UTF-8 |
| | | cache: false |
| | | expose-request-attributes: true |
| | | request-context-attribute: request |
| | | expose-session-attributes: true |
| | | content-type: text/html |
| | | template-loader-path: classpath:/html/ |
| | | suffix: .html |
| | | check-template-location: true |
| | | |
| | | #============== kafka =================== |
| | | kafka: |
| | | consumer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | enable: |
| | | auto: |
| | | commit: true |
| | | session: |
| | | timeout: 6000 |
| | | auto: |
| | | commit: |
| | | interval: 100 |
| | | offset: |
| | | reset: latest |
| | | topic: test |
| | | group: |
| | | id: consoleService |
| | | concurrency: 10 |
| | | |
| | | producer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | retries: 0 |
| | | batch: |
| | | size: 4096 |
| | | linger: 1 |
| | | buffer: |
| | | memory: 40960 |
| | | |
| | | |
| New file |
| | |
| | | project: |
| | | name: test |
| | | jedis: |
| | | pool: |
| | | config: |
| | | maxTotal: 100 |
| | | maxIdle: 20 |
| | | maxWaitMillis: 20000 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | |
| | | eureka: |
| | | instance: |
| | | leaseRenewalIntervalInSeconds: 10 |
| | | leaseExpirationDurationInSeconds: 30 |
| | | client: |
| | | serviceUrl: |
| | | defaultZone: http://135.192.86.200:8761/eureka/ |
| | | #defaultZone: http://localhost:8761/eureka/ |
| | | server: |
| | | port: 8443 |
| | | ssl: |
| | | keyStoreType: PKCS12 |
| | | keyAlias: tomcat |
| | | key-store: classpath:keystore.p12 |
| | | key-store-password: 12345678 |
| | | session: |
| | | cookie: |
| | | http-only: true |
| | | spring: |
| | | application: |
| | | name: console-service |
| | | redis: |
| | | database: 0 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | pool: |
| | | max-active: 300 |
| | | max-wait: 10000 |
| | | max-idle: 100 |
| | | min-idle: 0 |
| | | timeout: 0 |
| | | datasource: |
| | | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
| | | minIdle: 5 |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | initialSize: 5 |
| | | maxWait: 60000 |
| | | filters: stat,wall,log4j |
| | | poolPreparedStatements: true |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | url: jdbc:mysql://135.192.86.200:3306/TT |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | password: TT@12345678 |
| | | testOnBorrow: false |
| | | testWhileIdle: true |
| | | minEvictableIdleTimeMillis: 300000 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | testOnReturn: false |
| | | driverClassName: com.mysql.jdbc.Driver |
| | | maxActive: 20 |
| | | username: TT |
| | | |
| | | freemarker: |
| | | charset: UTF-8 |
| | | cache: false |
| | | expose-request-attributes: true |
| | | request-context-attribute: request |
| | | expose-session-attributes: true |
| | | content-type: text/html |
| | | template-loader-path: classpath:/html/ |
| | | suffix: .html |
| | | check-template-location: true |
| | | |
| | | #============== kafka =================== |
| | | kafka: |
| | | consumer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | enable: |
| | | auto: |
| | | commit: true |
| | | session: |
| | | timeout: 6000 |
| | | auto: |
| | | commit: |
| | | interval: 100 |
| | | offset: |
| | | reset: latest |
| | | topic: test |
| | | group: |
| | | id: consoleService |
| | | concurrency: 10 |
| | | |
| | | producer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | retries: 0 |
| | | batch: |
| | | size: 4096 |
| | | linger: 1 |
| | | buffer: |
| | | memory: 40960 |
| | | |
| | | |
| | |
| | | jedis: |
| | | pool: |
| | | config: |
| | | maxTotal: 100 |
| | | maxIdle: 20 |
| | | maxWaitMillis: 20000 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | |
| | | eureka: |
| | | instance: |
| | | leaseRenewalIntervalInSeconds: 10 |
| | | leaseExpirationDurationInSeconds: 30 |
| | | client: |
| | | serviceUrl: |
| | | defaultZone: http://135.192.86.200:8761/eureka/ |
| | | #defaultZone: http://localhost:8761/eureka/ |
| | | server: |
| | | port: 8443 |
| | | ssl: |
| | | keyStoreType: PKCS12 |
| | | keyAlias: tomcat |
| | | key-store: classpath:keystore.p12 |
| | | key-store-password: 12345678 |
| | | session: |
| | | cookie: |
| | | http-only: true |
| | | spring: |
| | | application: |
| | | name: console-service |
| | | redis: |
| | | database: 0 |
| | | host: 135.192.86.200 |
| | | port: 6379 |
| | | pool: |
| | | max-active: 300 |
| | | max-wait: 10000 |
| | | max-idle: 100 |
| | | min-idle: 0 |
| | | timeout: 0 |
| | | datasource: |
| | | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
| | | minIdle: 5 |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | initialSize: 5 |
| | | maxWait: 60000 |
| | | filters: stat,wall,log4j |
| | | poolPreparedStatements: true |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | url: jdbc:mysql://135.192.86.200:3306/TT |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | password: TT@12345678 |
| | | testOnBorrow: false |
| | | testWhileIdle: true |
| | | minEvictableIdleTimeMillis: 300000 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | testOnReturn: false |
| | | driverClassName: com.mysql.jdbc.Driver |
| | | maxActive: 20 |
| | | username: TT |
| | | |
| | | freemarker: |
| | | charset: UTF-8 |
| | | cache: false |
| | | expose-request-attributes: true |
| | | request-context-attribute: request |
| | | expose-session-attributes: true |
| | | content-type: text/html |
| | | template-loader-path: classpath:/html/ |
| | | suffix: .html |
| | | check-template-location: true |
| | | |
| | | #============== kafka =================== |
| | | kafka: |
| | | consumer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | enable: |
| | | auto: |
| | | commit: true |
| | | session: |
| | | timeout: 6000 |
| | | auto: |
| | | commit: |
| | | interval: 100 |
| | | offset: |
| | | reset: latest |
| | | topic: test |
| | | group: |
| | | id: consoleService |
| | | concurrency: 10 |
| | | |
| | | producer: |
| | | zookeeper: |
| | | connect: 135.192.86.200:2181 |
| | | servers: 135.192.86.200:9092 |
| | | retries: 0 |
| | | batch: |
| | | size: 4096 |
| | | linger: 1 |
| | | buffer: |
| | | memory: 40960 |
| | | |
| | | |
| | | profiles: |
| | | active: test |
| | |
| | | "index": "id", |
| | | "width": 60, |
| | | "sorttype": "int", |
| | | "editable": "true" |
| | | "editable": "true", |
| | | "editoptions": {"size" : "10"} |
| | | } |
| | | }, { |
| | | "colName": "日期", |
| | |
| | | |
| | | <div id="grid-pager"></div> |
| | | |
| | | <button class="btn btn-blue" id="bedata">新增</button> |
| | | |
| | | |
| | | <script src="../static/assets/js/jquery-2.1.4.min.js"></script> |
| | | <script src="../static/assets/js/jquery.jqGrid.min.js"></script> |
| | |
| | | <!-- inline scripts related to this page --> |
| | | <script type="text/javascript"> |
| | | |
| | | var reqJson = createRequestData('queryTemplate',''); |
| | | |
| | | var colNames = []; |
| | | |
| | | var colModels = []; |
| | | |
| | | |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "../data/list_template.json", |
| | | data: reqJson, |
| | | contentType: "application/text", |
| | | dataType:"text", |
| | | success: function(data){ |
| | | processResponse(data); |
| | | }, |
| | | error: function(data){ |
| | | //alertText("网络超时,请稍后再试"); |
| | | } |
| | | }); |
| | | |
| | | |
| | | function processResponse(data){ |
| | | var data = getResponseInfo(data) |
| | | if(data.code != "0000"){ |
| | | alertText(data.msg+",错误ID:"+data.id); |
| | | return ; |
| | | } |
| | | var templates = data.data.template; |
| | | if(templates == null || templates == undefined){ |
| | | return ; |
| | | } |
| | | |
| | | |
| | | |
| | | for(var colIndex = 0; colIndex < templates.length; colIndex++){ |
| | | colNames.push(templates[colIndex].colName); |
| | | if(templates[colIndex].colModel.formatter == undefined){ |
| | | colModels.push(templates[colIndex].colModel); |
| | | }else{ |
| | | colModels.push(JSON.parse(JSON.stringify(templates[colIndex].colModel),function(k,v){ |
| | | if(v.indexOf && v.indexOf('function') > -1){ |
| | | return eval("(function(){return "+v+" })()") |
| | | } |
| | | return v; |
| | | })); |
| | | } |
| | | } |
| | | showGradData(colNames,colModels) |
| | | } |
| | | |
| | | |
| | | function showGradData(colNames,colModels){ |
| | | |
| | | jQuery(function($) { |
| | | var grid_selector = "#grid-table"; |
| | | var pager_selector = "#grid-pager"; |
| | | |
| | | |
| | | var parent_column = $(grid_selector).closest('[class*="col-"]'); |
| | | //resize to fit page size |
| | | $(window).on('resize.jqGrid', function () { |
| | | $(grid_selector).jqGrid( 'setGridWidth', parent_column.width() ); |
| | | }) |
| | | |
| | | //resize on sidebar collapse/expand |
| | | $(document).on('settings.ace.jqGrid' , function(ev, event_name, collapsed) { |
| | | if( event_name === 'sidebar_collapsed' || event_name === 'main_container_fixed' ) { |
| | | //setTimeout is for webkit only to give time for DOM changes and then redraw!!! |
| | | setTimeout(function() { |
| | | $(grid_selector).jqGrid( 'setGridWidth', parent_column.width() ); |
| | | }, 20); |
| | | } |
| | | }) |
| | | |
| | | jQuery(grid_selector).jqGrid({ |
| | | subGrid : false, |
| | | //data: grid_data, |
| | | url: "../data/list.json", |
| | | datatype: "json", |
| | | height: 250, |
| | | colNames:colNames, |
| | | colModel:colModels, |
| | | viewrecords : true, |
| | | rowNum:10, |
| | | rowList:[10,20,30], |
| | | pager : pager_selector, |
| | | altRows: true, |
| | | multiselect: true, |
| | | multiboxonly: true, |
| | | loadComplete : function() { |
| | | var table = this; |
| | | setTimeout(function(){ |
| | | styleCheckbox(table); |
| | | |
| | | updateActionIcons(table); |
| | | updatePagerIcons(table); |
| | | enableTooltips(table); |
| | | }, 0); |
| | | }, |
| | | |
| | | }); |
| | | $(window).triggerHandler('resize.jqGrid');//trigger window resize to make the grid get the correct size |
| | | |
| | | |
| | | //switch element when editing inline |
| | | function aceSwitch( cellvalue, options, cell ) { |
| | | setTimeout(function(){ |
| | | $(cell) .find('input[type=checkbox]') |
| | | .addClass('ace ace-switch ace-switch-5') |
| | | .after('<span class="lbl"></span>'); |
| | | }, 0); |
| | | } |
| | | |
| | | function doItemData(cellvalue, options, rowObject){ |
| | | var temp ='<div style="margin-left:8px;"><div title="详情记录" style="float:left;cursor:pointer;" class="ui-pg-div" id="jEditButton_3" onclick="detail('+rowObject+')" onmouseover="jQuery(this).addClass("ui-state-hover");" onmouseout="jQuery(this).removeClass(\"ui-state-hover\");"><span class="ui-icon fa-search-plus"/></div></div>'; |
| | | return '['+cellvalue+']'; |
| | | } |
| | | |
| | | //enable datepicker |
| | | function pickDate( cellvalue, options, cell ) { |
| | | setTimeout(function(){ |
| | | $(cell) .find('input[type=text]') |
| | | .datepicker({format:'yyyy-mm-dd' , autoclose:true}); |
| | | }, 0); |
| | | } |
| | | |
| | | |
| | | //navButtons |
| | | jQuery(grid_selector).jqGrid('navGrid',pager_selector, |
| | | { //navbar options |
| | | edit: true, |
| | | editicon : 'ace-icon fa fa-pencil blue', |
| | | add: true, |
| | | addicon : 'ace-icon fa fa-plus-circle purple', |
| | | del: true, |
| | | delicon : 'ace-icon fa fa-trash-o red', |
| | | search: true, |
| | | searchicon : 'ace-icon fa fa-search orange', |
| | | refresh: true, |
| | | refreshicon : 'ace-icon fa fa-refresh green', |
| | | view: true, |
| | | viewicon : 'ace-icon fa fa-search-plus grey', |
| | | }, |
| | | { |
| | | //edit record form |
| | | //closeAfterEdit: true, |
| | | //width: 700, |
| | | recreateForm: true, |
| | | beforeShowForm : function(e) { |
| | | var form = $(e[0]); |
| | | form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />') |
| | | style_edit_form(form); |
| | | } |
| | | }, |
| | | { |
| | | //new record form |
| | | //width: 700, |
| | | closeAfterAdd: true, |
| | | recreateForm: true, |
| | | viewPagerButtons: false, |
| | | beforeShowForm : function(e) { |
| | | var form = $(e[0]); |
| | | form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar') |
| | | .wrapInner('<div class="widget-header" />') |
| | | style_edit_form(form); |
| | | } |
| | | }, |
| | | { |
| | | //delete record form |
| | | recreateForm: true, |
| | | beforeShowForm : function(e) { |
| | | var form = $(e[0]); |
| | | if(form.data('styled')) return false; |
| | | |
| | | form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />') |
| | | style_delete_form(form); |
| | | |
| | | form.data('styled', true); |
| | | }, |
| | | onClick : function(e) { |
| | | //alert(1); |
| | | } |
| | | }, |
| | | { |
| | | //search form |
| | | recreateForm: true, |
| | | afterShowSearch: function(e){ |
| | | var form = $(e[0]); |
| | | form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class="widget-header" />') |
| | | style_search_form(form); |
| | | }, |
| | | afterRedraw: function(){ |
| | | style_search_filters($(this)); |
| | | } |
| | | , |
| | | multipleSearch: true, |
| | | /** |
| | | multipleGroup:true, |
| | | showQuery: true |
| | | */ |
| | | }, |
| | | { |
| | | //view record form |
| | | recreateForm: true, |
| | | beforeShowForm: function(e){ |
| | | var form = $(e[0]); |
| | | form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class="widget-header" />') |
| | | } |
| | | } |
| | | ) |
| | | |
| | | |
| | | |
| | | function style_edit_form(form) { |
| | | //enable datepicker on "sdate" field and switches for "stock" field |
| | | form.find('input[name=sdate]').datepicker({format:'yyyy-mm-dd' , autoclose:true}) |
| | | |
| | | form.find('input[name=stock]').addClass('ace ace-switch ace-switch-5').after('<span class="lbl"></span>'); |
| | | //don't wrap inside a label element, the checkbox value won't be submitted (POST'ed) |
| | | //.addClass('ace ace-switch ace-switch-5').wrap('<label class="inline" />').after('<span class="lbl"></span>'); |
| | | |
| | | |
| | | //update buttons classes |
| | | var buttons = form.next().find('.EditButton .fm-button'); |
| | | buttons.addClass('btn btn-sm').find('[class*="-icon"]').hide();//ui-icon, s-icon |
| | | buttons.eq(0).addClass('btn-primary').prepend('<i class="ace-icon fa fa-check"></i>'); |
| | | buttons.eq(1).prepend('<i class="ace-icon fa fa-times"></i>') |
| | | |
| | | buttons = form.next().find('.navButton a'); |
| | | buttons.find('.ui-icon').hide(); |
| | | buttons.eq(0).append('<i class="ace-icon fa fa-chevron-left"></i>'); |
| | | buttons.eq(1).append('<i class="ace-icon fa fa-chevron-right"></i>'); |
| | | } |
| | | |
| | | function style_delete_form(form) { |
| | | var buttons = form.next().find('.EditButton .fm-button'); |
| | | buttons.addClass('btn btn-sm btn-white btn-round').find('[class*="-icon"]').hide();//ui-icon, s-icon |
| | | buttons.eq(0).addClass('btn-danger').prepend('<i class="ace-icon fa fa-trash-o"></i>'); |
| | | buttons.eq(1).addClass('btn-default').prepend('<i class="ace-icon fa fa-times"></i>') |
| | | } |
| | | |
| | | function style_search_filters(form) { |
| | | form.find('.delete-rule').val('X'); |
| | | form.find('.add-rule').addClass('btn btn-xs btn-primary'); |
| | | form.find('.add-group').addClass('btn btn-xs btn-success'); |
| | | form.find('.delete-group').addClass('btn btn-xs btn-danger'); |
| | | } |
| | | function style_search_form(form) { |
| | | var dialog = form.closest('.ui-jqdialog'); |
| | | var buttons = dialog.find('.EditTable') |
| | | buttons.find('.EditButton a[id*="_reset"]').addClass('btn btn-sm btn-info').find('.ui-icon').attr('class', 'ace-icon fa fa-retweet'); |
| | | buttons.find('.EditButton a[id*="_query"]').addClass('btn btn-sm btn-inverse').find('.ui-icon').attr('class', 'ace-icon fa fa-comment-o'); |
| | | buttons.find('.EditButton a[id*="_search"]').addClass('btn btn-sm btn-purple').find('.ui-icon').attr('class', 'ace-icon fa fa-search'); |
| | | } |
| | | |
| | | function beforeDeleteCallback(e) { |
| | | var form = $(e[0]); |
| | | if(form.data('styled')) return false; |
| | | |
| | | form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />') |
| | | style_delete_form(form); |
| | | |
| | | form.data('styled', true); |
| | | } |
| | | |
| | | function beforeEditCallback(e) { |
| | | var form = $(e[0]); |
| | | form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />') |
| | | style_edit_form(form); |
| | | } |
| | | |
| | | |
| | | |
| | | //it causes some flicker when reloading or navigating grid |
| | | //it may be possible to have some custom formatter to do this as the grid is being created to prevent this |
| | | //or go back to default browser checkbox styles for the grid |
| | | function styleCheckbox(table) { |
| | | /** |
| | | $(table).find('input:checkbox').addClass('ace') |
| | | .wrap('<label />') |
| | | .after('<span class="lbl align-top" />') |
| | | |
| | | |
| | | $('.ui-jqgrid-labels th[id*="_cb"]:first-child') |
| | | .find('input.cbox[type=checkbox]').addClass('ace') |
| | | .wrap('<label />').after('<span class="lbl align-top" />'); |
| | | */ |
| | | } |
| | | |
| | | |
| | | //unlike navButtons icons, action icons in rows seem to be hard-coded |
| | | //you can change them like this in here if you want |
| | | function updateActionIcons(table) { |
| | | /** |
| | | var replacement = |
| | | { |
| | | 'ui-ace-icon fa fa-pencil' : 'ace-icon fa fa-pencil blue', |
| | | 'ui-ace-icon fa fa-trash-o' : 'ace-icon fa fa-trash-o red', |
| | | 'ui-icon-disk' : 'ace-icon fa fa-check green', |
| | | 'ui-icon-cancel' : 'ace-icon fa fa-times red' |
| | | }; |
| | | $(table).find('.ui-pg-div span.ui-icon').each(function(){ |
| | | var icon = $(this); |
| | | var $class = $.trim(icon.attr('class').replace('ui-icon', '')); |
| | | if($class in replacement) icon.attr('class', 'ui-icon '+replacement[$class]); |
| | | }) |
| | | */ |
| | | } |
| | | |
| | | //replace icons with FontAwesome icons like above |
| | | function updatePagerIcons(table) { |
| | | var replacement = |
| | | { |
| | | 'ui-icon-seek-first' : 'ace-icon fa fa-angle-double-left bigger-140', |
| | | 'ui-icon-seek-prev' : 'ace-icon fa fa-angle-left bigger-140', |
| | | 'ui-icon-seek-next' : 'ace-icon fa fa-angle-right bigger-140', |
| | | 'ui-icon-seek-end' : 'ace-icon fa fa-angle-double-right bigger-140' |
| | | }; |
| | | $('.ui-pg-table:not(.navtable) > tbody > tr > .ui-pg-button > .ui-icon').each(function(){ |
| | | var icon = $(this); |
| | | var $class = $.trim(icon.attr('class').replace('ui-icon', '')); |
| | | |
| | | if($class in replacement) icon.attr('class', 'ui-icon '+replacement[$class]); |
| | | }) |
| | | } |
| | | |
| | | function enableTooltips(table) { |
| | | $('.navtable .ui-pg-button').tooltip({container:'body'}); |
| | | $(table).find('.ui-pg-div').tooltip({container:'body'}); |
| | | } |
| | | |
| | | //var selr = jQuery(grid_selector).jqGrid('getGridParam','selrow'); |
| | | |
| | | $(document).one('ajaxloadstart.page', function(e) { |
| | | $.jgrid.gridDestroy(grid_selector); |
| | | $('.ui-jqdialog').remove(); |
| | | }); |
| | | }); |
| | | } |
| | | $(function(){ |
| | | pageInit(); |
| | | }); |
| | | function pageInit(){ |
| | | jQuery("#grid-table").jqGrid( |
| | | { |
| | | url : '../data/list.json', |
| | | datatype : "json", |
| | | colNames : [ 'Inv No', 'Date', 'Client', 'Amount', 'Tax','Total', 'Closed', 'Ship via', 'Notes' ], |
| | | colModel : [ |
| | | {name : 'id',index : 'id',width : 55,editable : "true",editoptions : {readonly : true,size : 10}}, |
| | | {name : 'invdate',index : 'invdate',width : 80,editable : true,editoptions : {size : 10}}, |
| | | {name : 'name',index : 'name',width : 90,editable : true,editoptions : {size : 25}}, |
| | | {name : 'amount',index : 'amount',width : 60,align : "right",editable : true,editoptions : {size : 10}}, |
| | | {name : 'tax',index : 'tax',width : 60,align : "right",editable : true,editoptions : {size : 10}}, |
| | | {name : 'total',index : 'total',width : 60,align : "right",editable : true,editoptions : {size : 10}}, |
| | | {name : 'closed',index : 'closed',width : 55,align : 'center',editable : true,edittype : "checkbox",editoptions : {value : "Yes:No"}}, |
| | | {name : 'ship_via',index : 'ship_via',width : 70,editable : true,edittype : "select",editoptions : {value : "FE:FedEx;TN:TNT"}}, |
| | | {name : 'note',index : 'note',width : 100,sortable : false,editable : true,edittype : "textarea",editoptions : {rows : "2",cols : "20"}} |
| | | ], |
| | | rowNum : 10, |
| | | rowList : [ 10, 20, 30 ], |
| | | pager : '#pagered', |
| | | sortname : 'id', |
| | | viewrecords : true, |
| | | sortorder : "desc", |
| | | caption : "Search Example", |
| | | editurl : "/RowEditing" |
| | | }); |
| | | $("#bedata").click(function() { |
| | | jQuery("#grid-table").jqGrid('editGridRow', "new", { |
| | | reloadAfterSubmit : false |
| | | }); |
| | | }); |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | enableTooltips(table); |
| | | }, 0); |
| | | }, |
| | | |
| | | editurl: "/console/editTemplateData?templateCode="+templateCode, |
| | | }); |
| | | $(window).triggerHandler('resize.jqGrid');//trigger window resize to make the grid get the correct size |
| | | |
| | |
| | | .after('<span class="lbl"></span>'); |
| | | }, 0); |
| | | } |
| | | |
| | | function doItemData(cellvalue, options, rowObject){ |
| | | var temp ='<div style="margin-left:8px;"><div title="详情记录" style="float:left;cursor:pointer;" class="ui-pg-div" id="jEditButton_3" onclick="detail('+rowObject+')" onmouseover="jQuery(this).addClass("ui-state-hover");" onmouseout="jQuery(this).removeClass(\"ui-state-hover\");"><span class="ui-icon fa-search-plus"/></div></div>'; |
| | | return '['+cellvalue+']'; |
| | | } |
| | | |
| | | //enable datepicker |
| | | function pickDate( cellvalue, options, cell ) { |
| New file |
| | |
| | | /*
|
| | | SQLyog Professional v12.09 (64 bit)
|
| | | MySQL - 5.6.40 : Database - TT
|
| | | *********************************************************************
|
| | | */
|
| | |
|
| | | /*!40101 SET NAMES utf8 */;
|
| | |
|
| | | /*!40101 SET SQL_MODE=''*/;
|
| | |
|
| | | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
| | | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
| | | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
| | | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
| | | CREATE DATABASE /*!32312 IF NOT EXISTS*/`TT` /*!40100 DEFAULT CHARACTER SET utf8 */;
|
| | |
|
| | | USE `TT`;
|
| | |
|
| | | /*Table structure for table `c_app` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_app`;
|
| | |
|
| | | CREATE TABLE `c_app` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
| | | `app_id` varchar(10) NOT NULL COMMENT '应用ID',
|
| | | `name` varchar(50) NOT NULL COMMENT 'åç§° 对应系统åç§°',
|
| | | `security_code` varchar(64) NOT NULL COMMENT 'ç¾åç signç¾å时用',
|
| | | `while_list_ip` varchar(200) DEFAULT NULL COMMENT '白åå•ip 多个之间用;隔开',
|
| | | `black_list_ip` varchar(200) DEFAULT NULL COMMENT '黑åå•ip 多个之间用;隔开',
|
| | | `remark` varchar(200) DEFAULT NULL COMMENT 'æè¿°',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL COMMENT 'æ•°æ®çжæ€ï¼Œè¯¦ç»†å‚考c_status表,0在用,1失效',
|
| | | PRIMARY KEY (`id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_app` */
|
| | |
|
| | | insert into `c_app`(`id`,`app_id`,`name`,`security_code`,`while_list_ip`,`black_list_ip`,`remark`,`create_time`,`status_cd`) values (1,'8000418001','内部测试应用','WEBURFPKIFJUHNCJUEIKMKJUJHULSMNCHDY89KMC',NULL,NULL,'è®°å¾—åˆ é™¤','2018-04-24 15:52:23','0'),(2,'8000418002','控制中心应用','',NULL,NULL,'控制中心应用','2018-05-07 12:14:44','0');
|
| | |
|
| | | /*Table structure for table `c_business` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_business`;
|
| | |
|
| | | CREATE TABLE `c_business` (
|
| | | `b_id` varchar(18) NOT NULL COMMENT '业务Id',
|
| | | `o_id` varchar(18) NOT NULL COMMENT '订å•ID',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `business_type_cd` varchar(4) NOT NULL COMMENT '业务项类型,å‚考c_business_type表',
|
| | | `finish_time` date DEFAULT NULL COMMENT 'å®Œæˆæ—¶é—´',
|
| | | `remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
| | | `status_cd` varchar(2) NOT NULL COMMENT 'æ•°æ®çжæ€ï¼Œè¯¦ç»†å‚考c_status表'
|
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_business` */
|
| | |
|
| | | /*Table structure for table `c_business_attrs` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_business_attrs`;
|
| | |
|
| | | CREATE TABLE `c_business_attrs` (
|
| | | `b_id` varchar(18) NOT NULL COMMENT '订å•ID',
|
| | | `attr_id` varchar(18) NOT NULL COMMENT '属性id',
|
| | | `spec_cd` varchar(12) NOT NULL COMMENT 'è§„æ ¼id,å‚考spec表',
|
| | | `VALUE` varchar(50) NOT NULL COMMENT '属性值'
|
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_business_attrs` */
|
| | |
|
| | | /*Table structure for table `c_business_type` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_business_type`;
|
| | |
|
| | | CREATE TABLE `c_business_type` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
| | | `business_type_cd` varchar(4) NOT NULL COMMENT '业务项类型',
|
| | | `name` varchar(50) NOT NULL COMMENT 'åç§°',
|
| | | `description` varchar(200) DEFAULT NULL COMMENT 'æè¿°',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | PRIMARY KEY (`id`)
|
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_business_type` */
|
| | |
|
| | | /*Table structure for table `c_cache` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_cache`;
|
| | |
|
| | | CREATE TABLE `c_cache` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '缓存ID',
|
| | | `cache_code` varchar(10) NOT NULL COMMENT '缓存编码 开始于1001',
|
| | | `service_code` varchar(50) NOT NULL COMMENT '调用服务编码 对应 c_service',
|
| | | `name` varchar(50) NOT NULL COMMENT '前台显示名称',
|
| | | `param` longtext NOT NULL COMMENT '请求缓存系统时的参数',
|
| | | `seq` int(11) NOT NULL COMMENT '列顺序',
|
| | | `group` varchar(10) NOT NULL DEFAULT 'COMMON' COMMENT '组,缓存属于哪个组',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,0在用,1失效',
|
| | | PRIMARY KEY (`id`),
|
| | | UNIQUE KEY `cache_code` (`cache_code`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_cache` */
|
| | |
|
| | | insert into `c_cache`(`id`,`cache_code`,`service_code`,`name`,`param`,`seq`,`group`,`create_time`,`status_cd`) values (1,'1001','flush.center.cache','映射缓存(c_mapping表)','{\"cacheName\":\"MAPPING\"}',1,'COMMON','2018-05-10 13:50:51','0'),(5,'1002','flush.center.cache','业务配置缓存(c_app,c_service,c_route表)','{\"cacheName\":\"APP_ROUTE_SERVICE\"}',2,'COMMON','2018-05-10 13:51:06','0'),(6,'1003','flush.center.cache','公用服务缓存(c_service_sql表)','{\"cacheName\":\"SERVICE_SQL\"}',3,'COMMON','2018-05-10 13:51:06','0');
|
| | |
|
| | | /*Table structure for table `c_cache_2_user` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_cache_2_user`;
|
| | |
|
| | | CREATE TABLE `c_cache_2_user` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '缓存用户ID',
|
| | | `cache_code` int(11) NOT NULL COMMENT '缓存编码',
|
| | | `user_id` varchar(12) NOT NULL COMMENT '用户id',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,0在用,1失效',
|
| | | PRIMARY KEY (`id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_cache_2_user` */
|
| | |
|
| | | insert into `c_cache_2_user`(`id`,`cache_code`,`user_id`,`create_time`,`status_cd`) values (1,1001,'10001','2018-05-10 14:10:57','0'),(2,1002,'10001','2018-05-10 14:10:57','0'),(3,1003,'10001','2018-05-10 14:10:57','0');
|
| | |
|
| | | /*Table structure for table `c_mapping` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_mapping`;
|
| | |
|
| | | CREATE TABLE `c_mapping` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
| | | `domain` varchar(50) NOT NULL COMMENT '域',
|
| | | `name` varchar(50) NOT NULL COMMENT 'åç§°',
|
| | | `key` varchar(100) NOT NULL COMMENT 'key',
|
| | | `value` varchar(1000) NOT NULL COMMENT 'value',
|
| | | `remark` varchar(200) DEFAULT NULL COMMENT 'æè¿°',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT 'æ•°æ®çжæ€ï¼Œè¯¦ç»†å‚考c_status表,0在用,1失效',
|
| | | PRIMARY KEY (`id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_mapping` */
|
| | |
|
| | | insert into `c_mapping`(`id`,`domain`,`name`,`key`,`value`,`remark`,`create_time`,`status_cd`) values (12,'DOMAIN.COMMON','日志开关','LOG_ON_OFF','ON','日志开关','2018-05-07 12:13:59','0'),(13,'DOMAIN.COMMON','耗时开关','COST_TIME_ON_OFF','ON','耗时开关','2018-05-07 12:13:59','0'),(14,'DOMAIN.COMMON','规则开关','RULE_ON_OFF','OFF','规则开关','2018-05-07 12:13:59','0'),(15,'DOMAIN.COMMON','不调规则服务的订单类型','NO_NEED_RULE_VALDATE_ORDER','Q','不调规则服务的订单类型','2018-05-07 12:13:59','0'),(16,'DOMAIN.COMMON','不保存订单信息','NO_SAVE_ORDER','Q','不保存订单信息','2018-05-07 12:13:59','0'),(17,'DOMAIN.COMMON','不用调用 下游系统的配置','NO_INVOKE_BUSINESS_SYSTEM','JAVA110','不用调用 下游系统的配置(一般不存在这种情况,这里主要是在没有下游系统的情况下测试中心服务用)','2018-05-07 12:13:59','0'),(18,'DOMAIN.COMMON','不用调用 作废下游系统的配置','NO_INVALID_BUSINESS_SYSTEM','Q','不用调用 作废下游系统的配置 (一般不存在这种情况,这里主要是在没有下游系统的情况下测试中心服务用)','2018-05-07 12:14:00','0'),(19,'DOMAIN.COMMON','需要调用服务生成各个ID','NEED_INVOKE_SERVICE_GENERATE_ID','OFF','需要调用服务生成各个ID','2018-05-07 12:14:00','0'),(20,'DOMAIN.COMMON','公钥','PUBLIC_STRING','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDloKXSBA5+tP39uS8yi5RZOs6Jdrt0znRQetyXX2l/IUCi1x1QAMgoZbnEavmdZ5jOZN/T1WYFbt/VomXEHaTdStAiYm3DCnxxy5CMMyRKai0+6n4lLJQpUmnAQPFENrOV8b70gBSBVjUXksImgui5qYaNqX90pjEzcyq+6CugBwIDAQAB','公钥','2018-05-07 12:14:00','0'),(21,'DOMAIN.COMMON','私钥','PRIVATE_STRING','MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJbtQYV+VpWZvifoc0R11MyAfIyMGoJKHDrWQau7oxLHotDDJM80o7ea7oL2onaHWOXaybpUp5FpZgjuixYMhlQOA/VXosrJOGJhgNv0dAL6VVXxmjlg2UWqIEoyTS7IzF3BuQCqy2k9aT7mGiC0RYRpndTuwe/0DKwFx70dIIIrAgMBAAECgYBMNMHnqLIJWZa1Sd6hy6lGFP5ObROZg9gbMUH5d4XQnrKsHEyCvz6HH5ic0fGYTaDqdn1zMvllJ8XYbrIV0P8lvHr9/LCnoXessmf61hKZyTKi5ycNkiPHTjmJZCoVTQFprcNgYeVX4cvNsqB2zWwzoAk8bbdWY6X5jB6YEpfBmQJBANiO9GiBtw+T9h60MpyV1xhJKsx0eCvxRZcsDB1OLZvQ7dHnsHmh0xUBL2MraHKnQyxOlrIzOtyttxSTrQzwcM0CQQCyajkzxpF6EjrXWHYVHb3AXFSoz5krjOkLEHegYlGhx0gtytBNVwftCn6hqtaxCxKMp00ZJoXIxo8d9tQy4N7XAkBljnTT5bEBnzPWpk7t298pRnbJtvz8LoOiJ0fvHlCJN+uvemXqRJeGzC165kpvKj14M8q7+wZpoxWukqqe3MspAkAuFYHw/blV7p+EQDU//w6kQTUc5YKK3TrUwMwlgT/UqcTbDyf+0hwZ/jv3RkluMY35Br3DYU/tLFyLQNZOzgbBAkEApWARXVlleEYbv8dPUL+56S0ky1hZSuPfVOBda4V3p0q18LjcHIyYcVhKGqkpii5JgblaYyjUriNDisFalCp8jQ==','私钥','2018-05-07 12:14:00','0'),(22,'DOMAIN.COMMON','外部应用公钥','PUBLIC_STRING','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCW7UGFflaVmb4n6HNEddTMgHyMjBqCShw61kGru6MSx6LQwyTPNKO3mu6C9qJ2h1jl2sm6VKeRaWYI7osWDIZUDgP1V6LKyThiYYDb9HQC+lVV8Zo5YNlFqiBKMk0uyMxdwbkAqstpPWk+5hogtEWEaZ3U7sHv9AysBce9HSCCKwIDAQAB','外部应用公钥','2018-05-07 12:14:00','0'),(23,'DOMAIN.COMMON','外部应用私钥','PRIVATE_STRING','MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAOWgpdIEDn60/f25LzKLlFk6zol2u3TOdFB63JdfaX8hQKLXHVAAyChlucRq+Z1nmM5k39PVZgVu39WiZcQdpN1K0CJibcMKfHHLkIwzJEpqLT7qfiUslClSacBA8UQ2s5XxvvSAFIFWNReSwiaC6Lmpho2pf3SmMTNzKr7oK6AHAgMBAAECgYEAlfR5FVNM2/X6QC0k408/i53Zru94r2j7kGsLj1bhoAHpIe502AAKtkboL5rkc6Rpp688dCvRug6T4gFxj8cEF7rOOU4CHqVCHUHa4sWSDL2Rg7pMbQOVB7PGmM4C/hEgXcwM6tmLiU3xkkQDrpgT1bPpAm7iwDx4HkZBv1naYnECQQDyk40+KDvyUgp/r1tKbkMLoQOAfTZPXy+HgeAkU3PCUTFQlvn2OU6Fsl3Yjlp6utxPVnd00DoPZ8qvx1falaeLAkEA8lWoIDgyYwnibv2fr3A715PkieJ0exKfLb5lSD9UIfGJ9s7oTcltl7pprykfSP46heWjScS7YJRZHPfqb1/Y9QJAJNUQqjJzv7yDSZX3t5p8ZaSiIn1gpLagQeQPg5SETCoF4eW6uI9FA/nsU/hxdpcu4oEPjFYdqr8owH31MgRtNwJAaE+6qPPHrJ3qnAAMJoZXG/qLG1cg8IEZh6U3D5xC6MGBs31ovWMBC5iwOTeoQdE8+7nXSb+nMHFq0m9cuEg3qQJAH4caPSQ9RjVOP9on+niy9b1mATbvurepIB95KUtaHLz1hpihCLR7dTwrz8JOitgFE75Wzt4a00GZYxnaq3jsjA==','外部应用私钥','2018-05-07 12:14:00','0'),(24,'DOMAIN.COMMON','默认KEY_SIZE','DEFAULT_DECRYPT_KEY_SIZE','2048','默认KEY_SIZE','2018-05-07 12:14:00','0'),(25,'DOMAIN.COMMON','中心服务地址','CENTER_SERVICE_URL','http://center-service/httpApi/service','中心服务地址','2018-05-07 12:14:00','0'),(26,'DOMAIN.COMMON','控制中心APP_ID','CONSOLE_SERVICE_APP_ID','8000418002','控制中心APP_ID','2018-05-07 12:14:00','0'),(27,'DOMAIN.COMMON','控制服务加密开关','KEY_CONSOLE_SERVICE_SECURITY_ON_OFF','ON','控制服务加密开关','2018-05-07 12:14:00','0'),(28,'DOMAIN.COMMON','控制服务鉴权秘钥','CONSOLE_SECURITY_CODE','WEBURFPKIFJUHNCJUEIKMKJUJHULSMNCHDY89KMC','控制服务鉴权秘钥','2018-05-07 12:14:00','0'),(29,'DOMAIN.COMMON','update java110','java110','1','java110','2018-05-13 15:27:55','1'),(30,'DOMAIN.COMMON','java110??','java110','ON','','2018-05-13 15:44:49','1');
|
| | |
|
| | | /*Table structure for table `c_order_type` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_order_type`;
|
| | |
|
| | | CREATE TABLE `c_order_type` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
| | | `order_type_cd` varchar(4) NOT NULL COMMENT '订å•类型',
|
| | | `name` varchar(50) NOT NULL COMMENT 'åç§°',
|
| | | `description` varchar(200) DEFAULT NULL COMMENT 'æè¿°',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | PRIMARY KEY (`id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_order_type` */
|
| | |
|
| | | insert into `c_order_type`(`id`,`order_type_cd`,`name`,`description`,`create_time`) values (1,'Q','查询å•','查询å•','2018-04-24 15:52:23');
|
| | |
|
| | | /*Table structure for table `c_orders` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_orders`;
|
| | |
|
| | | CREATE TABLE `c_orders` (
|
| | | `o_id` varchar(18) NOT NULL COMMENT '订å•ID',
|
| | | `app_id` varchar(10) NOT NULL COMMENT '应用ID',
|
| | | `ext_transaction_id` varchar(30) NOT NULL COMMENT 'å¤–éƒ¨äº¤æ˜“æµæ°´',
|
| | | `user_id` varchar(12) NOT NULL COMMENT '用户ID',
|
| | | `request_time` varchar(16) NOT NULL COMMENT '外部系统请求时间',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `order_type_cd` varchar(4) NOT NULL COMMENT '订å•类型,å‚考c_order_type表',
|
| | | `finish_time` date DEFAULT NULL COMMENT '订å•å®Œæˆæ—¶é—´',
|
| | | `remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
| | | `status_cd` varchar(2) NOT NULL COMMENT 'æ•°æ®çжæ€ï¼Œè¯¦ç»†å‚考c_status表'
|
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_orders` */
|
| | |
|
| | | /*Table structure for table `c_orders_attrs` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_orders_attrs`;
|
| | |
|
| | | CREATE TABLE `c_orders_attrs` (
|
| | | `o_id` varchar(18) NOT NULL COMMENT '订å•ID',
|
| | | `attr_id` varchar(18) NOT NULL COMMENT '属性id',
|
| | | `spec_cd` varchar(12) NOT NULL COMMENT 'è§„æ ¼id,å‚考spec表',
|
| | | `VALUE` varchar(50) NOT NULL COMMENT '属性值'
|
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_orders_attrs` */
|
| | |
|
| | | /*Table structure for table `c_route` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_route`;
|
| | |
|
| | | CREATE TABLE `c_route` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
| | | `app_id` varchar(10) NOT NULL COMMENT '应用ID',
|
| | | `service_id` int(11) NOT NULL COMMENT '下游接å£é…ç½®ID',
|
| | | `order_type_cd` varchar(4) NOT NULL COMMENT '订å•类型,å‚考c_order_type表',
|
| | | `invoke_limit_times` int(11) DEFAULT NULL COMMENT '接å£è°ƒç”¨ä¸€åˆ†é’Ÿè°ƒç”¨æ¬¡æ•°',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL COMMENT 'æ•°æ®çжæ€ï¼Œè¯¦ç»†å‚考c_status表,0在用,1失效,2 表示下线(当组件调用æœåŠ¡è¶…è¿‡é™åˆ¶æ—¶è‡ªåŠ¨ä¸‹çº¿ï¼‰',
|
| | | PRIMARY KEY (`id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_route` */
|
| | |
|
| | | insert into `c_route`(`id`,`app_id`,`service_id`,`order_type_cd`,`invoke_limit_times`,`create_time`,`status_cd`) values (1,'8000418001',1,'Q',NULL,'2018-04-24 15:52:23','0'),(2,'8000418001',3,'Q',NULL,'2018-04-24 15:52:23','0'),(3,'8000418001',3,'Q',NULL,'2018-05-07 12:16:38','0'),(4,'8000418002',3,'Q',NULL,'2018-05-07 12:16:38','0'),(5,'8000418002',4,'Q',NULL,'2018-05-07 12:16:38','0'),(6,'8000418002',5,'Q',NULL,'2018-05-09 12:18:26','0'),(7,'8000418002',6,'Q',NULL,'2018-05-09 12:18:26','0'),(8,'8000418002',7,'Q',NULL,'2018-05-09 12:18:27','0'),(9,'8000418002',8,'Q',NULL,'2018-05-10 12:24:10','0'),(10,'8000418002',9,'Q',NULL,'2018-05-10 12:24:10','0'),(11,'8000418002',10,'Q',NULL,'2018-05-10 12:24:10','0'),(12,'8000418002',11,'Q',NULL,'2018-05-10 13:04:51','0'),(13,'8000418002',12,'Q',NULL,'2018-05-10 14:13:34','0'),(14,'8000418002',13,'Q',NULL,'2018-05-10 16:21:42','0'),(15,'8000418002',14,'Q',NULL,'2018-05-13 15:16:20','0'),(16,'8000418002',15,'Q',NULL,'2018-05-13 15:38:00','0'),(17,'8000418002',16,'Q',NULL,'2018-05-13 15:46:53','0');
|
| | |
|
| | | /*Table structure for table `c_service` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_service`;
|
| | |
|
| | | CREATE TABLE `c_service` (
|
| | | `service_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
| | | `service_code` varchar(50) NOT NULL COMMENT 'è‡ªå®šä¹‰ï¼Œå‘½åæ–¹å¼æŸ¥è¯¢ç±»query.+ç›®æ ‡ç³»ç»Ÿ+.+业务åç§° ä¿å˜ç±» save.+ç›®æ ‡ç³»ç»Ÿ+.+业务åç§° 修改类 modify.+ç›®æ ‡ç³»ç»Ÿ+.+业务åç§° åˆ é™¤ç±» remove.+ç›®æ ‡ç³»ç»Ÿ+.+业务åç§° 例如:query.user.userinfo save.user.adduserinfo',
|
| | | `invoke_model` varchar(1) NOT NULL COMMENT '1-åŒæ¥æ–¹å¼ 2-å¼‚æ¥æ–¹å¼',
|
| | | `business_type_cd` varchar(4) NOT NULL COMMENT '业务项类型,å‚考c_business_type表',
|
| | | `name` varchar(50) NOT NULL COMMENT 'æœåŠ¡åç§°',
|
| | | `seq` int(11) NOT NULL COMMENT 'é¡ºåº åªæœ‰åŒæ¥æ–¹å¼ä¸‹æ ¹æ®seq从å°åˆ°å¤§è°ƒç”¨æŽ¥å£',
|
| | | `messageQueueName` varchar(50) DEFAULT NULL COMMENT '消æ¯é˜Ÿé‡Œåç§° åªæœ‰å¼‚æ¥æ—¶æœ‰ç”¨',
|
| | | `url` varchar(200) DEFAULT NULL COMMENT 'ç›®æ ‡åœ°å€',
|
| | | `method` varchar(50) DEFAULT NULL COMMENT '方法 空 为http post LOCAL_SERVICE 为调用本地æœåŠ¡ 其他为webserviceæ–¹å¼è°ƒç”¨',
|
| | | `timeout` int(11) NOT NULL DEFAULT '60' COMMENT 'è¶…æ—¶æ—¶é—´',
|
| | | `retry_count` int(11) NOT NULL DEFAULT '3' COMMENT 'é‡è¯•次数',
|
| | | `provide_app_id` varchar(10) NOT NULL COMMENT '应用ID',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT 'æ•°æ®çжæ€ï¼Œè¯¦ç»†å‚考c_status表,0在用,1失效',
|
| | | PRIMARY KEY (`service_id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_service` */
|
| | |
|
| | | insert into `c_service`(`service_id`,`service_code`,`invoke_model`,`business_type_cd`,`name`,`seq`,`messageQueueName`,`url`,`method`,`timeout`,`retry_count`,`provide_app_id`,`create_time`,`status_cd`) values (1,'query.user.userInfo','S','Q','ç”¨æˆ·ä¿¡æ¯æŸ¥è¯¢',1,NULL,'http://...',NULL,60,3,'8000418001','2018-04-24 15:52:23','0'),(2,'query.order.orderInfo','S','Q','订å•ä¿¡æ¯',1,NULL,'http://center-service/businessApi/query',NULL,60,3,'8000418001','2018-04-24 15:52:23','0'),(3,'query.console.menu','S','Q','查询菜单',1,NULL,'http://center-service/businessApi/query',NULL,60,3,'8000418002','2018-05-07 12:16:18','0'),(4,'query.user.loginInfo','S','Q','查询用户登录信息',1,NULL,'http://center-service/businessApi/query',NULL,60,3,'8000418002','2018-05-07 12:16:18','0'),(5,'query.console.template','S','Q','查询模板信息',1,NULL,'http://center-service/businessApi/query',NULL,60,3,'8000418002','2018-05-09 12:17:45','0'),(6,'query.console.templateCol','S','Q','查询列模板信息',1,NULL,'http://center-service/businessApi/query',NULL,60,3,'8000418002','2018-05-09 12:17:45','0'),(7,'query.center.mapping','S','Q','查询映射数据',1,NULL,'http://center-service/businessApi/query',NULL,60,3,'8000418002','2018-05-09 12:17:45','0'),(8,'query.center.apps','S','Q','查询外部应用',1,NULL,'http://center-service/businessApi/query',NULL,60,3,'8000418002','2018-05-10 12:23:19','0'),(9,'query.center.services','S','Q','查询服务',1,NULL,'http://center-service/businessApi/query',NULL,60,3,'8000418002','2018-05-10 12:23:19','0'),(10,'query.center.routes','S','Q','查询路由',1,NULL,'http://center-service/businessApi/query',NULL,60,3,'8000418002','2018-05-10 12:23:19','0'),(11,'flush.center.cache','S','Q','CenterService缓存',1,NULL,'http://center-service/cacheApi/flush',NULL,60,3,'8000418002','2018-05-10 13:03:56','0'),(12,'query.console.caches','S','Q','查询所有缓存',1,NULL,'http://center-service/businessApi/query',NULL,60,3,'8000418002','2018-05-10 14:13:12','0'),(13,'query.console.cache','S','Q','查询所有缓存',1,NULL,'http://center-service/businessApi/query',NULL,60,3,'8000418002','2018-05-10 16:21:26','0'),(14,'save.center.mapping','S','Q','保存映射信息',1,NULL,'http://center-service/businessApi/do',NULL,60,3,'8000418002','2018-05-13 15:15:26','0'),(15,'delete.center.mapping','S','Q','删除映射信息',1,NULL,'http://center-service/businessApi/do',NULL,60,3,'8000418002','2018-05-13 15:37:41','0'),(16,'update.center.mapping','S','Q','保存映射信息',1,NULL,'http://center-service/businessApi/do',NULL,60,3,'8000418002','2018-05-13 15:46:44','0');
|
| | |
|
| | | /*Table structure for table `c_service_sql` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_service_sql`;
|
| | |
|
| | | CREATE TABLE `c_service_sql` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
| | | `service_code` varchar(50) NOT NULL COMMENT '对应c_service表',
|
| | | `name` varchar(50) NOT NULL COMMENT 'åç§°',
|
| | | `params` varchar(500) NOT NULL COMMENT '傿•°',
|
| | | `query_model` varchar(1) NOT NULL COMMENT 'æŸ¥è¯¢æ–¹å¼ 1ã€sql,2ã€å˜å‚¨è¿‡ç¨‹',
|
| | | `sql` longtext COMMENT '执行sql',
|
| | | `proc` varchar(200) DEFAULT NULL COMMENT 'å˜å‚¨è¿‡ç¨‹åç§°',
|
| | | `java_script` longtext COMMENT '执行java脚本代ç ',
|
| | | `template` longtext COMMENT '输出模æ¿',
|
| | | `remark` varchar(200) DEFAULT NULL COMMENT 'æè¿°',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL COMMENT 'æ•°æ®çжæ€ï¼Œè¯¦ç»†å‚考c_status表,0在用,1失效',
|
| | | PRIMARY KEY (`id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_service_sql` */
|
| | |
|
| | | insert into `c_service_sql`(`id`,`service_code`,`name`,`params`,`query_model`,`sql`,`proc`,`java_script`,`template`,`remark`,`create_time`,`status_cd`) values (1,'query.order.orderInfo','订å•ä¿¡æ¯','oId','1','{\n \"param1\":\"SELECT co.app_id appId,co.create_time createTime,co.ext_transaction_id extTransactionId,co.finish_time finishTime\n ,co.order_type_cd orderTypeCd,co.o_id oId ,co.remark remark ,co.request_time requestTime ,co.user_id userId,co.status_cd statusCd\n FROM c_orders co WHERE co.o_id = #oId#\",\n \"param2\":\"SELECT cb.b_id bId, cb.business_type_cd businessTypeCd,cb.create_time createTime,cb.finish_time finishTime ,cb.o_id oId,\n cb.remark remark,cb.status_cd statusCd FROM c_business cb WHERE cb.o_id = #oId#\"\n }','',NULL,'{\"PARAM:\"{\n \"param1\": \"$.#order#Object\",\n \"param2\": \"$.#business#Array\"\n },\"TEMPLATE\":\"{\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"æˆåŠŸ\"\n }\n }\"}','','2018-04-24 15:52:23','0'),(2,'query.order.orderInfo','订单信息','oId','1','{\n \"param1\":\"SELECT co.app_id appId,co.create_time createTime,co.ext_transaction_id extTransactionId,co.finish_time finishTime\n ,co.order_type_cd orderTypeCd,co.o_id oId ,co.remark remark ,co.request_time requestTime ,co.user_id userId,co.status_cd statusCd\n FROM c_orders co WHERE co.o_id = #oId#\",\n \"param2\":\"SELECT cb.b_id bId, cb.business_type_cd businessTypeCd,cb.create_time createTime,cb.finish_time finishTime ,cb.o_id oId,\n cb.remark remark,cb.status_cd statusCd FROM c_business cb WHERE cb.o_id = #oId#\"\n }','',NULL,'{\"PARAM:\"{\n \"param1\": \"$.#order#Object\",\n \"param2\": \"$.#business#Array\"\n },\"TEMPLATE\":\"{\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }\"}','','2018-05-07 12:16:18','0'),(3,'query.console.menu','查询菜单','manageId,menuGroup','1','{\n \"param1\":\"select mm.m_id mId,mm.name name,mm.level level,mm.parent_id parentId,mm.menu_group menuGroup,mm.user_id userId,mm.create_time createTime,\n mm.remark remark,mmc.url url,mmc.template template\n from m_menu_2_user mm2u,m_menu mm, m_menu_ctg mmc\n where mm2u.user_id = #manageId#\n and mm2u.m_id = mm.m_id\n AND mm.menu_group = #menuGroup#\n and mm2u.status_cd = \'0\'\n and mm.status_cd = \'0\'\n and mmc.m_id = mm.m_id\n and mmc.status_cd = \'0\'\r\norder by mm.seq asc\"\n }','',NULL,'{\"PARAM\":{\n \"param1\": \"$.#menus#Array\"\n },\"TEMPLATE\":{\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }}','','2018-05-07 12:16:18','0'),(4,'query.user.loginInfo','查询用户登录信息','userCode','1','{\n\"param1\":\"SELECT \'10001\' userId, \'admin\' userName,\'d57167e07915c9428b1c3aae57003807\' userPwd FROM DUAL WHERE #userCode#=\'admin\'\"\n }','',NULL,'{\"PARAM\":{\n \"param1\": \"$.#user#Object\"\n },\"TEMPLATE\":{\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }}','','2018-05-07 12:16:18','0'),(5,'query.console.template','查询模板信息','templateCode','1','{\n \"param1\":\"SELECT t.template_code templateCode,t.name templateName,t.`html_name` htmlName,t.`url` templateUrl\n FROM c_template t WHERE t.status_cd = \'0\' AND t.template_code = #templateCode#\"\n }','',NULL,'{\"PARAM\":{\n \"param1\": \"$.#template#Object\"\n },\"TEMPLATE\":{\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }}','','2018-05-09 12:18:54','0'),(6,'query.console.templateCol','查询模板列信息','templateCode','1','{\n \"param1\":\"SELECT t.template_code templateCode,t.name templateName,tc.col_name colName,tc.col_model colModel FROM c_template t,c_template_col tc WHERE t.status_cd = \'0\' AND t.template_code = tc.template_code\n AND tc.status_cd = \'0\'\n AND t.template_code = #templateCode# order by tc.seq asc\"\n }','',NULL,'{\"PARAM\":{\n \"param1\": \"$.#template#Array\"\n },\"TEMPLATE\":{\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }}','','2018-05-09 12:18:54','0'),(7,'query.center.mapping','查询映射数据','page,rows,sord','1','{\r\n \"param1\": \"select count(1) records,ceil(#page#/#rows#)+1 page,ceil(count(1)/#rows#) total from c_mapping m where m.status_cd = \'0\'\",\r\n \"param2\": \"SELECT m.`id` id,m.`domain` domain,m.name name,m.`key` `key` ,m.`value` `value`,m.`remark` remark FROM c_mapping m WHERE m.`status_cd` = \'0\' LIMIT #page#,#rows#\"\r\n}','',NULL,'{\n \"PARAM\": {\n \"param1\": \"$.##Object\",\n \"param2\": \"$.#rows#Array\"\n },\n \"TEMPLATE\": {\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }\n }','','2018-05-09 12:37:28','0'),(8,'query.center.apps','查询外部应用','page,rows,sord','1','{\"param1\":\"select count(1) records,ceil(#page#/#rows#)+1 page,ceil(count(1)/#rows#) total from c_app a where a.status_cd = \'0\'\",\n \"param2\":\"SELECT m.`id` id,m.`app_id` appId,m.name `name`,m.`security_code` securityCode ,m.`while_list_ip` whileListIp,m.`black_list_ip` blackListIp,m.`remark` remark FROM c_app m WHERE m.`status_cd` = \'0\' LIMIT #page#, #rows#\"\n }','',NULL,'{\n \"PARAM\": {\n \"param1\": \"$.##Object\",\n \"param2\": \"$.#rows#Array\"\n },\n \"TEMPLATE\": {\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }\n }','','2018-05-10 12:24:38','0'),(9,'query.center.services','查询服务数据','page,rows,sord','1','{\"param1\":\"select count(1) records,ceil(#page#/#rows#)+1 page,ceil(count(1)/#rows#) total from c_service a where a.status_cd = \'0\'\",\n \"param2\":\"SELECT s.`service_id` serviceId,s.`service_code` serviceCode,s.`invoke_model` invokeModel,s.`business_type_cd` businessTypeCd,s.name `name`,\n s.`messageQueueName` messageQueueName,s.url url,s.`provide_app_id` provideAppId FROM c_service s WHERE s.`status_cd` = \'0\' LIMIT #page#, #rows#\"\n }','',NULL,'{\n \"PARAM\": {\n \"param1\": \"$.##Object\",\n \"param2\": \"$.#rows#Array\"\n },\n \"TEMPLATE\": {\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }\n }','','2018-05-10 12:24:38','0'),(10,'query.center.routes','查询路由数据','page,rows,sord','1','{\"param1\":\"select count(1) records,ceil(#page#/#rows#)+1 page,ceil(count(1)/#rows#) total from c_route a,c_service cs WHERE a.`service_id` = cs.`service_id` AND cs.`status_cd` = \'0\' and a.status_cd = \'0\'\",\n \"param2\":\"SELECT s.id id,s.`app_id` appId,s.`service_id` serviceId,cs.`name` serviceName,cs.`service_code` serviceCode,s.`order_type_cd` orderTypeCd,s.`invoke_limit_times` invokelimitTimes FROM c_route s,c_service cs WHERE s.`service_id` = cs.`service_id` AND cs.`status_cd` = \'0\' AND s.`status_cd` = \'0\' LIMIT #page#, #rows#\"\n }','',NULL,'{\n \"PARAM\": {\n \"param1\": \"$.##Object\",\n \"param2\": \"$.#rows#Array\"\n },\n \"TEMPLATE\": {\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }\n }','','2018-05-10 12:24:38','0'),(11,'query.console.caches','查询缓存数据','page,rows,sord','1','{\n \"param1\":\"SELECT c.id id,c.`cache_code` cacheCode, c.`name` cacheName FROM c_cache c, c_cache_2_user c2u WHERE c.`cache_code` = c2u.`cache_code` AND c.`status_cd` = \'0\'\n AND c2u.`status_cd` = \'0\' AND c2u.`user_id` = #userId# AND c.`group` = \'COMMON\' ORDER BY c.`seq` ASC\"\n }','',NULL,'{\n \"PARAM\": {\n \"param1\": \"$.#rows#Array\"\n },\n \"TEMPLATE\": {\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }\n }','','2018-05-10 14:25:37','0'),(12,'query.console.cache','查询单条缓存信息','cacheCode','1','{\n \"param1\":\"SELECT c.id id,c.`cache_code` cacheCode, c.`name` cacheName,c.`param` param,c.`service_code` serviceCode FROM c_cache c WHERE c.`status_cd` = \'0\' AND c.`cache_code` = #cacheCode#\"\n }','',NULL,'{\n \"PARAM\": {\n \"param1\": \"$.#cache#Object\"\n },\n \"TEMPLATE\": {\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }\n }','','2018-05-10 16:25:41','0'),(13,'save.center.mapping','保存映射信息','domain,name,key,value,remark','1','{\n \"param1\":\"INSERT c_mapping(domain,`name`,`key`,`value`,remark) VALUES(#domain#,#name#,#key#,#value#,#remark#)\"\n }','',NULL,'{\n \"TEMPLATE\": {\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }\n }','','2018-05-13 15:20:28','0'),(14,'delete.center.mapping','删除映射信息','domain,name,key,value,remark','1','{\n \"param1\":\"UPDATE c_mapping m SET m.status_cd = \'1\' WHERE m.status_cd = \'0\' AND m.id = #id#\"\n }','',NULL,'{\n \"TEMPLATE\": {\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }\n }','','2018-05-13 15:40:56','0'),(15,'update.center.mapping','修改映射信息','id,domain,name,key,value,remark','1','{\n \"param1\":\"UPDATE c_mapping m SET m.domain=#domain#,m.name = #name#,m.key=#key#,m.value=#value#,m.remark=#remark# WHERE m.status_cd = \'0\' AND m.id = #id#\"\n }','',NULL,'{\n \"TEMPLATE\": {\n \"response\": {\n \"code\": \"0000\",\n \"message\": \"成功\"\n }\n }\n }','','2018-05-13 15:49:39','0');
|
| | |
|
| | | /*Table structure for table `c_status` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_status`;
|
| | |
|
| | | CREATE TABLE `c_status` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
| | | `status_cd` varchar(4) NOT NULL COMMENT '状æ€',
|
| | | `name` varchar(50) NOT NULL COMMENT 'åç§°',
|
| | | `description` varchar(200) DEFAULT NULL COMMENT 'æè¿°',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | PRIMARY KEY (`id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_status` */
|
| | |
|
| | | insert into `c_status`(`id`,`status_cd`,`name`,`description`,`create_time`) values (1,'1','æ— æ•ˆçš„ï¼Œä¸åœ¨ç”¨çš„','æ— æ•ˆçš„ï¼Œä¸åœ¨ç”¨çš„','2018-04-24 15:52:20'),(2,'0','有效的,在用的','有效的,在用的','2018-04-24 15:52:20'),(3,'S','ä¿å˜æˆåŠŸ','ä¿å˜æˆåŠŸ','2018-04-24 15:52:20'),(4,'D','作废订å•','作废订å•','2018-04-24 15:52:20'),(5,'E','错误订å•','错误订å•','2018-04-24 15:52:21'),(6,'NE','通知错误订å•','通知错误订å•','2018-04-24 15:52:21'),(7,'C','错误订å•','错误订å•','2018-04-24 15:52:21');
|
| | |
|
| | | /*Table structure for table `c_template` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_template`;
|
| | |
|
| | | CREATE TABLE `c_template` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '模板ID',
|
| | | `template_code` varchar(20) NOT NULL COMMENT '模板编码 模板英文名',
|
| | | `name` varchar(50) NOT NULL COMMENT '模板名称',
|
| | | `html_name` varchar(20) NOT NULL COMMENT '对应HTML文件名称',
|
| | | `url` varchar(200) NOT NULL COMMENT '查询数据,修改数据url 其真实地址对应于mapping表中 LIST->key 对应 查询多条数据 QUERY->key 对应单条数据 UPDATE-> 对应修改数据 DELETE->key 对应删除数据 多条之间用 ; 分隔',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,0在用,1失效',
|
| | | PRIMARY KEY (`id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_template` */
|
| | |
|
| | | insert into `c_template`(`id`,`template_code`,`name`,`html_name`,`url`,`create_time`,`status_cd`) values (1,'mapping','映射管理','list_template','LIST->query.center.mapping;QUERY->mapping_query_url;INSERT->save.center.mapping;UPDATE->update.center.mapping;DELETE->delete.center.mapping','2018-05-09 12:13:56','0'),(2,'app','外部应用','list_template','LIST->query.center.apps;QUERY->query.center.app','2018-05-10 12:21:16','0'),(3,'service','服务管理','list_template','LIST->query.center.services;QUERY->query.center.service','2018-05-10 12:21:17','0'),(4,'route','路由管理','list_template','LIST->query.center.routes;QUERY->query.center.route','2018-05-10 12:21:17','0'),(5,'cache','刷新缓存','list_template_cache','LIST->query.console.caches;QUERY->query.console.cache','2018-05-10 14:36:01','0');
|
| | |
|
| | | /*Table structure for table `c_template_col` */
|
| | |
|
| | | DROP TABLE IF EXISTS `c_template_col`;
|
| | |
|
| | | CREATE TABLE `c_template_col` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '模板ID',
|
| | | `template_code` varchar(20) NOT NULL COMMENT '模板编码 模板英文名',
|
| | | `col_name` varchar(50) NOT NULL COMMENT '前台显示名称',
|
| | | `col_code` varchar(20) NOT NULL COMMENT '字段的编码',
|
| | | `col_model` longtext NOT NULL COMMENT 'jqgrid的colmodel',
|
| | | `seq` int(11) NOT NULL COMMENT '列顺序',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,0在用,1失效',
|
| | | PRIMARY KEY (`id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `c_template_col` */
|
| | |
|
| | | insert into `c_template_col`(`id`,`template_code`,`col_name`,`col_code`,`col_model`,`seq`,`create_time`,`status_cd`) values (1,'mapping','列ID','id','{\r\n \"name\": \"id\",\r\n \"index\": \"id\",\r\n \"width\": \"20\",\r\n \"editable\": true,\r\n \"sorttype\": \"int\",\r\n\"align\" : \"center\"\r\n}',1,'2018-05-09 12:14:13','0'),(2,'mapping','域','domain','{\r\n \"name\": \"domain\",\r\n \"index\": \"domain\",\r\n \"width\": \"70\",\r\n \"editable\": true,\r\n\"align\" : \"center\",\r\n \"editoptions\" : {\"size\" : \"35\",\"defaultValue\": \"DOMAIN.COMMON\"}\r\n}',2,'2018-05-09 12:14:13','0'),(3,'mapping','名称','name','{\r\n \"name\": \"name\",\r\n \"index\": \"name\",\r\n \"width\": \"90\",\r\n \"editable\": true,\r\n \"editoptions\" : {\"size\" : \"35\"}\r\n}',3,'2018-05-09 12:14:13','0'),(4,'mapping','键','key','{\r\n \"name\": \"key\",\r\n \"index\": \"key\",\r\n \"width\": \"90\",\r\n \"editable\": true,\r\n \"editoptions\" : {\"size\" : \"35\"}\r\n}',4,'2018-05-09 12:14:13','0'),(5,'mapping','值','value','{\r\n \"name\": \"value\",\r\n \"index\": \"value\",\r\n \"width\": \"90\",\r\n \"editable\": true,\r\n \"editoptions\" : {\"size\" : \"35\"}\r\n}',5,'2018-05-09 12:14:13','0'),(6,'mapping',' ','BUTTON','{\r\n \"name\": \"detail\",\r\n \"index\": \"\",\r\n \"width\": \"40\",\r\n \"fixed\": \"true\",\r\n \"sortable\": \"false\",\r\n \"resize\": \"false\",\r\n \"formatter\": \"function(cellvalue, options, rowObject){ var temp =\\\"<div style=\'margin-left:8px;\'><div title=\'详情记录\' style=\'float:left;cursor:pointer;\' class=\'ui-pg-div\' id=\'jEditButton_3\' onclick=\'detail(\\\" + rowObject + \\\")\' onmouseover=\'jQuery(this).addClass(\'ui-state-hover\');\' onmouseout=\'jQuery(this).removeClass(\'ui-state-hover\');\'><span class=\'ui-icon fa-search-plus\'/></div></div>\\\";return temp; }\"\r\n}',7,'2018-05-09 12:14:13','0'),(7,'mapping','备注','remark','{\r\n \"name\": \"remark\",\r\n \"index\": \"remark\",\r\n \"width\": \"90\",\r\n \"editable\": true,\r\n \"edittype\" : \"textarea\",\r\n\"editoptions\" : {\"rows\" : \"2\",\"cols\" : \"35\"}\r\n\r\n}',6,'2018-05-09 13:25:29','0'),(8,'app','列ID','id','{ \"name\": \"id\",\"index\": \"id\",\"width\": \"20\",\n \"editable\": \"true\",\n \"sorttype\": \"int\" }',1,'2018-05-10 12:21:16','0'),(9,'app','AppId','domain','{ \"name\": \"appId\",\"index\": \"appId\",\"width\": \"40\",\n \"editable\": \"true\"\n }',2,'2018-05-10 12:21:16','0'),(10,'app','名称','name','{ \"name\": \"name\",\"index\": \"name\",\"width\": \"50\",\n \"editable\": \"true\" }',3,'2018-05-10 12:21:16','0'),(11,'app','秘钥','securityCode','{ \"name\": \"securityCode\",\"index\": \"securityCode\",\"width\": \"50\",\n \"editable\": \"true\" }',4,'2018-05-10 12:21:17','0'),(12,'app','白名单','whileListIp','{ \"name\": \"whileListIp\",\"index\": \"whileListIp\",\"width\": \"90\",\n \"editable\": \"true\" }',5,'2018-05-10 12:21:17','0'),(13,'app','黑名单','blackListIp','{ \"name\": \"blackListIp\",\"index\": \"blackListIp\",\"width\": \"40\",\n \"editable\": \"true\" }',6,'2018-05-10 12:21:17','0'),(14,'app','备注','value','{ \"name\": \"remark\",\"index\": \"remark\",\"width\": \"90\",\n \"editable\": \"true\" }',7,'2018-05-10 12:21:17','0'),(15,'app','BUTTON','BUTTON',' {\r\n \"name\": \"detail\",\r\n \"index\": \"\",\r\n \"width\": \"40\",\r\n \"fixed\": \"true\",\r\n \"sortable\": \"false\",\r\n \"resize\": \"false\",\r\n \"formatter\": \"function(cellvalue, options, rowObject){ var temp =\\\"<div style=\'margin-left:8px;\'><div title=\'详情记录\' style=\'float:left;cursor:pointer;\' class=\'ui-pg-div\' id=\'jEditButton_3\' onclick=\'detail(\\\" + rowObject + \\\")\' onmouseover=\'jQuery(this).addClass(\'ui-state-hover\');\' onmouseout=\'jQuery(this).removeClass(\'ui-state-hover\');\'><span class=\'ui-icon fa-search-plus\'/></div></div>\\\";return temp; }\"\r\n }',8,'2018-05-10 12:21:17','0'),(16,'service','服务ID','serviceId','{ \"name\": \"serviceId\",\"index\": \"serviceId\",\"width\": \"20\",\n \"editable\": \"true\",\n \"sorttype\": \"int\" }',1,'2018-05-10 12:21:17','0'),(17,'service','服务编码','serviceCode','{ \"name\": \"serviceCode\",\"index\": \"serviceCode\",\"width\": \"40\",\n \"editable\": \"true\"\n }',2,'2018-05-10 12:21:17','0'),(18,'service','调用方式','invokeModel','{ \"name\": \"invokeModel\",\"index\": \"invokeModel\",\"width\": \"50\",\n \"editable\": \"true\" }',3,'2018-05-10 12:21:17','0'),(19,'service','业务类型','businessTypeCd','{ \"name\": \"businessTypeCd\",\"index\": \"businessTypeCd\",\"width\": \"50\",\n \"editable\": \"true\" }',4,'2018-05-10 12:21:17','0'),(20,'service','名称','name','{ \"name\": \"name\",\"index\": \"name\",\"width\": \"40\",\n \"editable\": \"true\" }',5,'2018-05-10 12:21:17','0'),(21,'service','消息队列','messageQueueName','{ \"name\": \"messageQueueName\",\"index\": \"messageQueueName\",\"width\": \"10\",\n \"editable\": \"true\" }',6,'2018-05-10 12:21:17','0'),(22,'service','URL','url','{ \"name\": \"url\",\"index\": \"url\",\"width\": \"60\",\n \"editable\": \"true\" }',7,'2018-05-10 12:21:17','0'),(23,'service','提供者AppId','provideAppId','{ \"name\": \"provideAppId\",\"index\": \"provideAppId\",\"width\": \"10\",\n \"editable\": \"true\" }',8,'2018-05-10 12:21:17','0'),(24,'service','BUTTON','BUTTON',' {\r\n \"name\": \"detail\",\r\n \"index\": \"\",\r\n \"width\": \"40\",\r\n \"fixed\": \"true\",\r\n \"sortable\": \"false\",\r\n \"resize\": \"false\",\r\n \"formatter\": \"function(cellvalue, options, rowObject){ var temp =\\\"<div style=\'margin-left:8px;\'><div title=\'详情记录\' style=\'float:left;cursor:pointer;\' class=\'ui-pg-div\' id=\'jEditButton_3\' onclick=\'detail(\\\" + rowObject + \\\")\' onmouseover=\'jQuery(this).addClass(\'ui-state-hover\');\' onmouseout=\'jQuery(this).removeClass(\'ui-state-hover\');\'><span class=\'ui-icon fa-search-plus\'/></div></div>\\\";return temp; }\"\r\n }',9,'2018-05-10 12:21:17','0'),(25,'route','路由ID','id','{ \"name\": \"id\",\"index\": \"id\",\"width\": \"10\",\n \"editable\": \"true\",\n \"sorttype\": \"int\" }',1,'2018-05-10 12:21:17','0'),(26,'route','AppId','appId','{ \"name\": \"appId\",\"index\": \"appId\",\"width\": \"30\",\n \"editable\": \"true\"\n }',2,'2018-05-10 12:21:17','0'),(27,'route','服务ID','serviceId','{ \"name\": \"serviceId\",\"index\": \"serviceId\",\"width\": \"30\",\n \"editable\": \"true\" }',3,'2018-05-10 12:21:17','0'),(28,'route','服务名称','serviceName','{ \"name\": \"serviceName\",\"index\": \"serviceName\",\"width\": \"30\",\n \"editable\": \"true\" }',4,'2018-05-10 12:21:17','0'),(29,'route','服务编码','serviceCode','{ \"name\": \"serviceCode\",\"index\": \"serviceCode\",\"width\": \"30\",\n \"editable\": \"true\" }',5,'2018-05-10 12:21:17','0'),(30,'route','订单类型','orderTypeCd','{ \"name\": \"orderTypeCd\",\"index\": \"orderTypeCd\",\"width\": \"30\",\n \"editable\": \"true\" }',6,'2018-05-10 12:21:17','0'),(31,'route','调用次数限制','invokelimitTimes','{ \"name\": \"invokelimitTimes\",\"index\": \"invokelimitTimes\",\"width\": \"40\",\n \"editable\": \"true\" }',7,'2018-05-10 12:21:18','0'),(32,'route','BUTTON','BUTTON',' {\r\n \"name\": \"detail\",\r\n \"index\": \"\",\r\n \"width\": \"40\",\r\n \"fixed\": \"true\",\r\n \"sortable\": \"false\",\r\n \"resize\": \"false\",\r\n \"formatter\": \"function(cellvalue, options, rowObject){ var temp =\\\"<div style=\'margin-left:8px;\'><div title=\'详情记录\' style=\'float:left;cursor:pointer;\' class=\'ui-pg-div\' id=\'jEditButton_3\' onclick=\'detail(\\\" + rowObject + \\\")\' onmouseover=\'jQuery(this).addClass(\'ui-state-hover\');\' onmouseout=\'jQuery(this).removeClass(\'ui-state-hover\');\'><span class=\'ui-icon fa-search-plus\'/></div></div>\\\";return temp; }\"\r\n }',8,'2018-05-10 12:21:18','0'),(33,'cache','缓存ID','id','{ \"name\": \"id\",\"index\": \"id\",\"width\": \"10\",\n \"editable\": \"true\",\n \"sorttype\": \"int\" }',1,'2018-05-10 14:36:01','0'),(34,'cache','缓存编码','cacheCode','{ \"name\": \"cacheCode\",\"index\": \"cacheCode\",\"width\": \"20\",\n \"editable\": \"true\" }',2,'2018-05-10 14:36:01','0'),(35,'cache','缓存名称','cacheName','{ \"name\": \"cacheName\",\"index\": \"cacheName\",\"width\": \"50\",\n \"editable\": \"true\" }',3,'2018-05-10 14:36:01','0'),(36,'cache','BUTTON','BUTTON',' {\r\n \"name\": \"detail\",\r\n \"index\": \"\",\r\n \"width\": \"120\",\r\n \"fixed\": \"true\",\r\n \"sortable\": \"false\",\r\n \"resize\": \"false\",\r\n \"formatter\": \"function(cellvalue, options, rowObject){ var temp =\\\"<div style=\'margin-left:8px;\'><button type=\'button\' class=\'btn btn-warning\' style=\'border-radius: .25rem;\' onclick=\'flush(this,\\\" + rowObject.cacheCode + \\\")\'>刷新缓存</button> </div>\\\";return temp; }\"\r\n }',4,'2018-05-10 14:36:01','0');
|
| | |
|
| | | /*Table structure for table `m_menu` */
|
| | |
|
| | | DROP TABLE IF EXISTS `m_menu`;
|
| | |
|
| | | CREATE TABLE `m_menu` (
|
| | | `m_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
|
| | | `name` varchar(10) NOT NULL COMMENT '菜单名称',
|
| | | `level` varchar(2) NOT NULL COMMENT '菜单级别 一级菜单 为 1 二级菜单为2',
|
| | | `parent_id` int(11) NOT NULL COMMENT '父类菜单id 如果是一类菜单则写为-1 如果是二类菜单则写父类的菜单id',
|
| | | `menu_group` varchar(10) NOT NULL COMMENT '菜单组 left 显示在页面左边的菜单',
|
| | | `user_id` varchar(12) NOT NULL COMMENT '创建菜单的用户id',
|
| | | `remark` varchar(200) DEFAULT NULL COMMENT '描述',
|
| | | `seq` int(11) NOT NULL COMMENT '顺序',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,0在用,1失效',
|
| | | PRIMARY KEY (`m_id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `m_menu` */
|
| | |
|
| | | insert into `m_menu`(`m_id`,`name`,`level`,`parent_id`,`menu_group`,`user_id`,`remark`,`seq`,`create_time`,`status_cd`) values (1,'系统配置','1',-1,'LEFT','10001','',1,'2018-05-07 12:12:36','0'),(2,'映射管理','2',1,'LEFT','10001','',2,'2018-05-07 12:12:36','0'),(3,'外部应用','2',1,'LEFT','10001','',3,'2018-05-07 12:12:36','0'),(4,'路由管理','2',1,'LEFT','10001','',5,'2018-05-07 12:12:36','0'),(5,'服务管理','2',1,'LEFT','10001','',4,'2018-05-07 12:12:36','0'),(6,'刷新缓存','2',7,'LEFT','10001','',2,'2018-05-07 12:12:36','0'),(7,'缓存管理','1',-1,'LEFT','10001','',1,'2018-05-10 12:17:47','0');
|
| | |
|
| | | /*Table structure for table `m_menu_2_user` */
|
| | |
|
| | | DROP TABLE IF EXISTS `m_menu_2_user`;
|
| | |
|
| | | CREATE TABLE `m_menu_2_user` (
|
| | | `m_user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '菜单用户ID',
|
| | | `m_id` int(11) NOT NULL COMMENT '菜单id',
|
| | | `user_id` varchar(100) NOT NULL COMMENT '用户id',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,0在用,1失效',
|
| | | PRIMARY KEY (`m_user_id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `m_menu_2_user` */
|
| | |
|
| | | insert into `m_menu_2_user`(`m_user_id`,`m_id`,`user_id`,`create_time`,`status_cd`) values (1,1,'10001','2018-05-07 12:12:37','0'),(2,2,'10001','2018-05-07 12:12:37','0'),(3,3,'10001','2018-05-07 12:12:37','0'),(4,4,'10001','2018-05-07 12:12:37','0'),(5,5,'10001','2018-05-07 12:12:37','0'),(6,6,'10001','2018-05-10 12:20:31','0'),(7,7,'10001','2018-05-10 12:20:31','0');
|
| | |
|
| | | /*Table structure for table `m_menu_ctg` */
|
| | |
|
| | | DROP TABLE IF EXISTS `m_menu_ctg`;
|
| | |
|
| | | CREATE TABLE `m_menu_ctg` (
|
| | | `m_ctg_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '菜单配置ID',
|
| | | `m_id` int(11) NOT NULL COMMENT '菜单ID',
|
| | | `url` varchar(100) NOT NULL COMMENT '菜单打开地址',
|
| | | `template` varchar(50) DEFAULT NULL COMMENT '页面模板 模板名称',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,0在用,1失效',
|
| | | PRIMARY KEY (`m_ctg_id`)
|
| | | ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `m_menu_ctg` */
|
| | |
|
| | | insert into `m_menu_ctg`(`m_ctg_id`,`m_id`,`url`,`template`,`create_time`,`status_cd`) values (1,1,'#','','2018-05-07 12:12:36','0'),(2,2,'/console/list?templateCode=mapping','','2018-05-07 12:12:37','0'),(3,3,'/console/list?templateCode=app','','2018-05-07 12:12:37','0'),(4,4,'/console/list?templateCode=route','','2018-05-07 12:12:37','0'),(5,5,'/console/list?templateCode=service','','2018-05-07 12:12:37','0'),(6,7,'#','','2018-05-10 12:18:34','0'),(7,6,'/console/list?templateCode=cache','','2018-05-10 12:18:34','0');
|
| | |
|
| | | /*Table structure for table `spec` */
|
| | |
|
| | | DROP TABLE IF EXISTS `spec`;
|
| | |
|
| | | CREATE TABLE `spec` (
|
| | | `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
| | | `spec_cd` varchar(4) NOT NULL COMMENT 'ä¸šåŠ¡é¡¹ç±»åž‹è§„æ ¼ç¼–ç ,从x00020001å¼€å§‹æ¯æ¬¡åР䏀就å¯ä»¥(约定,x=10表示c_orders_attrs ä¸å±žæ€§ï¼Œx=11表示c_business_attrs ä¸çš„属性)',
|
| | | `name` varchar(50) NOT NULL COMMENT 'åç§°',
|
| | | `description` varchar(200) DEFAULT NULL COMMENT 'æè¿°',
|
| | | `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
| | | PRIMARY KEY (`id`)
|
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
| | |
|
| | | /*Data for the table `spec` */
|
| | |
|
| | | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
| | | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
| | | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
| | | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
| | |
| | | public final static String TEMPLATE_URL_QUERY = "QUERY->"; |
| | | public final static String TEMPLATE_URL_UPDATE = "UPDATE->"; |
| | | public final static String TEMPLATE_URL_DELETE = "DELETE->"; |
| | | public final static String TEMPLATE_URL_INSERT = "INSERT->"; |
| | | public final static String TEMPLATE_URL_SPILT = ";"; |
| | | |
| | | |
| | | /** |
| | | * 添加数据 |
| | | */ |
| | | public final static String TEMPLATE_OPER_ADD = "add"; |
| | | |
| | | |
| | | /** |
| | | * 编辑数据 |
| | | */ |
| | | public final static String TEMPLATE_OPER_EDIT = "edit"; |
| | | |
| | | /** |
| | | * 删除数据 |
| | | */ |
| | | public final static String TEMPLATE_OPER_DEL = "del"; |
| | | |
| | | |
| | | public final static String CACHE_PARAM_NAME = "cacheName"; |
| | | |
| | | /** |
| | |
| | | INSERT INTO c_service(service_code,invoke_model,business_type_cd,`name`,seq,url,provide_app_id) |
| | | VALUES('query.console.cache','S','Q','查询所有缓存',1,'http://center-service/businessApi/query','8000418002'); |
| | | |
| | | |
| | | INSERT INTO c_service(service_code,invoke_model,business_type_cd,`name`,seq,url,provide_app_id) |
| | | VALUES('save.center.mapping','S','Q','保存映射信息',1,'http://center-service/businessApi/do','8000418002'); |
| | | |
| | | INSERT INTO c_service(service_code,invoke_model,business_type_cd,`name`,seq,url,provide_app_id) |
| | | VALUES('delete.center.mapping','S','Q','保存映射信息',1,'http://center-service/businessApi/do','8000418002'); |
| | | |
| | | INSERT INTO c_service(service_code,invoke_model,business_type_cd,`name`,seq,url,provide_app_id) |
| | | VALUES('update.center.mapping','S','Q','保存映射信息',1,'http://center-service/businessApi/do','8000418002'); |
| | | |
| | | insert into c_route(app_id,service_id,order_type_cd,status_cd) values( |
| | | '8000418001','1','Q','0' |
| | | ); |
| | |
| | | ); |
| | | INSERT INTO c_route(app_id,service_id,order_type_cd,status_cd) VALUES( |
| | | '8000418002','13','Q','0' |
| | | ); |
| | | |
| | | INSERT INTO c_route(app_id,service_id,order_type_cd,status_cd) VALUES( |
| | | '8000418002','14','Q','0' |
| | | ); |
| | | INSERT INTO c_route(app_id,service_id,order_type_cd,status_cd) VALUES( |
| | | '8000418002','15','Q','0' |
| | | ); |
| | | |
| | | INSERT INTO c_route(app_id,service_id,order_type_cd,status_cd) VALUES( |
| | | '8000418002','16','Q','0' |
| | | ); |
| | | |
| | | |
| | |
| | | }','','0'); |
| | | |
| | | INSERT INTO c_service_sql(service_code,`name`,params,query_model,`sql`,proc,template,remark,status_cd) |
| | | VALUES('query.console.caches','查询路由数据','userId','1','{ |
| | | VALUES('query.console.caches','查询缓存数据','userId','1','{ |
| | | "param1":"SELECT c.id id,c.`cache_code` cacheCode, c.`name` cacheName FROM c_cache c, c_cache_2_user c2u WHERE c.`cache_code` = c2u.`cache_code` AND c.`status_cd` = ''0'' |
| | | AND c2u.`status_cd` = ''0'' AND c2u.`user_id` = #10001# AND c.`group` = ''COMMON'' ORDER BY c.`seq` ASC" |
| | | AND c2u.`status_cd` = ''0'' AND c2u.`user_id` = #userId# AND c.`group` = ''COMMON'' ORDER BY c.`seq` ASC" |
| | | }','','{ |
| | | "PARAM": { |
| | | "param1": "$.#rows#Array" |
| | |
| | | }','','0'); |
| | | |
| | | |
| | | |
| | | INSERT INTO c_service_sql(service_code,`name`,params,query_model,`sql`,proc,template,remark,status_cd) |
| | | VALUES('save.center.mapping','保存映射信息','domain,name,key,value,remark','1','{ |
| | | "param1":"INSERT c_mapping(domain,`name`,`key`,`value`,remark) VALUES(#domain#,#name#,#key#,#value#,#remark#)" |
| | | }','','{ |
| | | "TEMPLATE": { |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | } |
| | | } |
| | | }','','0'); |
| | | INSERT INTO c_service_sql(service_code,`name`,params,query_model,`sql`,proc,template,remark,status_cd) |
| | | VALUES('delete.center.mapping','删除映射信息','id','1','{ |
| | | "param1":"UPDATE c_mapping m SET m.status_cd = ''1'' WHERE m.status_cd = ''0'' AND m.id = #id#" |
| | | }','','{ |
| | | "TEMPLATE": { |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | } |
| | | } |
| | | }','','0'); |
| | | INSERT INTO c_service_sql(service_code,`name`,params,query_model,`sql`,proc,template,remark,status_cd) |
| | | VALUES('update.center.mapping','修改映射信息','id,domain,name,key,value,remark','1','{ |
| | | "param1":"UPDATE c_mapping m SET m.domain=#domain#,m.name = #name#,m.key=#key#,m.value=#value#,m.remark=#remark# WHERE m.status_cd = ''0'' AND m.id = #id#" |
| | | }','','{ |
| | | "TEMPLATE": { |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | } |
| | | } |
| | | }','','0'); |
| | | |
| | | |
| | | |
| | |
| | | insert into c_template(template_code,name,html_name,url) values('mapping','映射管理','list_template','LIST->query.center.mapping;QUERY->mapping_query_url'); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('mapping','列ID','id','{ "name": "id","index": "id","width": "90", |
| | | "editable": "true", |
| | | "editable": true, |
| | | "sorttype": "int" }',1); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('mapping','域','domain','{ "name": "domain","index": "domain","width": "90", |
| | | "editable": "true", |
| | | "editable": true, |
| | | "formatoptions": { "defaultValue": "DOMAIN.COMMON" } |
| | | }',2); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('mapping','名称','name','{ "name": "name","index": "name","width": "90", |
| | | "editable": "true" }',3); |
| | | "editable": true }',3); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('mapping','键','key','{ "name": "key","index": "key","width": "90", |
| | | "editable": "true" }',4); |
| | | "editable": true }',4); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('mapping','值','value','{ "name": "value","index": "value","width": "90", |
| | | "editable": "true" }',5); |
| | | "editable": true }',5); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('mapping','备注','value','{ "name": "remark","index": "remark","width": "90", |
| | | "editable": "true" }',6); |
| | | "editable": true }',6); |
| | | |
| | | INSERT INTO c_template_col(template_code,col_name,col_code,col_model,seq) VALUES('mapping','BUTTON','BUTTON','{ |
| | | "name": "detail", |
| | |
| | | "name": "detail", |
| | | "index": "", |
| | | "width": "40", |
| | | "fixed": "true", |
| | | "fixed": true, |
| | | "sortable": "false", |
| | | "resize": "false", |
| | | "formatter": "function(cellvalue, options, rowObject){ var temp =\"<div style='margin-left:8px;'><div title='详情记录' style='float:left;cursor:pointer;' class='ui-pg-div' id='jEditButton_3' onclick='detail(\" + rowObject + \")' onmouseover='jQuery(this).addClass('ui-state-hover');' onmouseout='jQuery(this).removeClass('ui-state-hover');'><span class='ui-icon fa-search-plus'/></div></div>\";return temp; }" |
| | |
| | | insert into c_template(template_code,name,html_name,url) values('app','外部应用','list_template','LIST->query.center.apps;QUERY->query.center.app'); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('app','列ID','id','{ "name": "id","index": "id","width": "20", |
| | | "editable": "true", |
| | | "editable": true, |
| | | "sorttype": "int" }',1); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('app','AppId','domain','{ "name": "appId","index": "appId","width": "40", |
| | | "editable": "true" |
| | | "editable": true |
| | | }',2); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('app','名称','name','{ "name": "name","index": "name","width": "50", |
| | | "editable": "true" }',3); |
| | | "editable": true }',3); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('app','秘钥','securityCode','{ "name": "securityCode","index": "securityCode","width": "50", |
| | | "editable": "true" }',4); |
| | | "editable": true }',4); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('app','白名单','whileListIp','{ "name": "whileListIp","index": "whileListIp","width": "90", |
| | | "editable": "true" }',5); |
| | | "editable": true }',5); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('app','黑名单','blackListIp','{ "name": "blackListIp","index": "blackListIp","width": "40", |
| | | "editable": "true" }',6); |
| | | "editable": true }',6); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('app','备注','value','{ "name": "remark","index": "remark","width": "90", |
| | | "editable": "true" }',7); |
| | | "editable": true }',7); |
| | | |
| | | INSERT INTO c_template_col(template_code,col_name,col_code,col_model,seq) VALUES('app','BUTTON','BUTTON','{ |
| | | "name": "detail", |
| | |
| | | insert into c_template(template_code,name,html_name,url) values('service','服务管理','list_template','LIST->query.center.services;QUERY->query.center.service'); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('service','服务ID','serviceId','{ "name": "serviceId","index": "serviceId","width": "20", |
| | | "editable": "true", |
| | | "editable": true, |
| | | "sorttype": "int" }',1); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('service','服务编码','serviceCode','{ "name": "serviceCode","index": "serviceCode","width": "40", |
| | | "editable": "true" |
| | | "editable": true |
| | | }',2); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('service','调用方式','invokeModel','{ "name": "invokeModel","index": "invokeModel","width": "50", |
| | | "editable": "true" }',3); |
| | | "editable": true }',3); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('service','业务类型','businessTypeCd','{ "name": "businessTypeCd","index": "businessTypeCd","width": "50", |
| | | "editable": "true" }',4); |
| | | "editable": true }',4); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('service','名称','name','{ "name": "name","index": "name","width": "40", |
| | | "editable": "true" }',5); |
| | | "editable": true }',5); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('service','消息队列','messageQueueName','{ "name": "messageQueueName","index": "messageQueueName","width": "10", |
| | | "editable": "true" }',6); |
| | | "editable": true }',6); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('service','URL','url','{ "name": "url","index": "url","width": "60", |
| | | "editable": "true" }',7); |
| | | "editable": true }',7); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('service','提供者AppId','provideAppId','{ "name": "provideAppId","index": "provideAppId","width": "10", |
| | | "editable": "true" }',8); |
| | | "editable": true }',8); |
| | | |
| | | INSERT INTO c_template_col(template_code,col_name,col_code,col_model,seq) VALUES('service','BUTTON','BUTTON','{ |
| | | "name": "detail", |
| | |
| | | insert into c_template(template_code,name,html_name,url) values('route','路由管理','list_template','LIST->query.center.routes;QUERY->query.center.route'); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('route','路由ID','id','{ "name": "id","index": "id","width": "10", |
| | | "editable": "true", |
| | | "editable": true, |
| | | "sorttype": "int" }',1); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('route','AppId','appId','{ "name": "appId","index": "appId","width": "30", |
| | | "editable": "true" |
| | | "editable": true |
| | | }',2); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('route','服务ID','serviceId','{ "name": "serviceId","index": "serviceId","width": "30", |
| | | "editable": "true" }',3); |
| | | "editable": true }',3); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('route','服务名称','serviceName','{ "name": "serviceName","index": "serviceName","width": "30", |
| | | "editable": "true" }',4); |
| | | "editable": true }',4); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('route','服务编码','serviceCode','{ "name": "serviceCode","index": "serviceCode","width": "30", |
| | | "editable": "true" }',5); |
| | | "editable": true }',5); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('route','订单类型','orderTypeCd','{ "name": "orderTypeCd","index": "orderTypeCd","width": "30", |
| | | "editable": "true" }',6); |
| | | "editable": true }',6); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('route','调用次数限制','invokelimitTimes','{ "name": "invokelimitTimes","index": "invokelimitTimes","width": "40", |
| | | "editable": "true" }',7); |
| | | "editable": true }',7); |
| | | |
| | | INSERT INTO c_template_col(template_code,col_name,col_code,col_model,seq) VALUES('route','BUTTON','BUTTON','{ |
| | | "name": "detail", |
| | |
| | | insert into c_template(template_code,name,html_name,url) values('cache','刷新缓存','list_template_cache','LIST->query.center.caches;QUERY->query.center.cacheOne'); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('cache','缓存ID','id','{ "name": "id","index": "id","width": "10", |
| | | "editable": "true", |
| | | "editable": true, |
| | | "sorttype": "int" }',1); |
| | | |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('cache','缓存编码','cacheCode','{ "name": "cacheCode","index": "cacheCode","width": "30", |
| | | "editable": "true" }',2); |
| | | "editable": true }',2); |
| | | insert into c_template_col(template_code,col_name,col_code,col_model,seq) values('cache','缓存名称','cacheName','{ "name": "cacheName","index": "cacheName","width": "30", |
| | | "editable": "true" }',3); |
| | | "editable": true }',3); |
| | | INSERT INTO c_template_col(template_code,col_name,col_code,col_model,seq) VALUES('cache','BUTTON','BUTTON','{ |
| | | "name": "detail", |
| | | "index": "", |
| | |
| | | "fixed": "true", |
| | | "sortable": "false", |
| | | "resize": "false", |
| | | "formatter": "function(cellvalue, options, rowObject){\n var temp =\"<div style=''margin-left:8px;''><div title=''刷新缓存'' style=''float:left;cursor:pointer;'' class=''ui-pg-div'' id=''jEditButton_3'' onclick=''flush(\"+rowObject+\")'' onmouseover=''jQuery(this).addClass(''ui-state-hover'');'' onmouseout=''jQuery(this).removeClass(''ui-state-hover'');''><span class=''ui-icon fa-search-plus''/></div></div>\";\n return temp; \n}" |
| | | "formatter": ""function(cellvalue, options, rowObject){ var temp =\"<div style='margin-left:8px;'><button type='button' class='btn btn-warning' style='border-radius: .25rem;' onclick='flush(this,\"+rowObject.cacheCode+\")'>刷新缓存</button></div>\";return temp; }" |
| | | }',4); |
| | | /** 如果BUTTON 报错不显示,则直接粘贴到col_model中 |
| | | { |
| | |
| | | "fixed": "true", |
| | | "sortable": "false", |
| | | "resize": "false", |
| | | "formatter": "function(cellvalue, options, rowObject){ var temp =\"<div style='margin-left:8px;'><div title='刷新缓存' style='float:left;cursor:pointer;' class='ui-pg-div' id='jEditButton_3' onclick='flush(\" + rowObject + \")' onmouseover='jQuery(this).addClass('ui-state-hover');' onmouseout='jQuery(this).removeClass('ui-state-hover');'><span class='ui-icon fa-search-plus'/></div></div>\";return temp; }" |
| | | "formatter": "function(cellvalue, options, rowObject){ var temp =\"<div style='margin-left:8px;'><button type='button' class='btn btn-warning' style='border-radius: .25rem;' onclick='flush(this,\"+rowObject.cacheCode+\")'>刷新缓存</button></div>\";return temp; }" |
| | | } |
| | | **/ |
| | | |
| | |
| | | ); |
| | | |
| | | |
| | | insert into c_cache (cache_code,service_code,`name`,param,seq) values('1001','query.center.cache','映射缓存(c_mapping表)','{"cacheName":"MAPPING"}',1); |
| | | insert into c_cache (cache_code,service_code,`name`,param,seq) values('1002','query.center.cache','业务配置缓存(c_app,c_service,c_route表)','{"cacheName":"APP_ROUTE_SERVICE"}',2); |
| | | insert into c_cache (cache_code,service_code,`name`,param,seq) values('1003','query.center.cache','公用服务缓存(c_service_sql表)','{"cacheName":"SERVICE_SQL"}',3); |
| | | insert into c_cache (cache_code,service_code,`name`,param,seq) values('1001','flush.center.cache','映射缓存(c_mapping表)','{"cacheName":"MAPPING"}',1); |
| | | insert into c_cache (cache_code,service_code,`name`,param,seq) values('1002','flush.center.cache','业务配置缓存(c_app,c_service,c_route表)','{"cacheName":"APP_ROUTE_SERVICE"}',2); |
| | | insert into c_cache (cache_code,service_code,`name`,param,seq) values('1003','flush.center.cache','公用服务缓存(c_service_sql表)','{"cacheName":"SERVICE_SQL"}',3); |
| | | |
| | | insert into c_cache_2_user(cache_code,user_id) values('1001','10001'); |
| | | insert into c_cache_2_user(cache_code,user_id) values('1002','10001'); |
| File was renamed from java110-event/src/main/java/com/java110/event/center/init/CenterServiceStartInit.java |
| | |
| | | package com.java110.event.center.init; |
| | | |
| | | import com.java110.common.factory.ApplicationContextFactory; |
| | | import com.java110.entity.center.DataFlow; |
| | | import com.java110.event.app.AppEventPublishing; |
| | | import com.java110.event.app.AppListener; |
| | | import com.java110.event.center.DataFlowEventPublishing; |
| | | import com.java110.event.center.DataFlowListener; |
| | | import com.java110.event.listener.common.CommonDispatchListener; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.boot.context.event.ApplicationReadyEvent; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.core.io.support.PropertiesLoaderUtils; |
| | | |
| | |
| | | * 系统启动时加载信息 |
| | | * Created by wuxw on 2017/4/14. |
| | | */ |
| | | public class CenterServiceStartInit { |
| | | public class EventConfigInit { |
| | | |
| | | /** |
| | | * 默认 事件配置路径classpath:/ |
| | | */ |
| | | private final String DEFAULT_EVENT_PATH = "config/"; |
| | | private final static String DEFAULT_EVENT_PATH = "config/"; |
| | | |
| | | |
| | | /** |
| | | * 默认 文件名称 .properties |
| | | */ |
| | | private final String DEFAULT_FILE_NAME = "center_event.properties"; |
| | | private final static String DEFAULT_FILE_NAME = "center_event.properties"; |
| | | |
| | | /** |
| | | * 订单调度处理侦听 |
| | |
| | | private final static String DISPATCH_EVENT = "java110.event.properties.centerServiceEvent"; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 加载配置文件,将侦听初始化 |
| | | * @param event |
| | | */ |
| | | // @Override |
| | | public void onApplicationEvent(ApplicationReadyEvent event){ |
| | | |
| | | |
| | | public static void initSystemConfig(){ |
| | | //加载配置文件,注册订单处理侦听 |
| | | try { |
| | | |
| | | ApplicationContextFactory.setApplicationContext(event.getApplicationContext()); |
| | | |
| | | Properties properties = this.load(DEFAULT_EVENT_PATH,DEFAULT_FILE_NAME); |
| | | |
| | | registerListener(properties); |
| | | |
| | | //注册事件 |
| | | registerEvent(properties); |
| | | |
| | | } |
| | | catch (Exception ex) { |
| | | throw new IllegalStateException("system init error", ex); |
| | | } |
| | | |
| | | } |
| | | |
| | | public void initSystemConfig(ApplicationContext context){ |
| | | //加载配置文件,注册订单处理侦听 |
| | | try { |
| | | |
| | | ApplicationContextFactory.setApplicationContext(context); |
| | | |
| | | Properties properties = this.load(DEFAULT_EVENT_PATH,DEFAULT_FILE_NAME); |
| | | Properties properties = load(DEFAULT_EVENT_PATH,DEFAULT_FILE_NAME); |
| | | |
| | | registerListener(properties); |
| | | |
| | |
| | | * @param filename |
| | | * @param |
| | | */ |
| | | private Properties load(String location,String filename) throws Exception{ |
| | | private static Properties load(String location,String filename) throws Exception{ |
| | | Properties properties = PropertiesLoaderUtils.loadProperties(new ClassPathResource(location+filename)); |
| | | return properties; |
| | | } |
| | |
| | | * 注册侦听 |
| | | * @param properties |
| | | */ |
| | | private void registerListener(Properties properties) throws Exception{ |
| | | private static void registerListener(Properties properties) throws Exception{ |
| | | |
| | | String[] listeners = properties.getProperty(DATAFLOW_LISTENER).split("\\,"); |
| | | |
| | |
| | | * @param properties |
| | | * @throws Exception |
| | | */ |
| | | private void registerEvent(Properties properties) throws Exception{ |
| | | private static void registerEvent(Properties properties) throws Exception{ |
| | | String[] events = properties.getProperty(DISPATCH_EVENT).split("\\,"); |
| | | |
| | | for (String event : events){ |
| | |
| | | try { |
| | | DataQuery dataQuery = DataQueryFactory.newInstance().builder(businessInfo); |
| | | initConfig(dataQuery); |
| | | //这里应该添加 只有配置类数据才能处理数据,业务类数据不能操作 逻辑 |
| | | queryServiceSMOImpl.commonDoService(dataQuery); |
| | | return dataQuery.getResponseInfo().toJSONString(); |
| | | }catch (Exception e){ |
| | |
| | | throw new IllegalStateException("system init error", ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | * @param dataQuery |
| | | */ |
| | | private void doExecuteUpdateSql(DataQuery dataQuery) throws BusinessException{ |
| | | |
| | | JSONObject business = null; |
| | | try { |
| | | JSONObject params = dataQuery.getRequestParams(); |
| | | JSONObject sqlObj = JSONObject.parseObject(dataQuery.getServiceSql().getSql()); |
| | | JSONObject templateObj = JSONObject.parseObject(dataQuery.getServiceSql().getTemplate()); |
| | | business = JSONObject.parseObject(templateObj.getString("TEMPLATE")); |
| | | List<Object> currentParams = new ArrayList<Object>(); |
| | | String currentSql = ""; |
| | | for(String key : sqlObj.keySet()) { |
| | |
| | | continue; |
| | | } |
| | | currentSqlNew += "?"; |
| | | currentParams.add(params.get(sqls[sqlIndex]) instanceof Integer ? params.getInteger(sqls[sqlIndex]) : "'" + params.getString(sqls[sqlIndex]) + "'"); |
| | | currentParams.add(params.get(sqls[sqlIndex]) instanceof Integer ? params.getInteger(sqls[sqlIndex]) : "" + params.getString(sqls[sqlIndex]) + ""); |
| | | //currentSqlNew += params.get(sqls[sqlIndex]) instanceof Integer ? params.getInteger(sqls[sqlIndex]) : "'" + params.getString(sqls[sqlIndex]) + "'"; |
| | | } |
| | | |
| | |
| | | logger.error("数据交互异常:",e); |
| | | throw new BusinessException(ResponseConstant.RESULT_CODE_INNER_ERROR,"数据交互异常。。。"); |
| | | } |
| | | |
| | | dataQuery.setResponseInfo(DataTransactionFactory.createBusinessResponseJson(ResponseConstant.RESULT_CODE_SUCCESS, |
| | | "成功",business)); |
| | | } |
| | | |
| | | /** |