From 1c563154e20583496b252e6e54ecc1a84d45c562 Mon Sep 17 00:00:00 2001 From: GatsbyH Date: Mon, 12 Feb 2024 21:59:15 +0800 Subject: [PATCH] item --- .../ruoyi/app/controller/AppCategoryController.java | 8 ++++++++ .../com/ruoyi/app/system/mapper/AccounttbMapper.java | 2 ++ .../ruoyi/app/system/service/IAccounttbService.java | 2 ++ .../system/service/impl/AccounttbServiceImpl.java | 5 +++++ .../main/resources/mapper/system/AccounttbMapper.xml | 12 +++++++++++- 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/controller/AppCategoryController.java b/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/controller/AppCategoryController.java index 117e1ab..45ae90f 100644 --- a/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/controller/AppCategoryController.java +++ b/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/controller/AppCategoryController.java @@ -61,4 +61,12 @@ public class AppCategoryController { } + @GetMapping("/getCountItemOneMonth") + public AjaxResult getCountItemOneMonth(Accounttb accounttb) + { + Integer countItemOneMonth = accounttbService.getCountItemOneMonth(accounttb); + return AjaxResult.success(countItemOneMonth); + } + + } diff --git a/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/mapper/AccounttbMapper.java b/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/mapper/AccounttbMapper.java index 54021c5..1d98464 100644 --- a/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/mapper/AccounttbMapper.java +++ b/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/mapper/AccounttbMapper.java @@ -62,4 +62,6 @@ public interface AccounttbMapper public int deleteAccounttbByIds(Long[] ids); Float getSumMoneyOneDay(Accounttb accounttb); + + Integer getCountItemOneMonth(Accounttb accounttb); } diff --git a/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/service/IAccounttbService.java b/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/service/IAccounttbService.java index e6bbeac..978c4bc 100644 --- a/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/service/IAccounttbService.java +++ b/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/service/IAccounttbService.java @@ -62,4 +62,6 @@ public interface IAccounttbService public int deleteAccounttbById(Long id); Float getSumMoneyOneDay(Accounttb accounttb); + + Integer getCountItemOneMonth(Accounttb accounttb); } diff --git a/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/service/impl/AccounttbServiceImpl.java b/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/service/impl/AccounttbServiceImpl.java index c05230a..8df05c4 100644 --- a/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/service/impl/AccounttbServiceImpl.java +++ b/RuoYi-Vue/ruoyi-homejizhang/src/main/java/com/ruoyi/app/system/service/impl/AccounttbServiceImpl.java @@ -98,4 +98,9 @@ public class AccounttbServiceImpl implements IAccounttbService public Float getSumMoneyOneDay(Accounttb accounttb) { return accounttbMapper.getSumMoneyOneDay(accounttb); } + + @Override + public Integer getCountItemOneMonth(Accounttb accounttb) { + return accounttbMapper.getCountItemOneMonth(accounttb); + } } diff --git a/RuoYi-Vue/ruoyi-homejizhang/src/main/resources/mapper/system/AccounttbMapper.xml b/RuoYi-Vue/ruoyi-homejizhang/src/main/resources/mapper/system/AccounttbMapper.xml index 0295c50..70bb01c 100644 --- a/RuoYi-Vue/ruoyi-homejizhang/src/main/resources/mapper/system/AccounttbMapper.xml +++ b/RuoYi-Vue/ruoyi-homejizhang/src/main/resources/mapper/system/AccounttbMapper.xml @@ -52,7 +52,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + insert into accounttb typename,