item
This commit is contained in:
parent
bf87f96d63
commit
1c563154e2
|
@ -61,4 +61,12 @@ public class AppCategoryController {
|
|||
}
|
||||
|
||||
|
||||
@GetMapping("/getCountItemOneMonth")
|
||||
public AjaxResult getCountItemOneMonth(Accounttb accounttb)
|
||||
{
|
||||
Integer countItemOneMonth = accounttbService.getCountItemOneMonth(accounttb);
|
||||
return AjaxResult.success(countItemOneMonth);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -62,4 +62,6 @@ public interface AccounttbMapper
|
|||
public int deleteAccounttbByIds(Long[] ids);
|
||||
|
||||
Float getSumMoneyOneDay(Accounttb accounttb);
|
||||
|
||||
Integer getCountItemOneMonth(Accounttb accounttb);
|
||||
}
|
||||
|
|
|
@ -62,4 +62,6 @@ public interface IAccounttbService
|
|||
public int deleteAccounttbById(Long id);
|
||||
|
||||
Float getSumMoneyOneDay(Accounttb accounttb);
|
||||
|
||||
Integer getCountItemOneMonth(Accounttb accounttb);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
</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 into accounttb
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
Loading…
Reference in New Issue