管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-12-26 d36c6276c35e62070001569e9171bf41ac0a5607
1
已添加1个文件
已修改4个文件
52 ■■■■■ 文件已修改
data/ts.sql 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/集成用户所需接口.docx 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/all/PermsController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/sys/UserController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/all/PermsMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/ts.sql
@@ -67,6 +67,9 @@
insert into lf.sys_role_user (id, roleid, userid, create_user) values (3, 13, 3, 1);
insert into lf.sys_role_user (id, roleid, userid, create_user) values (4, 14, 5, 1);
insert into lf.sys_role_user (id, roleid, userid, create_user) values (5, 15, 4, 1);
alter sequence lf.sys_apply_id_seq restart with 3;
alter sequence lf.sys_flow_id_seq restart with 7;
-----------------------------------------------------------------------
select depid from bd.dlg_25w_boul where depid > 0 and depid != ALL(fn_rec_array(38, 'dep'))
and ST_Intersects(geom, ST_PolygonFromText('POLYGON ((115.94927385452 32.3754479115071 0,121.989371092554 32.2766788010181 0,121.850621222894 29.6874200067864 0,115.9727267226 29.7835368627922 0,115.94927385452 32.3754479115071 0))', 4490))
@@ -75,15 +78,16 @@
select c.* from lf.sys_role a inner join lf.sys_role_user b on a.id = b.roleid inner join lf.sys_user c on b.userid = c.id
where a.is_admin = 2 and a.depid = 55 order by c.id limit 1
select * from lf.sys_apply;
select * from lf.sys_flow;
select * from lf.sys_apply order by id;
select * from lf.sys_flow order by id;
update lf.sys_flow set status = 1 where id = 3;
update lf.sys_apply a set status = (select count(*) from lf.sys_flow b where b.status = 1 and b.applyid = a.id) where id = 1;
update lf.sys_apply set status = 10 where status = count and id = 1;
select * from lf.sys_role_user
select * from lf.sys_role a inner join lf.sys_role_user b on a.id = b.roleid
where a.is_admin = 1
data/¼¯³ÉÓû§ËùÐè½Ó¿Ú.docx
Binary files differ
src/main/java/com/lf/server/controller/all/PermsController.java
@@ -14,6 +14,7 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -114,4 +115,17 @@
            return fail(ex.getMessage(), false);
        }
    }
    @SysLog()
    @ApiOperation(value = "查询用户角色")
    @GetMapping("/selectRoles")
    public ResponseMsg<Object> selectRoles(HttpServletRequest req, HttpServletResponse res) {
        try {
            //
            return success(null);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
}
src/main/java/com/lf/server/controller/sys/UserController.java
@@ -192,6 +192,27 @@
    }
    @SysLog()
    @ApiOperation(value = "查询是/否为管理员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "用户ID", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/selectIsAdmin")
    public ResponseMsg<Boolean> selectIsAdmin(Integer id) {
        try {
            UserEntity ue = userService.selectUser(id);
            if (ue == null) {
                return fail("用户不存在", false);
            }
            Integer rows = userService.selectForIsAdmin(ue.getId());
            return success("成功", rows > 0);
        } catch (Exception ex) {
            return fail(ex.getMessage(), false);
        }
    }
    @SysLog()
    @ApiOperation(value = "插入一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.data.UserEntity", paramType = "body", example = "")
src/main/resources/mapper/all/PermsMapper.xml
@@ -40,4 +40,9 @@
        where a.uid = #{uid}
        order by e.order_num
    </select>
    <select id="selectRoles">
        select is_admin from lf.sys_role a inner join lf.sys_role_user b on a.id = b.roleid
        inner join lf.sys_user c on b.userid = c.id where c.id = #{uid}
    </select>
</mapper>