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

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