Merge remote-tracking branch 'origin/dev' into test
						commit
						897a4dfbd4
					
				| @ -0,0 +1,87 @@ | ||||
| package cn.estsh.i3plus.core.apiservice.controller.base; | ||||
| 
 | ||||
| import cn.estsh.i3plus.core.api.iservice.base.ISystemInitService; | ||||
| import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil; | ||||
| 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.util.ResultBean; | ||||
| import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiOperation; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.GetMapping; | ||||
| import org.springframework.web.bind.annotation.RequestMapping; | ||||
| import org.springframework.web.bind.annotation.RestController; | ||||
| 
 | ||||
| /** | ||||
|  * @Description : 后台服务 | ||||
|  * @Reference : | ||||
|  * @Author : wei.peng | ||||
|  * @CreateDate : 2019-06-19 下午2:32 | ||||
|  * @Modify: | ||||
|  **/ | ||||
| @RestController | ||||
| @Api(description = "后台运维服务") | ||||
| @RequestMapping("/impp/white/backstage") | ||||
| public class BackstageController extends CoreBaseController { | ||||
| 
 | ||||
|     public static final Logger LOGGER = LoggerFactory.getLogger(BackstageController.class); | ||||
| 
 | ||||
|     @Autowired | ||||
|     private ISystemInitService systemInitService; | ||||
| 
 | ||||
|     @GetMapping(value = "/redis-put-all") | ||||
|     @ApiOperation(value = "重新加载所有缓存数据",notes = "重新加载所有缓存数据") | ||||
|     public ResultBean redisPutAll(){ | ||||
|         try { | ||||
|             systemInitService.putAndLoadAll(); | ||||
|             return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()); | ||||
|         }catch(ImppBusiException busExcep){ | ||||
|             return ResultBean.fail(busExcep); | ||||
|         }catch(Exception e){ | ||||
|             return ImppExceptionBuilder.newInstance().buildExceptionResult(e); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     @GetMapping(value = "/redis-put-system-language") | ||||
|     @ApiOperation(value = "重新加载语言数据",notes = "重新加载语言数据") | ||||
|     public ResultBean redisPutSystemLanguage(){ | ||||
|         try { | ||||
|             systemInitService.putAndLoadSysLocaleLanguage(); | ||||
|             return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()); | ||||
|         }catch(ImppBusiException busExcep){ | ||||
|             return ResultBean.fail(busExcep); | ||||
|         }catch(Exception e){ | ||||
|             return ImppExceptionBuilder.newInstance().buildExceptionResult(e); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     @GetMapping(value = "/redis-put-system-config") | ||||
|     @ApiOperation(value = "重新加载系统配置数据",notes = "重新加载系统配置数据") | ||||
|     public ResultBean redisPutSystemConfig(){ | ||||
|         try { | ||||
|             systemInitService.putAndLoadSysConfig(); | ||||
|             return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()); | ||||
|         }catch(ImppBusiException busExcep){ | ||||
|             return ResultBean.fail(busExcep); | ||||
|         }catch(Exception e){ | ||||
|             return ImppExceptionBuilder.newInstance().buildExceptionResult(e); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     @GetMapping(value = "/redis-put-system-dictionary") | ||||
|     @ApiOperation(value = "重新加载系统字典数据",notes = "重新加载系统字典数据") | ||||
|     public ResultBean redisPutSystemDictionary(){ | ||||
|         try { | ||||
|             systemInitService.putAndLoadSysDictionary(); | ||||
|             return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()); | ||||
|         }catch(ImppBusiException busExcep){ | ||||
|             return ResultBean.fail(busExcep); | ||||
|         }catch(Exception e){ | ||||
|             return ImppExceptionBuilder.newInstance().buildExceptionResult(e); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
| } | ||||
					Loading…
					
					
				
		Reference in New Issue