| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.bean.dto.AccountSubjectDto; |
| | | import com.ruoyi.account.bean.vo.AccountSubjectVo; |
| | | import com.ruoyi.account.service.AccountSubjectService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ»è´¦ç§ç®è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-05-07 04:45:30 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/accountSubject") |
| | | @RequiredArgsConstructor |
| | | @Tag(name = "æ»è´¦ç§ç®") |
| | | public class AccountSubjectController { |
| | | private final AccountSubjectService accountSubjectService; |
| | | |
| | | @GetMapping("/list") |
| | | @Log(title = "æ»è´¦ç§ç®æ°æ®éå", businessType = BusinessType.OTHER) |
| | | @Operation(summary = "æ»è´¦ç§ç®å页æ¥è¯¢") |
| | | public R<IPage<AccountSubjectVo>> AccountSubjectDtoList(Page<AccountSubjectDto> page, AccountSubjectDto accountSubjectDto) { |
| | | IPage<AccountSubjectVo> paramList = accountSubjectService.baseList(page, accountSubjectDto); |
| | | return R.ok(paramList); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "æ°å¢æ»è´¦ç§ç®", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢æ»è´¦ç§ç®") |
| | | public R AccountSubjectDtoAdd(@RequestBody AccountSubjectDto accountSubjectDto) { |
| | | return R.ok(accountSubjectService.save(accountSubjectDto)); |
| | | } |
| | | |
| | | @PutMapping("/edit") |
| | | @Log(title = "ä¿®æ¹æ»è´¦ç§ç®", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ä¿®æ¹æ»è´¦ç§ç®") |
| | | public R AccountSubjectDtoEdit(@RequestBody AccountSubjectDto accountSubjectDto) { |
| | | return R.ok(accountSubjectService.updateById(accountSubjectDto)); |
| | | } |
| | | |
| | | @DeleteMapping("/remove/{ids}") |
| | | @Log(title = "å 餿»è´¦ç§ç®", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å 餿»è´¦ç§ç®") |
| | | public R AccountSubjectDtooRemove(@PathVariable Long[] ids) { |
| | | return R.ok(accountSubjectService.removeBatchByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PostMapping("/export") |
| | | @Operation(summary = "å¯¼åºæ»è´¦ç§ç®æä»¶") |
| | | @Log(title = "å¯¼åºæ»è´¦ç§ç®æä»¶", businessType = BusinessType.EXPORT) |
| | | public void exportAccountSubject(HttpServletResponse response) { |
| | | accountSubjectService.exportAccountSubject(response); |
| | | } |
| | | |
| | | } |