|
@@ -0,0 +1,142 @@
|
|
|
+package com.chelvc.cloud.maintain.controller;
|
|
|
+
|
|
|
+import com.chelvc.cloud.vehicle.api.dto.*;
|
|
|
+import com.chelvc.cloud.vehicle.api.service.InformService;
|
|
|
+import com.chelvc.framework.base.context.SessionContextHolder;
|
|
|
+import com.chelvc.framework.common.model.Pagination;
|
|
|
+import com.chelvc.framework.common.model.Paging;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.validation.Valid;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 订单通知接口
|
|
|
+ *
|
|
|
+ * @author igl
|
|
|
+ * @Date 2023/12/13
|
|
|
+ **/
|
|
|
+@Validated
|
|
|
+@RequiredArgsConstructor
|
|
|
+@RestController
|
|
|
+@RequestMapping
|
|
|
+public class InformController {
|
|
|
+
|
|
|
+ @DubboReference
|
|
|
+ private InformService informService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取用户的订单通知列表
|
|
|
+ *
|
|
|
+ * @param paging 分页信息
|
|
|
+ * @return 用户的订单列表
|
|
|
+ */
|
|
|
+ @GetMapping("/order/inform")
|
|
|
+ public Pagination<OmsOrderOperateHistoryDTO> listUserOrderInform(@Valid Paging paging) {
|
|
|
+ return informService.selectOmsOrderOperateHistoryListByUserId(SessionContextHolder.getId(), paging);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 将新订单通知标识更改
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @PutMapping("/order/inform/flag")
|
|
|
+ public void changeUserOrderInformFlag() {
|
|
|
+ informService.changeUserOrderInformFlag(SessionContextHolder.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查看是否有系统新消息
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @GetMapping("/new/inform")
|
|
|
+ public NewInformDTO getNewInform() {
|
|
|
+ return informService.getNewInform(SessionContextHolder.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取用户的支付通知列表
|
|
|
+ *
|
|
|
+ * @param paging 分页信息
|
|
|
+ * @return 用户的订单列表
|
|
|
+ */
|
|
|
+ @GetMapping("/pay/inform")
|
|
|
+ public Pagination<OmsOrderPayHistoryDTO> listUserPayInform(@Valid Paging paging) {
|
|
|
+ return informService.selectOmsOrderPayHistoryListByUserId(SessionContextHolder.getId(), paging);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 将新订单通知标识更改
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @PutMapping("/pay/inform/flag")
|
|
|
+ public void changeUserPayInformFlag() {
|
|
|
+ informService.changeUserPayInformFlag(SessionContextHolder.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取用户的点赞回复通知列表
|
|
|
+ *
|
|
|
+ * @param paging 分页信息
|
|
|
+ * @return 用户的订单列表
|
|
|
+ */
|
|
|
+ @GetMapping("/evaluate/inform")
|
|
|
+ public Pagination<EvaluateDTO> listEvaluate(@Valid Paging paging) {
|
|
|
+ return informService.selectEvaluateListByUserId(SessionContextHolder.getId(), paging);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 将新点赞回复通知标识更改
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @PutMapping("/evaluate/inform/flag")
|
|
|
+ public void changeEvaluateInformFlag() {
|
|
|
+ informService.changeEvaluateInformFlag(SessionContextHolder.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取用户的评价通知列表
|
|
|
+ *
|
|
|
+ * @param paging 分页信息
|
|
|
+ * @return 用户的订单列表
|
|
|
+ */
|
|
|
+ @GetMapping("/comment/inform")
|
|
|
+ public Pagination<CommentDTO> listCommentInform(@Valid Paging paging) {
|
|
|
+ return informService.selectCommentListByUserId(SessionContextHolder.getId(), paging);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 将新评价通知标识更改
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @PutMapping("/comment/inform/flag")
|
|
|
+ public void changeCommentInformFlag() {
|
|
|
+ informService.changeCommentInformFlag(SessionContextHolder.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取用户的优惠券通知列表
|
|
|
+ *
|
|
|
+ * @param paging 分页信息
|
|
|
+ * @return 用户的订单列表
|
|
|
+ */
|
|
|
+ @GetMapping("/coupon/inform")
|
|
|
+ public Pagination<UserCouponDTO> listUserCouponInform(@Valid Paging paging) {
|
|
|
+ return informService.selectUserCouponListByUserId(SessionContextHolder.getId(), paging);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 将新优惠券通知标识更改
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @PutMapping("/coupon/inform/flag")
|
|
|
+ public void changeUserCouponInformFlag() {
|
|
|
+ informService.changeUserCouponInformFlag(SessionContextHolder.getId());
|
|
|
+ }
|
|
|
+}
|