修改商品查询
This commit is contained in:
parent
8fe4f57f30
commit
992dac2c1b
@ -447,8 +447,8 @@ class BasicDataService extends BaseService
|
||||
];
|
||||
|
||||
$params = array();
|
||||
|
||||
|
||||
$params['product_status'] = 1;
|
||||
$params['is_delete'] = 0;
|
||||
$product = Product::getWithAmountPage($params, $keyword,$fields, $page, $per_page);
|
||||
if (empty($product['data'])) {
|
||||
return success($product);
|
||||
|
||||
@ -1433,6 +1433,16 @@ class UserDoctorService extends BaseService
|
||||
return fail(HttpEnumCode::SERVER_ERROR,"商品错误");
|
||||
}
|
||||
|
||||
if ($product['product_status'] == 2){
|
||||
Db::rollBack();
|
||||
return fail(HttpEnumCode::HTTP_ERROR,"药品" . $product['product_name'] . "已下架");
|
||||
}
|
||||
|
||||
if ($product['is_delete'] == 1){
|
||||
Db::rollBack();
|
||||
return fail(HttpEnumCode::HTTP_ERROR,"药品" . $product['product_name'] . "已被删除,无法开具");
|
||||
}
|
||||
|
||||
// 获取商品库存
|
||||
$params =array();
|
||||
$params['product_platform_id'] = $product['product_platform_id'];
|
||||
@ -1444,6 +1454,7 @@ class UserDoctorService extends BaseService
|
||||
}
|
||||
|
||||
if ($product_platform_amount['stock'] <= 0){
|
||||
Db::rollBack();
|
||||
return fail(HttpEnumCode::HTTP_ERROR,"商品库存不足");
|
||||
}
|
||||
|
||||
|
||||
@ -278,6 +278,7 @@ class UserPatientService extends BaseService
|
||||
if (empty($product)){
|
||||
return fail();
|
||||
}
|
||||
|
||||
// 获取商品库存
|
||||
$params =array();
|
||||
$params['product_platform_id'] = $product['product_platform_id'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user