新增系统管理员获取任务列表选择下拉
This commit is contained in:
@ -236,7 +236,15 @@ func (s *sTask) GetSelectorList(ctx context.Context, in *model.SelectorIn) (out
|
||||
|
||||
data := make([]model.SelectorOut, 0)
|
||||
err = dao.Merchants.Ctx(ctx).WithAll().Scan(&data)
|
||||
|
||||
for i, v := range data {
|
||||
for j, vv := range v.StoreDatas {
|
||||
str, err := dao.Stores.Ctx(ctx).Fields("name").One(do.Stores{Id: vv.Id})
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("获取门店名称失败")
|
||||
}
|
||||
data[i].StoreDatas[j].StoreName = str.Map()["name"].(string)
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("获取选择列表失败")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user