| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "å页æ¥è¯¢å¹¶è¿åè®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "åç§°", dataType = "String", paramType = "query", example = "æææ"), |
| | | @ApiImplicitParam(name = "pageSize", value = "æ¯é¡µæ¡æ°", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "å页æ°ï¼ä»1å¼å§ï¼", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectByPageAndCount") |
| | | public ResponseMsg<List<ArgsEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | int count = argsService.selectCount(name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<ArgsEntity> rs = argsService.selectByPage(name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢ææ") |
| | | @GetMapping(value = "/selectAll") |
| | | public ResponseMsg<List<ArgsEntity>> selectAll() { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ·»å æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", paramType = "body") |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "ArgsEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody ArgsEntity entity) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éæ·»å ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", paramType = "body") |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "ArgsEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<ArgsEntity> list) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éå é¤") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "IDæ°ç»", dataType = "Integer", paramType = "query", example = "{1,2}") |
| | | @ApiImplicitParam(name = "ids", value = "IDæ°ç»", dataType = "Integer", paramType = "query", example = "1,2") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¿®æ¹æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", paramType = "body") |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "ArgsEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éä¿®æ¹") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", paramType = "body") |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "ArgsEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "å页æ¥è¯¢å¹¶è¿åè®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userid", value = "ç»å½äººID", dataType = "String", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "userid", value = "ç»å½äººID", dataType = "Integer", paramType = "query", example = "1"), |
| | | @ApiImplicitParam(name = "pageSize", value = "æ¯é¡µæ¡æ°", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "å页æ°ï¼ä»1å¼å§ï¼", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.lf.server.mapper.sys.ArgsEntity"> |
| | | <mapper namespace="com.lf.server.mapper.sys.ArgsMapper"> |
| | | <!-- ç»è®¡è¡æ° --> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | select count(*) from lf.sys_args |
| | | <where> |
| | | <if test="name != null"> |
| | | name = #{name} |
| | | name like #{name} |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | select * from lf.sys_args |
| | | <where> |
| | | <if test="name != null"> |
| | | name = #{name} |
| | | name like #{name} |
| | | </if> |
| | | </where> |
| | | order by id |
| | |
| | | 1.ä¿®æ¹èåãæ°æ®ç®å½ãåä½çxlsæ°æ®ï¼ç¼åé彿¥è¯¢SQL |
| | | 2.ç»å½æ¶éªè¯ä½¿ç¨MD5+Saltå¯ç |
| | | |
| | | 3.ä¿®æ¹ç¨æ·å¯ç æ¶ä½¿ç¨MD5+Saltå¯ç |
| | | 4.è§£å³Swagger-UIæ æ³ä¼ éCookieä¿¡æ¯ |
| | | 5.ç»å½æ¶çç¨æ·ååå¯ç 使ç¨RSAå å¯ãè§£å¯ |