支付方式接口
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user