Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Springboot Plus
Commits
a2bec4db
Commit
a2bec4db
authored
Nov 10, 2018
by
liudonghua
Browse files
use query/edit/add/delete as convention
parent
c1805ba6
Changes
2
Hide whitespace changes
Inline
Side-by-side
admin-console/src/main/java/com/ibeetl/admin/console/web/RoleConsoleController.java
View file @
a2bec4db
...
@@ -168,7 +168,7 @@ public class RoleConsoleController {
...
@@ -168,7 +168,7 @@ public class RoleConsoleController {
* @return
* @return
*/
*/
@PostMapping
(
MODEL
+
"/update.json"
)
@PostMapping
(
MODEL
+
"/update.json"
)
@Function
(
"role.
update
"
)
@Function
(
"role.
edit
"
)
@ResponseBody
@ResponseBody
public
JsonResult
<
String
>
update
(
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
CoreRole
role
)
{
public
JsonResult
<
String
>
update
(
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
CoreRole
role
)
{
...
@@ -265,7 +265,7 @@ public class RoleConsoleController {
...
@@ -265,7 +265,7 @@ public class RoleConsoleController {
// }
// }
@PostMapping
(
MODEL
+
"/function/ids.json"
)
@PostMapping
(
MODEL
+
"/function/ids.json"
)
@Function
(
"role.function.
list
"
)
@Function
(
"role.function.
query
"
)
@ResponseBody
@ResponseBody
public
JsonResult
<
List
<
Long
>>
getFunctionIdByRole
(
Long
roleId
)
{
public
JsonResult
<
List
<
Long
>>
getFunctionIdByRole
(
Long
roleId
)
{
List
<
Long
>
list
=
functionConsoleService
.
getFunctionByRole
(
roleId
);
List
<
Long
>
list
=
functionConsoleService
.
getFunctionByRole
(
roleId
);
...
@@ -273,7 +273,7 @@ public class RoleConsoleController {
...
@@ -273,7 +273,7 @@ public class RoleConsoleController {
}
}
@GetMapping
(
MODEL
+
"/function/queryFunction.json"
)
@GetMapping
(
MODEL
+
"/function/queryFunction.json"
)
@Function
(
"role.function.
list
"
)
@Function
(
"role.function.
query
"
)
@ResponseBody
@ResponseBody
public
JsonResult
<
List
<
RoleDataAccessFunction
>>
getQueryFunctionByRole
(
Long
roleId
)
{
public
JsonResult
<
List
<
RoleDataAccessFunction
>>
getQueryFunctionByRole
(
Long
roleId
)
{
List
<
RoleDataAccessFunction
>
list
=
functionConsoleService
.
getQueryFunctionByRole
(
roleId
);
List
<
RoleDataAccessFunction
>
list
=
functionConsoleService
.
getQueryFunctionByRole
(
roleId
);
...
@@ -281,7 +281,7 @@ public class RoleConsoleController {
...
@@ -281,7 +281,7 @@ public class RoleConsoleController {
}
}
@PostMapping
(
MODEL
+
"/function/update.json"
)
@PostMapping
(
MODEL
+
"/function/update.json"
)
@Function
(
"role.function.
update
"
)
@Function
(
"role.function.
edit
"
)
@ResponseBody
@ResponseBody
public
JsonResult
updateFunction
(
Long
roleId
,
String
ids
)
{
public
JsonResult
updateFunction
(
Long
roleId
,
String
ids
)
{
List
<
Long
>
all
=
ConvertUtil
.
str2longs
(
ids
);
List
<
Long
>
all
=
ConvertUtil
.
str2longs
(
ids
);
...
...
admin-core/src/main/resources/codeTemplate/js/entityApi.js
View file @
a2bec4db
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
layui
.
define
([],
function
(
exports
)
{
layui
.
define
([],
function
(
exports
)
{
var
api
=
{
var
api
=
{
update$
{
upperFirst
(
entity
.
code
)}:
function
(
form
,
callback
){
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
){
add$
{
upperFirst
(
entity
.
code
)}:
function
(
form
,
callback
){
Lib
.
submitForm
(
"
/${target.urlBase}/${entity.code}/add.json
"
,
form
,{},
callback
)
Lib
.
submitForm
(
"
/${target.urlBase}/${entity.code}/add.json
"
,
form
,{},
callback
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment