Commit a2bec4db authored by liudonghua's avatar liudonghua
Browse files

use query/edit/add/delete as convention

parent c1805ba6
......@@ -168,7 +168,7 @@ public class RoleConsoleController {
* @return
*/
@PostMapping(MODEL + "/update.json")
@Function("role.update")
@Function("role.edit")
@ResponseBody
public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) CoreRole role) {
......@@ -265,7 +265,7 @@ public class RoleConsoleController {
// }
@PostMapping(MODEL + "/function/ids.json")
@Function("role.function.list")
@Function("role.function.query")
@ResponseBody
public JsonResult<List<Long>> getFunctionIdByRole(Long roleId) {
List<Long> list = functionConsoleService.getFunctionByRole(roleId);
......@@ -273,7 +273,7 @@ public class RoleConsoleController {
}
@GetMapping(MODEL + "/function/queryFunction.json")
@Function("role.function.list")
@Function("role.function.query")
@ResponseBody
public JsonResult<List<RoleDataAccessFunction>> getQueryFunctionByRole(Long roleId) {
List<RoleDataAccessFunction> list = functionConsoleService.getQueryFunctionByRole(roleId);
......@@ -281,7 +281,7 @@ public class RoleConsoleController {
}
@PostMapping(MODEL + "/function/update.json")
@Function("role.function.update")
@Function("role.function.edit")
@ResponseBody
public JsonResult updateFunction(Long roleId, String ids) {
List<Long> all = ConvertUtil.str2longs(ids);
......
......@@ -2,7 +2,7 @@
layui.define([], function(exports) {
var api={
update${upperFirst(entity.code)}:function(form,callback){
Lib.submitForm("/${target.urlBase}/${entity.code}/update.json",form,{},callback)
Lib.submitForm("/${target.urlBase}/${entity.code}/edit.json",form,{},callback)
},
add${upperFirst(entity.code)}:function(form,callback){
Lib.submitForm("/${target.urlBase}/${entity.code}/add.json",form,{},callback)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment