feat(tenant-balance): 新增查询自身及下级余额接口

- Controller 增加 /get-self-amount 与 /get-self-subordinate-amount-page 端点
- Service 与 Mapper 实现当前租户余额查询及下级分页查询
- RespVO 移除乐观锁字段,改用 updatedAt 并补充 tenantName 展示
This commit is contained in:
2025-11-21 15:51:17 +08:00
parent 1c40343c6d
commit dfdedbb92d
6 changed files with 53 additions and 4 deletions

View File

@@ -21,4 +21,17 @@
</where>
order by stb.id desc
</select>
<select id="selectPageWithSelfSubordinateTenant"
resultType="cn.iocoder.yudao.module.system.controller.admin.tenantbalance.vo.TenantBalanceRespVO">
select stb.*, st.name as tenantName from system_tenant_balance as stb
left join system_tenant as st on stb.id = st.id
<where>
and st.parent_Id = #{tenantId,jdbcType=BIGINT}
<if test="pageReqVO.id != null">
and stb.id = #{pageReqVO.id,jdbcType=BIGINT}
</if>
</where>
order by stb.id desc
</select>
</mapper>