示例#1
0
class CityAvgPriceHandle(BaseController):
    """
    desc: [MP接口] 城市均价接口

    """
    def initialize(self):
        self.service = MiniProgramService()

    @catch()  # 异常装饰器
    def post(self, *args, **kwargs):
        city = kwargs.get('city', '')
        data = self.service.city_avgprice(city=city)
        return data
示例#2
0
class SellWeekChangeCnt(BaseController):
    """
    desc: [MP接口] 二手房城市成交城区房源分布

    """
    def initialize(self):
        self.service = MiniProgramService()

    @catch()  # 异常装饰器
    def get(self, *args, **kwargs):
        city = kwargs.get('city')
        data = self.service.sellFinishCityareaDistribution(city=city)
        return {"data": data}
示例#3
0
class HousetypeDistributionHandle(BaseController):
    """
    desc: [MP接口] 户型分布
    """
    def initialize(self):
        self.service = MiniProgramService()

    @catch()  # 异常装饰器
    def post(self, *args, **kwargs):
        city = kwargs.get('city', '')
        pms = json.loads(self.request.body)
        data = self.service.getHousetypeDistribution(city=city, pms=pms)
        return data
示例#4
0
class SellWeekChangeCnt(BaseController):
    """
    desc: [MP接口] 房源变动趋势接口

    """
    def initialize(self):
        self.service = MiniProgramService()

    @catch()  # 异常装饰器
    def get(self, *args, **kwargs):
        city = kwargs.get('city')
        cityarea_id = int(self.get_argument("cityarea_id", 0))
        cityarea2_id = int(self.get_argument("cityarea2_id", 0))
        data = self.service.sell_week_change_cnt(city=city,
                                                 cityarea_id=cityarea_id,
                                                 cityarea2_id=cityarea2_id)
        return {"data": data}
示例#5
0
 def initialize(self):
     self.service = MiniProgramService()