|
|
@@ -18,50 +18,50 @@ use bizMall\promote\services\CouponService;
|
|
|
class PxApplyController extends BaseController
|
|
|
{
|
|
|
|
|
|
- //报名申请 ssh 2021.3.17
|
|
|
- public function actionAdd()
|
|
|
- {
|
|
|
- $get = Yii::$app->request->get();
|
|
|
- $classId = $get['classId'] ?? 0;
|
|
|
- $info = PxClassClass::getClassInfo($classId);
|
|
|
- PxClassClass::valid($info, $this->sjId);
|
|
|
-
|
|
|
- $customId = $this->customId;
|
|
|
- if (!empty($customId)) {
|
|
|
- $custom = CustomClass::getCustomInfo($customId);
|
|
|
- CustomClass::valid($custom, $this->sjId);
|
|
|
- }
|
|
|
- $get['sjId'] = $this->sjId;
|
|
|
- $get['prePrice'] = $info['tuition'];
|
|
|
- $get['actPrice'] = $info['tuition'];
|
|
|
- $get['shopId'] = $this->shopId;
|
|
|
- $get['shopAdminId'] = 0;
|
|
|
- $get['customId'] = $this->customId;
|
|
|
- $get['className'] = $info['name'] ?? '';
|
|
|
- $get['classCover'] = $info['cover'] ?? '';
|
|
|
- $get['applyTime'] = date("Y-m-d H:i:s");
|
|
|
- $get['status'] = PxApplyClass::STATUS_UN_CONFIRM;
|
|
|
-
|
|
|
- PxApplyClass::addApply($get, $this->shop);
|
|
|
- util::complete();
|
|
|
- }
|
|
|
-
|
|
|
- //新学员 学员管理 ssh 2021.3.17
|
|
|
- public function actionList()
|
|
|
- {
|
|
|
- $where = ['shopId' => $this->shopId];
|
|
|
- $respond = PxApplyClass::getApplyList($where);
|
|
|
- util::success($respond);
|
|
|
- }
|
|
|
-
|
|
|
- public function actionWxPay()
|
|
|
+ //报名申请 ssh 2021.3.17
|
|
|
+ public function actionAdd()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $classId = $get['classId'] ?? 0;
|
|
|
+ $info = PxClassClass::getClassInfo($classId);
|
|
|
+ PxClassClass::valid($info, $this->sjId);
|
|
|
+
|
|
|
+ $customId = $this->customId;
|
|
|
+ if (!empty($customId)) {
|
|
|
+ $custom = CustomClass::getCustomInfo($customId);
|
|
|
+ CustomClass::valid($custom, $this->sjId);
|
|
|
+ }
|
|
|
+ $get['sjId'] = $this->sjId;
|
|
|
+ $get['prePrice'] = $info['tuition'];
|
|
|
+ $get['actPrice'] = $info['tuition'];
|
|
|
+ $get['shopId'] = $this->shopId;
|
|
|
+ $get['shopAdminId'] = 0;
|
|
|
+ $get['customId'] = $this->customId;
|
|
|
+ $get['className'] = $info['name'] ?? '';
|
|
|
+ $get['classCover'] = $info['cover'] ?? '';
|
|
|
+ $get['applyTime'] = date("Y-m-d H:i:s");
|
|
|
+ $get['status'] = PxApplyClass::STATUS_UN_CONFIRM;
|
|
|
+
|
|
|
+ $respond = PxApplyClass::addApply($get, $this->shop);
|
|
|
+ util::success($respond);
|
|
|
+ }
|
|
|
+
|
|
|
+ //新学员 学员管理 ssh 2021.3.17
|
|
|
+ public function actionList()
|
|
|
+ {
|
|
|
+ $where = ['shopId' => $this->shopId];
|
|
|
+ $respond = PxApplyClass::getApplyList($where);
|
|
|
+ util::success($respond);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function actionWxPay()
|
|
|
{
|
|
|
ini_set('date.timezone', 'Asia/Shanghai');
|
|
|
$post = Yii::$app->request->post();
|
|
|
$orderSn = isset($post['orderSn']) ? $post['orderSn'] : 0;
|
|
|
$couponId = isset($post['couponId']) ? $post['couponId'] : 0;
|
|
|
|
|
|
- $order = PxApplyClass::getByCondition(['customId'=> $this->customId,'orderSn' => $orderSn,'status'=>PxApplyClass::STATUS_UN_CONFIRM]);
|
|
|
+ $order = PxApplyClass::getByCondition(['customId' => $this->customId, 'orderSn' => $orderSn, 'status' => PxApplyClass::STATUS_UN_CONFIRM]);
|
|
|
if (empty($order)) {
|
|
|
util::fail('订单号无效');
|
|
|
}
|
|
|
@@ -118,7 +118,7 @@ class PxApplyController extends BaseController
|
|
|
$tools = new \JsApiPay();
|
|
|
$jsApiParameters = $tools->GetJsApiParameters($wxOrder, $sjExtend);
|
|
|
$newParams = json_decode($jsApiParameters, true);
|
|
|
-
|
|
|
+
|
|
|
$current = date("Y-m-d H:i:s");
|
|
|
$updateData = ['deadline' => $current, 'changePrice' => 2];
|
|
|
// PurchaseClass::updateById($id, $updateData);
|