35 lines
759 B
Go
35 lines
759 B
Go
package supply
|
|
|
|
import (
|
|
"bsm/full/module/ec/market/internal/models"
|
|
pb "bsm/full/module/ec/market/pb"
|
|
)
|
|
|
|
func ref(data []*models.MarketSupply) (list []*pb.MarketSupplyItem) {
|
|
if len(data) == 0 {
|
|
return
|
|
}
|
|
|
|
for _, in := range data {
|
|
row := pb.MarketSupplyItem{
|
|
Id: int32(in.ID),
|
|
Identity: in.Identity,
|
|
Name: in.Name,
|
|
Avatar: in.Avatar,
|
|
Account: in.Account,
|
|
Phone: in.Phone,
|
|
OrgName: in.OrgName,
|
|
OrgPhoto: in.OrgPhoto,
|
|
IdName: in.IDName,
|
|
IdBefore: in.IDBefore,
|
|
IdAfter: in.IDAfter,
|
|
Remark: in.Remark,
|
|
CommissionRate: in.CommissionRate,
|
|
Status: int32(in.Status),
|
|
}
|
|
|
|
list = append(list, &row)
|
|
}
|
|
return
|
|
}
|