|
@@ -1,6 +1,11 @@
|
|
package com.gree.mall.manager.logic;
|
|
package com.gree.mall.manager.logic;
|
|
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
import cn.hutool.http.HttpRequest;
|
|
import cn.hutool.http.HttpRequest;
|
|
|
|
+import cn.hutool.http.HttpUtil;
|
|
|
|
+import cn.hutool.json.JSONArray;
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
import com.gree.mall.manager.constant.Constant;
|
|
import com.gree.mall.manager.constant.Constant;
|
|
import com.gree.mall.manager.plus.entity.ItfGreeSynDownloadRec;
|
|
import com.gree.mall.manager.plus.entity.ItfGreeSynDownloadRec;
|
|
import com.gree.mall.manager.plus.entity.ItfGreeSynRule;
|
|
import com.gree.mall.manager.plus.entity.ItfGreeSynRule;
|
|
@@ -12,6 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
+import java.util.Map;
|
|
|
|
+
|
|
@Service
|
|
@Service
|
|
@Slf4j
|
|
@Slf4j
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
@@ -30,12 +37,19 @@ public class SyncOrderInfoLogic {
|
|
ItfGreeSynRule itfGreeSynRule = itfGreeSynRuleService.lambdaQuery().eq(ItfGreeSynRule::getSalesWebsitNumber, Constant.gree.GUANGZHOUXIAOSI)
|
|
ItfGreeSynRule itfGreeSynRule = itfGreeSynRuleService.lambdaQuery().eq(ItfGreeSynRule::getSalesWebsitNumber, Constant.gree.GUANGZHOUXIAOSI)
|
|
.one();
|
|
.one();
|
|
|
|
|
|
|
|
+ Long time = itfGreeSynRule.getLastSynTime().getTime()/1000;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ String body = HttpRequest.get(greeUrl+ Constant.gree.GET_UPDATE_ORDERS+"/"+Constant.gree.GUANGZHOUXIAOSI+"/"+time).execute().body();
|
|
|
|
+
|
|
|
|
+ Map<String,Object> bodyMap = JSON.parseObject(body);
|
|
|
|
+
|
|
|
|
+ log.info("【工单同步数据内容】:"+bodyMap.get("data").toString());
|
|
|
|
+
|
|
|
|
+ JSONArray jsonArray = JSONUtil.parseArray(JSON.parseObject(bodyMap.get("data").toString()));
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
-/* String body = HttpRequest.post(greeUrl+ Constant.gree.GET_UPDATE_ORDERS+"/"+Constant.gree.GUANGZHOUXIAOSI+"/")
|
|
|
|
- .header("key", jiaxianKey)
|
|
|
|
- .header("sign", getSign())
|
|
|
|
- .execute().body();*/
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public void syncFo() {
|
|
public void syncFo() {
|