فهرست منبع

[update] message:1.果园修改增加飞鸟看园id字段

kelei 6 ماه پیش
والد
کامیت
7933b49511

+ 3 - 0
admin/src/main/java/com/flyer/foster/dto/GardenAddDTO.java

@@ -21,6 +21,9 @@ public class GardenAddDTO {
     @NotBlank(message = "果园名称不能为空")
     private String name;
 
+    @NotNull(message = "飞鸟看园果园id不能为空")
+    private Integer birdseyeGardenId;
+
     /**
      * 用户id
      */

+ 5 - 0
admin/src/main/java/com/flyer/foster/dto/GardenUpdateDTO.java

@@ -27,6 +27,11 @@ public class GardenUpdateDTO {
     private Integer userId;
 
     /**
+     * 飞鸟看园
+     */
+    private Integer birdseyeGardenId;
+
+    /**
      * 底图
      */
     private String baseMapUrl;

+ 2 - 0
admin/src/main/java/com/flyer/foster/service/impl/GardenServiceImpl.java

@@ -2,6 +2,7 @@ package com.flyer.foster.service.impl;
 
 import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.lang.intern.InternUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -118,6 +119,7 @@ public class GardenServiceImpl extends ServiceImpl<IGardenMapper, Garden> implem
         }
         return this.lambdaUpdate()
                 .set(Garden::getName, updateDTO.getName())
+                .set(updateDTO.getBirdseyeGardenId() != null, Garden::getBirdseyeGardenId, updateDTO.getBirdseyeGardenId())
                 .set(updateDTO.getUserId() != null, Garden::getUserId, updateDTO.getUserId())
                 .set(StrUtil.isNotBlank(updateDTO.getBaseMapUrl()), Garden::getBaseMapUrl, updateDTO.getBaseMapUrl())
                 .set(updateDTO.getStatus() != null, Garden::getStatus, updateDTO.getStatus())