Subversion Repositories SmartDukaan

Rev

Rev 6805 | Rev 6903 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6805 Rev 6848
Line 5... Line 5...
5
'''
5
'''
6
from shop2020.thriftpy.model.v1.catalog.ttypes import Item, Category, \
6
from shop2020.thriftpy.model.v1.catalog.ttypes import Item, Category, \
7
    SourceItemPricing, Source, ItemType, \
7
    SourceItemPricing, Source, ItemType, \
8
    ProductNotificationRequest as TProductNotificationRequest, \
8
    ProductNotificationRequest as TProductNotificationRequest, \
9
    ProductNotificationRequestCount as TProductNotificationRequestCount, \
9
    ProductNotificationRequestCount as TProductNotificationRequestCount, \
10
    VoucherItemMapping, EntityTag as TEntityTag, \
10
    VoucherItemMapping, EntityTag as TEntityTag, Banner as TBanner, BannerMap as TBannerMap, \
11
    Insurer as TInsurer
11
    Insurer as TInsurer
12
from shop2020.utils.Utils import to_java_date
12
from shop2020.utils.Utils import to_java_date
13
from shop2020.model.v1.catalog.impl.DataService import Insurer
13
from shop2020.model.v1.catalog.impl.DataService import Insurer
14
 
14
 
15
def to_t_item(item):
15
def to_t_item(item):
Line 130... Line 130...
130
    return t_product_notification_request_count
130
    return t_product_notification_request_count
131
 
131
 
132
def to_t_entity_tag(entity_tag):
132
def to_t_entity_tag(entity_tag):
133
    t_entity_tag = TEntityTag()
133
    t_entity_tag = TEntityTag()
134
    t_entity_tag.entityId = entity_tag.entityId
134
    t_entity_tag.entityId = entity_tag.entityId
135
    t_entity_tag.tag = entity_tag.tag
-
 
136
135
    t_entity_tag.tag = entity_tag.tag
-
 
136
    
-
 
137
def to_t_banner(banner):
-
 
138
    t_banner = TBanner()
-
 
139
    t_banner.bannerName = banner.bannerName
-
 
140
    t_banner.imageName = banner.imageName
-
 
141
    t_banner.link = banner.link
-
 
142
    t_banner.priority = banner.priority
-
 
143
    t_banner.isActive = banner.isActive
-
 
144
    t_banner.hasMap = banner.hasMap
-
 
145
    return t_banner
-
 
146
 
-
 
147
def to_t_banner_map(banner_map):
-
 
148
    t_banner_map = TBannerMap()
-
 
149
    t_banner_map.bannerName = banner_map.bannerName
-
 
150
    t_banner_map.mapLink = banner_map.mapLink
-
 
151
    t_banner_map.coordinates = banner_map.coordinates
-
 
152
    return t_banner_map
-
 
153