feat(tenant-balance): 新增查询自身及下级余额接口
- Controller 增加 /get-self-amount 与 /get-self-subordinate-amount-page 端点 - Service 与 Mapper 实现当前租户余额查询及下级分页查询 - RespVO 移除乐观锁字段,改用 updatedAt 并补充 tenantName 展示
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user