|
@@ -27,6 +27,9 @@ import com.taobao.api.response.TradesSoldGetResponse;
|
|
|
import com.taobao.api.request.TradesSoldIncrementGetRequest;
|
|
import com.taobao.api.request.TradesSoldIncrementGetRequest;
|
|
|
import com.taobao.api.response.TradesSoldIncrementGetResponse;
|
|
import com.taobao.api.response.TradesSoldIncrementGetResponse;
|
|
|
|
|
|
|
|
|
|
+import com.taobao.api.request.TopOaidDecryptRequest;
|
|
|
|
|
+import com.taobao.api.response.TopOaidDecryptResponse;
|
|
|
|
|
+
|
|
|
import com.uas.eis.utils.HttpUtil;
|
|
import com.uas.eis.utils.HttpUtil;
|
|
|
import com.uas.eis.utils.HttpUtil.Response;
|
|
import com.uas.eis.utils.HttpUtil.Response;
|
|
|
|
|
|
|
@@ -161,14 +164,14 @@ public class InsertServiceImpl implements InsertService {
|
|
|
calendar2.set(Calendar.SECOND, 0);
|
|
calendar2.set(Calendar.SECOND, 0);
|
|
|
Date zero = calendar2.getTime();
|
|
Date zero = calendar2.getTime();
|
|
|
|
|
|
|
|
- req2.setStartModified(zero);
|
|
|
|
|
|
|
+ req2.setStartModified(zero);
|
|
|
// req2.setStartModified(StringUtils.parseDateTime("2020-01-05 00:00:00"));
|
|
// req2.setStartModified(StringUtils.parseDateTime("2020-01-05 00:00:00"));
|
|
|
calendar2.set(Calendar.HOUR_OF_DAY, 23);
|
|
calendar2.set(Calendar.HOUR_OF_DAY, 23);
|
|
|
calendar2.set(Calendar.MINUTE, 59);
|
|
calendar2.set(Calendar.MINUTE, 59);
|
|
|
calendar2.set(Calendar.SECOND, 59);
|
|
calendar2.set(Calendar.SECOND, 59);
|
|
|
Date endtime = calendar2.getTime();
|
|
Date endtime = calendar2.getTime();
|
|
|
|
|
|
|
|
- req2.setEndModified(endtime);
|
|
|
|
|
|
|
+ req2.setEndModified(endtime);
|
|
|
// req2.setEndModified(StringUtils.parseDateTime("2020-01-05 23:59:59"));
|
|
// req2.setEndModified(StringUtils.parseDateTime("2020-01-05 23:59:59"));
|
|
|
try {
|
|
try {
|
|
|
TradesSoldIncrementGetResponse rsp2 = client2.execute(req2, session_Key);
|
|
TradesSoldIncrementGetResponse rsp2 = client2.execute(req2, session_Key);
|
|
@@ -227,7 +230,35 @@ public class InsertServiceImpl implements InsertService {
|
|
|
} else {
|
|
} else {
|
|
|
consigntime = formatdx.format( trades.get(i).getConsignTime() );
|
|
consigntime = formatdx.format( trades.get(i).getConsignTime() );
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+//0819
|
|
|
|
|
+ String oaid=trades.get(i).getOaid();
|
|
|
|
|
+ String tid6=trades.get(i).getTid().toString();
|
|
|
|
|
+ TopOaidDecryptRequest req6 = new TopOaidDecryptRequest();
|
|
|
|
|
+ List<TopOaidDecryptRequest.ReceiverQuery> list2 = new ArrayList<TopOaidDecryptRequest.ReceiverQuery>();
|
|
|
|
|
+ TopOaidDecryptRequest.ReceiverQuery obj3 = new TopOaidDecryptRequest.ReceiverQuery();
|
|
|
|
|
+ list2.add(obj3);
|
|
|
|
|
+ obj3.setOaid(oaid);
|
|
|
|
|
+ obj3.setTid(tid6);
|
|
|
|
|
+ obj3.setScene("1001");
|
|
|
|
|
+ req6.setQueryList(list2);
|
|
|
|
|
+ TaobaoClient client6 = new DefaultTaobaoClient("http://39.98.201.114:30001/router/rest", "31921866", "7121c52d4c9970ba08bf09e2f525acd0");
|
|
|
|
|
+ String name_oaid=trimNull(trades.get(i).getReceiverName() );
|
|
|
|
|
+ String receiver_mobile=trimNull(trades.get(i).getReceiverMobile() );
|
|
|
|
|
+ String address=trimNull(trades.get(i).getReceiverState() ) + trimNull(trades.get(i).getReceiverCity() ) + trimNull(trades.get(i).getReceiverDistrict() ) + trimNull( trades.get(i).getReceiverAddress() );
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if(oaid!=null) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ TopOaidDecryptResponse rsp6 = client6.execute(req6, session_Key);
|
|
|
|
|
+ name_oaid=rsp6.getReceiverList().get(0).getName();
|
|
|
|
|
+ receiver_mobile=rsp6.getReceiverList().get(0).getMobile();
|
|
|
|
|
+ address=trimNull(rsp6.getReceiverList().get(0).getState() ) + trimNull(rsp6.getReceiverList().get(0).getCity() ) + trimNull(rsp6.getReceiverList().get(0).getDistrict() ) + trimNull( rsp6.getReceiverList().get(0).getAddressDetail() );
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+
|
|
|
|
|
+ logger.info(new SimpleDateFormat("YYYY-MM-DD hh24:mi:ss").format(new Date()) + this.getClass() + "淘宝未返回敏感数据");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+//
|
|
|
|
|
|
|
|
|
|
|
|
|
String INSERTSALESql = "insert into sale( SA_ISUPDATE,SA_DISCOUNTFEE,SA_TRADESTATUS, sa_sellernick,sa_custcode,sa_paymentscode,SA_TAOBAOID,sa_payments,sa_custname,sa_kind,sa_wwh_user,sa_need15,sa_id,sa_tradeid,sa_code,sa_date,sa_recorder,sa_recorddate,sa_currency,sa_rate" +
|
|
String INSERTSALESql = "insert into sale( SA_ISUPDATE,SA_DISCOUNTFEE,SA_TRADESTATUS, sa_sellernick,sa_custcode,sa_paymentscode,SA_TAOBAOID,sa_payments,sa_custname,sa_kind,sa_wwh_user,sa_need15,sa_id,sa_tradeid,sa_code,sa_date,sa_recorder,sa_recorddate,sa_currency,sa_rate" +
|
|
@@ -235,9 +266,9 @@ public class InsertServiceImpl implements InsertService {
|
|
|
",sa_transport,sa_seller,sa_updatedate" +
|
|
",sa_transport,sa_seller,sa_updatedate" +
|
|
|
",sa_enddate,sa_statuscode,sa_status,sa_fare,sa_total" +
|
|
",sa_enddate,sa_statuscode,sa_status,sa_fare,sa_total" +
|
|
|
",sa_recamount,sa_plandelivery,sa_printstatuscode,sa_remark)" +
|
|
",sa_recamount,sa_plandelivery,sa_printstatuscode,sa_remark)" +
|
|
|
- " SELECT 1,"+trades.get(i).getDiscountFee() +",'"+trimNull(trades.get(i).getStatus() )+"','" + trimNull(trades.get(i).getSellerNick() ) + " ', 'GN0008358','P001', " + trades.get(i).getTid() + " , '现结','HLK淘宝','国内标准销售订单', ' " +trimNull( trades.get(i).getReceiverName() ) + " ' , ' " + trimNull(trades.get(i).getReceiverMobile()) + " ' , " + said + "," + trades.get(i).getTid() + "," + trades.get(i).getTid()
|
|
|
|
|
|
|
+ " SELECT 1,"+trades.get(i).getDiscountFee() +",'"+trimNull(trades.get(i).getStatus() )+"','" + trimNull(trades.get(i).getSellerNick() ) + " ', 'GN0008358','P001', " + trades.get(i).getTid() + " , '现结','HLK淘宝','国内标准销售订单', ' " +trimNull( name_oaid ) + " ' , ' " + trimNull( receiver_mobile ) + " ' , " + said + "," + trades.get(i).getTid() + "," + trades.get(i).getTid()
|
|
|
+ " , to_date ( '" + end_time + "' ,'YYYY-MM-DD hh24:mi:ss') , '管理员',sysdate,'RMB','1','"
|
|
+ " , to_date ( '" + end_time + "' ,'YYYY-MM-DD hh24:mi:ss') , '管理员',sysdate,'RMB','1','"
|
|
|
- + trimNull(trades.get(i).getReceiverName() )+ "','" + trimNull( trades.get(i).getBuyerNick() )+ "','" + trimNull(trades.get(i).getReceiverState() ) + trimNull(trades.get(i).getReceiverCity() ) + trimNull(trades.get(i).getReceiverDistrict() ) + trimNull( trades.get(i).getReceiverAddress() )+ " ', ' "
|
|
|
|
|
|
|
+ + trimNull(name_oaid )+ "','" + trimNull( trades.get(i).getBuyerNick() )+ "','" + address + " ', ' "
|
|
|
+ trimNull( trades.get(i).getShippingType() ) + " ', ' " + trimNull (trades.get(i).getO2oGuideName() ) + " ', to_date ( '" + modified
|
|
+ trimNull( trades.get(i).getShippingType() ) + " ', ' " + trimNull (trades.get(i).getO2oGuideName() ) + " ', to_date ( '" + modified
|
|
|
+ "','YYYY-MM-DD hh24:mi:ss') , to_date ( '" +end_time + "','YYYY-MM-DD hh24:mi:ss') ,'ENTERING','在录入'," + trimNull( trades.get(i).getPostFee() )+ "," +trimNull( trades.get(i).getPayment() ) + ","
|
|
+ "','YYYY-MM-DD hh24:mi:ss') , to_date ( '" +end_time + "','YYYY-MM-DD hh24:mi:ss') ,'ENTERING','在录入'," + trimNull( trades.get(i).getPostFee() )+ "," +trimNull( trades.get(i).getPayment() ) + ","
|
|
|
+ trimNull(trades.get(i).getPayment() ) + " , to_date ( '" +consigntime + "','YYYY-MM-DD hh24:mi:ss') ,'unprint', '淘宝自动抓取' FROM DUAL " +
|
|
+ trimNull(trades.get(i).getPayment() ) + " , to_date ( '" +consigntime + "','YYYY-MM-DD hh24:mi:ss') ,'unprint', '淘宝自动抓取' FROM DUAL " +
|