提交 424eb646 编写于 作者: F fengyw

修改

上级 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;
}
......@@ -2,6 +2,8 @@ package ${cfg.packagePrefix}.${cfg.packageName!}.service.admin;
import ${cfg.packagePrefix}.common.core.base.Page;
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.req.Admin${entity}EditReq;
import ${cfg.packagePrefix}.${cfg.packageName!}.service.admin.req.Admin${entity}PageReq;
......@@ -18,54 +20,52 @@ import javax.validation.Valid;
import javax.validation.constraints.NotNull;
/**
* ADMIN-${table.comment!}
*
* @author ${author}
*/
* ADMIN-${table.comment!}
*
* @author ${author}
*/
@Api(tags = "ADMIN-${table.comment!}")
@RestController
@RequiredArgsConstructor
@RequestMapping("/${cfg.packageName}/admin/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.name ?replace("_","/")}</#if>")
public class Admin${table.entityName}Controller {
@NotNull
private final Admin${entity}Biz biz;
@NotNull
private final Admin${entity}Biz biz;
@ApiOperation(value = "${table.comment!}分页", notes = "${table.comment!}分页")
@PostMapping(value = "/page")
public Result
<Page<#noparse>
<</#noparse>Admin${entity}PageResp<#noparse>></#noparse>> page(@RequestBody Admin${entity}PageReq req) {
return biz.page(req);
@ApiOperation(value = "${table.comment!}分页", notes = "${table.comment!}分页")
@PostMapping(value = "/page")
public Result<Page<#noparse><</#noparse>Admin${entity}PageResp<#noparse>></#noparse>> page(@RequestBody Admin${entity}PageReq req) {
return biz.page(req);
}
@ApiOperation(value = "${table.comment!}添加", notes = "${table.comment!}添加")
@SysLog(value = "${table.comment!}添加")
@PostMapping(value = "/save")
public Result
<String> save(@RequestBody @Valid Admin${entity}SaveReq req) {
public Result<String> save(@RequestBody @Valid Admin${entity}SaveReq req) {
return biz.save(req);
}
}
@ApiOperation(value = "${table.comment!}查看", notes = "${table.comment!}查看")
@ApiImplicitParam(name = "id", value = "主键ID", dataTypeClass = Long.class, paramType = "query", required = true)
@GetMapping(value = "/view")
public Result
<Admin${entity}ViewResp> view(@RequestParam Long id) {
return biz.view(id);
}
@ApiOperation(value = "${table.comment!}查看", notes = "${table.comment!}查看")
@ApiImplicitParam(name = "id", value = "主键ID", dataTypeClass = Long.class, paramType = "query", required = true)
@SysLogCache
@GetMapping(value = "/view")
public Result<Admin${entity}ViewResp> view(@RequestParam Long id) {
return biz.view(id);
}
@ApiOperation(value = "${table.comment!}修改", notes = "${table.comment!}修改")
@PutMapping(value = "/edit")
public Result
<String> edit(@RequestBody @Valid Admin${entity}EditReq req) {
return biz.edit(req);
}
@ApiOperation(value = "${table.comment!}修改", notes = "${table.comment!}修改")
@SysLog(value = "${table.comment!}修改", isUpdate = true)
@PutMapping(value = "/edit")
public Result<String> edit(@RequestBody @Valid Admin${entity}EditReq req) {
return biz.edit(req);
}
@ApiOperation(value = "${table.comment!}删除", notes = "${table.comment!}删除")
@ApiImplicitParam(name = "id", value = "主键ID", dataTypeClass = Long.class, paramType = "query", required = true)
@DeleteMapping(value = "/delete")
public Result
<String> delete(@RequestParam Long id) {
return biz.delete(id);
}
}
@ApiOperation(value = "${table.comment!}删除", notes = "${table.comment!}删除")
@ApiImplicitParam(name = "id", value = "主键ID", dataTypeClass = Long.class, paramType = "query", required = true)
@SysLog(value = "${table.comment!}删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam Long id) {
return biz.delete(id);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册