交班记录代码提交
This commit is contained in:
@@ -105,12 +105,10 @@ public class HandoverRecordServiceImpl extends ServiceImpl<HandoverRecordMapper,
|
||||
|
||||
@Override
|
||||
public void initHandoverRecord(HandoverRecord entity) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
List<HandoverRecord> list = super.list(query().eq(HandoverRecord::getShopId, shopId).isNull(HandoverRecord::getHandoverTime));
|
||||
List<HandoverRecord> list = super.list(query().eq(HandoverRecord::getShopId, entity.getShopId()).isNull(HandoverRecord::getHandoverTime));
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
entity.setShopId(shopId);
|
||||
entity.setLoginTime(LocalDateTime.now());
|
||||
super.save(entity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user