ShopGoodsSpec.php 475 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace app\admin\model\dao;
  3. use think\facade\Cache;
  4. use think\facade\Db;
  5. class ShopGoodsSpec extends BaseDao
  6. {
  7. public static $table = "db_shop_goods_spec";
  8. public function __construct()
  9. {
  10. }
  11. public static function getList()
  12. {
  13. return Db::table(self::$table)->select()->toArray();
  14. }
  15. public static function getGoodsSpecByGoodId($id)
  16. {
  17. return Db::table(self::$table)->where(['goods_id' => $id])->find();
  18. }
  19. }