refactor: reorganize modules and add Linux build tooling
This commit is contained in:
29
module/ec/mall/internal/logic/notice/ref.go
Normal file
29
module/ec/mall/internal/logic/notice/ref.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package notice
|
||||
|
||||
import (
|
||||
"bsm/full/module/ec/mall/internal/models"
|
||||
pb "bsm/full/module/ec/mall/pb"
|
||||
"git.apinb.com/bsm-sdk/core/vars"
|
||||
)
|
||||
|
||||
func ref(data []*models.MallNotice) (list []*pb.NoticeItem) {
|
||||
if len(data) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
for _, in := range data {
|
||||
row := pb.NoticeItem{
|
||||
Identity: in.Identity,
|
||||
Title: in.Title,
|
||||
StoreId: int64(in.Store_ID),
|
||||
StoreIdentity: in.Store_Identity,
|
||||
Author: in.Author,
|
||||
Content: in.Content,
|
||||
CreatedAt: in.CreatedAt.Format(vars.YYYY_MM_DD_HH_MM_SS),
|
||||
Status: int64(in.Status),
|
||||
}
|
||||
|
||||
list = append(list, &row)
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user