Subversion Repositories SmartDukaan

Rev

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

Rev 8362 Rev 8579
Line 8... Line 8...
8
    SourceItemPricing, Source, ItemType, \
8
    SourceItemPricing, Source, ItemType, \
9
    ProductNotificationRequest as TProductNotificationRequest, \
9
    ProductNotificationRequest as TProductNotificationRequest, \
10
    ProductNotificationRequestCount as TProductNotificationRequestCount, \
10
    ProductNotificationRequestCount as TProductNotificationRequestCount, \
11
    VoucherItemMapping, EntityTag as TEntityTag, Banner as TBanner, BannerMap as TBannerMap, \
11
    VoucherItemMapping, EntityTag as TEntityTag, Banner as TBanner, BannerMap as TBannerMap, \
12
    Insurer as TInsurer, BrandInfo as TBrandInfo, Amazonlisted as TAmazonlisted, \
12
    Insurer as TInsurer, BrandInfo as TBrandInfo, Amazonlisted as TAmazonlisted, \
13
    EbayItem as TEbayItem
13
    EbayItem as TEbayItem, BannerUriMapping as TBannerUriMapping, Campaign as TCampaign
14
from shop2020.utils.Utils import to_java_date
14
from shop2020.utils.Utils import to_java_date
15
 
15
 
16
def to_t_item(item):
16
def to_t_item(item):
17
    t_item = Item()
17
    t_item = Item()
18
    if item is None:
18
    if item is None:
Line 143... Line 143...
143
    t_banner = TBanner()
143
    t_banner = TBanner()
144
    t_banner.bannerName = banner.bannerName
144
    t_banner.bannerName = banner.bannerName
145
    t_banner.imageName = banner.imageName
145
    t_banner.imageName = banner.imageName
146
    t_banner.link = banner.link
146
    t_banner.link = banner.link
147
    t_banner.priority = banner.priority
147
    t_banner.priority = banner.priority
148
    t_banner.isActive = banner.isActive
-
 
149
    t_banner.hasMap = banner.hasMap
148
    t_banner.hasMap = banner.hasMap
150
    return t_banner
149
    return t_banner
151
 
150
 
-
 
151
def to_t_banner_list(bannerList):
-
 
152
    t_banner_list = []
-
 
153
    for banner in bannerList:
-
 
154
        t_banner = TBanner()
-
 
155
        t_banner.bannerName = banner.bannerName
-
 
156
        t_banner.imageName = banner.imageName
-
 
157
        t_banner.link = banner.link
-
 
158
        t_banner.priority = banner.priority
-
 
159
        t_banner.hasMap = banner.hasMap
-
 
160
        t_banner_list.append(t_banner)
-
 
161
    return t_banner_list
-
 
162
        
-
 
163
 
152
def to_t_banner_map(banner_map):
164
def to_t_banner_map(banner_map):
153
    t_banner_map = TBannerMap()
165
    t_banner_map = TBannerMap()
154
    t_banner_map.bannerName = banner_map.bannerName
166
    t_banner_map.bannerName = banner_map.bannerName
155
    t_banner_map.mapLink = banner_map.mapLink
167
    t_banner_map.mapLink = banner_map.mapLink
156
    t_banner_map.coordinates = banner_map.coordinates
168
    t_banner_map.coordinates = banner_map.coordinates
157
    return t_banner_map
169
    return t_banner_map
158
 
170
 
-
 
171
def to_t_uri_mapping(uriMapping):
-
 
172
    t_uri_mapping =TBannerUriMapping()
-
 
173
    t_uri_mapping.bannerName = uriMapping.bannerName
-
 
174
    t_uri_mapping.uri = uriMapping.uri
-
 
175
    t_uri_mapping.isActive = uriMapping.isActive
-
 
176
    return t_uri_mapping
-
 
177
 
-
 
178
def to_t_campaign(campaign):
-
 
179
    t_campaign = TCampaign()
-
 
180
    t_campaign.id = campaign.id
-
 
181
    t_campaign.campaignName = campaign.campaignName
-
 
182
    t_campaign.imageName = campaign.imageName
-
 
183
    return t_campaign
-
 
184
 
159
def to_t_Amazonlisted(Amazonlisted):
185
def to_t_Amazonlisted(Amazonlisted):
160
    t_amazonlisted = TAmazonlisted()
186
    t_amazonlisted = TAmazonlisted()
161
    if Amazonlisted is None:
187
    if Amazonlisted is None:
162
        return t_amazonlisted
188
        return t_amazonlisted
163
    t_amazonlisted.asin = Amazonlisted.asin
189
    t_amazonlisted.asin = Amazonlisted.asin