This commit is contained in:
xiangwb
2018-04-23 16:43:12 +08:00
parent 910cda7413
commit 93129e59bb
4 changed files with 9 additions and 9 deletions
@@ -34,16 +34,16 @@ public class DataDictionaryControl {
private DataDictionaryService dataDictionaryService;
@LogInfo("添加字典")
@PostMapping("save")
@ApiOperation(value = "添加字典", response = RestMessageVo.class)
@PostMapping("save")
public JSONObject save(@RequestBody DataDictionary dictionary) {
RestMessage result = dataDictionaryService.save(dictionary);
return JsonResult.toJSONObj(result);
}
@LogInfo("修改字典")
@PutMapping("update")
@ApiOperation(value = "修改字典", response = RestMessageVo.class)
@PutMapping("update")
public JSONObject update(@RequestBody DataDictionary dictionary) {
if (StringUtils.isEmpty(dictionary.getId())) {
return JsonResult.toJSONObj("主键不能为空");
@@ -83,7 +83,7 @@ public class DataDictionaryControl {
@ApiImplicitParam(name = "parentId", value = "父id", paramType = "query", dataType = "string"),
@ApiImplicitParam(name = "enable", value = "是否启用,格式为Y|N", paramType = "query", dataType = "string")
})
@PostMapping("findListByParent")
@GetMapping("findListByParent")
public JSONObject findListByParent(String enable, String parentId) {
if (StringUtils.isEmpty(parentId)) {
parentId = CommonConstant.ROOT;
@@ -95,7 +95,7 @@ public class DataDictionaryControl {
@LogInfo("根据编码查询字典列表")
@ApiOperation(value = "根据编码查询字典列表", response = ListDataDictionaryVo.class)
@ApiImplicitParam(name = "enable", value = "是否启用,格式为Y|N", paramType = "query", dataType = "string")
@PostMapping("findListByCode")
@GetMapping("findListByCode")
public JSONObject findListByCode(@RequestParam String code, String enable) {
if (StringUtils.isEmpty(code)) {
return JsonResult.toJSONObj("编码不能为空");
@@ -38,8 +38,8 @@ public class SysAuthorityControl {
private RedisService redisService;
@LogInfo("添加权限")
@PostMapping("save")
@ApiOperation(value = "添加权限", response = RestMessageVo.class)
@PostMapping("save")
public JSONObject save(@RequestBody SysAuthority sysAuthority) {
RestMessage save = sysAuthorityService.save(sysAuthority);
//删除缓存
@@ -105,9 +105,9 @@ public class SysAuthorityControl {
}
@LogInfo("根据父节点查询子节点")
@GetMapping("listByParentId")
@ApiOperation(value = "根据父节点查询子节点", response = ListSysAuthorityVo.class)
@ApiImplicitParam(name = "parentId", value = "父id,可为空", paramType = "query", dataType = "string")
@GetMapping("listByParentId")
public JSONObject listByParentId(String parentId) {
if (StringUtils.isEmpty(parentId)) {
parentId = CommonConstant.ROOT;
@@ -96,7 +96,7 @@ public class SysRoleControl {
@LogInfo("根据角色主键查找权限")
@ApiOperation(value = "根据角色主键查找权限", response = ListSysRoleVo.class)
@ApiImplicitParam(name = "enable", value = "是否启用,格式Y|N", paramType = "query", dataType = "string")
@PostMapping("listAuthorityByRoleId")
@GetMapping("listAuthorityByRoleId")
public JSONObject listAuthorityByRoleId(@RequestParam String roleId, String enable) {
if (StringUtils.isEmpty(roleId)) {
return JsonResult.toJSONObj("角色主键不能为空");
@@ -213,7 +213,7 @@ public class SysUserControl {
@LogInfo("根据用户主键查找所拥有的角色")
@ApiOperation(value = "根据用户主键查找所拥有的角色", response = ListSysRoleVo.class)
@ApiImplicitParam(name = "enable", value = "是否启用,格式Y|N", paramType = "query", dataType = "string")
@PostMapping("listRoleByUserId")
@GetMapping("listRoleByUserId")
public JSONObject listRoleByUserId(@RequestParam String userId, String enable) {
if (StringUtils.isEmpty(userId)) {
return JsonResult.toJSONObj("用户主键不能为空");
@@ -225,7 +225,7 @@ public class SysUserControl {
@LogInfo("根据用户主键查找所拥有的权限")
@ApiOperation(value = "根据用户主键查找所拥有的权限", response = ListSysAuthorityVo.class)
@ApiImplicitParam(name = "enable", value = "是否启用,格式Y|N", paramType = "query", dataType = "string")
@PostMapping("listAuthorityByUserId")
@GetMapping("listAuthorityByUserId")
public JSONObject listAuthorityByUserId(@RequestParam String userId, String enable) {
if (StringUtils.isEmpty(userId)) {
return JsonResult.toJSONObj("用户主键不能为空");