Browse Source

更新添加床位,编辑床位接口

liu 1 year ago
parent
commit
bd676759bf
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/main/java/com/template/controller/WelcomeBedController.java

+ 8 - 0
src/main/java/com/template/controller/WelcomeBedController.java

@@ -107,6 +107,11 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
         wb.setIsCheck(StringUtils.hasText(iwbr.getCardNum()) ? 1 : 0);
         wb.setRemark(iwbr.getRemark());
 
+        wb.setInstructor(iwbr.getInstructor());
+        wb.setGrade(iwbr.getGrade());
+        wb.setCollegeId(iwbr.getCollegeId());
+        wb.setCollege(iwbr.getCollege());
+
         int result = welcomeBedService.insertWelcomeBed(wb);
         return result > 0 ? CommonResult.ok("添加成功!") : CommonResult.fail("添加失败");
     }
@@ -163,6 +168,9 @@ public class WelcomeBedController implements WelcomeBedControllerAPI {
         oldData.setName(uwbr.getName());
         oldData.setRemark(uwbr.getRemark());
 
+        oldData.setInstructor(uwbr.getInstructor());
+        oldData.setGrade(uwbr.getGrade());
+
         int result = welcomeBedService.updateWelcomeBed(oldData);
         return result > 0 ? CommonResult.ok("编辑成功!") : CommonResult.fail("编辑失败");
     }