支付方式接口

This commit is contained in:
张松
2025-02-26 10:59:07 +08:00
parent 533a5a4e7e
commit 6488a55355
6 changed files with 97 additions and 7 deletions

View File

@@ -42,13 +42,23 @@ public class ShopPayTypeController {
}
/**
* 支付方式详情获取
* 支付方式编辑
*/
@SaAdminCheckPermission(value = "shopPayType:edit", name = "支付方式编辑")
@PutMapping
public CzgResult<Boolean> edit(@RequestBody ShopPayTypeDTO shopPayTypeDTO) {
ShopPayType shopPayType = BeanUtil.copyProperties(shopPayTypeDTO, ShopPayType.class);
return CzgResult.success(shopPayTypeService.updateById(shopPayType));
return CzgResult.success(shopPayTypeService.update(shopPayType, new QueryWrapper().eq(ShopPayType::getId, shopPayTypeDTO.getId()).eq(ShopPayType::getShopId, StpKit.USER.getShopId())));
}
/**
* 支付方式添加
*/
@SaAdminCheckPermission(value = "shopPayType:save", name = "支付方式添加")
@PostMapping
public CzgResult<Boolean> add(@RequestBody ShopPayTypeDTO shopPayTypeDTO) {
ShopPayType shopPayType = BeanUtil.copyProperties(shopPayTypeDTO, ShopPayType.class);
return CzgResult.success(shopPayTypeService.add(StpKit.USER.getShopId(),shopPayType));
}
}