限流改造

1.x
tanghc 6 years ago
parent 8ebc0925cb
commit ae37028c61
  1. 32
      sop-1.8.0.sql
  2. 5
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitNewAddParam.java
  3. 6
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitNewParam.java
  4. 5
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/param/LimitNewUpdateParam.java
  5. 3
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/entity/ConfigLimit.java
  6. 10
      sop-admin/sop-admin-vue/src/views/isv/index.vue
  7. 36
      sop-admin/sop-admin-vue/src/views/service/limit/index2.vue
  8. 6
      sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/DefaultLimitConfigManager.java
  9. 24
      sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/zuul/filter/PreLimitFilter.java
  10. 2
      sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/annotation/ApiMapping.java
  11. 4
      sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/bean/ServiceConfig.java
  12. 17
      sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/AlipayServiceConfiguration.java
  13. 66
      sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/param/ApiArgumentResolver.java
  14. 12
      sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/param/SopHandlerMethodArgumentResolver.java
  15. 32
      sop-example/sop-story/sop-story-web/src/main/java/com/gitee/sop/storyweb/controller/StoryController.java
  16. 2
      sop-test/src/test/java/com/gitee/sop/LimitDemoPostTest.java
  17. 95
      sop-test/src/test/java/com/gitee/sop/LimitDemoPostTest2.java
  18. 80
      sop-test/src/test/java/com/gitee/sop/LimitDemoPostTest3.java
  19. 80
      sop-test/src/test/java/com/gitee/sop/LimitDemoPostTest4.java
  20. 80
      sop-test/src/test/java/com/gitee/sop/LimitDemoPostTest5.java
  21. 81
      sop-test/src/test/java/com/gitee/sop/LimitDemoPostTest6.java
  22. 86
      sop.sql

