|
|
@ -10,7 +10,7 @@ import cn.estsh.i3plus.pojo.platform.bean.SysConfig;
|
|
|
|
import cn.estsh.impp.framework.base.controller.CoreBaseController;
|
|
|
|
import cn.estsh.impp.framework.base.controller.CoreBaseController;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionEnum;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
@ -58,11 +58,9 @@ public class SysConfigController extends CoreBaseController {
|
|
|
|
sysConfigService.insertSysConfig(sysConfig);
|
|
|
|
sysConfigService.insertSysConfig(sysConfig);
|
|
|
|
return ResultBean.success("添加成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
return ResultBean.success("添加成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
}catch(Exception e){
|
|
|
|
}catch(Exception e){
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -73,11 +71,9 @@ public class SysConfigController extends CoreBaseController {
|
|
|
|
sysConfigService.deleteSysConfigById(Long.parseLong(id));
|
|
|
|
sysConfigService.deleteSysConfigById(Long.parseLong(id));
|
|
|
|
return ResultBean.success("删除成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
return ResultBean.success("删除成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
}catch(Exception e){
|
|
|
|
}catch(Exception e){
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -101,11 +97,9 @@ public class SysConfigController extends CoreBaseController {
|
|
|
|
sysConfigService.updateSysConfig(sysConfig);
|
|
|
|
sysConfigService.updateSysConfig(sysConfig);
|
|
|
|
return ResultBean.success("删除成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
return ResultBean.success("删除成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
}catch(Exception e){
|
|
|
|
}catch(Exception e){
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -118,11 +112,9 @@ public class SysConfigController extends CoreBaseController {
|
|
|
|
.setResultList(sysConfigList)
|
|
|
|
.setResultList(sysConfigList)
|
|
|
|
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
}catch(Exception e){
|
|
|
|
}catch(Exception e){
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -138,11 +130,9 @@ public class SysConfigController extends CoreBaseController {
|
|
|
|
return ResultBean.fail("数据不存在").setCode(ResourceEnumUtil.MESSAGE.EMPTY.getCode());
|
|
|
|
return ResultBean.fail("数据不存在").setCode(ResourceEnumUtil.MESSAGE.EMPTY.getCode());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
}catch(Exception e){
|
|
|
|
}catch(Exception e){
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -155,11 +145,55 @@ public class SysConfigController extends CoreBaseController {
|
|
|
|
.setListPager(sysConfigListPager)
|
|
|
|
.setListPager(sysConfigListPager)
|
|
|
|
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
LOGGER.error(busExcep.getErrorMsg() + ":{}",busExcep.getErrorDetail(),busExcep);
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
}catch(Exception e){
|
|
|
|
}catch(Exception e){
|
|
|
|
LOGGER.error(ImppExceptionEnum.SYSTEM_EXCEPTION.getDescription() + ":{}",e.getMessage(),e);
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
return ResultBean.fail().setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/get-code/{code}")
|
|
|
|
|
|
|
|
@ApiOperation(value = "根据代码获取系统配置")
|
|
|
|
|
|
|
|
public ResultBean getSysConfigByCode(@PathVariable("code") String code){
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
SysConfig sysConfig = sysConfigService.getSysConfigByCode(code);
|
|
|
|
|
|
|
|
if(sysConfig == null){
|
|
|
|
|
|
|
|
return ResultBean.fail("数据不存在").setCode(ResourceEnumUtil.MESSAGE.EMPTY.getCode());
|
|
|
|
|
|
|
|
} else{
|
|
|
|
|
|
|
|
return ResultBean.success("查询成功").setResultObject(sysConfig).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/find-mail")
|
|
|
|
|
|
|
|
@ApiOperation(value = "查询邮件配置")
|
|
|
|
|
|
|
|
public ResultBean findMailSysConfig(){
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
List sysConfig = sysConfigService.findMailConfig();
|
|
|
|
|
|
|
|
if(sysConfig == null){
|
|
|
|
|
|
|
|
return ResultBean.fail("数据不存在").setCode(ResourceEnumUtil.MESSAGE.EMPTY.getCode());
|
|
|
|
|
|
|
|
} else{
|
|
|
|
|
|
|
|
return ResultBean.success("查询成功").setResultList(sysConfig).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/update-code/{code}/{value}")
|
|
|
|
|
|
|
|
public ResultBean updateSysConfigByCode(@PathVariable("code") String code,@PathVariable("value") String value){
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
|
|
|
// sysConfigService.update
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}catch(ImppBusiException busExcep){
|
|
|
|
|
|
|
|
return ResultBean.fail(busExcep.getErrorShow());
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|