|
|
|
@ -1,31 +1,25 @@
|
|
|
|
|
package cn.estsh.i3plus.core.apiservice.controller;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.core.apiservice.schedulejob.CoreLogClearJob;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.util.PlatformConstWords;
|
|
|
|
|
import cn.estsh.i3plus.platform.plugin.elasticsearch.ElasticSearchPack;
|
|
|
|
|
import cn.estsh.i3plus.platform.plugin.elasticsearch.ElasticSearchTool;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.jpa.factory.BaseRepositoryFactoryBean;
|
|
|
|
|
import cn.estsh.i3plus.pojo.model.license.ImppLicense;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.repository.SysUserRepository;
|
|
|
|
|
import cn.estsh.impp.framework.boot.license.ImppLicenseTool;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.model.license.ImppLicense;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.platbean.SysLogOperate;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.repository.SysUserRepository;
|
|
|
|
|
import cn.estsh.impp.framework.base.controller.CoreBaseController;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
|
import cn.estsh.impp.framework.boot.license.ImppLicenseTool;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
|
|
|
import org.apache.poi.ss.formula.functions.T;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.core.ResolvableType;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import java.lang.reflect.ParameterizedType;
|
|
|
|
|
import java.lang.reflect.Type;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -37,7 +31,7 @@ import java.util.List;
|
|
|
|
|
**/
|
|
|
|
|
@RestController
|
|
|
|
|
@Api(tags = "测试Demo ")
|
|
|
|
|
@RequestMapping(PlatformConstWords.BASE_URL + "/demo")
|
|
|
|
|
@RequestMapping("/impp/demo")
|
|
|
|
|
public class DemoController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@ -46,6 +40,7 @@ public class DemoController extends CoreBaseController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private SysUserRepository repository;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/query")
|
|
|
|
|
@ApiOperation(value = "添加操作日志", notes = "添加操作日志,可用于国际化")
|
|
|
|
|
public ResultBean insertLogOperate() {
|
|
|
|
@ -113,6 +108,23 @@ public class DemoController extends CoreBaseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @GetMapping(value = "/rabbitmq")
|
|
|
|
|
// @ApiOperation(value = "repository 测试")
|
|
|
|
|
// public ResultBean imppChannel() {
|
|
|
|
|
// try{
|
|
|
|
|
//
|
|
|
|
|
// String message = ImppSystemTool.getServerHost() + ":" + ImppSystemTool.getServerPort()
|
|
|
|
|
// + ":" + ImppSystemTool.getServerPid() + "Hello ->" + System.currentTimeMillis();
|
|
|
|
|
// mqChannel.putMessage(message);
|
|
|
|
|
// Thread.sleep(100);
|
|
|
|
|
// return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
// } catch (ImppBusiException busExcep) {
|
|
|
|
|
// return ResultBean.fail(busExcep).build();
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args)throws Exception {
|
|
|
|
|
ResolvableType resolvableType = ResolvableType.forClass(SysUserRepository.class).as(SysUserRepository.class);
|
|
|
|
|
System.out.println(resolvableType.getGeneric(0));//User
|
|
|
|
@ -121,4 +133,5 @@ public class DemoController extends CoreBaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|