发表于: 2025-06-05 20:39:59

0 36


今天完成的事情:(一定要写非常细致的内容,比如说学会了盒子模型,了解了Margin)

model

package org.example.model;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
public class User {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private Long pid;
private Long level;
private String name;
private String state;
private Long createAt;
private Long updateAt;
private String author;
private Long sort;
public User() {
}

public User(Long id, Long pid, Long level, String name, String state, Long createAt, Long updateAt, String author, Long sort) {
this.id = id; // 主键ID
       this.pid = pid; // ID
       this.level = level; // 层级
       this.name = name; // 名称
       this.state = state; // 状态
       this.createAt = createAt; // 创建时间
       this.updateAt = updateAt; // 更新时间
       this.author = author; // 创建人
       this.sort = sort; // 排序
   }
public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public Long getPid() {
return pid;
}

public void setPid(Long pid) {
this.pid = pid;
}

public Long getLevel() {
return level;
}

public void setLevel(Long level) {
this.level = level;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getState() {
return state;
}

public void setState(String state) {
this.state = state;
}

public Long getCreateAt() {
return createAt;
}

public void setCreateAt(Long createAt) {
this.createAt = createAt;
}

public Long getUpdateAt() {
return updateAt;
}

public void setUpdateAt(Long updateAt) {
this.updateAt = updateAt;
}

public String getAuthor() {
return author;
}

public void setAuthor(String author) {
this.author = author;
}

public Long getSort() {
return sort;
}

public void setSort(Long sort) {
this.sort = sort;
}
@Override
   public String toString() {
return "User{" +
"id=" + id +
", pid=" + pid +
", level=" + level +
", name='" + name + '\'' +
", state='" + state + '\'' +
", createAt=" + createAt +
", updateAt=" + updateAt +
", author='" + author + '\'' +
", sort=" + sort +
'}';
}
}

UserMapper

package org.example.mapper;

import org.example.model.User;
import java.util.List;

public interface UserMapper {
// 查询
   List<User> selectAll();
User selectById(Long id);
List<User> selectByPid(Long pid);

// 新增
   int insert(User user);

// 更新
   int update(User user);

// 删除
   int deleteById(Long id);
}


明天计划的事情:(一定要写非常细致的内容)
遇到的问题:(遇到什么困难,怎么解决的)
收获:(通过今天的学习,学到了什么知识)


返回列表 返回列表
评论

    分享到