The object print to log the toString results are as follows:
ShopGoodsBuyerParamDto=shopGoodsBuyerParamDto {shopId=44, goodsCodeList=[20000890, 20000989, 20001017, 20000887, 20000956, 20000879, 20000880, 20001182, 20001186, 20001190, 20001174, 20001178, 20000617]}, buyer=buyer {id=1234, name='Joe', cityId=310100}
General how to put this object to return to the Java bean Entity, general method to realize the entityStringToEntity what?
Classes are defined as follows:
Public class ShopGoodsBuyerParamDto {
The Integer shopId;
ListGoodsCodeList;
Buyer Buyer;
Public Integer getShopId () {
Return shopId;
}
Public void setShopId (Integer shopId) {
Enclosing shopId=shopId;
}
Public ListGetGoodsCodeList () {
Return goodsCodeList;
}
Public void setGoodsCodeList (ListGoodsCodeList) {
Enclosing goodsCodeList=goodsCodeList;
}
Public Buyer getBuyer () {
Return buyer;
}
Public void setBuyer Buyer (Buyer) {
This. Buyer=buyer;
}
@ Override
Public String toString () {
Return ShopGoodsBuyerParamDto {" + "
"ShopId=" + shopId +
", goodsCodeList="+ goodsCodeList +
", buyer="+ buyer +
'} ';
}
}
Public class Buyer {
The Integer id;
String name;
The Integer cityId;
Public Integer getId () {
Return the id;
}
Public void setId (Integer id) {
this.id=id;
}
Public String getName () {
return name;
}
Public void elegantly-named setName (String name) {
this.name=name;
}
Public Integer getCityId () {
Return cityId;
}
Public void setCityId (Integer cityId) {
Enclosing cityId=cityId;
}
@ Override
Public String toString () {
Return Buyer {" + "
"Id=" + id +
"And name='" + name +' \ ' '+
+ cityId ", cityId="+
'} ';
}
}
CodePudding user response:
Don't understand what you want to askCodePudding user response:
The