From d151d7af6ebab17d7de4ee2941448f634f0d0d8f Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期五, 09 五月 2025 18:18:16 +0800 Subject: [PATCH] 编辑删除办理进度接口 --- springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/StaticsController.java | 21 ++++++++++ springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintProgressServiceImpl.java | 15 +++++++ springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java | 25 ++++++++++++ springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComplaintProgressController.java | 29 ++++++++++++++ springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintProcessDTO.java | 3 + springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintProgressService.java | 2 + 6 files changed, 93 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComplaintProgressController.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComplaintProgressController.java index b9211ad..6e29ee1 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComplaintProgressController.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/ComplaintProgressController.java @@ -1,6 +1,18 @@ package com.panzhihua.sangeshenbian.controller; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.sangeshenbian.model.dto.ComplaintProcessDTO; +import com.panzhihua.sangeshenbian.service.IComplaintProgressService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.RequiredArgsConstructor; +import org.springframework.context.annotation.Lazy; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -13,8 +25,23 @@ * @author * @since 2025-02-22 */ +@Api(tags = {"【2.0.1】诉求办理进度相关接口"}) @RestController -@RequestMapping("/complaint-progress") +@RequestMapping("/applet/complaint-progress") +@RequiredArgsConstructor(onConstructor_ = {@Lazy}) public class ComplaintProgressController { + private final IComplaintProgressService complaintProgressService; + @DeleteMapping("/{id}") + @ApiOperation("【2.0.1】删除办理进度") + public R<?> delete(@ApiParam(name = "id", value = "进度id", required = true) @PathVariable("id") Long id) { + complaintProgressService.removeById(id); + return R.ok(); + } + @PutMapping("/edit") + @ApiOperation("【2.0.1】编辑办理进度") + public R<?> edit(@RequestBody ComplaintProcessDTO dto) { + complaintProgressService.edit(dto); + return R.ok(); + } } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/StaticsController.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/StaticsController.java new file mode 100644 index 0000000..8bde110 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/StaticsController.java @@ -0,0 +1,21 @@ +package com.panzhihua.sangeshenbian.controller; + +import com.panzhihua.sangeshenbian.service.impl.StaticsService; +import io.swagger.annotations.Api; +import lombok.RequiredArgsConstructor; +import org.springframework.context.annotation.Lazy; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author mitao + * @date 2025/5/9 + */ +@Api(tags = {"【2.0.1】统计分析相关接口"}) +@RestController +@RequestMapping("/applet/statics") +@RequiredArgsConstructor(onConstructor_ = {@Lazy}) +public class StaticsController { + private final StaticsService staticsService; + +} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintProcessDTO.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintProcessDTO.java index b94461c..83deb36 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintProcessDTO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/dto/ComplaintProcessDTO.java @@ -18,6 +18,9 @@ @ApiModel public class ComplaintProcessDTO { + @ApiModelProperty(value = "主键") + private Long id; + @ApiModelProperty(value = "诉求id") @NotNull(message = "诉求id不能为空") private Long complaintId; diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintProgressService.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintProgressService.java index 8fce8b4..84ef977 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintProgressService.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IComplaintProgressService.java @@ -1,5 +1,6 @@ package com.panzhihua.sangeshenbian.service; +import com.panzhihua.sangeshenbian.model.dto.ComplaintProcessDTO; import com.panzhihua.sangeshenbian.model.entity.ComplaintProgress; import com.baomidou.mybatisplus.extension.service.IService; @@ -13,4 +14,5 @@ */ public interface IComplaintProgressService extends IService<ComplaintProgress> { + void edit(ComplaintProcessDTO dto); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintProgressServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintProgressServiceImpl.java index d1660c1..11bfc8c 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintProgressServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintProgressServiceImpl.java @@ -1,10 +1,16 @@ package com.panzhihua.sangeshenbian.service.impl; +import cn.hutool.core.bean.BeanUtil; +import com.panzhihua.common.exceptions.ServiceException; +import com.panzhihua.sangeshenbian.model.dto.ComplaintProcessDTO; import com.panzhihua.sangeshenbian.model.entity.ComplaintProgress; import com.panzhihua.sangeshenbian.dao.ComplaintProgressMapper; import com.panzhihua.sangeshenbian.service.IComplaintProgressService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; + +import java.util.Objects; /** * <p> @@ -16,5 +22,12 @@ */ @Service public class ComplaintProgressServiceImpl extends ServiceImpl<ComplaintProgressMapper, ComplaintProgress> implements IComplaintProgressService { - + @Override + public void edit(ComplaintProcessDTO dto) { + if (Objects.nonNull(dto.getId())) { + throw new ServiceException("办理进度id不能为空"); + } + ComplaintProgress complaintProgress = BeanUtil.copyProperties(dto, ComplaintProgress.class); + this.updateById(complaintProgress); + } } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java new file mode 100644 index 0000000..2ec8758 --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java @@ -0,0 +1,25 @@ +package com.panzhihua.sangeshenbian.service.impl; + +import com.panzhihua.sangeshenbian.service.IBcRegionService; +import com.panzhihua.sangeshenbian.service.IComActService; +import com.panzhihua.sangeshenbian.service.IComStreetService; +import com.panzhihua.sangeshenbian.service.IComplaintService; +import com.panzhihua.sangeshenbian.service.IdentityInformationService; +import lombok.RequiredArgsConstructor; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; + +/** + * @author mitao + * @date 2025/5/9 + */ +@RequiredArgsConstructor(onConstructor_ = {@Lazy}) +@Service +public class StaticsService { + private final IdentityInformationService identityInformationService; + private final IComplaintService complaintService; + private final IBcRegionService bcRegionService; + private final IComStreetService comStreetService; + private final IComActService comActService; + +} -- Gitblit v1.7.1