优化租户管理的编辑功能

This commit is contained in:
季圣华
2022-10-23 00:24:34 +08:00
parent d7c0012885
commit b6d1e01233
9 changed files with 66 additions and 35 deletions

View File

@@ -3,10 +3,12 @@
<mapper namespace="com.jsh.erp.datasource.mappers.TenantMapperEx">
<resultMap extends="com.jsh.erp.datasource.mappers.LogMapper.BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.entities.TenantEx">
<result column="userCount" jdbcType="VARCHAR" property="userCount" />
</resultMap>
<select id="selectByConditionTenant" parameterType="com.jsh.erp.datasource.entities.TenantExample" resultMap="ResultMapEx">
select *
select jsh_tenant.*,
(select count(jsh_user.id) from jsh_user where jsh_user.Status='0' and jsh_user.tenant_id=jsh_tenant.tenant_id) userCount
FROM jsh_tenant
where 1=1
<if test="loginName != null">

View File

@@ -77,6 +77,7 @@
</foreach>
)
</update>
<resultMap id="BaseTreeResultMap" type="com.jsh.erp.datasource.vo.TreeNodeEx">
<result column="id" property="id"/>
<result column="text" property="text"/>
@@ -129,4 +130,9 @@
and ifnull(org_stcd,'0') !='5'
order by sort asc
</select>
<update id="disableUserByLimit">
update jsh_user set Status='2'
where tenant_id=#{tenantId} and id!=#{tenantId} and Status!='1'
</update>
</mapper>