积分商品获取问题

This commit is contained in:
2025-12-10 17:06:52 +08:00
parent b281607022
commit df12c83b8e
3 changed files with 16 additions and 3 deletions

View File

@@ -54,7 +54,12 @@ public class PointsGoodsController {
public CzgResult<Boolean> addPointsGoodsSetting(@RequestBody @Validated MkPointsGoodsDTO dto) {
dto.setShopId(StpKit.USER.getShopId());
MkPointsGoods entity = BeanUtil.copyProperties(dto, MkPointsGoods.class);
boolean ret = pointsGoodsSettingService.saveOrUpdate(entity);
boolean ret;
if (entity.getId() != null) {
ret = pointsGoodsSettingService.saveOrUpdate(entity);
} else {
ret = pointsGoodsSettingService.updateById(entity, false);
}
return CzgResult.success(ret);
}