From 7aab004601e77890b158f19d1735594a8326feaa Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期四, 24 四月 2025 17:11:17 +0800 Subject: [PATCH] 数据库事务注解位置调整 --- pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigatePlan.java | 30 ++++++++++-------------------- 1 files changed, 10 insertions(+), 20 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigatePlan.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigatePlan.java index e5d5c79..c7fa0f7 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigatePlan.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigatePlan.java @@ -1,8 +1,6 @@ package com.dy.pipIrrWechat.irrigatePlan.dto; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.*; import lombok.Data; import java.util.Date; @@ -34,6 +32,8 @@ * 璁″垝鍚姩妯″紡锛�1-鎵嬪伐鍚姩锛�2-鑷姩鍚姩 */ @NotNull(message = "璁″垝鍚姩妯″紡涓嶈兘涓虹┖") + @Min(value = 1, message = "璁″垝鍚姩妯″紡涓嶈兘灏忎簬1") + @Max(value = 2, message = "璁″垝鍚姩妯″紡涓嶈兘澶т簬2") private Byte startupMode; /** @@ -42,25 +42,15 @@ private Date planStartTime; /** - * 璁″垝鍋滄鏃堕棿 - */ - private Date planStopTime; - - /** - * 鐏屾簤绫诲瀷锛�1-杞亴缁勶紝2-鐏屾簤鍗曞厓 - */ - @NotNull(message = "鐏屾簤绫诲瀷涓嶈兘涓虹┖") - private Byte irrigateType; - - /** - * 鐏屾簤娆″簭 - */ - @NotEmpty(message = "宸℃杞ㄨ抗涓嶈兘涓虹┖") - private List<IrrigateSchedule> schedules; - - /** * 鎿嶄綔浜篒D */ @NotNull(message = "鎿嶄綔浜篒D涓嶈兘涓虹┖") private Long operatorId; + + /** + * 鐏屾簤娆″簭 + */ + @NotEmpty(message = "鐏屾簤娆″簭涓嶈兘涓虹┖") + private List<IrrigateSchedule> schedules; + } -- Gitblit v1.8.0