refactor: reorganize modules and add Linux build tooling
This commit is contained in:
34
module/ec/market/internal/logic/supply/ref.go
Normal file
34
module/ec/market/internal/logic/supply/ref.go
Normal file
@@ -0,0 +1,34 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user