Merge pull request '3' (#7) from cqq into develop

develop
prxhap34i 1 month ago
commit 9ca130cb58

@ -9,10 +9,10 @@ import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.view.YonghuView;
/**
* Dao
*
* @author
/*
* Dao
* @author
*/
public interface YonghuDao extends BaseMapper<YonghuEntity> {

@ -21,325 +21,332 @@ import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* yonghu
*
* @author
* @author
* @email
*/
@TableName("yonghu")
@TableName("yonghu") // 指定对应的数据库表名
public class YonghuEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L; // 序列化版本UID
/**
*
*/
public YonghuEntity() {
public YonghuEntity() {
}
public YonghuEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
/**
*
*
* BeanUtils
* @param t
*/
@TableId(type = IdType.AUTO)
@TableField(value = "id")
public YonghuEntity(T t) {
try {
BeanUtils.copyProperties(this, t); // 使用BeanUtils进行属性拷贝
} catch (IllegalAccessException | InvocationTargetException e) {
// 打印异常堆栈
e.printStackTrace();
}
}
/**
* ID
*
*/
@TableId(type = IdType.AUTO) // 主键自增
@TableField(value = "id") // 对应数据库字段名
private Integer id;
/**
*
* /
*
*/
@TableField(value = "username")
@TableField(value = "username") // 对应数据库字段名
private String username;
/**
*
*
*/
@TableField(value = "password")
@TableField(value = "password") // 对应数据库字段名
private String password;
/**
*
*
*/
@TableField(value = "yonghu_name")
@TableField(value = "yonghu_name") // 对应数据库字段名
private String yonghuName;
/**
*
*
*
*/
@TableField(value = "yonghu_photo")
@TableField(value = "yonghu_photo") // 对应数据库字段名
private String yonghuPhoto;
/**
*
*/
@TableField(value = "yonghu_phone")
@TableField(value = "yonghu_phone") // 对应数据库字段名
private String yonghuPhone;
/**
*
*/
@TableField(value = "yonghu_id_number")
@TableField(value = "yonghu_id_number") // 对应数据库字段名
private String yonghuIdNumber;
/**
*
*
*/
@TableField(value = "yonghu_email")
@TableField(value = "yonghu_email") // 对应数据库字段名
private String yonghuEmail;
/**
*
* 使
*/
@TableField(value = "sex_types")
@TableField(value = "sex_types") // 对应数据库字段名
private Integer sexTypes;
/**
*
*
*/
@TableField(value = "new_money")
@TableField(value = "new_money") // 对应数据库字段名
private Double newMoney;
/**
*
*
* 1-2-
*/
@TableField(value = "yonghu_delete")
@TableField(value = "yonghu_delete") // 对应数据库字段名
private Integer yonghuDelete;
/**
*
* yyyy-MM-dd HH:mm:ss
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time",fill = FieldFill.INSERT)
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") // 日期格式化
@DateTimeFormat // 日期格式
@TableField(value = "create_time",fill = FieldFill.INSERT) // 插入时自动填充
private Date createTime;
// ================ getter和setter方法 ================
/**
*
*/
* ID
* @return id ID
*/
public Integer getId() {
return id;
}
/**
*
*/
* ID
* @param id ID
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
* /
* @return username
*/
public String getUsername() {
return username;
}
/**
*
*/
* /
* @param username
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
*/
*
* @return password
*/
public String getPassword() {
return password;
}
/**
*
*/
*
* @param password
*/
public void setPassword(String password) {
this.password = password;
}
/**
*
*/
*
* @return yonghuName
*/
public String getYonghuName() {
return yonghuName;
}
/**
*
*/
*
* @param yonghuName
*/
public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName;
}
/**
*
*/
*
* @return yonghuPhoto
*/
public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
*
*/
*
* @param yonghuPhoto
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
*
*/
*
* @return yonghuPhone
*/
public String getYonghuPhone() {
return yonghuPhone;
}
/**
*
*/
*
* @param yonghuPhone
*/
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
/**
*
*/
*
* @return yonghuIdNumber
*/
public String getYonghuIdNumber() {
return yonghuIdNumber;
}
/**
*
*/
*
* @param yonghuIdNumber
*/
public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber;
}
/**
*
*/
*
* @return yonghuEmail
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
*
*/
*
* @param yonghuEmail
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
/**
*
*/
*
* @return sexTypes
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
*
*/
*
* @param sexTypes
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
*
*/
*
* @return newMoney
*/
public Double getNewMoney() {
return newMoney;
}
/**
*
*/
*
* @param newMoney
*/
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
/**
*
*/
*
* @return yonghuDelete (1-2-)
*/
public Integer getYonghuDelete() {
return yonghuDelete;
}
/**
*
*/
*
* @param yonghuDelete (1-2-)
*/
public void setYonghuDelete(Integer yonghuDelete) {
this.yonghuDelete = yonghuDelete;
}
/**
*
*/
*
* @return createTime
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
*
* @param createTime
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* toString
* @return
*/
@Override
public String toString() {
return "Yonghu{" +
"id=" + id +
", username=" + username +
", password=" + password +
", yonghuName=" + yonghuName +
", yonghuPhoto=" + yonghuPhoto +
", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber +
", yonghuEmail=" + yonghuEmail +
", sexTypes=" + sexTypes +
", newMoney=" + newMoney +
", yonghuDelete=" + yonghuDelete +
", createTime=" + createTime +
"}";
"id=" + id +
", username=" + username +
", password=" + password +
", yonghuName=" + yonghuName +
", yonghuPhoto=" + yonghuPhoto +
", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber +
", yonghuEmail=" + yonghuEmail +
", sexTypes=" + sexTypes +
", newMoney=" + newMoney +
", yonghuDelete=" + yonghuDelete +
", createTime=" + createTime +
"}";
}
}
}

