新增系统管理员获取任务列表选择下拉
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)
|
data := make([]model.SelectorOut, 0)
|
||||||
err = dao.Merchants.Ctx(ctx).WithAll().Scan(&data)
|
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 {
|
if err != nil {
|
||||||
return nil, ecode.Fail.Sub("获取选择列表失败")
|
return nil, ecode.Fail.Sub("获取选择列表失败")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,3 +98,7 @@ type StoreData struct {
|
|||||||
MerchantId int `json:"merchantId" orm:"merchant_id"`
|
MerchantId int `json:"merchantId" orm:"merchant_id"`
|
||||||
StoreName string `json:"storeName" orm:"name"`
|
StoreName string `json:"storeName" orm:"name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type S struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user