package com.hangzhou.yiyouliao.springboot_mybatis.model;
import lombok.Data;
import java.util.Date;
@Data
public class UserInfo {
private Long id;
private String companyName;
private String personalName;
private String workName;
private String sourceName;
private String sourceUrl;
private String fromdb;
private String bazhuayuTaskId;
private Integer state;
private Date insertTime;
private Integer permissions;
public UserInfo getSourceInfo(){
if(companyName != null){
this.setWorkName(companyName);
}
if (personalName != null){
this.setWorkName(personalName);
}
return this;
}
}
model中的方法慎用get,set开头。如下图,会被当做属性的。