# -*- coding:UTF-8 -*-

from db.mod_db import DataBase


class LableDao:
    def __init__(self, db=None):
        if db is None:
            self.dataBase = DataBase()
        else:
            self.dataBase = db

    def select(self, company_name):
        return self.dataBase.fetch_all(
            "select * from `tj_label_depth_all` where company_name = '%s'" % company_name)

    def select_label_slave(self, company_name):
        return self.dataBase.fetch_all(
            "select * from `tj_company_hx` where company_name = '%s'" % company_name)

