| xqd
@@ -16,6 +16,7 @@ use traits\ModelTrait;
|
|
|
use app\admin\model\study\PlanBuy;
|
|
|
use app\admin\model\study\PlanItems;
|
|
|
use app\wap\model\special\Special;
|
|
|
+use app\wap\model\topic\TestPaperObtain;
|
|
|
|
|
|
/**专题获得
|
|
|
* Class SpecialBuy
|
| xqd
@@ -128,21 +129,8 @@ class SpecialBuy extends ModelBasic
|
|
|
//将课程信息插入到specialbuy里面
|
|
|
$spinfo = Special::where(['id' => $special_id])->find();
|
|
|
$planItems = PlanItems::alias('pt')->join($join)->where(['pt.cid'=>$special_id])->find()->toArray();
|
|
|
- if ($spinfo) {
|
|
|
- $data = [
|
|
|
- 'uid' => $uid,
|
|
|
- 'order_id' => $planItems['orderid'],
|
|
|
- 'column_id' => 0,
|
|
|
- 'special_id' => $special_id,
|
|
|
- 'type' => $planItems['type'],
|
|
|
- 'is_del' => 0,
|
|
|
- 'add_time' => time(),
|
|
|
- 'validity_time' => 0,
|
|
|
- 'planid' => $planItems['pid'],
|
|
|
- 'planbuyid' => $planItems['id'],
|
|
|
- ];
|
|
|
- self::set($data);
|
|
|
- }
|
|
|
+ SpecialBuy::setBuySpecial($planItems['orderid'], $uid, $special_id, $planItems['type'], 0, 0, $planItems['pid']);
|
|
|
+ TestPaperObtain::setTestPaper($planItems['orderid'], $uid, $special_id, 2, $planItems['pid']);
|
|
|
}
|
|
|
|
|
|
}
|