#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2020/4/22 0022 上午 10:28
# @Author  : hj
# @File    : GetImageFromSql_dao.py
# @Software: PyCharm

from db.mod_db import DataBase


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

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



    def select_product(self, companyname):
        return self.dataBase.fetch_all(
            "SELECT * from `tj_product_result_copy1_test_0317` where companyname='%s'" % companyname)