# RevenueRateReviewController.java

    package cloud.wconnect.rateshop.controller.revenue;

    import cloud.wconnect.commonlib.annotation.ApiId;
    import cloud.wconnect.commonlib.component.SessionContext;
    import cloud.wconnect.rateshop.pojo.dto.revenue.RateReviewDTO;
    import cloud.wconnect.rateshop.pojo.dto.revenue.RateReviewNotifyLogDTO;
    import cloud.wconnect.rateshop.service.revenue.IRevenueRateReviewNotifyLogService;
    import cloud.wconnect.rateshop.service.revenue.IRevenueRateReviewService;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.web.bind.annotation.*;

    import java.util.Collections;
    import java.util.Map;

    /**
     * <p>
     * Rate Review 确认记录 前端控制器
     * </p>
     *
     * @author yyt
     * @since 2025-02-11
     */
    @RestController
    @RequestMapping("/revenue")
    public class RevenueRateReviewController {

        @Autowired
        private SessionContext sessionContext;
        @Autowired
        private IRevenueRateReviewService revenueRateReviewService;
        @Autowired
        private IRevenueRateReviewNotifyLogService revenueRateReviewNotifyLogService;

        /**
         * 1344 - Rate Review 确认
         *
         * @param date     指定日期
         * @param property 资产标识
         * @return {}
         * @author yyt
         * @date 2025/2/11
         **/
        @ApiId(1344)
        @PostMapping("/{date:\\d+}/rate-review")
        public Map confirm(@PathVariable long date, String property) {

            revenueRateReviewService.save(sessionContext.getPropertyId(property), date, sessionContext.getLoginUserId());

            return Collections.emptyMap();
        }

        /**
         * 1345 - 获取 Rate Review 确认记录
         *
         * @param date     指定日期
         * @param property 资产标识
         * @return Rate Review 确认记录
         * @author yyt
         * @date 2025/2/11
         **/
        @ApiId(1345)
        @GetMapping("/{date:\\d+}/rate-review")
        public RateReviewDTO get(@PathVariable long date, String property) {
            return revenueRateReviewService.getDTO(sessionContext.getPropertyId(property), date);
        }

        /**
         * 1350 - 获取当天 Rate Review 通知记录
         *
         * @param date     指定日期
         * @param property 资产标识
         * @return Rate Review 通知记录
         * @author yyt
         * @date 2025/3/14
         **/
        @ApiId(1350)
        @GetMapping("/{date:\\d+}/rate-review/notify-log")
        public RateReviewNotifyLogDTO getNotifyLog(@PathVariable long date, String property) {
            return revenueRateReviewNotifyLogService.getDTO(sessionContext.getPropertyId(property), date);
        }

    }