访客pc端新增
This commit is contained in:
parent
eb03629e84
commit
86c28e95dd
@ -123,7 +123,7 @@ public class TbVisitorManagementController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增访客管理
|
* 小程序新增访客管理
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("property:visitorManagement:add")
|
@SaCheckPermission("property:visitorManagement:add")
|
||||||
@Log(title = "访客管理", businessType = BusinessType.INSERT)
|
@Log(title = "访客管理", businessType = BusinessType.INSERT)
|
||||||
@ -137,6 +137,18 @@ public class TbVisitorManagementController extends BaseController {
|
|||||||
return toAjax(tbVisitorManagementService.insertByBo(bo));
|
return toAjax(tbVisitorManagementService.insertByBo(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pc端新增访客管理
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("property:visitorManagement::addVisitorManagement")
|
||||||
|
@Log(title = "访客管理", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping
|
||||||
|
public R<Void> addVistorManagement(@Validated(AddGroup.class) @RequestBody TbVisitorManagementBo bo) {
|
||||||
|
return toAjax(tbVisitorManagementService.insertVistorManagementByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改访客管理
|
* 修改访客管理
|
||||||
*/
|
*/
|
||||||
|
@ -25,7 +25,7 @@ public class TbVisitorManagementBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* qr码id
|
* qr码id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "qr码id不能为空", groups = { AddGroup.class, EditGroup.class })
|
// @NotNull(message = "qr码id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private Long qrCodeId;
|
private Long qrCodeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,6 +56,9 @@ public interface ITbVisitorManagementService {
|
|||||||
*/
|
*/
|
||||||
Boolean insertByBo(TbVisitorManagementBo bo);
|
Boolean insertByBo(TbVisitorManagementBo bo);
|
||||||
|
|
||||||
|
|
||||||
|
Boolean insertVistorManagementByBo(TbVisitorManagementBo bo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改访客管理
|
* 修改访客管理
|
||||||
*
|
*
|
||||||
|
@ -93,7 +93,7 @@ public class TbVisitorManagementServiceImpl implements ITbVisitorManagementServi
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增访客管理
|
* 小程序新增访客管理
|
||||||
*
|
*
|
||||||
* @param bo 访客管理
|
* @param bo 访客管理
|
||||||
* @return 是否新增成功
|
* @return 是否新增成功
|
||||||
@ -111,6 +111,26 @@ public class TbVisitorManagementServiceImpl implements ITbVisitorManagementServi
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pc端新增访客管理
|
||||||
|
*
|
||||||
|
* @param bo 访客管理
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertVistorManagementByBo(TbVisitorManagementBo bo) {
|
||||||
|
// QrCodeInfo info = RedisUtils.getCacheObject("Qrcode" + bo.getQrCodeId());
|
||||||
|
TbVisitorManagement add = MapstructUtils.convert(bo, TbVisitorManagement.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
// add.setCreateById(info.getUserid());
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改访客管理
|
* 修改访客管理
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user