def execute(self, request): shop = ShopServer.get(request.shop_id) ShopServer.is_name_exist(request.shop_info["name"], shop) if 'channel_id' in request.shop_info: channel = ChannelServer.get(request.shop_info['channel_id']) request.shop_info.update({'channel': channel}) ShopServer.update(shop, **request.shop_info)
def execute(self, request): if "channel_id" in request.search_info: channel = ChannelServer.get(request.search_info["channel_id"]) request.search_info.update({"channel":channel}) shop_list = ShopServer.search_all(**request.search_info) return shop_list
def execute(self, request): shop_page = ShopServer.search(request.current_page, **request.search_info) shop_page.data = MeasureShopServer.hung_measure_forshops( shop_page.data) return shop_page
def execute(self, request): if "shop_name" in request.search_info: shop_name = request.search_info.pop("shop_name") shop_list = ShopServer.search_all(name=shop_name) request.search_info.update({"shop__in": shop_list}) measure_shop_qs = MeasureShopServer.search_qs(**request.search_info) sum_data = MeasureShopServer.summing(measure_shop_qs) measure_shop_page = MeasureShopServer.search(request.current_page, measure_shop_qs) measure_shop_page.data = ChannelServer.hung_channel_forshops( measure_shop_page.data) MeasureShopServer.calculation(measure_shop_page.data) return sum_data, measure_shop_page
def execute(self, request): channel_page = ChannelServer.search(request.current_page, **request.search_info) # 挂载店铺数量 ShopServer.hung_shopnum_bychannel(channel_page.data) return channel_page
def execute(self, request): shop_page = ShopServer.search(request.current_page, **request.search_info) return shop_page
def execute(self, request): ShopServer.is_name_exist(request.shop_info['name']) channel = ChannelServer.get(request.shop_info['channel_id']) request.shop_info.update({'channel': channel}) ShopServer.generate(**request.shop_info)
def execute(self, request): shop_list = ShopServer.match(request.keyword, request.size) return shop_list
def execute(self, request): ShopServer.remove(request.shop_id)
def execute(self, request): shop = ShopServer.get(request.shop_id) return shop
def execute(self, request): staff = self.auth_user shop = ShopServer.get(request.report_info["shop_id"]) request.report_info.update({'shop': shop, 'staff': staff}) MeasureShopServer.generate(**request.report_info)
def execute(self, request): shop = ShopServer.get(request.report_info["shop_id"]) request.report_info.update({"shop": shop}) MeasureShopServer.update(request.report_id, **request.report_info)