|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace app\common\model;
|
|
|
|
|
|
+use app\common\validate\KillService;
|
|
|
use think\db\Query;
|
|
|
use think\Model;
|
|
|
|
|
@@ -29,6 +30,14 @@ class GoodsSku Extends Model
|
|
|
return $this->belongsTo(Goods::class);
|
|
|
}
|
|
|
|
|
|
+ public function getRealAmount(){
|
|
|
+ $open=KillService::open();
|
|
|
+ if($open){
|
|
|
+ return $this['amount_kill'];
|
|
|
+ }
|
|
|
+ return $this['amount'];
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
protected static function init()
|
|
|
{
|