diff --git a/app/admin/logic/inventory_transfer/InventoryTransferLogic.php b/app/admin/logic/inventory_transfer/InventoryTransferLogic.php index bae2f627..39a61e46 100644 --- a/app/admin/logic/inventory_transfer/InventoryTransferLogic.php +++ b/app/admin/logic/inventory_transfer/InventoryTransferLogic.php @@ -82,14 +82,22 @@ class InventoryTransferLogic extends BaseLogic 'two_id' => $params['two_id'] ]); if($params['one_type']==1){ - StoreBranchProduct::where('product_id', $params['product_id'])->where('store_id', $params['one_id'])->dec('stock', $params['nums'])->update(); + $find=StoreBranchProduct::where('product_id', $params['product_id'])->where('store_id', $params['one_id'])->find(); + $find->save(['stock' =>bcsub( $find['stock'],$params['nums'],2)]); + SqlChannelLog('StoreBranchProduct', $find['id'], $params['nums'], -1, Request()->url()); } elseif ($params['one_type'] == 2) { - WarehouseProductStorege::where('product_id', $params['product_id'])->where('warehouse_id', $params['one_id'])->dec('nums', $params['nums'])->update(); + $find=WarehouseProductStorege::where('product_id', $params['product_id'])->where('warehouse_id', $params['one_id'])->find(); + $find->save(['nums' =>bcsub( $find['nums'],$params['nums'],2)]); + SqlChannelLog('WarehouseProductStorege', $find['id'], $params['nums'], -1, Request()->url()); } if($params['two_type']==1){ - StoreBranchProduct::where('product_id', $params['product_id'])->where('store_id', $params['two_id'])->inc('stock', $params['nums'])->update(); + $find=StoreBranchProduct::where('product_id', $params['product_id'])->where('store_id', $params['two_id'])->find(); + $find->save(['stock' =>bcadd( $find['stock'],$params['nums'],2)]); + SqlChannelLog('StoreBranchProduct', $find['id'], $params['nums'], 1, Request()->url()); } elseif ($params['two_type'] == 2) { - WarehouseProductStorege::where('product_id', $params['product_id'])->where('warehouse_id', $params['two_id'])->inc('nums', $params['nums'])->update(); + $find=WarehouseProductStorege::where('product_id', $params['product_id'])->where('warehouse_id', $params['two_id'])->find(); + $find->save(['nums' =>bcadd( $find['nums'],$params['nums'],2)]); + SqlChannelLog('WarehouseProductStorege', $find['id'], $params['nums'], 1, Request()->url()); } Db::commit(); return true; diff --git a/app/admin/logic/warehouse_product/WarehouseProductLogic.php b/app/admin/logic/warehouse_product/WarehouseProductLogic.php index 1a1962d6..3fd3e1bd 100644 --- a/app/admin/logic/warehouse_product/WarehouseProductLogic.php +++ b/app/admin/logic/warehouse_product/WarehouseProductLogic.php @@ -37,7 +37,6 @@ class WarehouseProductLogic extends BaseLogic { // Db::startTrans(); try { - $before_nums = 0; $after_nums = 0; if ($params['order_type'] != 6) { $storege = WarehouseProductStorege::where('warehouse_id', $params['warehouse_id'])->where('product_id', $params['product_id'])->find(); @@ -48,23 +47,24 @@ class WarehouseProductLogic extends BaseLogic if (!$storeProduct) { throw new BusinessException('商品不存在'); } - if($storeProduct['purchase']<=0){ - $total_price=0; - }else{ + if ($storeProduct['purchase'] <= 0) { + $total_price = 0; + } else { $total_price = bcmul($after_nums, $storeProduct['purchase'], 2); } WarehouseProductStorege::update(['nums' => $after_nums, 'total_price' => $total_price], ['id' => $storege['id']]); + SqlChannelLog('WarehouseProductStorege', $storege['id'], $after_nums, 1, Request()->url()); + } - $before_nums = $storege['nums']; } else { $after_nums = $params['nums']; $storeProduct = StoreProduct::where('id', $params['product_id'])->findOrEmpty(); if (!$storeProduct) { throw new BusinessException('商品不存在'); } - if($storeProduct['purchase']<=0){ - $total_price=0; - }else{ + if ($storeProduct['purchase'] <= 0) { + $total_price = 0; + } else { $total_price = bcmul($after_nums, $storeProduct['purchase'], 2); } $data = [ @@ -77,6 +77,8 @@ class WarehouseProductLogic extends BaseLogic $data['nums'] = -$params['nums']; } $storege = WarehouseProductStorege::create($data); + SqlChannelLog('WarehouseProductStorege', $storege['id'], -$params['nums'], 1, Request()->url()); + } } $batch_count = WarehouseProduct::where(['product_id' => $params['product_id'], 'warehouse_id' => $params['warehouse_id'], 'financial_pm' => $params['financial_pm'], 'store_id' => $params['store_id']])->count(); @@ -89,8 +91,8 @@ class WarehouseProductLogic extends BaseLogic 'financial_pm' => $params['financial_pm'], 'batch' => $batch_count + 1, 'nums' => $params['nums'], - 'before_nums' => $before_nums, - 'after_nums' => $after_nums, + 'before_nums' => 0, + 'after_nums' => 0, 'price' => $params['price'] ?? '', 'purchase' => $params['purchase'] ?? '', // 'cost' => $params['cost'] ?? '', @@ -108,6 +110,8 @@ class WarehouseProductLogic extends BaseLogic $data['expiration_date'] = strtotime($params['expiration_date']); } $res = WarehouseProduct::create($data); + SqlChannelLog('WarehouseProduct', $res['id'], $params['nums'], $params['financial_pm'] == 1 ? 1 : -1, Request()->url()); + return $res; } catch (\Throwable $e) { throw new BusinessException($e->getMessage()); @@ -125,7 +129,7 @@ class WarehouseProductLogic extends BaseLogic if ($params['order_type'] != 6) { $storege = WarehouseProductStorege::where('warehouse_id', $params['warehouse_id'])->where('product_id', $params['product_id'])->find(); if ($storege) { - if(in_array($params['order_type'],[1,4])){ + if (in_array($params['order_type'], [1, 4])) { SystemStoreStorage::create([ 'store_id' => $params['store_id'], 'admin_id' => $params['admin_id'], @@ -140,6 +144,7 @@ class WarehouseProductLogic extends BaseLogic $after_nums = bcsub($storege['nums'], $params['nums']); $total_price = bcmul($after_nums, $params['purchase'], 2); WarehouseProductStorege::update(['nums' => bcsub($storege['nums'], $params['nums']), 'total_price' => $total_price], ['id' => $storege['id']]); + SqlChannelLog('WarehouseProductStorege', $storege['id'], bcsub($storege['nums'], $params['nums']), -1, Request()->url()); } else { $data = [ 'warehouse_id' => $params['warehouse_id'], @@ -148,6 +153,7 @@ class WarehouseProductLogic extends BaseLogic 'total_price' => 0 ]; $storege = WarehouseProductStorege::create($data); + SqlChannelLog('WarehouseProductStorege', $storege->id, -$params['nums'], -1, Request()->url()); } } else { $storege['nums'] = 0; @@ -176,6 +182,8 @@ class WarehouseProductLogic extends BaseLogic 'mark' => $params['mark'] ?? '', ]; $res = WarehouseProduct::create($data); + SqlChannelLog('WarehouseProduct', $res->id, $params['nums'], $params['financial_pm'] == 1 ? 1 : -1, Request()->url()); + Db::commit(); return $res; } catch (\Throwable $e) { @@ -195,42 +203,20 @@ class WarehouseProductLogic extends BaseLogic { Db::startTrans(); try { - $before_nums = 0; - $after_nums = 0; $find = WarehouseOrder::where('id', $params['oid'])->find(); if ($find) { $res = WarehouseProduct::where('id', $params['id'])->find(); - - if ($find['financial_pm'] == 1) { - WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->dec('nums', $res['nums'])->update(); - StoreBranchProduct::where('store_id', $res['store_id'])->where('product_id', $res['product_id'])->dec('stock', $res['nums'])->update(); - - $warehouseProductStorege = WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->find(); - WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->inc('nums', $params['nums'])->update(); - StoreBranchProduct::where('store_id', $res['store_id'])->where('product_id', $res['product_id'])->inc('stock', $params['nums'])->update(); - $before_nums = $warehouseProductStorege['nums']; - $after_nums = $warehouseProductStorege['nums'] + $params['nums']; - } else { - WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->inc('nums', $res['nums'])->update(); - StoreBranchProduct::where('store_id', $res['store_id'])->where('product_id', $res['product_id'])->dec('stock', $res['nums'])->update(); - - $warehouseProductStorege = WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->find(); - WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->dec('nums', $params['nums'])->update(); - StoreBranchProduct::where('store_id', $res['store_id'])->where('product_id', $res['product_id'])->inc('stock', $params['nums'])->update(); - $before_nums = $warehouseProductStorege['nums']; - $after_nums = bcsub($warehouseProductStorege['nums'], $params['nums'], 2); - } + self::decStock($res); + self::incStock($res, $params); $datas = [ 'nums' => $params['nums'], - 'before_nums' => $before_nums, - 'after_nums' => $after_nums, 'total_price' => $params['total_price'], ]; - if($find['financial_pm']==1){ + if ($find['financial_pm'] == 1) { $datas['supplier_id'] = $params['supplier_id']; $datas['pay_type'] = $params['pay_type']; $datas['purchase'] = $params['purchase']; - }else{ + } else { $datas['price'] = $params['price']; } if (isset($params['manufacture']) && $params['manufacture'] != '') { @@ -239,7 +225,7 @@ class WarehouseProductLogic extends BaseLogic if (isset($params['expiration_date']) && $params['expiration_date'] != '') { $datas['expiration_date'] = strtotime($params['expiration_date']); } - WarehouseProduct::where('id', $params['id'])->update($datas); + $res->save($datas); $finds = WarehouseProduct::where('oid', $params['oid'])->field('sum(nums) as nums,sum(total_price) as total_price')->find(); if ($finds) { WarehouseOrder::where('id', $params['oid'])->update([ @@ -269,14 +255,11 @@ class WarehouseProductLogic extends BaseLogic if ($res) { $res->delete(); if ($res['financial_pm'] == 1) { - WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->dec('nums', $res['nums'])->update(); + $find = WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->dec('nums', $res['nums'])->save(); + SqlChannelLog('WarehouseProductStorege', $find['id'], $res['nums'], -1, Request()->url()); } elseif ($res['financial_pm'] == 0) { - $stock = StoreBranchProduct::where(['store_id' => $res['store_id'], 'product_id' => $res['product_id']])->value('stock'); - if ($stock < $res['nums']) { - throw new BusinessException('商品库存不足,无法退回'); - } - StoreBranchProduct::where(['store_id' => $res['store_id'], 'product_id' => $res['product_id']])->dec('stock', $res['nums'])->update(); - WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->inc('nums', $res['nums'])->update(); + $find = WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->inc('nums', $res['nums'])->save(); + SqlChannelLog('WarehouseProductStorege', $find['id'], $res['nums'], 1, Request()->url()); } $find = WarehouseProduct::where('oid', $res['oid'])->field('sum(nums) as nums,sum(total_price) as total_price')->find(); if ($find) { @@ -321,44 +304,15 @@ class WarehouseProductLogic extends BaseLogic { Db::startTrans(); try { - $res = WarehouseProduct::where('id',$params['id'])->find(); + $res = WarehouseProduct::where('id', $params['id'])->find(); if ($res) { - if ($res['financial_pm'] == 1) { - WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->dec('nums', $res['nums'])->update(); - StoreBranchProduct::where('store_id', $res['store_id'])->where('product_id', $res['product_id'])->dec('stock', $res['nums'])->update(); - - $warehouseProductStorege = WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->find(); - WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->inc('nums', $params['nums'])->update(); - StoreBranchProduct::where('store_id', $res['store_id'])->where('product_id', $res['product_id'])->inc('stock', $params['nums'])->update(); - $before_nums = $warehouseProductStorege['nums']; - $after_nums = $warehouseProductStorege['nums'] + $params['nums']; - } else { - WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->inc('nums', $res['nums'])->update(); - StoreBranchProduct::where('store_id', $res['store_id'])->where('product_id', $res['product_id'])->dec('stock', $res['nums'])->update(); - - $warehouseProductStorege = WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->find(); - WarehouseProductStorege::where('warehouse_id', $res['warehouse_id'])->where('product_id', $res['product_id'])->dec('nums', $params['nums'])->update(); - StoreBranchProduct::where('store_id', $res['store_id'])->where('product_id', $res['product_id'])->inc('stock', $params['nums'])->update(); - $before_nums = $warehouseProductStorege['nums']; - $after_nums = bcsub($warehouseProductStorege['nums'], $params['nums'], 2); - } - if($res['financial_pm']==1){ - $datas=[ - 'nums' => $params['nums'], - 'before_nums' => $before_nums, - 'after_nums' => $after_nums, - 'total_price' => bcmul($params['nums'], $res['purchase'], 2), - - ]; - }else{ - $datas=[ - 'nums' => $params['nums'], - 'before_nums' => $before_nums, - 'after_nums' => $after_nums, - 'total_price' => bcmul($params['nums'], $res['price'], 2), - ]; - } - WarehouseProduct::where('id', $params['id'])->update($datas); + self::decStock($res); + self::incStock($res, $params); + $datas = [ + 'nums' => $params['nums'], + 'total_price' => bcmul($params['nums'], $res['price'], 2), + ]; + $res->save($datas); $finds = WarehouseProduct::where('oid', $res['oid'])->field('sum(nums) as nums')->find(); if ($finds) { WarehouseOrder::where('id', $res['oid'])->update([ @@ -388,4 +342,35 @@ class WarehouseProductLogic extends BaseLogic } return $data; } + + //减少 + private static function decStock($res) + { + $res = WarehouseProductStorege::where('warehouse_id', $res['warehouse_id']) + ->where('product_id', $res['product_id']) + ->dec('nums', $res['nums']) + ->save(); + SqlChannelLog('WarehouseProductStorege', $res['id'], $res['nums'], -1, Request()->url()); + + $res2 = StoreBranchProduct::where('id', $res['id']) + ->dec('stock', $res['nums']) + ->update(); + SqlChannelLog('StoreBranchProduct', $res2['id'], $res['nums'], -1, Request()->url()); + } + + //增加 + private static function incStock($res, $params) + { + $res = WarehouseProductStorege::where('warehouse_id', $res['warehouse_id']) + ->where('product_id', $res['product_id']) + ->inc('nums', $params['nums']) + ->save(); + SqlChannelLog('WarehouseProductStorege', $res['id'], $res['nums'], 1, Request()->url()); + + + $res2 = StoreBranchProduct::where('id', $res['id']) + ->inc('stock', $params['nums']) + ->save(); + SqlChannelLog('StoreBranchProduct', $res2['id'], $res['nums'], 1, Request()->url()); + } } diff --git a/app/admin/logic/warehouse_product_return/WarehouseProductReturnLogic.php b/app/admin/logic/warehouse_product_return/WarehouseProductReturnLogic.php index a2594842..f1567fc6 100644 --- a/app/admin/logic/warehouse_product_return/WarehouseProductReturnLogic.php +++ b/app/admin/logic/warehouse_product_return/WarehouseProductReturnLogic.php @@ -114,9 +114,13 @@ class WarehouseProductReturnLogic extends BaseLogic WarehouseOrder::where(['id' => $find['oid']])->update(['total_price' => $total_price]); BeforehandOrder::update(['pay_price' => $total_price], ['id' => $params['bhoid']]); } - WarehouseProductStorege::where(['product_id' => $find['product_id'], 'warehouse_id' => $find['warehouse_id']])->inc('nums', $params['nums'])->update(); + $res=WarehouseProductStorege::where(['product_id' => $find['product_id'], 'warehouse_id' => $find['warehouse_id']])->find(); + $res->save(['nums' =>bcadd( $res['nums'],$params['nums'],2)]); + SqlChannelLog('WarehouseProductStorege', $res['id'], $params['nums'], 1, Request()->url()); } elseif ($params['financial_pm'] == 0 && $params['return_type'] == 2) { - WarehouseProductStorege::where(['product_id' => $find['product_id'], 'warehouse_id' => $find['warehouse_id']])->dec('nums', $params['nums'])->update(); + $res=WarehouseProductStorege::where(['product_id' => $find['product_id'], 'warehouse_id' => $find['warehouse_id']])->find(); + $res->save(['nums' =>bcsub( $res['nums'],$params['nums'],2)]); + SqlChannelLog('WarehouseProductStorege', $res['id'], $params['nums'], -1, Request()->url()); } } diff --git a/app/admin/logic/warehouse_product_storege/WarehouseProductStoregeLogic.php b/app/admin/logic/warehouse_product_storege/WarehouseProductStoregeLogic.php index f993e40f..35e21387 100644 --- a/app/admin/logic/warehouse_product_storege/WarehouseProductStoregeLogic.php +++ b/app/admin/logic/warehouse_product_storege/WarehouseProductStoregeLogic.php @@ -44,6 +44,7 @@ class WarehouseProductStoregeLogic extends BaseLogic $find=WarehouseProductStorege::where('id',$params['id'])->find(); if($find){ $find->save(['nums'=>$params['nums']]); + SqlChannelLog('WarehouseProductStorege', $params['id'], $params['nums'], 0,Request()->url()); } Db::commit(); return true; diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index 86b30def..c1277288 100644 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -11,6 +11,7 @@ use app\admin\logic\tools\GeneratorLogic; use app\api\lists\purchase_product_offer\PurchaseProductOfferListsTwo; use app\api\logic\order\OrderLogic as OrderOrderLogic; use app\common\cache\ExportCache; +use app\common\logic\ChangeLogLogic; use app\common\logic\PayNotifyLogic; use app\common\logic\store_order\StoreOrderLogic; use app\common\model\beforehand_order_record\BeforehandOrderRecord; @@ -50,14 +51,15 @@ use PhpOffice\PhpWord\Settings; use PhpOffice\PhpWord\IOFactory; use PhpOffice\PhpWord\Shared\Converter; use PhpOffice\PhpWord\Style\Font; +use Chance\Log\facades\OperationLog; class IndexController extends BaseApiController { - public $notNeedLogin = ['index', 'app_update', 'express_list', 'province', 'city', 'area', 'street', 'village', 'brigade', 'config', 'push', 'purchase_product_offer']; + public $notNeedLogin = ['aa','index', 'app_update', 'express_list', 'province', 'city', 'area', 'street', 'village', 'brigade', 'config', 'push', 'purchase_product_offer']; public function index() { - d(1); + d(1); $arr = Db::name('ceshi_copy')->select(); foreach ($arr as $k => $v) { $data = [ @@ -301,8 +303,8 @@ class IndexController extends BaseApiController if ($find) { Db::name('wps_product')->where('id', $find['id'])->update($arr); } else { - $arr['product_id']=$data['product_id']; - $arr['name']=$data['name']; + $arr['product_id'] = $data['product_id']; + $arr['name'] = $data['name']; Db::name('wps_product')->insert($arr); } } @@ -310,4 +312,53 @@ class IndexController extends BaseApiController return $this->fail('时间不能为空'); } } + + public function aa(){ + $boyd = $this->request->post(); + // 计算body的MD5值 + $microtime = microtime(true); + +// 将秒和微秒数转换为毫秒级时间戳 +$millisecondTimestamp = number_format($microtime * 1000, 0, '', ''); +// 输出结果 + $time = $millisecondTimestamp; + + // 需要签名的数据 + $data = [ + 'appid' => 'e328e0d083784b8cbbd8a45e2a13b430', + 'timestamp' => $time, + 'version' => "1.0.0" + ]; + $md5='{}'; + if($boyd){ + $md5 = md5(json_encode($boyd,true)); + $data['md5']=$md5; + }else{ + $md5 = md5($md5); + $data['md5']=$md5; + } + // 获取token + $token=$this->request->header('token'); + if($token){ + $data['token']=$token; + } + // 按字母顺序排序 + ksort($data); + + // 转换为JSON字符串 + $jsonString = json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); + // RSA私钥 + $privateKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAKYtaukWByNHG8VZsvfIwEeJUKa0t2RaNNMp/IlgWj/29aK+nCZZC+zROc8xjQAAHKbQgwXeFzizzDb98Q8Qavgo+8zuNi2V45sj12+7yC1tfX4zRkm4Yqri+YifJLNXxoh46dvx9CsNrKT/e5we6irxaWJoXxGxeZ4pA1JpcrwHAgMBAAECgYBnoELe/yGMWjdzJbB42/MrqPFmQ6NpLOdsFu6oLDGbWcFrrzlooHbTQtWt4tRuf6NeUwChlBEfBt/+GvVL040gF2T2ylsMi3biktZDSlT/+DI7H5S1x4aBplIBc4yAp/vrFTyWmxdULEksap2BUf5fEqG/CVcWMI2zszORQi4QAQJBAO4z9FsOyPZ0ycrCFmQD9AYPzmnBvgTg/uU0xGY7yus8zIt29TL1uE77/ksmGxJQXXcRUt2ytPVm9YqXnXS/EgcCQQCyl9l7Kdr/eifOcRd9wAAXwsHKkjfJR1Vd1igv5wCZqSkXK2qxxvQDPE98HugosNkFxuyedFbfrbSQpPUjnIYBAkAyDXK8K4go2XOJim0ACSCeoXWjHVXbWpfU+9iFDu1drsHgUFfHpIBdAHB3xAMOPxrUqSw7b5C8vCy+OYuZe4jDAkAdpsqMAWID4sMzKmGtFjCtwT8to+MxPu+0ebcIZQEbghN5blLzm0WuN9g2kmcXQm114RYuJMC7uHpvPYQZ2oYBAkBBzytKuG5EhbsI5flwxYGTDvQtY1TGvsYVrt0anirPa9xVq+RYC2Jr9zk0j8s13QhXoVwAO6seO7cYN9n8J65t"; + + // 解码私钥 + $privateKeyPem = "-----BEGIN PRIVATE KEY-----\n" . wordwrap($privateKey, 64, "\n", true) . "\n-----END PRIVATE KEY-----"; + // 获取私钥资源 + $privateKeyResource = openssl_pkey_get_private($privateKeyPem); + openssl_sign($jsonString, $signature, $privateKeyResource, OPENSSL_ALGO_SHA1); + + // 将签名进行Base64编码 + $signatureString = base64_encode($signature); + + d($md5,$time,$signatureString); + } } diff --git a/app/functions.php b/app/functions.php index 2548a229..a1ba54d9 100644 --- a/app/functions.php +++ b/app/functions.php @@ -4,6 +4,7 @@ * Here is your custom functions. */ +use app\common\logic\ChangeLogLogic; use app\common\service\FileService; use support\Log; @@ -546,7 +547,18 @@ function channelLog($data, $type, $title = '更新前') $log = Log::channel($type); $log->info($title, $data); } - +/** + * 日志记录 + * @param model 模型 + * @param id 更新的模型组件id + * @param nums 更新的数量 + * @param pm 1:增加 -1:减少 + * @param url 请求地址 + */ +function SqlChannelLog($model='', $id=0, $nums=0,$pm=0,$url=''):void +{ + (new ChangeLogLogic())->insert($model, $id, $nums, $pm, $url); +} // if (!function_exists('getNewOrderSn')) { // /**