* 区县名称 | * 区县名称 | ||||
*/ | */ | ||||
private String districtName; | private String districtName; | ||||
private String username; | |||||
} | } |
TenantVo vo = Convert.convert(TenantVo.class, x); | TenantVo vo = Convert.convert(TenantVo.class, x); | ||||
Long userId = x.getUserId(); | Long userId = x.getUserId(); | ||||
List<AuthoritiesPo> poList = authoritiesMapper.selectByUserId(userId); | List<AuthoritiesPo> poList = authoritiesMapper.selectByUserId(userId); | ||||
UserPo userPo = clientUserMapper.selectByUserId(userId); | |||||
if (null != userPo) { | |||||
vo.setUsername(userPo.getUsername()); | |||||
} | |||||
List<BusinessSystemVo> businessSystemVoList = new ArrayList<>(); | List<BusinessSystemVo> businessSystemVoList = new ArrayList<>(); | ||||
for (AuthoritiesPo authoritiesPo : poList) { | for (AuthoritiesPo authoritiesPo : poList) { | ||||
//TODO 后期维护各个业务平台 | //TODO 后期维护各个业务平台 |
where code = #{code} | where code = #{code} | ||||
</select> | </select> | ||||
<select id="findList" resultType="com.tuoheng.model.po.TenantPo"> | <select id="findList" resultType="com.tuoheng.model.po.TenantPo"> | ||||
SELECT id, user_id, remark,enabled, code, | |||||
name,province_code,province_name,city_code,city_name,district_code,district_name | |||||
FROM t_tenant | |||||
WHERE enabled = 1 | |||||
SELECT t.id, t.user_id, t.remark, t.code, | |||||
t.name,t.province_code,t.province_name,t.city_code,t.city_name,t.district_code,t.district_name,u.username username | |||||
FROM t_tenant t,users u | |||||
WHERE t.enabled = 1 and u.enabled =1 and t.user_id =u.id | |||||
<if test="query.name != null and query.name != ''"> | <if test="query.name != null and query.name != ''"> | ||||
and name LIKE concat('%',#{query.name},'%') | |||||
and t.name LIKE concat('%',#{query.name},'%') | |||||
</if> | </if> | ||||
<if test="query.username != null and query.username != ''"> | <if test="query.username != null and query.username != ''"> | ||||
and username LIKE concat('%',#{query.username},'%') | |||||
and u.username LIKE concat('%',#{query.username},'%') | |||||
</if> | </if> | ||||
ORDER BY create_time desc | |||||
ORDER BY t.create_time desc | |||||
</select> | </select> | ||||
<select id="selectById" resultType="com.tuoheng.model.po.TenantPo"> | <select id="selectById" resultType="com.tuoheng.model.po.TenantPo"> | ||||
SELECT id, user_id, remark, enabled, code, name | SELECT id, user_id, remark, enabled, code, name |
where code = #{code} | where code = #{code} | ||||
</select> | </select> | ||||
<select id="findList" resultType="com.tuoheng.model.po.TenantPo"> | <select id="findList" resultType="com.tuoheng.model.po.TenantPo"> | ||||
SELECT id, user_id, remark,enabled, code, | |||||
name,province_code,province_name,city_code,city_name,district_code,district_name | |||||
FROM t_tenant | |||||
WHERE enabled = 1 | |||||
SELECT t.id, t.user_id, t.remark, t.code, | |||||
t.name,t.province_code,t.province_name,t.city_code,t.city_name,t.district_code,t.district_name,u.username username | |||||
FROM t_tenant t,users u | |||||
WHERE t.enabled = 1 and u.enabled =1 and t.user_id =u.id | |||||
<if test="query.name != null and query.name != ''"> | <if test="query.name != null and query.name != ''"> | ||||
and name LIKE concat('%',#{query.name},'%') | |||||
and t.name LIKE concat('%',#{query.name},'%') | |||||
</if> | </if> | ||||
<if test="query.username != null and query.username != ''"> | <if test="query.username != null and query.username != ''"> | ||||
and username LIKE concat('%',#{query.username},'%') | |||||
and u.username LIKE concat('%',#{query.username},'%') | |||||
</if> | </if> | ||||
ORDER BY create_time desc | |||||
ORDER BY t.create_time desc | |||||
</select> | </select> | ||||
<select id="selectById" resultType="com.tuoheng.model.po.TenantPo"> | <select id="selectById" resultType="com.tuoheng.model.po.TenantPo"> | ||||
SELECT id, user_id, remark, enabled, code, name | SELECT id, user_id, remark, enabled, code, name |