|
@ -1,5 +1,6 @@
|
|
|
package com.yihu.wlyy.job;
|
|
|
|
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
|
|
|
import org.quartz.Job;
|
|
|
import org.quartz.JobExecutionContext;
|
|
|
import org.quartz.JobExecutionException;
|
|
@ -23,7 +24,16 @@ public class PrescriptionPayOverdueJob implements Job {
|
|
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
|
|
try {
|
|
|
logger.info("Prescription_Pay_Overdue_Job_start");
|
|
|
StringBuffer sql = new StringBuffer("UPDATE wlyy_prescription SET status = -3 WHERE TIMESTAMPDIFF(second,create_time,NOW())>=172800");
|
|
|
StringBuffer sql = new StringBuffer("UPDATE wlyy_prescription " +
|
|
|
" JOIN wlyy_prescription_reviewed ON wlyy_prescription_reviewed.prescription_code = wlyy_prescription. CODE " +
|
|
|
" SET wlyy_prescription.`status` = -3 " +
|
|
|
" WHERE " +
|
|
|
" wlyy_prescription.`status` = " + PrescriptionLog.PrescriptionLogStatus.wait_pay.getValue() +
|
|
|
" AND TIMESTAMPDIFF( " +
|
|
|
" SECOND, " +
|
|
|
" wlyy_prescription_reviewed.reviewed_time, " +
|
|
|
" NOW() " +
|
|
|
" ) >= 86400");
|
|
|
jdbcTemplate.execute(sql.toString());
|
|
|
logger.info("Prescription_Pay_Overdue_Job_end");
|
|
|
}catch (Exception e){
|