@ -1,10 +1,14 @@
package com.entity.model;
// 导入用户实体类
import com.entity.YonghuEntity;
// 导入MyBatis-Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
// 导入Spring的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@ -16,252 +20,239 @@ import java.io.Serializable;
* ModelAndView model
*/
public class YonghuModel implements Serializable {
// 序列化版本号,用于保证序列化和反序列化的兼容性
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer id;
/**
*
*/
private String username;
/**
*
*/
private String password;
/**
*
*/
private String yonghuName;
/**
*
*/
private String yonghuPhoto;
/**
*
*/
private String yonghuPhone;
/**
*
*/
private String yonghuIdNumber;
/**
*
*/
private String yonghuEmail;
/**
*
*/
private Integer sexTypes;
/**
*
*/
private Double newMoney;
/**
*
* 01
*/
private Integer yonghuDelete;
/**
*
*/
// 用于JSON序列化时将日期格式化为指定的格式这里指定为中国时区格式为yyyy-MM-dd HH:mm:ss
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
// 用于Spring MVC接收表单数据时将字符串类型的日期转换为Date类型
@DateTimeFormat
private Date createTime;
/**
*
*/
*
*/
public Integer getId() {
return id;
}
/**
*
*/
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
*
*/
public String getUsername() {
return username;
}
/**
*
*/
*
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
*/
*
*/
public String getPassword() {
return password;
}
/**
*
*/
*
*/
public void setPassword(String password) {
this.password = password;
}
/**
*
*/
*
*/
public String getYonghuName() {
return yonghuName;
}
/**
*
*/
*
*/
public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName;
}
/**
*
*/
*
*/
public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
*
*/
*
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
*
*/
*
*/
public String getYonghuPhone() {
return yonghuPhone;
}
/**
*
*/
*
*/
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
/**
*
*/
*
*/
public String getYonghuIdNumber() {
return yonghuIdNumber;
}
/**
*
*/
*
*/
public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber;
}
/**
*
*/
*
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
*
*/
*
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
/**
*
*/
*
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
*
*/
*
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
*
*/
*
*/
public Double getNewMoney() {
return newMoney;
}
/**
*
*/
*
*/
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
/**
*
*/
*
*/
public Integer getYonghuDelete() {
return yonghuDelete;
}
/**
*
*/
*
*/
public void setYonghuDelete(Integer yonghuDelete) {
this.yonghuDelete = yonghuDelete;
}
/**
*
*/
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
}

@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
/**
*
*
@ -18,9 +19,10 @@ import java.util.Date;
public class YonghuView extends YonghuEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
/**
*
*/
private String sexValue;
@ -40,15 +42,17 @@ public class YonghuView extends YonghuEntity implements Serializable {
/**
*
*/
/**
*
*/
public String getSexValue() {
return sexValue;
}
/**
*
*/
/**
*
*/
public void setSexValue(String sexValue) {
this.sexValue = sexValue;
}

@ -6,14 +6,16 @@ import com.entity.YonghuEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
/**
*
*/
public interface YonghuService extends IService<YonghuEntity> {
/**
* @param params
* @return
*/
* @param params
* @return
*/
PageUtils queryPage(Map<String, Object> params);
}
Loading…
Cancel
Save