修改值问题

This commit is contained in:
2026-04-27 14:04:59 +08:00
parent 772ba6376a
commit 880d19b0fa

View File

@@ -36,8 +36,11 @@ public class ShopExtendServiceImpl extends ServiceImpl<ShopExtendMapper, ShopExt
}
BeanUtil.copyProperties(shopExtendDTO, shopExtend);
shopExtend.setAutoKey(null);
return update(shopExtend, new QueryWrapper().eq(ShopExtend::getShopId, shopId).eq(ShopExtend::getAutoKey, shopExtendDTO.getAutokey()));
if (shopExtendDTO.getValue() == null) {
shopExtend.setValue(null);
}
mapper.updateByQuery(shopExtend, false, new QueryWrapper().eq(ShopExtend::getShopId, shopId).eq(ShopExtend::getAutoKey, shopExtendDTO.getAutokey()));
return true;
}
@Override