Переглянути джерело

修改GetShopNaviAll接口

jyq 4 роки тому
батько
коміт
b27f3f02b6
2 змінених файлів з 6 додано та 6 видалено
  1. 4 4
      assembly/base/service/shop.go
  2. 2 2
      repository/grpc/bsw/im/api.go

+ 4 - 4
assembly/base/service/shop.go

@@ -64,7 +64,7 @@ func (s Shop) ManageableGetShopInfo(token string, r *pb.ShopDetailRequest) *pb.S
 
 	rst := im.ShopDetail(r.ShopId)
 
-	navi := im.GetShopNavi(int64(optId), r.GetShopId(), 0)
+	navi := im.GetShopNavi(int64(optId), r.GetShopId(), 0, s.WebStatusToManageStatus(pb.WebStatus_On))
 	var isHr, isScore int64 = 0, 0
 	if len(navi.List) > 0 {
 		for _, v := range navi.List {
@@ -124,7 +124,7 @@ func (s Shop) LicenseTypeMap(token string, r *pb.IdList) *pb.LicenseTypeMapReply
 func (s Shop) GetShopNavi(token string, r *pb.GetShopNaviRequest) *pb.GetShopNaviReply {
 	optId := s.checkPermission(token, r.GetShopId())
 
-	rst := im.GetShopNavi(optId, r.GetShopId(), r.GetParentId())
+	rst := im.GetShopNavi(optId, r.GetShopId(), r.GetParentId(), s.WebStatusToManageStatus(pb.WebStatus_On))
 	var info []*pb.Column
 	if len(rst.List) > 0 {
 		for _, v := range rst.List {
@@ -168,7 +168,7 @@ type Navi struct {
 func (s Shop) GetShopNaviAll(token string, r *pb.GetShopNaviAllRequest) *pb.GetShopNaviAllReply {
 	optId := s.checkPermission(token, r.GetShopId())
 
-	rst := im.GetShopNavi(optId, r.GetShopId(), 0)
+	rst := im.GetShopNavi(optId, r.GetShopId(), 0, s.WebStatusToManageStatus(pb.WebStatus_On))
 	var info []*ShopColumn
 	if len(rst.List) > 0 {
 		for _, v := range rst.List {
@@ -181,7 +181,7 @@ func (s Shop) GetShopNaviAll(token string, r *pb.GetShopNaviAllRequest) *pb.GetS
 			l.Id = strconv.FormatInt(v.Id, 10)
 			l.Status = s.ManageStatusToWebStatus(v.Status)
 			l.Icon = v.Icon
-			secRs := im.GetShopNavi(optId, r.GetShopId(), v.Id)
+			secRs := im.GetShopNavi(optId, r.GetShopId(), v.Id, s.WebStatusToManageStatus(pb.WebStatus_On))
 			if secRs.List != nil {
 				for _, v := range secRs.List {
 					n := Navi{}

+ 2 - 2
repository/grpc/bsw/im/api.go

@@ -152,9 +152,9 @@ func LicenseTypeMap(idList []int64) *im.LicenseTypeMapReply {
 	return rs
 }
 
-func GetShopNavi(userId, shopId int64, parentId int64) *im.UserGetColumnListReply {
+func GetShopNavi(userId, shopId int64, parentId int64, status im.Status) *im.UserGetColumnListReply {
 
-	request := &im.UserGetColumnListRequest{UserId: userId, ShopId: shopId, ParentId: parentId, Status: 1}
+	request := &im.UserGetColumnListRequest{UserId: userId, ShopId: shopId, ParentId: parentId, Status: status}
 
 	rs, err := getClient().UserGetColumnList(ctx(), request)
 	handleErr(err)