|
@@ -1,8 +1,10 @@
|
|
|
package com.chelvc.cloud.maintain.controller;
|
|
|
|
|
|
+import com.chelvc.cloud.vehicle.api.constant.SystemInformType;
|
|
|
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.base.exception.ResourceUnavailableException;
|
|
|
import com.chelvc.framework.common.model.Pagination;
|
|
|
import com.chelvc.framework.common.model.Paging;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -43,12 +45,15 @@ public class InformController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 将新订单通知标识更改
|
|
|
+ * 将新系统通知标识未读改为已读
|
|
|
*
|
|
|
*/
|
|
|
- @PutMapping("/order/inform/flag")
|
|
|
- public void changeUserOrderInformFlag() {
|
|
|
- informService.changeUserOrderInformFlag(SessionContextHolder.getId());
|
|
|
+ @PutMapping("/system/inform/flag")
|
|
|
+ public void changeSystemInformFlag(SystemInformType type) {
|
|
|
+ if(type == null){
|
|
|
+ throw new ResourceUnavailableException("参数错误");
|
|
|
+ }
|
|
|
+ informService.changeSystemInformFlag(type, SessionContextHolder.getId());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -61,23 +66,34 @@ public class InformController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取用户的支付通知列表
|
|
|
+ * (商家端)查看是否有系统新消息
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @GetMapping("/merchant/new/inform")
|
|
|
+ public NewMerchantInformDTO getMerchantNewInform() {
|
|
|
+ return informService.getMerchantNewInform(SessionContextHolder.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * (商家端)获取订单退款申请列表
|
|
|
*
|
|
|
* @param paging 分页信息
|
|
|
* @return 用户的订单列表
|
|
|
*/
|
|
|
- @GetMapping("/pay/inform")
|
|
|
- public Pagination<OmsOrderPayHistoryDTO> listUserPayInform(@Valid Paging paging) {
|
|
|
- return informService.selectOmsOrderPayHistoryListByUserId(SessionContextHolder.getId(), paging);
|
|
|
+ @GetMapping("/order/return/apply")
|
|
|
+ public Pagination<OmsOrderReturnApplyIdsDTO> listOrderReturnApply(@Valid Paging paging) {
|
|
|
+ return informService.listOrderReturnApply(SessionContextHolder.getId(), paging);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 将新订单通知标识更改
|
|
|
+ * 获取用户的支付通知列表
|
|
|
*
|
|
|
+ * @param paging 分页信息
|
|
|
+ * @return 用户的订单列表
|
|
|
*/
|
|
|
- @PutMapping("/pay/inform/flag")
|
|
|
- public void changeUserPayInformFlag() {
|
|
|
- informService.changeUserPayInformFlag(SessionContextHolder.getId());
|
|
|
+ @GetMapping("/pay/inform")
|
|
|
+ public Pagination<OmsOrderDTO> listUserPayInform(@Valid Paging paging) {
|
|
|
+ return informService.selectOmsOrderPayHistoryListByUserId(SessionContextHolder.getId(), paging);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -91,15 +107,6 @@ public class InformController {
|
|
|
return informService.selectEvaluateListByUserId(SessionContextHolder.getId(), paging);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 将新点赞回复通知标识更改
|
|
|
- *
|
|
|
- */
|
|
|
- @PutMapping("/evaluate/inform/flag")
|
|
|
- public void changeEvaluateInformFlag() {
|
|
|
- informService.changeEvaluateInformFlag(SessionContextHolder.getId());
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 获取用户的评价通知列表
|
|
|
*
|
|
@@ -111,15 +118,6 @@ public class InformController {
|
|
|
return informService.selectCommentListByUserId(SessionContextHolder.getId(), paging);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 将新评价通知标识更改
|
|
|
- *
|
|
|
- */
|
|
|
- @PutMapping("/comment/inform/flag")
|
|
|
- public void changeCommentInformFlag() {
|
|
|
- informService.changeCommentInformFlag(SessionContextHolder.getId());
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 获取用户的优惠券通知列表
|
|
|
*
|
|
@@ -130,13 +128,4 @@ public class InformController {
|
|
|
public Pagination<UserCouponDTO> listUserCouponInform(@Valid Paging paging) {
|
|
|
return informService.selectUserCouponListByUserId(SessionContextHolder.getId(), paging);
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * 将新优惠券通知标识更改
|
|
|
- *
|
|
|
- */
|
|
|
- @PutMapping("/coupon/inform/flag")
|
|
|
- public void changeUserCouponInformFlag() {
|
|
|
- informService.changeUserCouponInformFlag(SessionContextHolder.getId());
|
|
|
- }
|
|
|
}
|