@ -0,0 +1,32 @@
DROP TABLE IF EXISTS `config_limit`;
CREATE TABLE `config_limit` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`route_id` varchar(128) DEFAULT NULL COMMENT '路由id',
`app_key` varchar(128) DEFAULT NULL,
`limit_ip` varchar(300) DEFAULT NULL COMMENT '限流ip,多个用英文逗号隔开',
`service_id` varchar(64) NOT NULL DEFAULT '' COMMENT '服务id',
`limit_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '限流策略,1:漏桶策略,2:令牌桶策略',
`exec_count_per_second` int(11) DEFAULT NULL COMMENT '每秒可处理请求数',
`limit_code` varchar(64) DEFAULT NULL COMMENT '返回的错误码',
`limit_msg` varchar(100) DEFAULT NULL COMMENT '返回的错误信息',
`token_bucket_count` int(11) DEFAULT NULL COMMENT '令牌桶容量',
`limit_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '限流开启状态,1:开启,0关闭',
`order_index` int(11) NOT NULL DEFAULT '0' COMMENT '顺序,值小的优先执行',
`remark` varchar(128) DEFAULT NULL COMMENT '备注',
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='限流配置';
INSERT INTO `config_limit` (`id`, `route_id`, `app_key`, `limit_ip`, `service_id`, `limit_type`, `exec_count_per_second`, `limit_code`, `limit_msg`, `token_bucket_count`, `limit_status`, `order_index`, `remark`, `gmt_create`, `gmt_modified`) VALUES
(1,'alipay.story.get1.0','','192.168.1.1,172.2.2.3','story-service',2,5,'','',6,1,3,NULL,'2019-05-17 19:21:35','2019-05-21 09:12:15'),
(2,'alipay.story.get1.0','2019032617262200001','','story-service',1,5,'service-budy','服务器忙',5,1,0,NULL,'2019-05-17 19:39:30','2019-05-21 15:36:52'),
(3,'alipay.story.find1.0','20190331562013861008375808','','story-service',1,3,'service-busy','服务器忙',5,1,1,NULL,'2019-05-17 20:20:32','2019-05-20 17:40:17'),
(4,'alipay.story.get1.2','','','story-service',2,5,'','',3,1,1,NULL,'2019-05-20 16:27:21','2019-05-21 15:53:10'),
(5,'','20190401562373796095328256','','story-service',1,5,'service-busy','服务器忙',5,1,0,'这个appKey调用很频繁,重点照顾','2019-05-21 15:48:08','2019-05-21 18:45:32'),
(6,'','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,'这个ip在攻击我们','2019-05-21 15:55:33','2019-05-21 18:17:29'),
(7,'story.get1.1','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 16:30:48','2019-05-21 16:30:48'),
(8,'','20190513577548661718777857','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 17:10:45','2019-05-21 17:10:52');

@ -2,6 +2,7 @@ package com.gitee.sop.adminserver.api.service.param;
import com.gitee.easyopen.doc.annotation.ApiDocField;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
@ -59,4 +60,8 @@ public class LimitNewAddParam {
@NotNull(message = "orderIndex不能为空")
@Min(value = 0, message = "orderIndex必须大于等于0")
private Integer orderIndex;
@ApiDocField(description = "备注")
@Length(max = 128, message = "备注不能超过128")
private String remark;
}

@ -3,6 +3,7 @@ package com.gitee.sop.adminserver.api.service.param;
import com.gitee.easyopen.doc.annotation.ApiDocField;
import com.gitee.fastmybatis.core.query.Operator;
import com.gitee.fastmybatis.core.query.annotation.Condition;
import com.gitee.fastmybatis.core.query.param.PageParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -11,7 +12,10 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class LimitNewParam extends ServiceSearchParam {
public class LimitNewParam extends PageParam {
@ApiDocField(description = "服务名serviceId")
private String serviceId;
@ApiDocField(description = "路由id")
@Condition(operator = Operator.like)
private String routeId;

@ -2,6 +2,7 @@ package com.gitee.sop.adminserver.api.service.param;
import com.gitee.easyopen.doc.annotation.ApiDocField;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
@ -64,4 +65,8 @@ public class LimitNewUpdateParam {
@NotNull(message = "orderIndex不能为空")
@Min(value = 0, message = "orderIndex必须大于等于0")
private Integer orderIndex;
@ApiDocField(description = "备注")
@Length(max = 128, message = "备注不能超过128")
private String remark;
}

@ -58,6 +58,9 @@ public class ConfigLimit {
/** 顺序,值小的优先执行, 数据库字段:order_index */
private Integer orderIndex;
/** 备注, 数据库字段:remark */
private String remark;
/** 数据库字段:gmt_create */
private Date gmtCreate;

@ -94,9 +94,9 @@
<el-pagination
background
style="margin-top: 5px"
:current-page="pageInfo.pageIndex"
:current-page="searchFormData.pageIndex"
:page-size="searchFormData.pageSize"
:page-sizes="[5, 10, 20, 40]"
:page-size="pageInfo.pageSize"
:total="pageInfo.total"
layout="total, sizes, prev, pager, next"
@size-change="onSizeChange"
@ -181,12 +181,12 @@ export default {
}
return {
searchFormData: {
appKey: ''
appKey: '',
pageIndex: 1,
pageSize: 10
},
pageInfo: {
list: [],
pageIndex: 1,
pageSize: 10,
total: 0
},
roles: [],

@ -92,6 +92,12 @@
label="排序"
width="80"
/>
<el-table-column
prop="remark"
label="备注"
width="150"
:show-overflow-tooltip="true"
/>
<el-table-column
prop="gmtCreate"
label="创建时间"
@ -115,9 +121,9 @@
<el-pagination
background
style="margin-top: 5px"
:current-page="pageInfo.pageIndex"
:current-page="searchFormData.pageIndex"
:page-size="searchFormData.pageSize"
:page-sizes="[5, 10, 20, 40]"
:page-size="pageInfo.pageSize"
:total="pageInfo.total"
layout="total, sizes, prev, pager, next"
@size-change="onSizeChange"
@ -198,6 +204,9 @@
<el-form-item v-show="isTokenType()" label="令牌桶容量" prop="tokenBucketCount" :rules="isTokenType() ? rulesLimit.tokenBucketCount : []">
<el-input-number v-model="limitDialogFormData.tokenBucketCount" controls-position="right" :min="1" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="limitDialogFormData.remark" type="textarea" :rows="2" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="limitDialogVisible = false"> </el-button>
@ -217,11 +226,12 @@ export default {
treeData: [],
tableData: [],
serviceId: '',
searchFormData: {},
searchFormData: {
pageIndex: 1,
pageSize: 5
},
pageInfo: {
list: [],
pageIndex: 1,
pageSize: 10,
total: 0
},
routeList: [],
@ -245,6 +255,7 @@ export default {
limitStatus: 0, // 0: 1
limitType: 1,
orderIndex: 0,
remark: '',
typeKey: []
},
rulesLimit: {
@ -281,6 +292,9 @@ export default {
],
orderIndex: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
remark: [
{ max: 128, message: '长度不能超过128字符', trigger: 'blur' }
]
}
@ -459,21 +473,19 @@ export default {
limitRender: function(row) {
const html = []
const val = []
html.push('(')
if (row.routeId) {
val.push(row.routeId)
html.push('路由ID')
}
if (row.appKey) {
val.push(' + ' + row.appKey)
html.push(' + AppKey')
val.push(row.appKey)
html.push('AppKey')
}
if (row.limitIp) {
val.push(' + ' + row.limitIp)
html.push(' + IP')
val.push(row.limitIp)
html.push('IP')
}
html.push(')')
return val.join('') + '<br>' + html.join('')
return val.join(' + ') + '<br>(' + html.join(' + ') + ')'
}
}
}

@ -16,6 +16,7 @@ import java.util.concurrent.ConcurrentHashMap;
*/
public class DefaultLimitConfigManager implements LimitConfigManager {
public static final int LIMIT_STATUS_CLOSED = 0;
/**
* key: limitKey
*/
@ -25,9 +26,12 @@ public class DefaultLimitConfigManager implements LimitConfigManager {
@Override
public void update(ConfigLimitDto configLimitDto) {
configLimitDto.initRateLimiter();
Long id = configLimitDto.getId();
this.remove(id);
if (configLimitDto.getLimitStatus().intValue() == LIMIT_STATUS_CLOSED) {
return;
}
configLimitDto.initRateLimiter();
Set<String> keys = this.buildKeys(configLimitDto);
idKeyMap.put(id, keys);
for (String key : keys) {

@ -25,6 +25,9 @@ import java.util.List;
* @author tanghc
*/
public class PreLimitFilter extends BaseZuulFilter {
public static final int LIMIT_STATUS_OPEN = 1;
@Override
protected FilterType getFilterType() {
return FilterType.PRE;
@ -73,20 +76,27 @@ public class PreLimitFilter extends BaseZuulFilter {
String appKey = apiParam.fetchAppKey();
String ip = RequestUtil.getIP(request);
// 最多7种情况
String[] limitKeys = new String[]{
routeId,
appKey,
routeId + appKey,
routeId, // 根据路由ID限流
appKey, // 根据appKey限流
routeId + appKey, // 根据路由ID + appKey限流
ip + routeId,
ip + appKey,
ip + routeId + appKey,
ip, // 根据ip限流
ip + routeId, // 根据ip+路由id限流
ip + appKey, // 根据ip+appKey限流
ip + routeId + appKey, // 根据ip+路由id+appKey限流
};
List<ConfigLimitDto> limitConfigList = new ArrayList<>();
for (String limitKey : limitKeys) {
ConfigLimitDto configLimitDto = limitConfigManager.get(limitKey);
limitConfigList.add(configLimitDto);
if (configLimitDto == null) {
continue;
}
if (configLimitDto.getLimitStatus().intValue() == LIMIT_STATUS_OPEN) {
limitConfigList.add(configLimitDto);
}
}
if (limitConfigList.isEmpty()) {
return null;

@ -59,7 +59,7 @@ public @interface ApiMapping {
@AliasFor(annotation = RequestMapping.class)
RequestMethod[] method() default {RequestMethod.GET, RequestMethod.POST};
RequestMethod[] method() default {};
/**
* Alias for {@link RequestMapping#params}.

@ -3,10 +3,10 @@ package com.gitee.sop.servercommon.bean;
import com.gitee.sop.servercommon.configuration.DefaultGlobalExceptionHandler;
import com.gitee.sop.servercommon.configuration.GlobalExceptionHandler;
import com.gitee.sop.servercommon.param.ApiArgumentResolver;
import com.gitee.sop.servercommon.param.SopHandlerMethodArgumentResolver;
import com.gitee.sop.servercommon.result.DefaultServiceResultBuilder;
import com.gitee.sop.servercommon.result.ServiceResultBuilder;
import lombok.Data;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import java.util.ArrayList;
import java.util.List;
@ -38,7 +38,7 @@ public class ServiceConfig {
/**
* 解析业务参数
*/
private HandlerMethodArgumentResolver methodArgumentResolver = new ApiArgumentResolver();
private SopHandlerMethodArgumentResolver methodArgumentResolver = new ApiArgumentResolver();
/**
* 返回结果处理

@ -1,7 +1,10 @@
package com.gitee.sop.servercommon.configuration;
import com.gitee.sop.servercommon.bean.ServiceConfig;
import com.gitee.sop.servercommon.param.SopHandlerMethodArgumentResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
import java.util.List;
@ -16,9 +19,21 @@ public class AlipayServiceConfiguration extends BaseServiceConfiguration {
ServiceConfig.getInstance().setDefaultVersion("1.0");
}
@Autowired
private RequestMappingHandlerAdapter requestMappingHandlerAdapter;
@Override
protected void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
argumentResolvers.add(ServiceConfig.getInstance().getMethodArgumentResolver());
super.addArgumentResolvers(argumentResolvers);
SopHandlerMethodArgumentResolver sopHandlerMethodArgumentResolver = ServiceConfig.getInstance().getMethodArgumentResolver();
argumentResolvers.add(sopHandlerMethodArgumentResolver);
}
@Override
protected void doAfter() {
super.doAfter();
SopHandlerMethodArgumentResolver sopHandlerMethodArgumentResolver = ServiceConfig.getInstance().getMethodArgumentResolver();
List<HandlerMethodArgumentResolver> defaultArgumentResolvers = requestMappingHandlerAdapter.getArgumentResolvers();
sopHandlerMethodArgumentResolver.setResolvers(defaultArgumentResolvers);
}
}

@ -1,11 +1,9 @@
package com.gitee.sop.servercommon.param;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gitee.sop.servercommon.annotation.ApiAbility;
import com.gitee.sop.servercommon.annotation.ApiMapping;
import com.gitee.sop.servercommon.bean.ParamNames;
import lombok.Data;
import org.springframework.core.MethodParameter;
import org.springframework.util.ReflectionUtils;
import org.springframework.web.bind.support.WebDataBinderFactory;
@ -15,17 +13,29 @@ import org.springframework.web.method.support.ModelAndViewContainer;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.support.StandardMultipartHttpServletRequest;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* 解析request参数中的业务参数绑定到方法参数上
*
* @author tanghc
*/
@Data
public class ApiArgumentResolver implements HandlerMethodArgumentResolver {
public class ApiArgumentResolver implements SopHandlerMethodArgumentResolver {
private ParamValidator paramValidator = new ServiceParamValidator();
private final Map<MethodParameter, HandlerMethodArgumentResolver> argumentResolverCache =
new ConcurrentHashMap<>(256);
private final ParamValidator paramValidator = new ServiceParamValidator();
private List<HandlerMethodArgumentResolver> argumentResolvers = Collections.emptyList();
@Override
public void setResolvers(List<HandlerMethodArgumentResolver> resolvers) {
this.argumentResolvers = resolvers;
}
@Override
public boolean supportsParameter(MethodParameter methodParameter) {
@ -38,13 +48,22 @@ public class ApiArgumentResolver implements HandlerMethodArgumentResolver {
@Override
public Object resolveArgument(MethodParameter methodParameter, ModelAndViewContainer modelAndViewContainer, NativeWebRequest nativeWebRequest, WebDataBinderFactory webDataBinderFactory) throws Exception {
Object paramObj = this.getParamObject(methodParameter, nativeWebRequest);
// JSR-303验证
paramValidator.validateBizParam(paramObj);
return paramObj;
if (paramObj != null) {
// JSR-303验证
paramValidator.validateBizParam(paramObj);
return paramObj;
} else {
HandlerMethodArgumentResolver resolver = getOtherArgumentResolver(methodParameter);
if (resolver != null) {
return resolver.resolveArgument(methodParameter, modelAndViewContainer, nativeWebRequest, webDataBinderFactory);
}
return null;
}
}
/**
* 获取参数对象将request中的参数绑定到实体对象中去
*
* @param methodParameter
* @param nativeWebRequest
* @return
@ -55,17 +74,6 @@ public class ApiArgumentResolver implements HandlerMethodArgumentResolver {
Object bizObj = null;
if (bizContent != null) {
bizObj = JSON.parseObject(bizContent, parameterType);
} else {
Map<String, String[]> parameterMap = nativeWebRequest.getParameterMap();
JSONObject result = new JSONObject();
parameterMap.forEach((key, values) -> {
if (values.length > 0) {
result.put(key, values[0]);
}
});
if (result.size() > 0) {
bizObj = result.toJavaObject(parameterType);
}
}
this.bindUploadFile(bizObj, nativeWebRequest);
return bizObj;
@ -73,7 +81,8 @@ public class ApiArgumentResolver implements HandlerMethodArgumentResolver {
/**
* 将文件绑定到
* @param bizObj 业务参数
*
* @param bizObj 业务参数
* @param nativeWebRequest
*/
protected void bindUploadFile(Object bizObj, NativeWebRequest nativeWebRequest) {
@ -93,4 +102,21 @@ public class ApiArgumentResolver implements HandlerMethodArgumentResolver {
}
}
protected HandlerMethodArgumentResolver getOtherArgumentResolver(MethodParameter parameter) {
HandlerMethodArgumentResolver result = this.argumentResolverCache.get(parameter);
if (result == null) {
for (HandlerMethodArgumentResolver methodArgumentResolver : this.argumentResolvers) {
if (methodArgumentResolver instanceof SopHandlerMethodArgumentResolver) {
continue;
}
if (methodArgumentResolver.supportsParameter(parameter)) {
result = methodArgumentResolver;
this.argumentResolverCache.put(parameter, result);
break;
}
}
}
return result;
}
}

@ -0,0 +1,12 @@
package com.gitee.sop.servercommon.param;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import java.util.List;
/**
* @author tanghc
*/
public interface SopHandlerMethodArgumentResolver extends HandlerMethodArgumentResolver {
void setResolvers(List<HandlerMethodArgumentResolver> resolvers);
}

@ -1,9 +1,11 @@
package com.gitee.sop.storyweb.controller;
import com.gitee.sop.servercommon.annotation.ApiMapping;
import com.gitee.sop.servercommon.annotation.ApiAbility;
import com.gitee.sop.servercommon.annotation.ApiMapping;
import com.gitee.sop.story.api.domain.Story;
import com.gitee.sop.story.api.service.StoryService;
import lombok.Data;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -62,7 +64,7 @@ public class StoryController implements StoryService {
// http://localhost:2222/story/getStory2
// 遗留接口具备开放平台能力
@ApiAbility
@RequestMapping("getStory2")
@GetMapping("getStory2")
public Story getStory2_0() {
Story story = new Story();
story.setId(1);
@ -81,5 +83,31 @@ public class StoryController implements StoryService {
return story;
}
// 测试参数绑定
@ApiAbility
@GetMapping("getStory3")
public Story getStory3(String id) {
System.out.println(id);
Story story = new Story();
story.setId(1);
story.setName("海底小纵队(默认版本号)");
return story;
}
// 测试参数绑定,http://localhost:2222/story/getStory4?biz_content={"id":1, "name":"aaaa"}
@ApiAbility
@GetMapping("getStory4")
public Story getStory4(Story param, P p2) {
System.out.println(param + ", p2=" + p2);
Story story = new Story();
story.setId(1);
story.setName("海底小纵队(默认版本号)");
return story;
}
@Data
public static class P {
private String name;
}
}

@ -12,7 +12,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 限流测试
* 限流测试根据路由id限流
*/
public class LimitDemoPostTest extends TestBase {

@ -0,0 +1,95 @@
package com.gitee.sop;
import com.alibaba.fastjson.JSON;
import com.gitee.sop.alipay.AlipaySignature;
import org.junit.Test;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 限流测试根据路由ID + appKey限流
*/
public class LimitDemoPostTest2 extends TestBase {
String url = "http://localhost:8081/api"; // zuul
// 这个appKey会被限流
String appId = "2019032617262200001";
// 支付宝私钥
String privateKey = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCXJv1pQFqWNA/++OYEV7WYXwexZK/J8LY1OWlP9X0T6wHFOvxNKRvMkJ5544SbgsJpVcvRDPrcxmhPbi/sAhdO4x2PiPKIz9Yni2OtYCCeaiE056B+e1O2jXoLeXbfi9fPivJZkxH/tb4xfLkH3bA8ZAQnQsoXA0SguykMRZntF0TndUfvDrLqwhlR8r5iRdZLB6F8o8qXH6UPDfNEnf/K8wX5T4EB1b8x8QJ7Ua4GcIUqeUxGHdQ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MJxCT1Hi5gwJb+CZF3+IeYqsJk2NF2s0w5WJTE70k1BSvQsfIzAIDz2yE1oPHvwVAoGAA6e+xQkVH4fMEph55RJIZ5goI4Y76BSvt2N5OKZKd4HtaV+eIhM3SDsVYRLIm9ZquJHMiZQGyUGnsvrKL6AAVNK7eQZCRDk9KQz+0GKOGqku0nOZjUbAu6A2/vtXAaAuFSFx1rUQVVjFulLexkXR3KcztL1Qu2k5pB6Si0K/uwQ=";
// 这个appKey不会被限流
String appId2 = "20190401562373672858288128";
// 支付宝私钥
String privateKey2 = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAI6BKjoZ/Azxr6tRPibrWdlrurlwmmMvuW7FAq4m+QyX9DJ1WvNE+KcKHrOqAEkNrthjZfrPlPJOSNi4ORgyt3Idxi8IO4nQ2lE9kxH5AMTvTKn3An6Q6pNrxt6km3HO4JgvEXP7BGwgW3ScjELq20Joz04TD8F+WHCzfFzPDi6pAgMBAAECgYA/zuQ6ieILZbjUDBe5U46yxQMh/6KRoQ/14m81zauckPm+EkA8R3jTSru+lPN1wpO0vqUuLf6ylI0XxT2DcUokOgY07ZdE54pu5XAsyY0eanFwt6C1LrHYpORV3Mp9XuI3fXrxYqVlxLuj1N7MGinXUuW7aZCHaEuSnZ55OL9dkQJBANKOeFiYDISSuIFHSrndSgr+a8E44jS/2/7lE49p5l3WVOFTHh0IZQNTs/IKsKJkUnYDE4W/Ab7NTnWZpXYeM30CQQCtQrtxPEzLl4dtupPOBJJoApj2lq7Q6tIGx178K6wS9Rz3GEvkA7fz1Tpm+nmPZflWZ9mVmEaVuMTMpl3HN/edAkBylyzx8lYltIALg5QskT1hvFNChkW9tYjyMROzIkxIV4Q8WPLzlAT9iYlOOfkld/nU1hnC2VAG2k9P+z2sigU1AkBAl1AptsEqZSMn1RalBy9NdypvQ12IpQIHZOwUNnO/3YEe3P/t0TUSwbs0CMyomOuLOsvy6QHnbypu4Na1HjhBAkAWjtdhuvU15HAa5jMgiUVfQM3YFuz2k3QkRagtZZ33bqnYs4wNxEZqB5t+vEj+8r3fmSN0BpNR1VW71j53Ir0H";
@Test
public void testLimit() throws InterruptedException {
doTest(appId, privateKey);
}
@Test
public void testNotLimit() throws InterruptedException {
doTest(appId2, privateKey2);
}
protected void doTest(String appId, String privateKey) throws InterruptedException {
int threadsCount = 10; // threadsCount个线程同时提交
final CountDownLatch countDownLatch = new CountDownLatch(1);
final CountDownLatch count = new CountDownLatch(threadsCount);
final AtomicInteger success = new AtomicInteger();
for (int i = 0; i < threadsCount; i++) {
new Thread(new Runnable() {
@Override
public void run() {
try {
countDownLatch.await(); // 等在这里,执行countDownLatch.countDown();集体触发
// 业务方法
doBusiness(Thread.currentThread().getName(), appId, privateKey);
success.incrementAndGet();
} catch (Exception e) {
} finally {
count.countDown();
}
}
}).start();
}
countDownLatch.countDown();
count.await();
System.out.println("成功次数:" + success);
}
// 这个请求会路由到story服务
public void doBusiness(String threadName, String appKey, String priKey) throws Exception {
// 公共请求参数
Map<String, String> params = new HashMap<String, String>();
params.put("app_id", appKey);
params.put("method", "alipay.story.get");
params.put("format", "json");
params.put("charset", "utf-8");
params.put("sign_type", "RSA2");
params.put("timestamp", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
params.put("version", "1.0");
// 业务参数
Map<String, String> bizContent = new HashMap<>();
bizContent.put("id", "1");
bizContent.put("name", "葫芦娃");
params.put("biz_content", JSON.toJSONString(bizContent));
String content = AlipaySignature.getSignContent(params);
String sign = AlipaySignature.rsa256Sign(content, priKey, "utf-8");
params.put("sign", sign);
String responseData = post(url, params);// 发送请求
System.out.println(responseData);
}
}

@ -0,0 +1,80 @@
package com.gitee.sop;
import com.alibaba.fastjson.JSON;
import com.gitee.sop.alipay.AlipaySignature;
import org.junit.Test;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 限流测试根据appKey限流
*/
public class LimitDemoPostTest3 extends TestBase {
String url = "http://localhost:8081/api"; // zuul
String appId = "20190401562373796095328256";
// 支付宝私钥
String privateKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJvGfQSfZyPb23yL6bV1Pux4X1dDHdwRqgKVcVOWZzvxjVm5AVvJj31VLC/wlu2kbE+8FJUP1I+ZdY0FEFtIdP6DFK1x1cP1B4PeScYXL/VX7PcTZGP/osiUWaBOUaHV+YSC20+OxRbUOPvTj/J3IivD4IDIAwpDKsWDTBiY1b5RAgMBAAECgYAE27/ycPZKjATgcYyseCeqQGbY1eMMhhCDXB3YuYwmtnXuInMEZdjv08Q5CovqhYJLSlZp/8BlaifcahgEgNIFQXmxAF0U0HsNC6W4Dk1gGgQaVmYaZv5ex7uIcFB1qFvlO60kWf82YeRnO5KsFBODOJ1XSNwqjL2GeLSHBSVyQQJBAOsvDmClBsETSdiNSFMz+D9WCnCh1Ip4AoCzA/yG+PRSwYjZDdceP2DXieiZXPlxTFZ7MIXxAafgeyeQA2hpkQUCQQCpkCUSbrZ+nd4BYdnxZOSf0//cUT0o6+3kROX7gsXV7zRAWWxojT6DkGVlduDLZM/hjWeHRjWUxKC/jgbzvundAkBckhUSrWJPNQxoFJRXS6l3JKLPWqOSLVKu3ce/6lCrurc66lSsS9eegrhhuZwDAzmNAMhEsGx6a72OAP2WZ5cRAkBd8cT4X2qw4BpePa6YdcPNYZHCqSfvgje9XwbkwGGH1A3pESJlEsxt7BShkKmfRu1+E/AmHJoXIJHHT5M+fKnpAkA+VfyAAviKeCwUSq+5oUa0B+ozEA3frp/40cKQP7k02aamocAQCDRaC1ZlWffeQqYMnYe1/Mjr/SdX/Ut3X0CC";
@Test
public void testLimit() throws InterruptedException {
int threadsCount = 10; // threadsCount个线程同时提交
final CountDownLatch countDownLatch = new CountDownLatch(1);
final CountDownLatch count = new CountDownLatch(threadsCount);
final AtomicInteger success = new AtomicInteger();
for (int i = 0; i < threadsCount; i++) {
new Thread(new Runnable() {
@Override
public void run() {
try {
countDownLatch.await(); // 等在这里,执行countDownLatch.countDown();集体触发
// 业务方法
doBusiness(Thread.currentThread().getName());
success.incrementAndGet();
} catch (Exception e) {
} finally {
count.countDown();
}
}
}).start();
}
countDownLatch.countDown();
count.await();
System.out.println("成功次数:" + success);
}
// 这个请求会路由到story服务
public void doBusiness(String threadName) throws Exception {
// 公共请求参数
Map<String, String> params = new HashMap<String, String>();
params.put("app_id", appId);
params.put("method", "alipay.story.get");
params.put("format", "json");
params.put("charset", "utf-8");
params.put("sign_type", "RSA2");
params.put("timestamp", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
params.put("version", "1.2");
// 业务参数
Map<String, String> bizContent = new HashMap<>();
bizContent.put("id", "1");
bizContent.put("name", "葫芦娃");
params.put("biz_content", JSON.toJSONString(bizContent));
String content = AlipaySignature.getSignContent(params);
String sign = AlipaySignature.rsa256Sign(content, privateKey, "utf-8");
params.put("sign", sign);
String responseData = post(url, params);// 发送请求
System.out.println(responseData);
}
}

@ -0,0 +1,80 @@
package com.gitee.sop;
import com.alibaba.fastjson.JSON;
import com.gitee.sop.alipay.AlipaySignature;
import org.junit.Test;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 限流测试根据ip限流
*/
public class LimitDemoPostTest4 extends TestBase {
String url = "http://localhost:8081/api"; // zuul
String appId = "20190513577548661718777856";
// 支付宝私钥
String privateKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ";
@Test
public void testLimit() throws InterruptedException {
int threadsCount = 10; // threadsCount个线程同时提交
final CountDownLatch countDownLatch = new CountDownLatch(1);
final CountDownLatch count = new CountDownLatch(threadsCount);
final AtomicInteger success = new AtomicInteger();
for (int i = 0; i < threadsCount; i++) {
new Thread(new Runnable() {
@Override
public void run() {
try {
countDownLatch.await(); // 等在这里,执行countDownLatch.countDown();集体触发
// 业务方法
doBusiness(Thread.currentThread().getName());
success.incrementAndGet();
} catch (Exception e) {
} finally {
count.countDown();
}
}
}).start();
}
countDownLatch.countDown();
count.await();
System.out.println("成功次数:" + success);
}
// 这个请求会路由到story服务
public void doBusiness(String threadName) throws Exception {
// 公共请求参数
Map<String, String> params = new HashMap<String, String>();
params.put("app_id", appId);
params.put("method", "story.get");
params.put("format", "json");
params.put("charset", "utf-8");
params.put("sign_type", "RSA2");
params.put("timestamp", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
params.put("version", "1.0");
// 业务参数
Map<String, String> bizContent = new HashMap<>();
bizContent.put("id", "1");
bizContent.put("name", "葫芦娃");
params.put("biz_content", JSON.toJSONString(bizContent));
String content = AlipaySignature.getSignContent(params);
String sign = AlipaySignature.rsa256Sign(content, privateKey, "utf-8");
params.put("sign", sign);
String responseData = post(url, params);// 发送请求
System.out.println(responseData);
}
}

@ -0,0 +1,80 @@
package com.gitee.sop;
import com.alibaba.fastjson.JSON;
import com.gitee.sop.alipay.AlipaySignature;
import org.junit.Test;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 限流测试根据ip + 路由id限流
*/
public class LimitDemoPostTest5 extends TestBase {
String url = "http://localhost:8081/api"; // zuul
String appId = "20190513577548661718777856";
// 支付宝私钥
String privateKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ";
@Test
public void testLimit() throws InterruptedException {
int threadsCount = 10; // threadsCount个线程同时提交
final CountDownLatch countDownLatch = new CountDownLatch(1);
final CountDownLatch count = new CountDownLatch(threadsCount);
final AtomicInteger success = new AtomicInteger();
for (int i = 0; i < threadsCount; i++) {
new Thread(new Runnable() {
@Override
public void run() {
try {
countDownLatch.await(); // 等在这里,执行countDownLatch.countDown();集体触发
// 业务方法
doBusiness(Thread.currentThread().getName());
success.incrementAndGet();
} catch (Exception e) {
} finally {
count.countDown();
}
}
}).start();
}
countDownLatch.countDown();
count.await();
System.out.println("成功次数:" + success);
}
// 这个请求会路由到story服务
public void doBusiness(String threadName) throws Exception {
// 公共请求参数
Map<String, String> params = new HashMap<String, String>();
params.put("app_id", appId);
params.put("method", "story.get");
params.put("format", "json");
params.put("charset", "utf-8");
params.put("sign_type", "RSA2");
params.put("timestamp", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
params.put("version", "1.1");
// 业务参数
Map<String, String> bizContent = new HashMap<>();
bizContent.put("id", "1");
bizContent.put("name", "葫芦娃");
params.put("biz_content", JSON.toJSONString(bizContent));
String content = AlipaySignature.getSignContent(params);
String sign = AlipaySignature.rsa256Sign(content, privateKey, "utf-8");
params.put("sign", sign);
String responseData = post(url, params);// 发送请求
System.out.println(responseData);
}
}

@ -0,0 +1,81 @@
package com.gitee.sop;
import com.alibaba.fastjson.JSON;
import com.gitee.sop.alipay.AlipaySignature;
import org.junit.Test;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 限流测试根据ip + appKey限流
* 这条规则实际没什么用因为确定了appKeyip也就不重要了这里作为测试演示一下
*/
public class LimitDemoPostTest6 extends TestBase {
String url = "http://localhost:8081/api"; // zuul
String appId = "20190513577548661718777857";
// 支付宝私钥
String privateKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ";
@Test
public void testLimit() throws InterruptedException {
int threadsCount = 10; // threadsCount个线程同时提交
final CountDownLatch countDownLatch = new CountDownLatch(1);
final CountDownLatch count = new CountDownLatch(threadsCount);
final AtomicInteger success = new AtomicInteger();
for (int i = 0; i < threadsCount; i++) {
new Thread(new Runnable() {
@Override
public void run() {
try {
countDownLatch.await(); // 等在这里,执行countDownLatch.countDown();集体触发
// 业务方法
doBusiness(Thread.currentThread().getName());
success.incrementAndGet();
} catch (Exception e) {
} finally {
count.countDown();
}
}
}).start();
}
countDownLatch.countDown();
count.await();
System.out.println("成功次数:" + success);
}
// 这个请求会路由到story服务
public void doBusiness(String threadName) throws Exception {
// 公共请求参数
Map<String, String> params = new HashMap<String, String>();
params.put("app_id", appId);
params.put("method", "story.get");
params.put("format", "json");
params.put("charset", "utf-8");
params.put("sign_type", "RSA2");
params.put("timestamp", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
params.put("version", "1.1");
// 业务参数
Map<String, String> bizContent = new HashMap<>();
bizContent.put("id", "1");
bizContent.put("name", "葫芦娃");
params.put("biz_content", JSON.toJSONString(bizContent));
String content = AlipaySignature.getSignContent(params);
String sign = AlipaySignature.rsa256Sign(content, privateKey, "utf-8");
params.put("sign", sign);
String responseData = post(url, params);// 发送请求
System.out.println(responseData);
}
}

@ -1,22 +1,17 @@
CREATE DATABASE IF NOT EXISTS `sop` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
USE `sop`;
SET @PREVIOUS_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS;
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `user_info`;
DROP TABLE IF EXISTS `perm_role_permission`;
DROP TABLE IF EXISTS `perm_role`;
DROP TABLE IF EXISTS `perm_isv_role`;
DROP TABLE IF EXISTS `isv_info`;
DROP TABLE IF EXISTS `config_route_limit`;
DROP TABLE IF EXISTS `config_route_base`;
DROP TABLE IF EXISTS `config_limit`;
DROP TABLE IF EXISTS `admin_user_info`;
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `admin_user_info` (
@ -31,6 +26,26 @@ CREATE TABLE `admin_user_info` (
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='后台用户表';
CREATE TABLE `config_limit` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`route_id` varchar(128) DEFAULT NULL COMMENT '路由id',
`app_key` varchar(128) DEFAULT NULL,
`limit_ip` varchar(300) DEFAULT NULL COMMENT '限流ip,多个用英文逗号隔开',
`service_id` varchar(64) NOT NULL DEFAULT '' COMMENT '服务id',
`limit_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '限流策略,1:漏桶策略,2:令牌桶策略',
`exec_count_per_second` int(11) DEFAULT NULL COMMENT '每秒可处理请求数',
`limit_code` varchar(64) DEFAULT NULL COMMENT '返回的错误码',
`limit_msg` varchar(100) DEFAULT NULL COMMENT '返回的错误信息',
`token_bucket_count` int(11) DEFAULT NULL COMMENT '令牌桶容量',
`limit_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '限流开启状态,1:开启,0关闭',
`order_index` int(11) NOT NULL DEFAULT '0' COMMENT '顺序,值小的优先执行',
`remark` varchar(128) DEFAULT NULL COMMENT '备注',
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='限流配置';
CREATE TABLE `config_route_base` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`route_id` varchar(64) NOT NULL DEFAULT '' COMMENT '路由id',
@ -39,7 +54,7 @@ CREATE TABLE `config_route_base` (
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_routeid` (`route_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='路由配置表';
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='路由配置表';
CREATE TABLE `config_route_limit` (
@ -56,7 +71,7 @@ CREATE TABLE `config_route_limit` (
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_routeid` (`route_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='路由限流配置';
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='路由限流配置';
CREATE TABLE `isv_info` (
@ -71,7 +86,7 @@ CREATE TABLE `isv_info` (
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_app_key` (`app_key`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='isv信息表';
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='isv信息表';
CREATE TABLE `perm_isv_role` (
@ -82,7 +97,7 @@ CREATE TABLE `perm_isv_role` (
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_user_role` (`isv_id`,`role_code`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COMMENT='isv角色';
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COMMENT='isv角色';
CREATE TABLE `perm_role` (
@ -104,7 +119,7 @@ CREATE TABLE `perm_role_permission` (
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_role_perm` (`role_code`,`route_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='角色权限表';
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COMMENT='角色权限表';
CREATE TABLE `user_info` (
@ -118,6 +133,9 @@ CREATE TABLE `user_info` (
KEY `idx_unamepwd` (`username`,`password`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户信息表';
SET FOREIGN_KEY_CHECKS = @PREVIOUS_FOREIGN_KEY_CHECKS;
@ -133,6 +151,21 @@ ALTER TABLE `admin_user_info` ENABLE KEYS;
UNLOCK TABLES;
LOCK TABLES `config_limit` WRITE;
ALTER TABLE `config_limit` DISABLE KEYS;
INSERT INTO `config_limit` (`id`, `route_id`, `app_key`, `limit_ip`, `service_id`, `limit_type`, `exec_count_per_second`, `limit_code`, `limit_msg`, `token_bucket_count`, `limit_status`, `order_index`, `remark`, `gmt_create`, `gmt_modified`) VALUES
(1,'alipay.story.get1.0','','192.168.1.1,172.2.2.3','story-service',2,5,'','',6,1,3,NULL,'2019-05-17 19:21:35','2019-05-21 09:12:15'),
(2,'alipay.story.get1.0','2019032617262200001','','story-service',1,5,'service-budy','服务器忙',5,1,0,NULL,'2019-05-17 19:39:30','2019-05-21 15:36:52'),
(3,'alipay.story.find1.0','20190331562013861008375808','','story-service',1,3,'service-busy','服务器忙',5,1,1,NULL,'2019-05-17 20:20:32','2019-05-20 17:40:17'),
(4,'alipay.story.get1.2','','','story-service',2,5,'','',3,1,1,NULL,'2019-05-20 16:27:21','2019-05-21 15:53:10'),
(5,'','20190401562373796095328256','','story-service',1,5,'service-busy','服务器忙',5,1,0,'这个appKey调用很频繁,重点照顾','2019-05-21 15:48:08','2019-05-21 18:45:32'),
(6,'','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,'这个ip在攻击我们','2019-05-21 15:55:33','2019-05-21 18:17:29'),
(7,'story.get1.1','','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 16:30:48','2019-05-21 16:30:48'),
(8,'','20190513577548661718777857','10.1.30.54','story-service',1,5,'service-busy','服务器忙',5,1,0,NULL,'2019-05-21 17:10:45','2019-05-21 17:10:52');
ALTER TABLE `config_limit` ENABLE KEYS;
UNLOCK TABLES;
LOCK TABLES `config_route_base` WRITE;
ALTER TABLE `config_route_base` DISABLE KEYS;
INSERT INTO `config_route_base` (`id`, `route_id`, `status`, `gmt_create`, `gmt_modified`) VALUES
@ -140,7 +173,10 @@ INSERT INTO `config_route_base` (`id`, `route_id`, `status`, `gmt_create`, `gmt_
(2,'alipay.story.get1.0',1,'2019-04-09 19:19:57','2019-04-19 14:45:33'),
(3,'alipay.story.find1.0',1,'2019-04-11 09:29:55','2019-04-11 09:35:02'),
(4,'alipay.book.story.get1.0',1,'2019-04-16 10:23:44','2019-04-16 10:23:44'),
(5,'spirngmvc.goods.get1.0',2,'2019-04-16 10:24:08','2019-04-16 10:24:08');
(5,'spirngmvc.goods.get1.0',2,'2019-04-16 10:24:08','2019-04-16 10:24:08'),
(6,'alipay.category.get1.0',1,'2019-05-06 16:50:39','2019-05-20 17:01:48'),
(7,'permission.story.get1.0',1,'2019-05-06 20:03:17','2019-05-06 20:03:21'),
(8,'goods.add1.0',1,'2019-05-13 17:23:00','2019-05-13 17:23:11');
ALTER TABLE `config_route_base` ENABLE KEYS;
UNLOCK TABLES;
@ -150,7 +186,8 @@ ALTER TABLE `config_route_limit` DISABLE KEYS;
INSERT INTO `config_route_limit` (`id`, `route_id`, `service_id`, `limit_type`, `exec_count_per_second`, `limit_code`, `limit_msg`, `token_bucket_count`, `limit_status`, `gmt_create`, `gmt_modified`) VALUES
(1,'alipay.story.find1.0','story-service',1,10,'isp.service-busy','服务器正忙',NULL,1,'2019-04-10 20:55:08','2019-04-10 21:04:35'),
(2,'alipay.story.get1.0','story-service',2,5,'isp.service-busy','服务器正忙',5,0,'2019-04-10 21:05:51','2019-04-11 18:18:03'),
(3,'alipay.story.get1.2','story-service',2,10,'isp.service-busy','服务器正忙',3,1,'2019-04-11 17:26:04','2019-04-11 18:19:33');
(3,'alipay.story.get1.2','story-service',2,10,'isp.service-busy','服务器正忙',3,1,'2019-04-11 17:26:04','2019-04-11 18:19:33'),
(4,'alipay.category.get1.0','story-service',1,5,'error-code','服务器忙',5,1,'2019-05-07 12:22:04','2019-05-07 12:25:06');
ALTER TABLE `config_route_limit` ENABLE KEYS;
UNLOCK TABLES;
@ -158,14 +195,16 @@ UNLOCK TABLES;
LOCK TABLES `isv_info` WRITE;
ALTER TABLE `isv_info` DISABLE KEYS;
INSERT INTO `isv_info` (`id`, `app_key`, `secret`, `pub_key`, `pri_key`, `status`, `sign_type`, `gmt_create`, `gmt_modified`) VALUES
(1,'2019032617262200001','','MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlyb9aUBaljQP/vjmBFe1mF8HsWSvyfC2NTlpT/V9E+sBxTr8TSkbzJCeeeOEm4LCaVXL0Qz63MZoT24v7AIXTuMdj4jyiM/WJ4tjrWAgnmohNOegfntTto16C3l234vXz4ryWZMR/7W+MXy5B92wPGQEJ0LKFwNEoLspDEWZ7RdE53VH7w6y6sIZUfK+YkXWSwehfKPKlx+lDw3zRJ3/yvMF+U+BAdW/MfECe1GuBnCFKnlMRh3UKczWyXWkL6ItOpYHHJi/jx85op5BWDje2pY9QowzfN94+0DB3T7UvZeweu3zlP6diwAJDzLaFQX8ULfWhY+wfKxIRgs9NoiSAQIDAQAB','MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCXJv1pQFqWNA/++OYEV7WYXwexZK/J8LY1OWlP9X0T6wHFOvxNKRvMkJ5544SbgsJpVcvRDPrcxmhPbi/sAhdO4x2PiPKIz9Yni2OtYCCeaiE056B+e1O2jXoLeXbfi9fPivJZkxH/tb4xfLkH3bA8ZAQn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NwWosHSe+d2WWXt8IZBhO9d6dn0f7ORvcjmCqNKTNGgrkewMZEuVcliueJquR47IROdY8qmwqcBAN7Vg2K7r7CPlTKAWTRYMJxCT1Hi5gwJb+CZF3+IeYqsJk2NF2s0w5WJTE70k1BSvQsfIzAIDz2yE1oPHvwVAoGAA6e+xQkVH4fMEph55RJIZ5goI4Y76BSvt2N5OKZKd4HtaV+eIhM3SDsVYRLIm9ZquJHMiZQGyUGnsvrKL6AAVNK7eQZCRDk9KQz+0GKOGqku0nOZjUbAu6A2/vtXAaAuFSFx1rUQVVjFulLexkXR3KcztL1Qu2k5pB6Si0K/uwQ=',1,1,'2019-03-27 10:10:34','2019-04-19 19:21:40'),
(3,'asdfasdf','','333','4444',2,1,'2019-03-27 11:01:11','2019-04-14 23:30:17'),
(1,'2019032617262200001','','MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlyb9aUBaljQP/vjmBFe1mF8HsWSvyfC2NTlpT/V9E+sBxTr8TSkbzJCeeeOEm4LCaVXL0Qz63MZoT24v7AIXTuMdj4jyiM/WJ4tjrWAgnmohNOegfntTto16C3l234vXz4ryWZMR/7W+MXy5B92wPGQEJ0LKFwNEoLspDEWZ7RdE53VH7w6y6sIZUfK+YkXWSwehfKPKlx+lDw3zRJ3/yvMF+U+BAdW/MfECe1GuBnCFKnlMRh3UKczWyXWkL6ItOpYHHJi/jx85op5BWDje2pY9QowzfN94+0DB3T7UvZeweu3zlP6diwAJDzLaFQX8ULfWhY+wfKxIRgs9NoiSAQIDAQAB','MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCXJv1pQFqWNA/++OYEV7WYXwexZK/J8LY1OWlP9X0T6wHFOvxNKRvMkJ5544SbgsJpVcvRDPrcxmhPbi/sAhdO4x2PiPKIz9Yni2OtYCCeaiE056B+e1O2jXoLeXbfi9fPivJZkxH/tb4xfLkH3bA8ZAQnQsoXA0SguykMRZntF0TndUfvDrLqwhlR8r5i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UreLH8hfVUtyiY/KgUz+R5foJDNXD7TLE9CDoPSHy09qBe99HyVCZg/gNJH4O+tNr6C4916dYaVk01AkBYZ2HOEc8ZmeOaty/zJHtfm9zbqykgi6upwISNINV8Z4bxfHJdO7bKeVANFBBf7a/aFmqXX/EmjxYJioW03o6dAkEAp7ViXJCtJpNU1pNSFZ2hgvmxtSu7zuyVWKSrw8rjYiuI5eRUe13RXsCHgzQB+Ra5exdyEsUGCaL+yosPD73RmQJBALGuM8EQUcBgrpgpeLZ39Ni1DYXYG9aj+u+ar/UL6kI1mCNFgwroO4EVIvXPVxikMxUgiE2tVaBML5nm8VDNJ7s=',2,1,'2019-03-27 11:01:11','2019-05-11 10:45:01'),
(5,'20190331562013861008375808','29864b93427447f5ac6c44df746f84ef','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4aMIx2q8rCVu5z6dgNQQSX2vwhvIcRb7FaqSk0ZK8AV9qQeE1TvfFVlAzOHlysE1yTRb0Mb6W2aw7IAS7Bkc3onYBQR4zNQYjYoDBzLukjF8o84hoVFRnh7sV8zszid2vb5H/YQr3M+5sYhlXY8KfILk3vhdbWpHM/umplcrxlwIDAQAB','MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBALhowjHarysJW7nPp2A1BBJfa/CG8hxFvsVqpKTRkrwBX2pB4TVO98VWUDM4eXKwTXJNFvQxvpbZrDsgBLsGRzeidgFBHjM1BiNigMHMu6SMXyjziGhUVGeHuxXzOzOJ3a9vkf9hCvcz7mxiGVdjwp8guTe+F1takcz+6amVyvGXAgMBAAECgYBj40LFVGoryp7n0CYeg7kX5p4GJGKCk/jY4IIcUPTFZ4zydorxoDuvpag9hmqqh/r7XeyAC23sMi4LvLUzRRxPh+7PuwL6nLce7vytsMCZQTPpBgz7dUfbi2HAxsuMOLjH3sVGycutARJsz6bT+9PyBEuVtUqwBrDGpFvwT0z6yQJBAOANC8nysb+O4rn/fbJtHIhtQoV74yu00mLnfwv8/J1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YpIzUUaLj0+qEQBsPKLPSp8MECQQDY3A9Z+i19fPpd5hBl5x7cyzx9KeX2aru0kUMMmm3JeL1dSPSUuqmnTFdtveQrIUab9OYdJgxLtKoh3J8YqDqFAkEAuJ9jn1VNCIpXF8xsI4w1U5QFdXKnGGZ8PePHqWG1B8A9afj2o7T6gDW/xzX/k8g/2belAR3y4nXGo0EikMso8QJBANXWqYygFZtYUcmlwyW48cXm4o7Jcem69bzoQKV84iV42cHS3tqJ9iDyNoQQa53cAjRnGUJE8nr0e49IbdlyicECQQCz8vdhJ/1ro5t8IM4OX+ziR9aCQXxItivHDytfF1Mh+OhjUDzmF9JKARmqDCHOY1KI3QzBZ/WDcZRpL2WHh92hAkEAyetUnYn1F5zVJWxo+yC9PH6WYssZahNy22GdBcZblmDc/YQWw+sa9d55/5aMoYWn6AVO9Tb2gsMW2W0jM2/zCw==',2,2,'2019-03-31 22:07:20','2019-04-19 17:30:09'),
(6,'20190331562037310372184064','d6b2a6603236491f87eed958292be136','','',2,2,'2019-03-31 22:07:20','2019-05-07 18:14:53'),
(7,'20190401562373672858288128','','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCOgSo6GfwM8a+rUT4m61nZa7q5cJpjL7luxQKuJvkMl/QydVrzRPinCh6zqgBJDa7YY2X6z5TyTkjYuDkYMrdyHcYvCDuJ0NpRPZMR+QDE70yp9wJ+kOqTa8bepJtxzuCYLxFz+wRsIFt0nIxC6ttCaM9OEw/Bflhws3xczw4uqQIDAQAB','MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAI6BKjoZ/Azxr6tRPibrWdlrurlwmmMvuW7FAq4m+QyX9DJ1WvNE+KcKHrOqAEkNrthjZfrPlPJOSNi4ORgyt3Idxi8IO4nQ2lE9kxH5AMTvTKn3An6Q6pNrxt6km3HO4JgvEXP7BGwgW3ScjELq20Joz04TD8F+WHCzfFzPDi6pAgMBAAECgYA/zuQ6ieILZbjUDBe5U46yxQMh/6KR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ybJaoTqky8ttQ2Jy8UZ4VSVQhVC0My02sCWwWXLlXi8y7An+Rec73Ve0yxREOn5WrQT6pkmzh7V/ABWrYi5WxODpCIjtSbo0fLBa3Wqle00b0/hdCITetqIa/cFs1zUrOqICgK3bKWeXqiAkhhcwSZwwSgwOKM04Wn7ZUCgYBvhHX2mbdVJfyJ8kc+hMOE/E9RHRxiBVEXWHJlGi8PVCqNDq8qHr4g7Mdbzprig+s0yKblwHAvrpkseWvKHiZEjVTyDipHgShY4TGXEigVvUd37uppTrLi8xpYcJjS9gH/px7VCdiq1d+q/MJP6coJ1KphgATm2UrgDMYNBWaYWQKBgEHRxrmER7btUF60/YgcqPHFc8RpYQB2ZZE0kyKGDqk2Data1XYUY6vsPAU28yRLAaWr/D2H17iyLkxP80VLm6QhifxCadv90Q/Wl1DFfOJQMW6avyQ0so6G0wFq/LJxaFK4iLXQn1RJnmTp6BYiJMmK2BhFbRzw8ssMoF6ad2rr',1,1,'2019-04-03 19:54:05','2019-04-03 20:11:58'),
(10,'easyopen_test','G9w0BAQEFAAOCAQ8AMIIBCgKCA','','',1,2,'2019-04-19 17:19:34','2019-04-19 17:30:09');
(10,'easyopen_test','G9w0BAQEFAAOCAQ8AMIIBCgKCA','','',1,2,'2019-04-19 17:19:34','2019-04-19 17:30:09'),
(11,'20190513577548661718777856','','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdGjz3IE2VQteDjQaFacXLCAIqdEIIVcf7LW7f142V55Q0xtcjDTOHjBHExZsG64/Y5WKz4oQVWGnXwtrled8Qg0YAA7ueat8mE8NzJSm9txbfU9hwXB77nJxVkFyaSG1p0IZFrNQpbbUxTX9755deP7DdcSF148LLr091V++S3QIDAQAB','MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ',1,1,'2019-05-13 17:24:17','2019-05-13 17:24:17'),
(12,'20190513577548661718777857','','MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdGjz3IE2VQteDjQaFacXLCAIqdEIIVcf7LW7f142V55Q0xtcjDTOHjBHExZsG64/Y5WKz4oQVWGnXwtrled8Qg0YAA7ueat8mE8NzJSm9txbfU9hwXB77nJxVkFyaSG1p0IZFrNQpbbUxTX9755deP7DdcSF148LLr091V++S3QIDAQAB','MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJ0aPPcgTZVC14ONBoVpxcsIAip0QghVx/stbt/XjZXnlDTG1yMNM4eMEcTFmwbrj9jlYrPihBVYadfC2uV53xCDRgADu55q3yYTw3MlKb23Ft9T2HBcHvucnFWQXJpIbWnQhkWs1ClttTFNf3vnl14/sN1xIXXjwsuvT3VX75LdAgMBAAECgYB68z/nQDa3q/oykDocS21qujfHtfi/wTKjVylAsdezC+wnab6RRhGf8XUuhGARiGWpn8whcBNjCTC8lVju4vQ5IIx4Hb74vwDDMtNXeqwkLmARLYu2ELibauezSeqom8/J8cR3ho7Hr4VHPTiC8qvePRmu8AvXVQz2T7SOhEjDGQJBAOm8XOivr+atiknLbQhmo508ON3sjoN9VMwK9cmnup+ZPCsurJTHRja0MJQNdOXObUVJ6wJhs1PHWT+vITfXGJ8CQQCsESzxOYTkZaqBUFjbWVf1rSwjOOsylweTuq44YIJkHhwMjHf3kN/UTXbxsBPUGeT7/+2K5UwQ9snUPr0yTBcDAkA0FMezBWqxgNu+g7iA1bYBVCjrskkzHVsmuA56Z4hbBZ71lEnaQOjxSYdFhhYVGsEYXlciSbjWoyXM3e4N7jzLAkB0ejv+H33CTsAZQZalBdnxSQTz4vf0CyDp9BkzuMELnQZHyF79i2i5gqbd/N+vWMgVfq4CtC3F3gnKT54rii6ZAkAMBIvHriT5Zbs1fW+oxBP1rHqdsRvqs1zEyIadvJgKAFwFEisryfdw2mWm3vxQQ22RlOquBiZEDIlyM0z2m9PJ',1,1,'2019-05-13 17:24:17','2019-05-13 17:24:17');
ALTER TABLE `isv_info` ENABLE KEYS;
UNLOCK TABLES;
@ -173,14 +212,14 @@ UNLOCK TABLES;
LOCK TABLES `perm_isv_role` WRITE;
ALTER TABLE `perm_isv_role` DISABLE KEYS;
INSERT INTO `perm_isv_role` (`id`, `isv_id`, `role_code`, `gmt_create`, `gmt_modified`) VALUES
(16,6,'normal','2019-03-31 22:07:26','2019-03-31 22:07:26'),
(17,6,'vip','2019-03-31 22:07:26','2019-03-31 22:07:26'),
(18,5,'normal','2019-03-31 22:07:50','2019-03-31 22:07:50'),
(32,7,'normal','2019-04-01 20:27:33','2019-04-01 20:27:33'),
(36,9,'normal','2019-04-03 20:11:58','2019-04-03 20:11:58'),
(37,10,'normal','2019-04-19 17:19:34','2019-04-19 17:19:34'),
(38,10,'vip','2019-04-19 17:19:34','2019-04-19 17:19:34'),
(40,1,'normal','2019-04-19 19:21:40','2019-04-19 19:21:40');
(52,6,'normal','2019-05-07 18:14:53','2019-05-07 18:14:53'),
(57,1,'normal','2019-05-09 11:10:38','2019-05-09 11:10:38'),
(58,11,'normal','2019-05-13 17:24:17','2019-05-13 17:24:17');
ALTER TABLE `perm_isv_role` ENABLE KEYS;
UNLOCK TABLES;
@ -197,10 +236,11 @@ UNLOCK TABLES;
LOCK TABLES `perm_role_permission` WRITE;
ALTER TABLE `perm_role_permission` DISABLE KEYS;
INSERT INTO `perm_role_permission` (`id`, `role_code`, `route_id`, `gmt_create`, `gmt_modified`) VALUES
(15,'normal','permission.story.get1.0','2019-04-19 19:17:39','2019-04-19 19:17:39');
(29,'normal','permission.story.get1.0','2019-05-06 18:29:16','2019-05-06 18:29:16');
ALTER TABLE `perm_role_permission` ENABLE KEYS;
UNLOCK TABLES;
LOCK TABLES `user_info` WRITE;
ALTER TABLE `user_info` DISABLE KEYS;
INSERT INTO `user_info` (`id`, `username`, `password`, `nickname`, `gmt_create`, `gmt_modified`) VALUES
@ -209,6 +249,8 @@ ALTER TABLE `user_info` ENABLE KEYS;
UNLOCK TABLES;
SET FOREIGN_KEY_CHECKS = @PREVIOUS_FOREIGN_KEY_CHECKS;

Loading…
Cancel
Save