|
|
@@ -1106,11 +1106,11 @@ class OrderController extends BaseController
|
|
|
public function actionClassify()
|
|
|
{
|
|
|
$post = Yii::$app->request->post();
|
|
|
- $id = isset($post['id']) ? $post['id'] : 0;
|
|
|
+ $id = $post['id'] ?? 0;
|
|
|
$order = OrderService::getById($id);
|
|
|
OrderService::valid($order, $this->mainId);
|
|
|
- $categoryId = isset($post['categoryId']) ? $post['categoryId'] : $post['categoryId'];
|
|
|
- $usageId = isset($post['usageId']) ? $post['usageId'] : $post['usageId'];
|
|
|
+ $categoryId = $post['categoryId'];
|
|
|
+ $usageId = $post['usageId'];
|
|
|
OrderService::classify($id, $categoryId, $usageId);
|
|
|
util::complete();
|
|
|
}
|
|
|
@@ -1119,7 +1119,7 @@ class OrderController extends BaseController
|
|
|
public function actionUpdateSheet()
|
|
|
{
|
|
|
$post = Yii::$app->request->post();
|
|
|
- $id = isset($post['id']) ? $post['id'] : 0;
|
|
|
+ $id = $post['id'] ?? 0;
|
|
|
unset($post['id']);
|
|
|
$order = OrderService::getById($id);
|
|
|
OrderService::valid($order, $this->mainId);
|
|
|
@@ -1133,7 +1133,7 @@ class OrderController extends BaseController
|
|
|
$post = Yii::$app->request->post();
|
|
|
$price = isset($post['price']) && is_numeric($post['price']) ? $post['price'] : 0;
|
|
|
$payWay = isset($post['payWay']) && is_numeric($post['payWay']) ? $post['payWay'] : 0;
|
|
|
- $userId = isset($post['userId']) ? $post['userId'] : 0;
|
|
|
+ $userId = $post['userId'] ?? 0;
|
|
|
$userInfo = UserService::getById($userId);
|
|
|
if (empty($userInfo) || $userInfo['sjId'] != $this->sjId) {
|
|
|
util::fail('您选择的客户无效');
|