余额问题

This commit is contained in:
2025-10-17 09:13:37 +08:00
parent 9bdb09232c
commit e96b01c57f
3 changed files with 6 additions and 4 deletions

View File

@@ -137,10 +137,10 @@ public class SmsShopTemplateController {
*/
@PostMapping("/smsMoney/change")
public CzgResult<Void> change(@RequestBody SmsShopMoneyDetailDTO money) {
Long shopId = StpKit.USER.getShopId();
SmsShopMoney shopMoney = shopMoneyService.getShopMoney(shopId);
// Long shopId = StpKit.USER.getShopId();
SmsShopMoney shopMoney = shopMoneyService.getShopMoney(money.getShopId());
SmsShopMoneyDetail moneyDetail = BeanUtil.toBean(money, SmsShopMoneyDetail.class);
moneyDetail.setShopId(shopId);
moneyDetail.setShopId(money.getShopId());
if (money.getType() == 1) {
shopMoney.setMoney(shopMoney.getMoney().add(money.getExpense()));
} else {