|
|
|
@ -7,6 +7,7 @@ import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.platbean.SysLogOperate;
|
|
|
|
|
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.exception.ImppExceptionEnum;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
@ -41,11 +42,9 @@ public class DemoMongoController extends CoreBaseController{
|
|
|
|
|
logOperateService.insertSysLogOperate(logOperate);
|
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
return ResultBean.fail(busExcep).build();
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
LOGGER.error(e.getMessage(),e);
|
|
|
|
|
return ResultBean.fail(e.getMessage()).setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -60,7 +59,6 @@ public class DemoMongoController extends CoreBaseController{
|
|
|
|
|
logOperateService.deleteSysLogOperateById(Long.parseLong(id));
|
|
|
|
|
return ResultBean.success("删除日志成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
return ResultBean.fail(busExcep).build();
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
return ResultBean.fail(e.getMessage()).setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
@ -74,11 +72,9 @@ public class DemoMongoController extends CoreBaseController{
|
|
|
|
|
List logList = logOperateService.listSysLogOperate();
|
|
|
|
|
return ResultBean.success("操作成功").setResultList(logList).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
return ResultBean.fail(busExcep).build();
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -93,11 +89,9 @@ public class DemoMongoController extends CoreBaseController{
|
|
|
|
|
|
|
|
|
|
return ResultBean.success("操作成功").setResultList(logList).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
return ResultBean.fail(busExcep).build();
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -108,11 +102,9 @@ public class DemoMongoController extends CoreBaseController{
|
|
|
|
|
logOperateService.getSysLogOperateById(Long.parseLong(id));
|
|
|
|
|
return ResultBean.success().setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
return ResultBean.fail(busExcep).build();
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|