Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
roncoo
roncoo-education
提交
424eb646
R
roncoo-education
项目概览
roncoo
/
roncoo-education
12 个月 前同步成功
通知
146
Star
5
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roncoo-education
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
424eb646
编写于
8月 31, 2022
作者:
F
fengyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改
上级
1b792ae4
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
36 addition
and
59 deletion
+36
-59
roncoo-education-common/roncoo-education-common-core/src/main/java/com/roncoo/education/common/core/enums/UserTypeEnum.java
.../com/roncoo/education/common/core/enums/UserTypeEnum.java
+0
-23
roncoo-generator/src/main/resources/template/service/admin/admin.controller.java.ftl
...esources/template/service/admin/admin.controller.java.ftl
+36
-36
未找到文件。
roncoo-education-common/roncoo-education-common-core/src/main/java/com/roncoo/education/common/core/enums/UserTypeEnum.java
已删除
100644 → 0
浏览文件 @
1b792ae4
/**
* Copyright 2015-现在 广州市领课网络科技有限公司
*/
package
com.roncoo.education.common.core.enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* @author wujing
*/
@Getter
@AllArgsConstructor
public
enum
UserTypeEnum
{
USER
(
1
,
"用户"
,
""
),
LECTURER
(
2
,
"讲师"
,
"blue"
);
private
Integer
code
;
private
String
desc
;
private
String
color
;
}
roncoo-generator/src/main/resources/template/service/admin/admin.controller.java.ftl
浏览文件 @
424eb646
...
@@ -2,6 +2,8 @@ package ${cfg.packagePrefix}.${cfg.packageName!}.service.admin;
...
@@ -2,6 +2,8 @@ package ${cfg.packagePrefix}.${cfg.packageName!}.service.admin;
import
${
cfg
.
packagePrefix
}.
common
.
core
.
base
.
Page
;
import
${
cfg
.
packagePrefix
}.
common
.
core
.
base
.
Page
;
import
${
cfg
.
packagePrefix
}.
common
.
core
.
base
.
Result
;
import
${
cfg
.
packagePrefix
}.
common
.
core
.
base
.
Result
;
import
${
cfg
.
packagePrefix
}.
common
.
core
.
base
.
SysLog
;
import
${
cfg
.
packagePrefix
}.
common
.
core
.
base
.
SysLogCache
;
import
${
cfg
.
packagePrefix
}.${
cfg
.
packageName
!}.service.admin.biz.Admin${entity}Biz;
import
${
cfg
.
packagePrefix
}.${
cfg
.
packageName
!}.service.admin.biz.Admin${entity}Biz;
import
${
cfg
.
packagePrefix
}.${
cfg
.
packageName
!}.service.admin.req.Admin${entity}EditReq;
import
${
cfg
.
packagePrefix
}.${
cfg
.
packageName
!}.service.admin.req.Admin${entity}EditReq;
import
${
cfg
.
packagePrefix
}.${
cfg
.
packageName
!}.service.admin.req.Admin${entity}PageReq;
import
${
cfg
.
packagePrefix
}.${
cfg
.
packageName
!}.service.admin.req.Admin${entity}PageReq;
...
@@ -18,54 +20,52 @@ import javax.validation.Valid;
...
@@ -18,54 +20,52 @@ import javax.validation.Valid;
import
javax
.
validation
.
constraints
.
NotNull
;
import
javax
.
validation
.
constraints
.
NotNull
;
/**
/**
*
ADMIN
-${
table
.
comment
!}
*
ADMIN
-${
table
.
comment
!}
*
*
*
@
author
${
author
}
*
@
author
${
author
}
*/
*/
@
Api
(
tags
=
"ADMIN-${table.comment!}"
)
@
Api
(
tags
=
"ADMIN-${table.comment!}"
)
@
RestController
@
RestController
@
RequiredArgsConstructor
@
RequiredArgsConstructor
@
RequestMapping
(
"/${cfg.packageName}/admin/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.name ?replace("
_
","
/
")}</#if>"
)
@
RequestMapping
(
"/${cfg.packageName}/admin/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.name ?replace("
_
","
/
")}</#if>"
)
public
class
Admin
${
table
.
entityName
}
Controller
{
public
class
Admin
${
table
.
entityName
}
Controller
{
@
NotNull
@
NotNull
private
final
Admin
${
entity
}
Biz
biz
;
private
final
Admin
${
entity
}
Biz
biz
;
@
ApiOperation
(
value
=
"${table.comment!}分页"
,
notes
=
"${table.comment!}分页"
)
@
ApiOperation
(
value
=
"${table.comment!}分页"
,
notes
=
"${table.comment!}分页"
)
@
PostMapping
(
value
=
"/page"
)
@
PostMapping
(
value
=
"/page"
)
public
Result
public
Result
<
Page
<#
noparse
><</#
noparse
>
Admin
${
entity
}
PageResp
<#
noparse
>></#
noparse
>>
page
(@
RequestBody
Admin
${
entity
}
PageReq
req
)
{
<
Page
<#
noparse
>
<</#
noparse
>
Admin
${
entity
}
PageResp
<#
noparse
>></#
noparse
>>
page
(@
RequestBody
Admin
${
entity
}
PageReq
req
)
{
return
biz
.
page
(
req
);
return
biz
.
page
(
req
);
}
}
@
ApiOperation
(
value
=
"${table.comment!}添加"
,
notes
=
"${table.comment!}添加"
)
@
ApiOperation
(
value
=
"${table.comment!}添加"
,
notes
=
"${table.comment!}添加"
)
@
SysLog
(
value
=
"${table.comment!}添加"
)
@
PostMapping
(
value
=
"/save"
)
@
PostMapping
(
value
=
"/save"
)
public
Result
public
Result
<
String
>
save
(@
RequestBody
@
Valid
Admin
${
entity
}
SaveReq
req
)
{
<
String
>
save
(@
RequestBody
@
Valid
Admin
${
entity
}
SaveReq
req
)
{
return
biz
.
save
(
req
);
return
biz
.
save
(
req
);
}
}
@
ApiOperation
(
value
=
"${table.comment!}查看"
,
notes
=
"${table.comment!}查看"
)
@
ApiOperation
(
value
=
"${table.comment!}查看"
,
notes
=
"${table.comment!}查看"
)
@
ApiImplicitParam
(
name
=
"id"
,
value
=
"主键ID"
,
dataTypeClass
=
Long
.
class
,
paramType
=
"query"
,
required
=
true
)
@
ApiImplicitParam
(
name
=
"id"
,
value
=
"主键ID"
,
dataTypeClass
=
Long
.
class
,
paramType
=
"query"
,
required
=
true
)
@
SysLogCache
@
GetMapping
(
value
=
"/view"
)
@
GetMapping
(
value
=
"/view"
)
public
Result
public
Result
<
Admin
${
entity
}
ViewResp
>
view
(@
RequestParam
Long
id
)
{
<
Admin
${
entity
}
ViewResp
>
view
(@
RequestParam
Long
id
)
{
return
biz
.
view
(
id
);
return
biz
.
view
(
id
);
}
}
@
ApiOperation
(
value
=
"${table.comment!}修改"
,
notes
=
"${table.comment!}修改"
)
@
ApiOperation
(
value
=
"${table.comment!}修改"
,
notes
=
"${table.comment!}修改"
)
@
SysLog
(
value
=
"${table.comment!}修改"
,
isUpdate
=
true
)
@
PutMapping
(
value
=
"/edit"
)
@
PutMapping
(
value
=
"/edit"
)
public
Result
public
Result
<
String
>
edit
(@
RequestBody
@
Valid
Admin
${
entity
}
EditReq
req
)
{
<
String
>
edit
(@
RequestBody
@
Valid
Admin
${
entity
}
EditReq
req
)
{
return
biz
.
edit
(
req
);
return
biz
.
edit
(
req
);
}
}
@
ApiOperation
(
value
=
"${table.comment!}删除"
,
notes
=
"${table.comment!}删除"
)
@
ApiOperation
(
value
=
"${table.comment!}删除"
,
notes
=
"${table.comment!}删除"
)
@
ApiImplicitParam
(
name
=
"id"
,
value
=
"主键ID"
,
dataTypeClass
=
Long
.
class
,
paramType
=
"query"
,
required
=
true
)
@
ApiImplicitParam
(
name
=
"id"
,
value
=
"主键ID"
,
dataTypeClass
=
Long
.
class
,
paramType
=
"query"
,
required
=
true
)
@
SysLog
(
value
=
"${table.comment!}删除"
)
@
DeleteMapping
(
value
=
"/delete"
)
@
DeleteMapping
(
value
=
"/delete"
)
public
Result
public
Result
<
String
>
delete
(@
RequestParam
Long
id
)
{
<
String
>
delete
(@
RequestParam
Long
id
)
{
return
biz
.
delete
(
id
);
return
biz
.
delete
(
id
);
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录