|
@@ -1,16 +1,19 @@
|
|
|
package com.chelvc.cloud.maintain.controller;
|
|
|
|
|
|
+import com.chelvc.cloud.vehicle.api.dto.NewInformDTO;
|
|
|
import com.chelvc.cloud.vehicle.api.dto.OmsOrderOperateHistoryDTO;
|
|
|
-import com.chelvc.cloud.vehicle.api.service.OmsOrderOperateHistoryService;
|
|
|
-import com.chelvc.framework.base.annotation.ResponseWrapping;
|
|
|
+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;
|
|
|
|
|
|
/**
|
|
@@ -20,12 +23,13 @@ import javax.validation.Valid;
|
|
|
* @Date 2023/12/13
|
|
|
**/
|
|
|
@Validated
|
|
|
+@RequiredArgsConstructor
|
|
|
@RestController
|
|
|
-@ResponseWrapping
|
|
|
+@RequestMapping
|
|
|
public class InformController {
|
|
|
|
|
|
@DubboReference
|
|
|
- private OmsOrderOperateHistoryService omsOrderOperateHistoryService;
|
|
|
+ private final InformService informService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -36,7 +40,7 @@ public class InformController {
|
|
|
*/
|
|
|
@GetMapping("/order/inform")
|
|
|
public Pagination<OmsOrderOperateHistoryDTO> listUserOrderInform(@Valid Paging paging) {
|
|
|
- return omsOrderOperateHistoryService.selectOmsOrderOperateHistoryListByUserId(SessionContextHolder.getId(), paging);
|
|
|
+ return informService.selectOmsOrderOperateHistoryListByUserId(SessionContextHolder.getId(), paging);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -45,6 +49,15 @@ public class InformController {
|
|
|
*/
|
|
|
@PutMapping("/order/inform/flag")
|
|
|
public void changeUserOrderInformFlag() {
|
|
|
- omsOrderOperateHistoryService.changeUserOrderInformFlag(SessionContextHolder.getId());
|
|
|
+ informService.changeUserOrderInformFlag(SessionContextHolder.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查看是否有系统新消息
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @GetMapping("/new/inform")
|
|
|
+ public NewInformDTO getNewInform() {
|
|
|
+ return informService.getNewInform(SessionContextHolder.getId());
|
|
|
}
|
|
|
}
|