Browse Source

# 序列化问题修改

# 站点删除接口修改
zhongwei
haungxing 2 years ago
parent
commit
2a89423eb0
  1. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java
  2. 6
      hzims-service/operational/pom.xml
  3. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/config/WebDataConvertConfig.java
  4. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java
  5. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java

@ -86,8 +86,6 @@ public class StationEntity extends TenantEntity implements Serializable {
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
@JsonSerialize(using = LocalDateTimeSerializer.class)
@ApiModelProperty("投运时间,用于计算安全运行天数")
private LocalDateTime commissionTime;

6
hzims-service/operational/pom.xml

@ -180,12 +180,6 @@
<artifactId>hutool-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.13.2</version>
</dependency>
<!--WebSocket核心依赖包-->
<dependency>
<groupId>org.java-websocket</groupId>

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/config/WebDataConvertConfig.java

@ -21,7 +21,7 @@ import java.util.List;
* @Serial 1.0
* @Date 2023/4/10 16:11
*/
@Configuration
//@Configuration
public class WebDataConvertConfig extends WebMvcConfigurationSupport {
@ -31,7 +31,7 @@ public class WebDataConvertConfig extends WebMvcConfigurationSupport {
super.configureMessageConverters(converters);
}
@Bean
//@Bean
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
ObjectMapper mapper = new ObjectMapper();

7
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java

@ -145,12 +145,7 @@ public class StationController extends BladeController {
@ApiOperationSupport(order = 40)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
// 刷新演示平台站点数量
Executors.newSingleThreadExecutor().submit(() -> {
dataServicel.saveStation();
return "success";
});
return R.status(stationService.deleteLogic(Func.toLongList(ids)));
return R.status(stationService.removeStation(ids));
}
@GetMapping("/getStationByCode")

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

@ -127,8 +127,8 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
@Override
@Transactional(rollbackFor = Exception.class)
public boolean removeStation(String ids) {
if(this.deleteLogic(Func.toLongList(ids,","))) {
Func.toLongList(ids,",").forEach(id -> {
if(this.deleteLogic(Func.toLongList(",",ids))) {
Func.toLongList(",",ids).forEach(id -> {
StationEntity stationEntity = this.getById(id);
// 删除数据平台项目
Result<ProjectVO> existProject = projectClient.getProjectByPid(stationEntity.getCode());

Loading…
Cancel
Save