Browse Source

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

tags/V1.0.1
chengwang 1 year ago
parent
commit
91477c75c9
3 changed files with 7 additions and 2 deletions
  1. +4
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/system/role/RoleServiceImpl.java
  2. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/system/user/add/AddUserService.java
  3. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/UserMapper.xml

+ 4
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/system/role/RoleServiceImpl.java View File

@@ -2,6 +2,7 @@ package com.tuoheng.admin.service.system.role;


import cn.hutool.core.convert.Convert;
import cn.hutool.core.io.unit.DataUnit;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -90,7 +91,7 @@ public class RoleServiceImpl implements IRoleService {
}
queryWrapper.eq("mark", MarkEnum.VALID.getCode());
//queryWrapper.orderByAsc("sort");
queryWrapper.orderByDesc("create_time");
queryWrapper.orderByDesc("update_time");
queryWrapper.ne("id", "1");
// 查询分页数据
IPage<Role> pageData = roleMapper.selectPage(page, queryWrapper);
@@ -144,6 +145,8 @@ public class RoleServiceImpl implements IRoleService {
entity.setTenantId(CurrentUserUtil.getTenantId());
entity.setCreateUser(CurrentUserUtil.getUserId());
entity.setCreateTime(DateUtils.now());
entity.setUpdateTime(DateUtils.now());
entity.setUpdateUser(CurrentUserUtil.getUserId());
}
if (entity == null) {
return JsonResult.error("实体对象不存在");

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/system/user/add/AddUserService.java View File

@@ -133,6 +133,8 @@ public class AddUserService {
user.setTenantId(tenantId);
user.setCreateUser(CurrentUserUtil.getUserId());
user.setCreateTime(DateUtils.now());
user.setUpdateTime(DateUtils.now());
user.setUpdateUser(CurrentUserUtil.getUserId());
}

}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/resources/mapper/UserMapper.xml View File

@@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="request.realname != null and request.realname != ''"> and realname like concat('%', #{request.realname}, '%') </if>
<if test="request.roleId != null and request.roleId != 0"> and role_id = #{request.roleId} </if>
</where>
order by create_time desc
order by update_time desc
</select>

</mapper>

Loading…
Cancel
Save