| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping("/borrowInfo") |
| | | @AllArgsConstructor |
| | | public class BorrowInfoController { |
| | | public class BorrowInfoController extends BaseController { |
| | | |
| | | private BorrowInfoService borrowInfoService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "分页查询") |
| | | public AjaxResult listPage(Page page, BorrowInfo borrowInfo) { |
| | | public R<?> listPage(Page page, BorrowInfo borrowInfo) { |
| | | return borrowInfoService.listPage(page,borrowInfo); |
| | | } |
| | | |
| | |
| | | @PostMapping("/add") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "新增借款信息", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody BorrowInfo borrowInfo) { |
| | | public R<?> add(@RequestBody BorrowInfo borrowInfo) { |
| | | return borrowInfoService.add(borrowInfo); |
| | | } |
| | | |
| | |
| | | @PostMapping("/update") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "修改借款信息", businessType = BusinessType.UPDATE) |
| | | public AjaxResult updateBorrowInfo(@RequestBody BorrowInfo borrowInfo) { |
| | | public R<?> updateBorrowInfo(@RequestBody BorrowInfo borrowInfo) { |
| | | return borrowInfoService.updateBorrowInfo(borrowInfo); |
| | | } |
| | | |
| | |
| | | @DeleteMapping("/delete") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "删除借款信息", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | public R<?> delete(@RequestBody List<Long> ids) { |
| | | return borrowInfoService.delete(ids); |
| | | } |
| | | |