Pārlūkot izejas kodu

更新查询租户接口添加根据账号的模糊搜索查询

tags/v2.4.1
xiaoying pirms 1 gada
vecāks
revīzija
dd3f2707ca
5 mainītis faili ar 16 papildinājumiem un 18 dzēšanām
  1. +2
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/model/po/TenantPo.java
  2. +0
    -4
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/ClientUserServiceImpl.java
  3. +7
    -7
      tuoheng_oidc_admin/src/main/resources/mapper/TenantMapper.xml
  4. Binārs
      tuoheng_oidc_admin/target/classes/com/tuoheng/service/impl/ClientUserServiceImpl.class
  5. +7
    -7
      tuoheng_oidc_admin/target/classes/mapper/TenantMapper.xml

+ 2
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/model/po/TenantPo.java Parādīt failu

@@ -48,4 +48,6 @@ public class TenantPo extends BasePo {
* 区县名称
*/
private String districtName;

private String username;
}

+ 0
- 4
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/ClientUserServiceImpl.java Parādīt failu

@@ -323,10 +323,6 @@ public class ClientUserServiceImpl implements ClientUserSevice {
TenantVo vo = Convert.convert(TenantVo.class, x);
Long userId = x.getUserId();
List<AuthoritiesPo> poList = authoritiesMapper.selectByUserId(userId);
UserPo userPo = clientUserMapper.selectByUserId(userId);
if (null != userPo) {
vo.setUsername(userPo.getUsername());
}
List<BusinessSystemVo> businessSystemVoList = new ArrayList<>();
for (AuthoritiesPo authoritiesPo : poList) {
//TODO 后期维护各个业务平台

+ 7
- 7
tuoheng_oidc_admin/src/main/resources/mapper/TenantMapper.xml Parādīt failu

@@ -46,17 +46,17 @@
where code = #{code}
</select>
<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 != ''">
and name LIKE concat('%',#{query.name},'%')
and t.name LIKE concat('%',#{query.name},'%')
</if>
<if test="query.username != null and query.username != ''">
and username LIKE concat('%',#{query.username},'%')
and u.username LIKE concat('%',#{query.username},'%')
</if>
ORDER BY create_time desc
ORDER BY t.create_time desc
</select>
<select id="selectById" resultType="com.tuoheng.model.po.TenantPo">
SELECT id, user_id, remark, enabled, code, name

Binārs
tuoheng_oidc_admin/target/classes/com/tuoheng/service/impl/ClientUserServiceImpl.class Parādīt failu


+ 7
- 7
tuoheng_oidc_admin/target/classes/mapper/TenantMapper.xml Parādīt failu

@@ -46,17 +46,17 @@
where code = #{code}
</select>
<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 != ''">
and name LIKE concat('%',#{query.name},'%')
and t.name LIKE concat('%',#{query.name},'%')
</if>
<if test="query.username != null and query.username != ''">
and username LIKE concat('%',#{query.username},'%')
and u.username LIKE concat('%',#{query.username},'%')
</if>
ORDER BY create_time desc
ORDER BY t.create_time desc
</select>
<select id="selectById" resultType="com.tuoheng.model.po.TenantPo">
SELECT id, user_id, remark, enabled, code, name

Notiek ielāde…
Atcelt
Saglabāt