Merge remote-tracking branch 'origin/main'

This commit is contained in:
Strange 2024-02-13 20:43:10 +08:00
commit 20e91b50d4
5 changed files with 28 additions and 1 deletions

View File

@ -61,4 +61,12 @@ public class AppCategoryController {
} }
@GetMapping("/getCountItemOneMonth")
public AjaxResult getCountItemOneMonth(Accounttb accounttb)
{
Integer countItemOneMonth = accounttbService.getCountItemOneMonth(accounttb);
return AjaxResult.success(countItemOneMonth);
}
} }

View File

@ -62,4 +62,6 @@ public interface AccounttbMapper
public int deleteAccounttbByIds(Long[] ids); public int deleteAccounttbByIds(Long[] ids);
Float getSumMoneyOneDay(Accounttb accounttb); Float getSumMoneyOneDay(Accounttb accounttb);
Integer getCountItemOneMonth(Accounttb accounttb);
} }

View File

@ -62,4 +62,6 @@ public interface IAccounttbService
public int deleteAccounttbById(Long id); public int deleteAccounttbById(Long id);
Float getSumMoneyOneDay(Accounttb accounttb); Float getSumMoneyOneDay(Accounttb accounttb);
Integer getCountItemOneMonth(Accounttb accounttb);
} }

View File

@ -98,4 +98,9 @@ public class AccounttbServiceImpl implements IAccounttbService
public Float getSumMoneyOneDay(Accounttb accounttb) { public Float getSumMoneyOneDay(Accounttb accounttb) {
return accounttbMapper.getSumMoneyOneDay(accounttb); return accounttbMapper.getSumMoneyOneDay(accounttb);
} }
@Override
public Integer getCountItemOneMonth(Accounttb accounttb) {
return accounttbMapper.getCountItemOneMonth(accounttb);
}
} }

View File

@ -52,6 +52,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</select> </select>
<select id="getCountItemOneMonth" resultType="java.lang.Integer">
SELECT COUNT(*) AS count
FROM accounttb
WHERE
<trim prefix="(" suffix=")" suffixOverrides="AND">
<if test="year != null">year = #{year} AND</if>
<if test="month != null">month = #{month} AND</if>
<if test="kind != null">kind = #{kind} AND</if>
</trim>
</select>
<insert id="insertAccounttb" parameterType="Accounttb" useGeneratedKeys="true" keyProperty="id"> <insert id="insertAccounttb" parameterType="Accounttb" useGeneratedKeys="true" keyProperty="id">
insert into accounttb insert into accounttb
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">