安全漏洞升级,推送逻辑优化

This commit is contained in:
15856 2024-11-14 17:24:09 +08:00
parent 77e9a15277
commit 93d524ced2
2 changed files with 56 additions and 15 deletions

View File

@ -18,7 +18,41 @@
<dependency>
<groupId>com.bonus.sgzb</groupId>
<artifactId>sgzb-common-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.26.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.13</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.13</version>
</dependency>
<!-- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.3</version>
</dependency>-->
<dependency>
<groupId>com.bonus.sgzb</groupId>
<artifactId>sgzb-common-security</artifactId>

View File

@ -9,6 +9,7 @@ import com.bonus.sgzb.base.api.domain.BackApplyInfo;
import com.bonus.sgzb.base.api.domain.MaMachine;
import com.bonus.sgzb.base.api.domain.MachinePart;
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
import com.bonus.sgzb.base.mapper.MaMachineMapper;
import com.bonus.sgzb.common.core.constant.TaskTypeConstants;
import com.bonus.sgzb.common.core.enums.TaskStatusEnum;
import com.bonus.sgzb.common.core.enums.TaskTypeEnum;
@ -37,6 +38,9 @@ public class BackReceiveServiceImpl implements BackReceiveService {
@Resource
private BackReceiveMapper backReceiveMapper;
@Resource
private MaMachineMapper maMachineMapper;
@Resource
private TmTaskMapper tmTaskMapper;
@ -527,21 +531,24 @@ public class BackReceiveServiceImpl implements BackReceiveService {
res = 1;
} else {
res = backReceiveMapper.updateMaStatus(maId, "15");
//同步租赁机具状态
try {
MaMachine maMachine = new MaMachine();
maMachine.setMaId(maId);
// 15---1在库16---2已出库
maMachine.setMaStatus("1");
String content = JSONObject.toJSONString(maMachine);
Map<String, String> map = new HashMap<>();
map.put("body", content);
String body = JSONObject.toJSONString(map);
String data = HttpHelper.sendHttpPost(updateItemStatus, body);
log.info("dataString-=========:" + data);
} catch (Exception e) {
log.error("同步租赁商城机具状态失败");
throw new RuntimeException("同步租赁商城机具状态失败");
//查询装备是否推送到租赁
MaMachine maMachine = maMachineMapper.selectMaMachineByMaId(Long.valueOf(maId));
if (maMachine != null && maMachine.getPushStatus().equals(1)) {
//同步租赁机具状态
try {
maMachine.setMaId(maId);
// 15---1在库16---2已出库
maMachine.setMaStatus("1");
String content = JSONObject.toJSONString(maMachine);
Map<String, String> map = new HashMap<>();
map.put("body", content);
String body = JSONObject.toJSONString(map);
String data = HttpHelper.sendHttpPost(updateItemStatus, body);
log.info("dataString-=========:" + data);
} catch (Exception e) {
log.error("同步租赁商城机具状态失败");
throw new RuntimeException("同步租赁商城机具状态失败");
}
}
}
}