智慧保安后台管理-外网
tangzy
2021-08-25 f66856f80d0db11adff5c6dd5f86aa375f86c199
src/main/java/org/springblade/modules/record/controller/RecordController.java
@@ -93,7 +93,8 @@
   @ApiOperation(value = "新增", notes = "传入record")
   public R save(@Valid @RequestBody Record record) {
      String cardid = record.getCardid();
      Map map = recordService.selectIn(cardid);
      String type = record.getPtype();
      Map map = recordService.selectIn(cardid,type);
      if (map != null) {
         String id = map.get("id").toString();
         recordService.removeByIds(Func.toLongList(id));
@@ -129,7 +130,8 @@
   @ApiOperation(value = "新增", notes = "传入record")
   public R rocordsave(@Valid @RequestBody Record record) {
      String cardid = record.getCardid();
      Map map = recordService.selectIn(cardid);
      String type = record.getPtype();
      Map map = recordService.selectIn(cardid,type);
      if (map != null) {
         record.setStorage("0");
         record.setPermitime(new Date());
@@ -177,8 +179,8 @@
   @PostMapping("/selectIn")
   public R selectIn(String cardid) {
      Map map = recordService.selectIn(cardid);
   public R selectIn(String cardid,String type) {
      Map map = recordService.selectIn(cardid,type);
      return R.data(map);
   }
}