transient

********

1,@Transient

//产品政策详情

public class TZdCpzcXq implements java.io.Serializable {

private TZdCpzc cpzc; //产品政策

@Transient
public TZdCpzc getCpzc() {
return cpzc;
}

public void setCpzc(TZdCpzc cpzc) {
this.cpzc = cpzc;
}

}

public class FyjhAction extends ProjectBaseAction<Object> {
public
String list() throws Exception { page=zcxqService.getPage(page, zcxqModel); List<TZdCpzcXq> list=page.getResult(); for(TZdCpzcXq zcxq:list){ TZdCpzc temp=zcService.getById(zcxq.getZcid()); //产品政策 zcxq.setCpzc(temp); } return SUCCESS; }
}

********

有问题在公众号【清汤袭人】找我,时常冒出各种傻问题,然一通百通,其乐无穷,一起探讨


原文地址:https://www.cnblogs.com/qingmaple/p/4103354.html