当前位置: 代码迷 >> 综合 >> 注解@Data JavaBean省去get set 方法
  详细解决方案

注解@Data JavaBean省去get set 方法

热度:17   发布时间:2023-10-17 06:39:12.0
Maven 引入
<dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.16.22</version>
</dependency>

 

import lombok.Data;
import java.io.Serializable;@Data
public class CustomerInfoModel implements Serializable {private Long customerSubId;//客户表ID(集团客户存在多个子客户)private Long customerId;private String customerSubName;private String uniqId;//状态 0 无效 1 有效private Integer state;//手机号private String customerMobile;private String customerName;//客户类型 1.个人客户 2.集团客户private Integer customerType;//主账户private Long mainAccountId;//虚拟账户private Long virtualAccountId;public CustomerInfoModel(Long customerSubId, Long customerId, String customerSubName, String uniqId, Integer state, String customerMobile, String customerName, Integer customerType, Long mainAccountId, Long virtualAccountId) {this.customerSubId = customerSubId;this.customerId = customerId;this.customerSubName = customerSubName;this.uniqId = uniqId;this.state = state;this.customerMobile = customerMobile;this.customerName = customerName;this.customerType = customerType;this.mainAccountId = mainAccountId;this.virtualAccountId = virtualAccountId;}public CustomerInfoModel() {}
  相关解决方案