|
@@ -1,6 +1,8 @@
|
|
package com.dragoninfo.dcuc.app.business.impl;
|
|
package com.dragoninfo.dcuc.app.business.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
+import cn.hutool.core.date.DateTime;
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
import com.dragoninfo.dcuc.app.business.IFhAppSyncBusiness;
|
|
import com.dragoninfo.dcuc.app.business.IFhAppSyncBusiness;
|
|
import com.dragoninfo.dcuc.app.config.FhAppSyncProperties;
|
|
import com.dragoninfo.dcuc.app.config.FhAppSyncProperties;
|
|
import com.dragoninfo.dcuc.app.dto.appindex.*;
|
|
import com.dragoninfo.dcuc.app.dto.appindex.*;
|
|
@@ -29,6 +31,7 @@ import org.springframework.http.ResponseEntity;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.web.client.RestTemplate;
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
|
|
+import java.text.DateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -154,11 +157,14 @@ public class FhAppSyncBusinessImpl implements IFhAppSyncBusiness {
|
|
app.setDeleted(BooleanEnum.FALSE.value);
|
|
app.setDeleted(BooleanEnum.FALSE.value);
|
|
String sxrq = dto.getSxrq();
|
|
String sxrq = dto.getSxrq();
|
|
if (!StringUtils.isEmpty(sxrq)) {
|
|
if (!StringUtils.isEmpty(sxrq)) {
|
|
- app.setLineTime(sxrq);
|
|
|
|
|
|
+ long sxrqL = Long.parseLong(sxrq);
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
try {
|
|
try {
|
|
- Date parse = format.parse(sxrq);
|
|
|
|
|
|
+ Date date = DateUtil.date(sxrqL);
|
|
|
|
+ String formatDate = DateUtil.formatDate(date);
|
|
|
|
+ Date parse = format.parse(formatDate);
|
|
app.setRegistrationTime(parse);
|
|
app.setRegistrationTime(parse);
|
|
|
|
+ app.setLineTime(formatDate);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error("日期解析异常");
|
|
log.error("日期解析异常");
|
|
}
|
|
}
|
|
@@ -189,14 +195,16 @@ public class FhAppSyncBusinessImpl implements IFhAppSyncBusiness {
|
|
protected ResponseDTO<FhAppIndexRespDTO> getAppResource() {
|
|
protected ResponseDTO<FhAppIndexRespDTO> getAppResource() {
|
|
String address = fhAppSyncProperties.getAddress();
|
|
String address = fhAppSyncProperties.getAddress();
|
|
log.info("同步应用资源地址:{}", address);
|
|
log.info("同步应用资源地址:{}", address);
|
|
- // TODO 封装请求条件入参确认
|
|
|
|
RequestParam requestParam = new RequestParam();
|
|
RequestParam requestParam = new RequestParam();
|
|
requestParam.setResourceType("0");
|
|
requestParam.setResourceType("0");
|
|
-// requestParam.setCondition();
|
|
|
|
|
|
+ requestParam.setCondition("");
|
|
FhAppIndexReqDTO reqDTO = new FhAppIndexReqDTO();
|
|
FhAppIndexReqDTO reqDTO = new FhAppIndexReqDTO();
|
|
-// reqDTO.setFrom();
|
|
|
|
-// reqDTO.setTo();
|
|
|
|
-// reqDTO.setMessageSequence();
|
|
|
|
|
|
+ reqDTO.setFrom("120000000000");
|
|
|
|
+ reqDTO.setTo("120000000000");
|
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
|
|
|
+ String now = simpleDateFormat.format(new Date());
|
|
|
|
+ reqDTO.setMessageSequence(now);
|
|
|
|
+ log.info("同步应用资源请求参数:{}", requestParam);
|
|
reqDTO.setRequestParam(requestParam);
|
|
reqDTO.setRequestParam(requestParam);
|
|
|
|
|
|
HttpEntity<FhAppIndexReqDTO> httpEntity = new HttpEntity<>(reqDTO);
|
|
HttpEntity<FhAppIndexReqDTO> httpEntity = new HttpEntity<>(reqDTO);
|