This commit is contained in:
2023-10-13 17:41:41 +08:00
commit af09dd3cf3
20 changed files with 944 additions and 0 deletions
@@ -0,0 +1,52 @@
package com.jnssd.controller;
import com.jnssd.model.Menu;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* <h3>spring-boot-openapi</h3>
* <p>菜单</p>
*
* @author zxj
* @since 2023-10-12 16:33:23
*/
@RestController("menu")
public class MenuController {
List<Menu> list = new java.util.ArrayList<>();
public ResponseEntity<List<Menu>> getAll() {
return ResponseEntity.ok(list);
}
// 添加方法
@PostMapping("add")
public ResponseEntity<Menu> add(Menu entity) {
list.add(entity);
return ResponseEntity.ok(entity);
}
// 添加方法
@PostMapping("update")
public ResponseEntity<Menu> update(Menu entity) {
return null;
}
// 删除方法
@PostMapping("delete")
public ResponseEntity<Menu> delete(Menu entity) {
return null;
}
// 查询方法
@PostMapping("query")
public ResponseEntity<List<Menu>> query(Menu entity) {
return null;
}
}
@@ -0,0 +1,18 @@
package com.jnssd.controller;
import lombok.Data;
/**
* <h3>spring-boot-openapi</h3>
* <p>角色</p>
*
* @author zxj
* @since 2023-10-12 16:32:38
*/
@Data
public class RoleController {
private String id;
private String name;
private String description;
private String createTime;
}
@@ -0,0 +1,26 @@
package com.jnssd.controller;
import lombok.Data;
/**
* <h3>spring-boot-openapi</h3>
* <p>用户</p>
*
* @author zxj
* @since 2023-10-12 16:30:04
*/
@Data
public class UserController {
private String id;
private String name;
private String password;
private String email;
private String phone;
private String address;
private String description;
private String createTime;
private String updateTime;
private String status;
}