ShopGoods.php 466 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace app\admin\model\dao;
  3. use think\facade\Cache;
  4. use think\facade\Db;
  5. class ShopGoods extends BaseDao
  6. {
  7. public static $table = "db_shop_goods";
  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 getGoodsById($goods_id)
  16. {
  17. return Db::table(self::$table)->where('goods_id', $goods_id)->find();
  18. }
  19. }