|
@@ -214,6 +214,7 @@ class ViolationProduct extends Controller
|
|
|
$where = ['id' => $id];
|
|
$where = ['id' => $id];
|
|
|
$ViolationProduct = $ViolationProductModel->where($where)->first();
|
|
$ViolationProduct = $ViolationProductModel->where($where)->first();
|
|
|
if (!$ViolationProduct) return json_send(['code' => 'error', 'msg' => '记录不存在']);
|
|
if (!$ViolationProduct) return json_send(['code' => 'error', 'msg' => '记录不存在']);
|
|
|
|
|
+ $oldData = $ViolationProduct->toarray();
|
|
|
//如果修改采集周期,则校验采集时间是否在明天以后
|
|
//如果修改采集周期,则校验采集时间是否在明天以后
|
|
|
if ($sampling_cycle != $ViolationProduct->sampling_cycle) {
|
|
if ($sampling_cycle != $ViolationProduct->sampling_cycle) {
|
|
|
$allow_sampling_time = Carbon::tomorrow()->startOfDay()->getTimestamp(); // 明天的开始时间(允许开始采集时间校验)
|
|
$allow_sampling_time = Carbon::tomorrow()->startOfDay()->getTimestamp(); // 明天的开始时间(允许开始采集时间校验)
|
|
@@ -226,7 +227,7 @@ class ViolationProduct extends Controller
|
|
|
$admin_id = request('access_token.uid', 0); //用户ID
|
|
$admin_id = request('access_token.uid', 0); //用户ID
|
|
|
$table_name = $ViolationProductModel->getTable();
|
|
$table_name = $ViolationProductModel->getTable();
|
|
|
$notes_type = 2; //操作类型,1添加,2修改,3=删除
|
|
$notes_type = 2; //操作类型,1添加,2修改,3=删除
|
|
|
- $this->addAdminHistory('清洗配置-禁止商品管理', $admin_id, $table_name, $notes_type, $ViolationProduct->toarray(), $all_data, '修改了禁止商品' . $ViolationProduct->product_name . '信息');
|
|
|
|
|
|
|
+ $this->addAdminHistory('清洗配置-禁止商品管理', $admin_id, $table_name, $notes_type,$oldData, $all_data, '修改了禁止商品' . $oldData['product_name'] . '信息');
|
|
|
// 告知结果
|
|
// 告知结果
|
|
|
return json_send(['code' => 'success', 'msg' => '修改成功']);
|
|
return json_send(['code' => 'success', 'msg' => '修改成功']);
|
|
|
}
|
|
}
|