| | |
| | | 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)) |
| | |
| | | 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 |
| | | |
| | | |
| | | |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @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 = "") |
| | |
| | | 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> |