| | |
| | | import com.mzl.flower.base.BaseController; |
| | | import com.mzl.flower.base.R; |
| | | import com.mzl.flower.base.ReturnDataDTO; |
| | | import com.mzl.flower.config.exception.ValidationException; |
| | | import com.mzl.flower.config.security.SecurityUtils; |
| | | import com.mzl.flower.dto.request.wallet.CreateWalletWithdrawRecordDTO; |
| | | import com.mzl.flower.dto.response.supplier.SupplierDTO; |
| | | import com.mzl.flower.entity.wallet.WalletDO; |
| | | import com.mzl.flower.service.supplier.SupplierService; |
| | | import com.mzl.flower.service.wallet.WalletBillRecordService; |
| | | import com.mzl.flower.service.wallet.WalletService; |
| | | import com.mzl.flower.service.wallet.WalletWithdrawRecordService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | |
| | | @RequestMapping("/v2/withdraw-record") |
| | | public class WalletWithdrawRecordController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WalletWithdrawRecordService walletWithdrawRecordService; |
| | | |
| | | @Autowired |
| | | private WalletBillRecordService walletBillRecordService; |
| | | |
| | | @Autowired |
| | | private SupplierService supplierService; |
| | | @Autowired |
| | | private WalletService walletService; |
| | | |
| | | |
| | | |
| | | |
| | | @PostMapping("") |
| | | public ResponseEntity<ReturnDataDTO> create() { |
| | | public ResponseEntity<ReturnDataDTO> create(@Validated CreateWalletWithdrawRecordDTO walletWithdrawRecordDTO) { |
| | | |
| | | walletWithdrawRecordService.create(walletWithdrawRecordDTO); |
| | | |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |