Search in sources :

Example 21 with AjaxJson

use of com.cdeledu.common.base.AjaxJson in project wechat by dllwh.

the class GlobalExceptionHandler method request406.

/**
 * 406 - Not Acceptable
 */
@ResponseBody
@ExceptionHandler(HttpMediaTypeNotAcceptableException.class)
public AjaxJson request406(HttpMediaTypeNotAcceptableException e) {
    AjaxJson result = new AjaxJson();
    if (logger.isDebugEnabled()) {
        logger.error(HttpStatus.METHOD_NOT_ALLOWED.getReasonPhrase(), e);
    }
    result.setSuccess(false);
    result.setMsg(e.getMessage());
    result.setResultCode(406);
    return result;
}
Also used : AjaxJson(com.cdeledu.common.base.AjaxJson) ExceptionHandler(org.springframework.web.bind.annotation.ExceptionHandler) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 22 with AjaxJson

use of com.cdeledu.common.base.AjaxJson in project wechat by dllwh.

the class ScheduledController method run.

@ResponseBody
@RequestMapping("run")
@SystemLog(desc = "创建定时任务", opType = SysOpType.UPDATE, tableName = "sys_schedule_job")
public AjaxJson run(@RequestBody Long[] jobIds) {
    AjaxJson ajaxJson = new AjaxJson();
    scheduleJobService.run(jobIds);
    return ajaxJson;
}
Also used : AjaxJson(com.cdeledu.common.base.AjaxJson) SystemLog(com.cdeledu.core.annotation.SystemLog) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 23 with AjaxJson

use of com.cdeledu.common.base.AjaxJson in project wechat by dllwh.

the class ScheduledController method delete.

@ResponseBody
@RequestMapping("delete")
@SystemLog(desc = "删除定时任务", opType = SysOpType.DEL, tableName = "sys_schedule_job")
public AjaxJson delete(@RequestBody Long[] jobIds) {
    AjaxJson ajaxJson = new AjaxJson();
    scheduleJobService.deleteBatch(jobIds);
    return ajaxJson;
}
Also used : AjaxJson(com.cdeledu.common.base.AjaxJson) SystemLog(com.cdeledu.core.annotation.SystemLog) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 24 with AjaxJson

use of com.cdeledu.common.base.AjaxJson in project wechat by dllwh.

the class ScheduledController method update.

@ResponseBody
@RequestMapping("update")
@SystemLog(desc = "修改定时任务", opType = SysOpType.UPDATE, tableName = "sys_schedule_job")
public AjaxJson update(@RequestBody ScheduleJob scheduleJob) {
    AjaxJson ajaxJson = new AjaxJson();
    scheduleJobService.update(scheduleJob);
    return ajaxJson;
}
Also used : AjaxJson(com.cdeledu.common.base.AjaxJson) SystemLog(com.cdeledu.core.annotation.SystemLog) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 25 with AjaxJson

use of com.cdeledu.common.base.AjaxJson in project wechat by dllwh.

the class ScheduledController method resume.

@ResponseBody
@RequestMapping("resume")
@SystemLog(desc = "恢复定时任务", opType = SysOpType.UPDATE, tableName = "sys_schedule_job")
public AjaxJson resume(@RequestBody Long[] jobIds) {
    AjaxJson ajaxJson = new AjaxJson();
    scheduleJobService.resume(jobIds);
    return ajaxJson;
}
Also used : AjaxJson(com.cdeledu.common.base.AjaxJson) SystemLog(com.cdeledu.core.annotation.SystemLog) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

AjaxJson (com.cdeledu.common.base.AjaxJson)46 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)44 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)33 SystemLog (com.cdeledu.core.annotation.SystemLog)25 ExceptionHandler (org.springframework.web.bind.annotation.ExceptionHandler)12 SysUser (com.cdeledu.model.rbac.SysUser)8 ResponseStatus (org.springframework.web.bind.annotation.ResponseStatus)6 SysRole (com.cdeledu.model.rbac.SysRole)4 SysMenu (com.cdeledu.model.rbac.SysMenu)3 SysUserRole (com.cdeledu.model.rbac.SysUserRole)2 SysIcon (com.cdeledu.model.system.SysIcon)1 Map (java.util.Map)1 HttpSession (javax.servlet.http.HttpSession)1 AuthenticationException (org.apache.shiro.authc.AuthenticationException)1 DisabledAccountException (org.apache.shiro.authc.DisabledAccountException)1 ExcessiveAttemptsException (org.apache.shiro.authc.ExcessiveAttemptsException)1 ExpiredCredentialsException (org.apache.shiro.authc.ExpiredCredentialsException)1 IncorrectCredentialsException (org.apache.shiro.authc.IncorrectCredentialsException)1 LockedAccountException (org.apache.shiro.authc.LockedAccountException)1 UnknownAccountException (org.apache.shiro.authc.UnknownAccountException)1