org.springframework.beans.BeanUtils

package testBeanUtils;
 
import org.springframework.beans.BeanUtils;
 
 
public class Test {
 
	public static void main(String[] args) {
		Student student = new Student();
		student.setId("1");
		student.setAge("11");
		student.setName("zhangsan");
		Teacher teacher = new Teacher();
		Student student2 = new Student();
		BeanUtils.copyProperties(student, teacher);
		System.out.println(teacher.getId()+","+teacher.getName()+","+teacher.getAddress());
	}
}
CreditVendorContractInfoTableEntityPo entityPo = new CreditVendorContractInfoTableEntityPo();
        BeanUtils.copyProperties(dto, entityPo);
        return creditVendorContractInfoService.updateById(entityPo);
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_credit_vendor_contract_info")
@ApiModel(value = "CreditVendorContractInfoTableEntityPo", description = "厂商合同信息表")
public class CreditVendorContractInfoTableEntityPo extends CreditVendorContractInfoTableEntityDto {
    private static final long serialVersionUID = 1L;
}
package com.kingtechfin.ktfcp.sif.credit.contract.interfaces.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.kingtechfin.ktfcp.common.entity.po.BasePo;

import java.math.BigDecimal;

/**
 * 描述 : 厂商合同信息表.
 *
 * @author : hbt
 * @version : v1
 * @date : 2021-06-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "CreditVendorContractInfoTableEntityDto", description = "厂商合同信息表数据传输")
public class CreditVendorContractInfoTableEntityDto extends BasePo {

    @ApiModelProperty(value = "合同管理id,varchar(32)")
    @TableField("contract_manage_id")
    private String contractManageId;
    @ApiModelProperty(value = "合同编号,varchar(64)")
    @TableField("contract_no")
    private String contractNo;
    @ApiModelProperty(value = "合同名称,varchar(64)")
    @TableField("contract_name")
    private String contractName;
    @ApiModelProperty(value = "合同状态,varchar(32)")
    @TableField("contract_status")
    private String contractStatus;
    @ApiModelProperty(value = "授信额度,decimal(18,4)")
    @TableField("contract_quota")
    private BigDecimal contractQuota;
    @ApiModelProperty(value = "有效期(月),int(4)")
    @TableField("valid_month")
    private Integer validMonth;
    @ApiModelProperty(value = "起始日期,bigint(20)")
    @TableField("start_time")
    private Long startTime;
    @ApiModelProperty(value = "到期日期,bigint(20)")
    @TableField("end_time")
    private Long endTime;
    @ApiModelProperty(value = "签署日期,bigint(20)")
    @TableField("signed_time")
    private Long signedTime;
    @ApiModelProperty(value = "签署地点,varchar(128)")
    @TableField("signed_place")
    private String signedPlace;
    @ApiModelProperty(value = "是否固定授信,varchar(32)")
    @TableField("is_fixed_quota")
    private String isFixedQuota;
    @ApiModelProperty(value = "是否循环授信,varchar(32)")
    @TableField("is_revolve")
    private String isRevolve;
    @ApiModelProperty(value = "是否当前使用,varchar(32)")
    @TableField("is_present")
    private String isPresent;
    @ApiModelProperty(value = "审批绑定合同信息id,varchar(32)")
    @TableField("bundle_id")
    private String bundleId;
    @ApiModelProperty(value = "资料附件预留字段,varchar(256)")
    @TableField("attachments")
    private String attachments;
    @ApiModelProperty(value = "厂商项目名称,varchar(64)")
    @TableField(exist = false)
    private String projectName;

    @ApiModelProperty(value = "厂商名称,varchar(64)")
    @TableField(exist = false)
    private String venderName;

    @ApiModelProperty(value = "业务经理,varchar(64)")
    @TableField(exist = false)
    private String managerName;

    public static final String PROJECT_NAME = "project_name";
    public static final String CONTRACT_MANAGE_ID = "contract_manage_id";
    public static final String CONTRACT_NO = "contract_no";
    public static final String CONTRACT_NAME = "contract_name";
    public static final String CONTRACT_STATUS = "contract_status";
    public static final String CONTRACT_QUOTA = "contract_quota";
    public static final String VALID_MONTH = "valid_month";
    public static final String START_TIME = "start_time";
    public static final String END_TIME = "end_time";
    public static final String SIGNED_TIME = "signed_time";
    public static final String SIGNED_PLACE = "signed_place";
    public static final String IS_FIXED_QUOTA = "is_fixed_quota";
    public static final String IS_REVOLVE = "is_revolve";
    public static final String IS_PRESENT = "is_present";
    public static final String BUNDLE_ID = "bundle_id";
    public static final String ATTACHMENTS = "attachments";

    public static final String CONTRACT_STATUS_NO_SUBMIT = "0"; //未提交
    public static final String CONTRACT_STATUS_ON_APPROVAL = "1"; //审批中
    public static final String CONTRACT_STATUS_PASS_APPROVAL = "2"; //审批通过
    public static final String CONTRACT_STATUS_NO_PASS_APPROVAL = "3"; //审批不通过
    public static final String CONTRACT_STATUS_SIGNED = "4"; //已签署
    public static final String CONTRACT_STATUS_INVALID = "5"; //已废除

    public static final String IS_PRESENT_NO = "0";
    public static final String IS_PRESENT_YES = "1";

}

BeanUtils可以对两个相同类的实例进行所有属性的copy,也可以对两个不同实例进行相同属性名称的值的copy。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值