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(); } } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/StaticsController.java
New file @@ -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; } 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; 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); } 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); } } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java
New file @@ -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; }