|
|
|
@ -11,7 +11,6 @@ package com.example.todoapp.service; |
|
|
|
|
import com.example.todoapp.util.MessageUtils; |
|
|
|
|
|
|
|
|
|
import com.example.todoapp.dto.ToBuysDTO; |
|
|
|
|
import com.example.todoapp.dto.ToBuysBuyDTO; |
|
|
|
|
import com.example.todoapp.model.Stocks; |
|
|
|
|
import com.example.todoapp.model.Stuffs; |
|
|
|
|
import com.example.todoapp.model.ToBuys; |
|
|
|
@ -52,7 +51,7 @@ public class ToBuysService { |
|
|
|
|
private StuffsRepository stuffsRepository; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private StuffsRepository stocksRepository; |
|
|
|
|
private StocksRepository stocksRepository; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private MessageUtils messageUtils; |
|
|
|
@ -178,7 +177,7 @@ public class ToBuysService { |
|
|
|
|
stock.setExp_date(dto.getExp_date()); |
|
|
|
|
deleteToBuyByIds(dto.getUser_id(), dto.getTobuy_id()); |
|
|
|
|
// データベースに保存
|
|
|
|
|
return stockRepository.save(stock); |
|
|
|
|
return stocksRepository.save(stock); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|