| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.pojo.Account; |
| | | import com.ruoyi.account.pojo.AccountIncome; |
| | | import com.ruoyi.account.service.AccountIncomeService; |
| | | import com.ruoyi.account.service.AccountService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è´¢å¡ç®¡ç--èµé管ç |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/finance/funds") |
| | | @Api(tags = "è´¢å¡ç®¡ç--èµé管ç") |
| | | public class AccountController { |
| | | |
| | | @Resource |
| | | private AccountService accountService; |
| | | |
| | | |
| | | /** |
| | | * æ°å¢ |
| | | * @param account |
| | | * @return |
| | | */ |
| | | @PostMapping() |
| | | @ApiOperation("æ°å¢") |
| | | public AjaxResult add(@RequestBody Account account) { |
| | | return AjaxResult.success(accountService.save(account)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping() |
| | | @ApiOperation("å é¤") |
| | | public AjaxResult delQualityInspect(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | //å 餿£éªå |
| | | return AjaxResult.success(accountService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ |
| | | * @param account |
| | | * @return |
| | | */ |
| | | @PutMapping() |
| | | @ApiOperation("ä¿®æ¹") |
| | | public AjaxResult update(@RequestBody Account account) { |
| | | return AjaxResult.success(accountService.updateById(account)); |
| | | } |
| | | |
| | | /** |
| | | *å页æ¥è¯¢ |
| | | * @param page |
| | | * @return |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | public AjaxResult accountListPage(Page page,Account account) { |
| | | return AjaxResult.success(accountService.accountListPage(page,account)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |