# BudgetDatabaseConfigStartNotifyDateController.java

    package cloud.wconnect.rateshop.controller.budgetdatabase;

    import cloud.wconnect.commonlib.annotation.ApiId;
    import cloud.wconnect.commonlib.component.SessionContext;
    import cloud.wconnect.rateshop.pojo.dto.budgetdatabase.StartNotifyDateDTO;
    import cloud.wconnect.rateshop.pojo.dto.budgetdatabase.UpdateStartNotifyDateDTO;
    import cloud.wconnect.rateshop.service.budgetdatabase.IBudgetDatabaseConfigNotifyDateService;
    import jakarta.validation.Valid;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.web.bind.annotation.*;

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

    /**
     * <p>
     *  前端控制器
     * </p>
     *
     * @author yyt
     * @since 2025-08-16
     */
    @RestController
    @RequestMapping("/budget-database/start-notify-date")
    public class BudgetDatabaseConfigStartNotifyDateController {

        @Autowired
        private IBudgetDatabaseConfigNotifyDateService budgetDatabaseConfigNotifyDateService;
        @Autowired
        private SessionContext sessionContext;

        /**
         * 1566 - 获取到期通知开始日
         *
         * @param property 资产标识
         * @return 到期通知开始日
         * @author yyt
         * @date 2025/8/16
         */
        @ApiId(1566)
        @GetMapping
        public StartNotifyDateDTO get(String property) {
            Integer propertyId = sessionContext.getPropertyId(property);
            return budgetDatabaseConfigNotifyDateService.getDTO(propertyId);
        }

        /**
         * 1567 - 保存到期通知开始日
         *
         * @param property                 资产标识
         * @param updateStartNotifyDateDTO 到期通知开始日
         * @return {}
         * @author yyt
         * @date 2025/8/16
         */
        @ApiId(1567)
        @PostMapping
        public Map<String, Object> save(String property, @Valid @RequestBody UpdateStartNotifyDateDTO updateStartNotifyDateDTO) {
            budgetDatabaseConfigNotifyDateService.save(sessionContext.getPropertyId(property), updateStartNotifyDateDTO, sessionContext.getLoginUserId());
            return Collections.emptyMap();
        }

    }