|
@@ -289,6 +289,7 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, Shop> implements Sh
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public boolean linkDevice(Long shopId, Long deviceId) {
|
|
public boolean linkDevice(Long shopId, Long deviceId) {
|
|
|
// 检查门店是否存在
|
|
// 检查门店是否存在
|
|
|
Shop shop = this.getById(shopId);
|
|
Shop shop = this.getById(shopId);
|
|
@@ -345,6 +346,7 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, Shop> implements Sh
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public boolean unlinkDevice(Long shopId, Long deviceId) {
|
|
public boolean unlinkDevice(Long shopId, Long deviceId) {
|
|
|
// 检查设备是否属于该门店
|
|
// 检查设备是否属于该门店
|
|
|
Device device = deviceService.getById(deviceId);
|
|
Device device = deviceService.getById(deviceId);
|