...
|
...
|
@@ -97,12 +97,16 @@ class Withdraw extends Backend |
|
|
$result = false;
|
|
|
if($params['status'] == 1){
|
|
|
$withdraw = Db::name('withdraw')->where('id',$ids)->find();
|
|
|
$record['createtime'] = time();
|
|
|
$record['user_id'] = $withdraw['user_id'];
|
|
|
$record['teacher_id'] = $withdraw['teacher_id'];
|
|
|
$record['type'] = 3;
|
|
|
$record['money'] = $withdraw['money'];
|
|
|
Db::name('record')->insertGetId($record);
|
|
|
if($withdraw['status'] == 1){
|
|
|
true;
|
|
|
}else{
|
|
|
$record['createtime'] = time();
|
|
|
$record['user_id'] = $withdraw['user_id'];
|
|
|
$record['teacher_id'] = $withdraw['teacher_id'];
|
|
|
$record['type'] = 3;
|
|
|
$record['money'] = $withdraw['money'];
|
|
|
Db::name('record')->insertGetId($record);
|
|
|
}
|
|
|
}
|
|
|
Db::startTrans();
|
|
|
try {
|
...
|
...
|
|