The debug code finds that the same method is called at the end of two operations. The incoming parameters are consistent and the query results are inconsistent.
Directly say the cause of the problem: My two operations are AOP surround notification first get the incoming parameters, verify whether you need to insert data into another table. The second invocation of core logic
Object RetVal = Pjp.proceed ();
, the CheckStatus is set to 1, so the number of results queried before the core logic is 0.
Two times separately printed SQL, and enter parameters, and results
[DEBUG] [2017-10-25 20:48:27,888] [Http-nio-8080-exec-1] []-[==> preparing:select ID, name, code, Programcode, Seriescode,
Seriesname, Showid, type, source, SourceID, CPName, Cpcode, status, CheckStatus, Checkcontent, Downloadstatus, transcodes Tatus,
Overallbitrate, Duration, Bitratemode, FilePath, FileSize, FileFormat, Playurl, Videoformat, videobitrate, width, height , Framerate,
BitDepth, Audioformat, Audiobitrate, Samplingrate, ScanType, MD5, priority, Cpcontentid, Cdnstatus, Cdndesc, Domaincode, DomainName,
Offlinereason, Checktime, Createtime, Updatetime,transcodeid,videotype,iscompleted,completereason from T_movie where Type=0 and
Programcode=? and Checkstatus=1 and downloadstatus=2][debug] [2017-10-25 20:48:27,889] [http-nio-8080-exec-1] []-[==> Parameters: 23000022017102510572300001 (String)][debug] [2017-10-25 20:48:27,892] [http-nio-8080-exec-1] []-[<= = Total:1]
[DEBUG] [2017-10-25 20:50:08,957] [Http-nio-8080-exec-9] []-[==> preparing:select ID, name, code, Programcode, Seriescode,
Seriesname, Showid, type, source, SourceID, CPName, Cpcode, status, CheckStatus, Checkcontent, Downloadstatus, transcodes Tatus,
Overallbitrate, Duration, Bitratemode, FilePath, FileSize, FileFormat, Playurl, Videoformat, videobitrate, width, height , Framerate,
BitDepth, Audioformat, Audiobitrate, Samplingrate, ScanType, MD5, priority, Cpcontentid, Cdnstatus, Cdndesc, Domaincode, DomainName,
Offlinereason, Checktime, Createtime, Updatetime,transcodeid,videotype,iscompleted,completereason from T_movie where Type=0 and
Programcode=? and Checkstatus=1 and downloadstatus=2][debug] [2017-10-25 20:50:08,958] [http-nio-8080-exec-9] []-[==> Parameters: 23000022017102510572300001 (String)][debug] [2017-10-25 20:50:08,960] [http-nio-8080-exec-9] []-[<= = Total:0]
Remember that the pseudo-*sql query results are inconsistent