From b4a814c5233885cc5df6ac76d6b8f9b5958c603c Mon Sep 17 00:00:00 2001 From: 张天森 <1292933220@qq.com> Date: 星期三, 28 九月 2022 11:20:06 +0800 Subject: [PATCH] bug修改 --- /dev/null | 122 ---------------------------------------- springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/ComEventVO.java | 2 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java | 10 +++ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java | 2 4 files changed, 13 insertions(+), 123 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/ComEventVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/ComEventVO.java index f6dc2b9..3cf886f 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/ComEventVO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/ComEventVO.java @@ -1,5 +1,6 @@ package com.panzhihua.common.model.vos.sanshuo; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -138,6 +139,7 @@ private Long createBy; /**创建时间*/ @ApiModelProperty(name = "createAt", value = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createAt; /**修改人*/ @ApiModelProperty(name = "updateBy", value = "修改人") diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_api/pom.xml b/springcloud_k8s_panzhihuazhihuishequ/service_api/pom.xml deleted file mode 100644 index 7f8caae..0000000 --- a/springcloud_k8s_panzhihuazhihuishequ/service_api/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>com.panzhihua</groupId> - <artifactId>zhihuishequ</artifactId> - <version>1.0-SNAPSHOT</version> - </parent> - <groupId>com.panzhihua</groupId> - <artifactId>service_api</artifactId> - <version>0.0.1-SNAPSHOT</version> - <name>service_api</name> - <description>对接第三方接口项目</description> - - - <dependencies> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.cloud</groupId> - <artifactId>spring-cloud-starter-config</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.cloud</groupId> - <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.cloud</groupId> - <artifactId>spring-cloud-starter-openfeign</artifactId> - </dependency> - <dependency> - <groupId>org.projectlombok</groupId> - <artifactId>lombok</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>com.panzhihua</groupId> - <artifactId>common</artifactId> - </dependency> - <dependency> - <groupId>com.netflix.hystrix</groupId> - <artifactId>hystrix-javanica</artifactId> - </dependency> - <dependency> - <groupId>com.github.xiaoymin</groupId> - <artifactId>swagger-bootstrap-ui</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-test</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>cn.hutool</groupId> - <artifactId>hutool-http</artifactId> - <version>5.6.7</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - <configuration> - <mainClass>com.panzhihua.serviceapi.ServiceApiApplication</mainClass> - </configuration> - <executions> - <execution> - <goals> - <goal>repackage</goal> - </goals> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>com.spotify</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>1.2.0</version> - <configuration> - <imageName>registry.cn-chengdu.aliyuncs.com/panzhihua/service_api:v1</imageName> - <serverId></serverId> - <baseImage>java</baseImage> - <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint> - <resources> - <resource> - <targetPath>/</targetPath> - <directory>${project.build.directory}</directory> - <include>${project.build.finalName}.jar</include> - </resource> - </resources> - </configuration> - </plugin> - </plugins> - </build> - - <repositories> - <repository> - <id>spring-snapshots</id> - <name>Spring Snapshots</name> - <url>https://repo.spring.io/snapshot</url> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - <repository> - <id>spring-milestones</id> - <name>Spring Milestones</name> - <url>https://repo.spring.io/milestone</url> - </repository> - </repositories> - -</project> diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java index 5a446bc..305f44b 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java @@ -8,10 +8,12 @@ import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoEventDTO; import com.panzhihua.common.model.dtos.community.sanshuo.IndexDateDTO; import com.panzhihua.common.model.vos.R; +import com.panzhihua.service_community.entity.ComEvent; import com.panzhihua.service_community.entity.ComMediateType; import com.panzhihua.service_community.entity.ComSanshuoEvent; import com.panzhihua.service_community.service.ComSanShuoEventService; import com.panzhihua.service_community.service.CommediateTypeService; +import com.panzhihua.service_community.service.IComEventService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; @@ -32,6 +34,9 @@ @Resource private CommediateTypeService commediateTypeService; + + @Resource + private IComEventService comEventService; @GetMapping ("/list") public R list(@RequestParam(value = "keyWord",required = false)String keyWord, @@ -77,6 +82,11 @@ comMediateType.setDeleteFlag(true); comMediateType.setEnabled(false); comMediateType.setModifyUser(this.getLoginUserInfo().getUserId()); + //该分类是否有未调解完成事件 + List<ComEvent> list = comEventService.list(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getEventCategory, id).in(ComEvent::getEventProcessStatus, (1), (2), (5))); + if (list.size()>0){ + return R.fail("有未处理完成事件,无法删除"); + } return R.ok(commediateTypeService.updateById(comMediateType)); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java index 8ab3190..677872d 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java @@ -284,7 +284,7 @@ ComSanshuoExpert specter = comSanShuoExpertService.getById(specterId); comEvent.setSpecialistAcceptTime(new Date()); comEvent.setSpecialistName(specter.getName()); - comEvent.setEventProcessStatus(SanShuoEventStatusEnum.ACCEPT.getCode()); + comEvent.setEventProcessStatus(SanShuoEventStatusEnum.conciliation.getCode()); int flag = baseMapper.updateById(comEvent); return flag > 0 ? R.ok() : R.fail(ReturnMsgConstants.UPDATE_FALSE); } -- Gitblit v1.7.1