|
|
@@ -5,13 +5,13 @@ import com.taobao.api.DefaultTaobaoClient;
|
|
|
import com.taobao.api.TaobaoClient;
|
|
|
import com.taobao.api.domain.Order;
|
|
|
import com.taobao.api.domain.Trade;
|
|
|
-import com.taobao.api.internal.util.StringUtils;
|
|
|
import com.uas.eis.dao.BaseDao;
|
|
|
import com.uas.eis.service.InsertService;
|
|
|
import net.sf.json.JSON;
|
|
|
import net.sf.json.JSONArray;
|
|
|
import net.sf.json.JSONObject;
|
|
|
import oracle.sql.DATE;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
import org.apache.log4j.Logger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
@@ -189,12 +189,13 @@ public class InsertServiceImpl implements InsertService {
|
|
|
logger.info(this.getClass() + " 未录入淘宝订单 ");
|
|
|
} else {
|
|
|
int L=0;
|
|
|
+ List<Long> saleIDS =new ArrayList<>();
|
|
|
for (int i = 0; i < trades.size(); i++) {
|
|
|
|
|
|
/* 插入淘宝订单ID sa_tradeid 字段 alter table sale add sa_tradeid number; */
|
|
|
|
|
|
Long said = baseDao.queryForObject("select sale_seq.nextval from dual", Long.class);
|
|
|
-
|
|
|
+ saleIDS.add(said);
|
|
|
String sa_code = baseDao.sGetMaxNumber("Sale", 2);
|
|
|
SimpleDateFormat formatdx = new SimpleDateFormat("yyyy-MM-dd HH:MM:ss");
|
|
|
String createdtime="2020-11-25";
|
|
|
@@ -293,10 +294,12 @@ public class InsertServiceImpl implements InsertService {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- System.out.println(insertSqlsList);
|
|
|
try{
|
|
|
baseDao.execute(insertSqlsList);
|
|
|
- baseDao.callProcedure("SP_UPDATE_SALE");
|
|
|
+ if(saleIDS.size()>0) {
|
|
|
+ baseDao.callProcedure("SP_UPDATE_SALE", StringUtils.join(saleIDS, ','));
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}catch (Exception e) {
|
|
|
logger.info( e.getMessage() );
|