$GoodsMoneyModel=new\app\admin\model\GoodsMoney();$update=array();$update['product_price']=$moneydata['price'];$update['product_seller_price']=$moneydata['seller_price'];...
$GoodsMoneyModel = new \app\admin\model\GoodsMoney();
$update = array();
$update['product_price'] = $moneydata['price'];
$update['product_seller_price'] = $moneydata['seller_price'];
$update['product_market_price'] = $moneydata['market'];
$update['price'] = \think\Db::raw('profit_price+'.$update['product_price']);
$update['seller_price'] = \think\Db::raw('profit_price+'.$update['product_seller_price']);
$update['update_time'] = time();
$result = $GoodsMoneyModel->where(['product_id' => $has['product_id'], 'size_id' => $has['size_id']])->update($update);
结果报错method not exist:think\db\Query->raw
怎么解决
展开