老库存注释
This commit is contained in:
@@ -221,7 +221,6 @@ class Shopping extends Base
|
|||||||
$message_edit['remark'] = $message['remark'];
|
$message_edit['remark'] = $message['remark'];
|
||||||
}
|
}
|
||||||
$res = self::edit_data($message_edit);
|
$res = self::edit_data($message_edit);
|
||||||
print_r('更新结果...' . $res);
|
|
||||||
$s_id = self::get_shopping_send_id($message);
|
$s_id = self::get_shopping_send_id($message);
|
||||||
$rand = 'shopping_edit' . Random::build();
|
$rand = 'shopping_edit' . Random::build();
|
||||||
$str = 'edit';
|
$str = 'edit';
|
||||||
@@ -237,9 +236,6 @@ class Shopping extends Base
|
|||||||
}else {
|
}else {
|
||||||
$status = 0;
|
$status = 0;
|
||||||
}
|
}
|
||||||
print_r('发送的status...' . $status);
|
|
||||||
print_r('发送的data...');
|
|
||||||
print_r($data);
|
|
||||||
$snd_data = [
|
$snd_data = [
|
||||||
'msg' => '购物车修改',
|
'msg' => '购物车修改',
|
||||||
'operate_type' => $str,
|
'operate_type' => $str,
|
||||||
@@ -248,8 +244,6 @@ class Shopping extends Base
|
|||||||
'status' => $status,
|
'status' => $status,
|
||||||
'data' => $data[0]
|
'data' => $data[0]
|
||||||
];
|
];
|
||||||
print_r('发送回执前...');
|
|
||||||
print_r($snd_data);
|
|
||||||
self::gateway_query('sendToUid', [$s_id, json_encode($snd_data)]);
|
self::gateway_query('sendToUid', [$s_id, json_encode($snd_data)]);
|
||||||
}catch (Exception $e) {
|
}catch (Exception $e) {
|
||||||
Log::info('修改购物车时[error]->>>>>' . $e->getMessage());
|
Log::info('修改购物车时[error]->>>>>' . $e->getMessage());
|
||||||
|
|||||||
@@ -258,7 +258,6 @@ class Events
|
|||||||
->order('cons.stock_number', 'asc')
|
->order('cons.stock_number', 'asc')
|
||||||
->select()->toArray();
|
->select()->toArray();
|
||||||
if(!empty($tb_prod_cons[0])) {
|
if(!empty($tb_prod_cons[0])) {
|
||||||
print_r($tb_prod_cons);
|
|
||||||
// 如果是编辑,拿到已有数量
|
// 如果是编辑,拿到已有数量
|
||||||
if($message['operate_type'] == 'edit' && !empty($message['id'])) {
|
if($message['operate_type'] == 'edit' && !empty($message['id'])) {
|
||||||
$data = Db::query("
|
$data = Db::query("
|
||||||
@@ -266,11 +265,9 @@ class Events
|
|||||||
`id`={$message['id']}");
|
`id`={$message['id']}");
|
||||||
|
|
||||||
if($data) {
|
if($data) {
|
||||||
print_r('有库存');
|
|
||||||
// 如果编辑数量 小于已有数量并且大于库存数量 直接改成库存数量
|
// 如果编辑数量 小于已有数量并且大于库存数量 直接改成库存数量
|
||||||
if($tb_prod_cons[0]['current_quantity'] < $data[0]['number']) {
|
if($tb_prod_cons[0]['current_quantity'] < $data[0]['number']) {
|
||||||
$message['number'] = $tb_prod_cons[0]['current_quantity'];
|
$message['number'] = $tb_prod_cons[0]['current_quantity'];
|
||||||
print_r('修改后的..' . $message['number']);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user