diff --git a/LeixingView.java b/LeixingView.java new file mode 100644 index 0000000..79c2927 --- /dev/null +++ b/LeixingView.java @@ -0,0 +1,37 @@ +package com.entity.view; + +import com.entity.LeixingEntity; + +import com.baomidou.mybatisplus.annotations.TableName; +import org.apache.commons.beanutils.BeanUtils; +import java.lang.reflect.InvocationTargetException; + +import java.io.Serializable; + + +/** + * 类型 + * 后端返回视图实体辅助类 + * (通常后端关联的表或者自定义的字段需要返回使用) + * @author + * @email + * @date 2023-02-21 09:46:06 + */ +@TableName("leixing") +public class LeixingView extends LeixingEntity implements Serializable { + private static final long serialVersionUID = 1L; + + public LeixingView(){ + } + + // 接收 LeixingEntity 对象的构造函数 + public LeixingView(LeixingEntity leixingEntity) { + try { + // 将LeixingEntity的属性复制到当前LeixingView对象 + BeanUtils.copyProperties(this, leixingEntity); + } catch (IllegalAccessException | InvocationTargetException e) { + // 异常处理,打印堆栈信息 + e.printStackTrace(); + } + } +}