Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
ed4bb8d71f
|
@ -13,6 +13,7 @@ import io.renren.common.validator.group.UpdateGroup;
|
|||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.processForm.excel.TAbilityApplicationExcel;
|
||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||
import io.renren.modules.security.user.SecurityUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
@ -69,6 +70,8 @@ public class TAbilityApplicationController {
|
|||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
|
||||
dto.setId(SecurityUser.getUserId());
|
||||
|
||||
tAbilityApplicationService.save(dto);
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
|
|
@ -68,7 +68,7 @@ public class ApiGatewayService {
|
|||
}
|
||||
|
||||
//建路由(接口url)
|
||||
String routeUrl = gatewayUrl + "/apisix/admin/routes";
|
||||
String routeUrl = gatewayUrl + "apiops/api/routers";
|
||||
HashMap routeEntity = new HashMap();
|
||||
routeEntity.put("name", "api:1:" + resourceEntity.getName());
|
||||
routeEntity.put("group", id);
|
||||
|
@ -83,7 +83,7 @@ public class ApiGatewayService {
|
|||
LambdaUpdateWrapper<ResourceEntity> updateWrapper = new UpdateWrapper<ResourceEntity>().lambda();
|
||||
updateWrapper.eq(ResourceEntity::getId, resourceEntity.getId());
|
||||
updateWrapper.set(ResourceEntity::getGroupId, id);
|
||||
resourceDao.update(resourceEntity, updateWrapper);
|
||||
resourceDao.update(null, updateWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,13 +27,13 @@ spring:
|
|||
initial-size: 10
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
max-wait: 6000
|
||||
max-wait: 10
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
#Oracle需要打开注释
|
||||
# validation-query: SELECT 1 FROM DUAL
|
||||
validation-query: SELECT 1
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
|
@ -61,6 +61,10 @@ big_date:
|
|||
name: 青岛市大数据发展管理局
|
||||
assignee_role_name: 部门审批人
|
||||
|
||||
hisense:
|
||||
gateway:
|
||||
url: http://devtest-security-app.hismarttv.com:8080
|
||||
|
||||
|
||||
##多数据源的配置,需要引用renren-dynamic-datasource
|
||||
#dynamic:
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package io.renren;
|
||||
|
||||
import io.renren.common.redis.RedisUtils;
|
||||
import io.renren.modules.processForm.service.ApiGatewayService;
|
||||
import io.renren.modules.sys.entity.SysUserEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class ApiGatewayServiceTest {
|
||||
@Autowired
|
||||
private ApiGatewayService apiGatewayService;
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
apiGatewayService.registerApi2Gateway("1519505145602723841");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue