You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nt_backend/application/common/model/ProjectOrderMaterial.php

27 lines
605 B

<?php
namespace app\common\model;
use think\Model;
class ProjectOrderMaterial extends Model
{
// 表名
protected $name = 'project_order_material';
// 开启自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
protected $resultSetType = 'collection';
public static function getInfo($order_id) {
return self::where('order_id', $order_id)->find();
}
public static function getListByOrderId($order_id) {
$return = self::where('order_id', $order_id)->find();
return ProjectMaterial::getInfoByIds($return['material_ids']);
}
}