This commit is contained in:
xiangwb
2018-01-22 10:39:17 +08:00
parent df7a2e5709
commit c4ab568767
4 changed files with 22 additions and 22 deletions
@@ -7,6 +7,7 @@ import com.xwbing.constant.CommonConstant;
import com.xwbing.constant.CommonEnum;
import com.xwbing.domain.entity.sys.SysAuthority;
import com.xwbing.domain.entity.vo.ListSysAuthorityVo;
import com.xwbing.domain.entity.vo.RestMessageVo;
import com.xwbing.domain.entity.vo.SysAuthVo;
import com.xwbing.redis.RedisService;
import com.xwbing.service.sys.SysAuthorityService;
@@ -38,7 +39,7 @@ public class SysAuthorityControl {
@LogInfo("添加权限")
@PostMapping("save")
@ApiOperation(value = "添加权限", response = RestMessage.class)
@ApiOperation(value = "添加权限", response = RestMessageVo.class)
public JSONObject save(@RequestBody SysAuthority sysAuthority) {
RestMessage save = sysAuthorityService.save(sysAuthority);
//删除缓存
@@ -48,7 +49,7 @@ public class SysAuthorityControl {
}
@LogInfo("删除权限")
@ApiOperation(value = "删除权限", response = RestMessage.class)
@ApiOperation(value = "删除权限", response = RestMessageVo.class)
@GetMapping("removeById")
public JSONObject removeById(@RequestParam String id) {
if (StringUtils.isEmpty(id))
@@ -61,7 +62,7 @@ public class SysAuthorityControl {
}
@LogInfo("修改权限")
@ApiOperation(value = "修改权限", response = RestMessage.class)
@ApiOperation(value = "修改权限", response = RestMessageVo.class)
@PostMapping("update")
public JSONObject update(@RequestBody SysAuthority sysAuthority) {
if (StringUtils.isEmpty(sysAuthority.getId()))
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.xwbing.annotation.LogInfo;
import com.xwbing.domain.entity.sys.SysConfig;
import com.xwbing.domain.entity.vo.ListSysConfigVo;
import com.xwbing.domain.entity.vo.RestMessageVo;
import com.xwbing.domain.entity.vo.SysConfigVo;
import com.xwbing.service.sys.SysConfigService;
import com.xwbing.util.JSONObjResult;
@@ -36,7 +37,7 @@ public class SysConfigControl {
private SysConfigService sysConfigService;
@LogInfo("新增系统配置信息")
@ApiOperation(value = "新增", notes = "新增系统配置信息", response = RestMessage.class)
@ApiOperation(value = "新增", notes = "新增系统配置信息", response = RestMessageVo.class)
// @ApiImplicitParams({
// @ApiImplicitParam(name = "code", value = "配置项的key,长度为1-50", paramType = "query", required = true, dataType = "string"),
// @ApiImplicitParam(name = "value", value = "配置项的值", paramType = "query", required = true, dataType = "string"),
@@ -52,7 +53,7 @@ public class SysConfigControl {
}
@LogInfo("根据code删除系统配置信息")
@ApiOperation(value = "删除", notes = "根据code删除系统配置信息", response = RestMessage.class)
@ApiOperation(value = "删除", notes = "根据code删除系统配置信息", response = RestMessageVo.class)
@ApiImplicitParam(name = "code", value = "配置项的code", paramType = "query", required = true, dataType = "string")
@GetMapping("removeByCode")
public JSONObject removeByCode(@RequestParam String code) {
@@ -66,7 +67,7 @@ public class SysConfigControl {
}
@LogInfo("修改系统配置信息")
@ApiOperation(value = "修改", notes = "修改系统配置信息", response = RestMessage.class)
@ApiOperation(value = "修改", notes = "修改系统配置信息", response = RestMessageVo.class)
@ApiImplicitParams({
@ApiImplicitParam(name = "code", value = "配置项的key,长度为1-50", paramType = "query", required = true, dataType = "string"),
@ApiImplicitParam(name = "value", value = "配置项的值", paramType = "query", required = true, dataType = "string"),
@@ -6,6 +6,7 @@ import com.xwbing.domain.entity.sys.SysAuthority;
import com.xwbing.domain.entity.sys.SysRole;
import com.xwbing.domain.entity.sys.SysRoleAuthority;
import com.xwbing.domain.entity.vo.ListSysRoleVo;
import com.xwbing.domain.entity.vo.RestMessageVo;
import com.xwbing.domain.entity.vo.SysRoleVo;
import com.xwbing.service.sys.SysAuthorityService;
import com.xwbing.service.sys.SysRoleAuthorityService;
@@ -40,7 +41,7 @@ public class SysRoleControl {
private SysRoleAuthorityService sysRoleAuthorityService;
@LogInfo("添加角色")
@ApiOperation(value = "添加角色", response = RestMessage.class)
@ApiOperation(value = "添加角色", response = RestMessageVo.class)
@PostMapping("save")
public JSONObject save(@RequestBody SysRole sysRole) {
RestMessage result = sysRoleService.save(sysRole);
@@ -48,7 +49,7 @@ public class SysRoleControl {
}
@LogInfo("删除角色")
@ApiOperation(value = "删除角色", response = RestMessage.class)
@ApiOperation(value = "删除角色", response = RestMessageVo.class)
@GetMapping("removeById")
public JSONObject removeById(@RequestParam String id) {
if (StringUtils.isEmpty(id))
@@ -58,7 +59,7 @@ public class SysRoleControl {
}
@LogInfo("修改角色")
@ApiOperation(value = "修改角色", response = RestMessage.class)
@ApiOperation(value = "修改角色", response = RestMessageVo.class)
@PostMapping("update")
public JSONObject update(@RequestBody SysRole sysRole) {
if (StringUtils.isEmpty(sysRole.getId()))
@@ -103,7 +104,7 @@ public class SysRoleControl {
}
@LogInfo("保存角色权限")
@ApiOperation(value = "保存角色权限", response = RestMessage.class)
@ApiOperation(value = "保存角色权限", response = RestMessageVo.class)
@PostMapping("saveAuthority")
public JSONObject saveAuthority(@RequestParam String authorityIds, @RequestParam String roleId) {
if (StringUtils.isEmpty(authorityIds))
@@ -8,10 +8,7 @@ import com.xwbing.domain.entity.sys.SysAuthority;
import com.xwbing.domain.entity.sys.SysRole;
import com.xwbing.domain.entity.sys.SysUser;
import com.xwbing.domain.entity.sys.SysUserRole;
import com.xwbing.domain.entity.vo.ListSysAuthorityVo;
import com.xwbing.domain.entity.vo.ListSysRoleVo;
import com.xwbing.domain.entity.vo.ListSysUserVo;
import com.xwbing.domain.entity.vo.SysUserVo;
import com.xwbing.domain.entity.vo.*;
import com.xwbing.service.sys.SysAuthorityService;
import com.xwbing.service.sys.SysRoleService;
import com.xwbing.service.sys.SysUserRoleService;
@@ -53,7 +50,7 @@ public class SysUserControl {
private SysAuthorityService sysAuthorityService;
@LogInfo("添加用户")
@ApiOperation(value = "添加用户", response = RestMessage.class)
@ApiOperation(value = "添加用户", response = RestMessageVo.class)
@PostMapping("save")
public JSONObject save(@RequestBody @Valid SysUser sysUser) {
RestMessage result = sysUserService.save(sysUser);
@@ -61,7 +58,7 @@ public class SysUserControl {
}
@LogInfo("删除用户")
@ApiOperation(value = "删除用户", response = RestMessage.class)
@ApiOperation(value = "删除用户", response = RestMessageVo.class)
@GetMapping("removeById")
public JSONObject removeById(@RequestParam String id) {
if (StringUtils.isEmpty(id))
@@ -71,7 +68,7 @@ public class SysUserControl {
}
@LogInfo("修改用户信息")
@ApiOperation(value = "修改用户信息", response = RestMessage.class)
@ApiOperation(value = "修改用户信息", response = RestMessageVo.class)
@PostMapping("update")
public JSONObject update(@RequestBody @Valid SysUser sysUser) {
if (StringUtils.isEmpty(sysUser.getId()))
@@ -101,7 +98,7 @@ public class SysUserControl {
}
@LogInfo("登录")
@ApiOperation(value = "登录", response = RestMessage.class)
@ApiOperation(value = "登录", response = RestMessageVo.class)
@PostMapping("login")
public JSONObject login(HttpServletRequest request, @RequestParam String userName, @RequestParam String passWord, @RequestParam String checkCode) {
if (StringUtils.isEmpty(userName) || StringUtils.isEmpty(passWord))
@@ -113,7 +110,7 @@ public class SysUserControl {
}
@LogInfo("登出")
@ApiOperation(value = "登出", response = RestMessage.class)
@ApiOperation(value = "登出", response = RestMessageVo.class)
@GetMapping("logout")
public JSONObject logout(HttpServletRequest request) {
RestMessage logout = sysUserService.logout(request);
@@ -121,7 +118,7 @@ public class SysUserControl {
}
@LogInfo("修改密码")
@ApiOperation(value = "修改密码", response = RestMessage.class)
@ApiOperation(value = "修改密码", response = RestMessageVo.class)
@PostMapping("updatePassWord")
public JSONObject updatePassWord(@RequestParam String newPassWord, @RequestParam String oldPassWord, @RequestParam String id) {
if (StringUtils.isEmpty(id))
@@ -133,7 +130,7 @@ public class SysUserControl {
}
@LogInfo("重置密码")
@ApiOperation(value = "重置密码", response = RestMessage.class)
@ApiOperation(value = "重置密码", response = RestMessageVo.class)
@GetMapping("resetPassWord")
public JSONObject resetPassWord(@RequestParam String id) {
if (StringUtils.isEmpty(id))
@@ -170,7 +167,7 @@ public class SysUserControl {
}
@LogInfo("保存用户角色")
@ApiOperation(value = "保存用户角色", response = RestMessage.class)
@ApiOperation(value = "保存用户角色", response = RestMessageVo.class)
@PostMapping("saveRole")
public JSONObject saveRole(@RequestParam String roleIds, @RequestParam String userId) {
if (StringUtils.isEmpty(roleIds))