From ed27ac8115ce27b913da4c49d7c61671eff3c92e Mon Sep 17 00:00:00 2001 From: yss <17921@qq.com> Date: Tue, 18 Apr 2023 11:09:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E9=98=85=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/NotificationFeignClient.java | 17 ++ .../NotificationFeignFallbackFactory.java | 14 ++ .../controller/BizReadingController.java | 37 ++++ .../entity/NoticeReadingPO.java | 204 ++++++++++++++++++ .../NoticeReadingUpdateRequestBody.java | 50 +++++ .../service/BizReadingService.java | 21 ++ .../service/impl/BizReadingServiceImpl.java | 35 +++ 7 files changed, 378 insertions(+) create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/controller/BizReadingController.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/entity/NoticeReadingPO.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/entity/NoticeReadingUpdateRequestBody.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/service/BizReadingService.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/service/impl/BizReadingServiceImpl.java diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/client/NotificationFeignClient.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/client/NotificationFeignClient.java index 4220e7e..1323887 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/client/NotificationFeignClient.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/client/NotificationFeignClient.java @@ -2,13 +2,20 @@ package com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.client; import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; +import com.chinaunicom.mall.ebtp.common.log.OperationLogDetail; +import com.chinaunicom.mall.ebtp.common.log.enums.EbtpLogBusinessModule; +import com.chinaunicom.mall.ebtp.common.log.enums.EbtpLogType; import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.EshopMailPendingPO; import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.EshopSmsPendingPO; +import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.NoticeReadingPO; +import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.NoticeReadingUpdateRequestBody; import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import javax.validation.Valid; + @FeignClient(value = "${mconfig.feign.name.notification}", fallbackFactory = NotificationFeignFallbackFactory.class) public interface NotificationFeignClient { @@ -20,4 +27,14 @@ public interface NotificationFeignClient { @PostMapping("/v1/notification/sendMail") BaseResponse sendMail(@RequestBody EshopMailPendingPO eshopMailPendingPO); + @ApiOperation(value = "新增待阅", tags = "新增待阅", notes = "新增待阅") + @PostMapping("/v1/notification/sendReading") + @OperationLogDetail(businessModule = EbtpLogBusinessModule.OTHER,operationType = EbtpLogType.SELECT,detail = "待阅-新增") + BaseResponse sendPending(@Valid @RequestBody NoticeReadingPO noticeReadingPO); + + @ApiOperation(value = "待阅更新或删除", tags = "待阅更新或删除", notes = "待阅更新或删除") + @PostMapping("/v1/notification/updateReading") + @OperationLogDetail(businessModule = EbtpLogBusinessModule.OTHER,operationType = EbtpLogType.SELECT,detail = "待阅-更新或删除") + BaseResponse updateReading(@Valid @RequestBody NoticeReadingUpdateRequestBody noticeReadingUpdateRequestBody); + } diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/client/NotificationFeignFallbackFactory.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/client/NotificationFeignFallbackFactory.java index 246f90a..29a5916 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/client/NotificationFeignFallbackFactory.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/bizshortmessageemail/client/NotificationFeignFallbackFactory.java @@ -4,10 +4,14 @@ import cn.hutool.core.exceptions.ExceptionUtil; import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.EshopMailPendingPO; import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.EshopSmsPendingPO; +import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.NoticeReadingPO; +import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.NoticeReadingUpdateRequestBody; import feign.hystrix.FallbackFactory; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; +import javax.validation.Valid; + @Component @Slf4j public class NotificationFeignFallbackFactory implements FallbackFactory { @@ -26,6 +30,16 @@ public class NotificationFeignFallbackFactory implements FallbackFactory