|
@@ -9,6 +9,7 @@ use app\model\api\ContractTemplate as ContractTemplateModel;
|
|
|
use app\model\api\EducationCourse;
|
|
use app\model\api\EducationCourse;
|
|
|
use library\services\UtilService;
|
|
use library\services\UtilService;
|
|
|
use think\facade\Db;
|
|
use think\facade\Db;
|
|
|
|
|
+use think\facade\Log;
|
|
|
|
|
|
|
|
|
|
|
|
|
class Education
|
|
class Education
|
|
@@ -282,6 +283,11 @@ class Education
|
|
|
}
|
|
}
|
|
|
// 合约时间到期自动解约
|
|
// 合约时间到期自动解约
|
|
|
public function ContractTemplatEnd(){
|
|
public function ContractTemplatEnd(){
|
|
|
|
|
+ $lst = (new UserContractRecordModel())->where("status",1)->where("end_time","<",time())->select();
|
|
|
|
|
+ if(!empty($lst)){
|
|
|
|
|
+ $lst = $lst->toArray();
|
|
|
|
|
+ Log::info('搜索条件:' . json_encode($lst, JSON_UNESCAPED_UNICODE));
|
|
|
|
|
+ }
|
|
|
(new UserContractRecordModel())->where("status",1)->where("end_time","<",time())->update(["status"=>2]);
|
|
(new UserContractRecordModel())->where("status",1)->where("end_time","<",time())->update(["status"=>2]);
|
|
|
return app('json')->success('修改完成');
|
|
return app('json')->success('修改完成');
|
|
|
}
|
|
}
|