|
|
@@ -32,15 +32,16 @@ public class SyncProductStockTask {
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
|
|
|
- @Scheduled(cron = "0 0/2 * * * ?")
|
|
|
+ //@Scheduled(cron = "0 0/2 * * * ?")
|
|
|
+ @Scheduled(cron = "0 0 2,8,14,20 * * ?")
|
|
|
public void SyncProductStock() {
|
|
|
SqlRowList rs2 = baseDao.queryForRowSet("select TO_CHAR(SYSDATE,'HH24') v_hour,TO_CHAR(SYSDATE,'MI') v_mi from dual");
|
|
|
while(rs2.next()) {
|
|
|
String V_HOUR = rs2.getGeneralString("v_hour");
|
|
|
String V_MI = rs2.getGeneralString("v_mi");
|
|
|
baseDao.execute("update CUSTOMTABLE set ct_varchar50_2=to_char(sysdate,'yyyy-mm-dd HH24:mi:ss') where ct_id=1032876 ");
|
|
|
- if (("08".equals(V_HOUR) || "20".equals(V_HOUR) || "14".equals(V_HOUR) || "15".equals(V_HOUR) )
|
|
|
- //&& ("00".equals(V_MI) || "04".equals(V_MI) )
|
|
|
+ if (("08".equals(V_HOUR) || "20".equals(V_HOUR) || "02".equals(V_HOUR) || "14".equals(V_HOUR) )
|
|
|
+ // && ("00".equals(V_MI) )
|
|
|
) {
|
|
|
X5JsonHttpClient x5JsonHttpClient = new X5JsonHttpClient(configuration.getX5appid(), configuration.getX5appkey(), configuration.getX5ProductStockUrl());
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
@@ -52,7 +53,7 @@ public class SyncProductStockTask {
|
|
|
" where ct_caller='XiaoMiProduct' and ct_id= " +
|
|
|
" (select ct_id from (select ct_id from CUSTOMTABLE where ct_caller='XiaoMiProduct' " +
|
|
|
//"and trunc(ct_recorddate)=trunc(sysdate) " +
|
|
|
- "and ct_statuscode='AUDITED' and nvl(CT_SENDSTATUS,' ')<>'已上传' order by ct_id ) where rownum=1)" +
|
|
|
+ "and ct_statuscode='AUDITED' order by ct_id desc) where rownum=1)" +
|
|
|
" order by cd_detno) A) where rn<=1000";
|
|
|
SqlRowList rs = baseDao.queryForRowSet(Sql);
|
|
|
baseDao.execute("update CUSTOMTABLE set ct_varchar50_3=to_char(sysdate,'yyyy-mm-dd HH24:mi:ss') where ct_id=1032876 ");
|