| | |
| | | name varchar(50), |
| | | cvalue integer default 0, |
| | | dvalue integer default 0, |
| | | min_value integer default 0, |
| | | max_value integer default 0, |
| | | descr varchar(256), |
| | | create_user integer default 1, |
| | | create_time timestamp(6) without time zone default now(), |
| | |
| | | comment on column lf.sys_args.name is 'åç§°'; |
| | | comment on column lf.sys_args.cvalue is 'å½åå¼'; |
| | | comment on column lf.sys_args.dvalue is 'é»è®¤å¼'; |
| | | comment on column lf.sys_args.min_value is 'æå°å¼'; |
| | | comment on column lf.sys_args.max_value is 'æå¤§å¼'; |
| | | comment on column lf.sys_args.descr is 'æè¿°'; |
| | | comment on column lf.sys_args.create_user is 'å建人ID'; |
| | | comment on column lf.sys_args.create_time is 'å建æ¶é´'; |
| | | comment on column lf.sys_args.update_user is 'æ´æ°äººID'; |
| | | comment on column lf.sys_args.update_time is 'æ´æ°æ¶é´'; |
| | | |
| | | /* insert into lf.sys_args (name,cvalue,dvalue,descr) values ('èªå¨ç»åºæ¶é´',15,15,'é»è®¤ç¨æ·15åé䏿ä½ï¼å°±èªå¨ç»åºç³»ç»ã'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,descr) values ('ä»¤çæææ',240,240,'临æ¶ä»¤çé»è®¤æææä¸º240åéï¼4å°æ¶ï¼ï¼è¶
æ¶å°å¤±æã'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,descr) values ('ç¼åæææ',1440,1440,'ç¼åé»è®¤æææä¸º1440åéï¼1天ï¼ï¼è¶
æ¶å°å¤±æã'); */ |
| | | /* insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr) values ('èªå¨ç»åºæ¶é´',15,15,3,1440,'é»è®¤ç¨æ·15åé䏿ä½ï¼å°±èªå¨ç»åºç³»ç»ã'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr) values ('ä»¤çæææ',240,240,60,1440,'临æ¶ä»¤çé»è®¤æææä¸º240åéï¼4å°æ¶ï¼ï¼è¶
æ¶å°å¤±æã'); |
| | | insert into lf.sys_args (name,cvalue,dvalue,min_value,max_value,descr) values ('ç¼åæææ',240,240,60,1440,'ç¼åé»è®¤æææä¸º1440åéï¼1天ï¼ï¼è¶
æ¶å°å¤±æã'); */ |
| | | |
| | | select * from lf.sys_args; |
| | | ----------------------------------------------------------------------------------------------------- é彿¥è¯¢ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.controller.data; |
| | | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.DownloadEntity; |
| | | import com.lf.server.service.data.DownloadService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä¸è½½è®°å½ |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "æ°æ®ç®¡ç\\ä¸è½½è®°å½") |
| | | @RestController |
| | | @RequestMapping("/args") |
| | | public class DownloadController extends BaseController { |
| | | @Autowired |
| | | DownloadService downloadService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "åç§°", dataType = "String", paramType = "query", required = false, example = "") |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(String name) { |
| | | try { |
| | | int count = downloadService.selectCount(name); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @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 = "/selectByPage") |
| | | public ResponseMsg<List<DownloadEntity>> selectByPage(String name, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | |
| | | List<DownloadEntity> rs = downloadService.selectByPage(name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @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<DownloadEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | int count = downloadService.selectCount(name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<DownloadEntity> rs = downloadService.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<DownloadEntity>> selectAll() { |
| | | try { |
| | | List<DownloadEntity> list = downloadService.selectAll(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ ¹æ®IDæ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectById") |
| | | public ResponseMsg<DownloadEntity> selectById(int id) { |
| | | try { |
| | | DownloadEntity entity = downloadService.selectById(id); |
| | | |
| | | return success(entity); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ·»å æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "DownloadEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody DownloadEntity entity) { |
| | | try { |
| | | int count = downloadService.insert(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éæ·»å ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "DownloadEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<DownloadEntity> list) { |
| | | try { |
| | | int count = downloadService.inserts(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "åªé¤æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/delete") |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | int count = downloadService.delete(id); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éå é¤") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "IDæ°ç»", dataType = "Integer", paramType = "query", example = "1,2") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { |
| | | try { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return fail("idæ°ç»ä¸è½ä¸ºç©º", -1); |
| | | } |
| | | |
| | | int count = downloadService.deletes(ids); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¿®æ¹æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "DownloadEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody DownloadEntity entity) { |
| | | try { |
| | | int count = downloadService.update(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éä¿®æ¹") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "DownloadEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<DownloadEntity> list) { |
| | | try { |
| | | int count = downloadService.updates(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.controller.data; |
| | | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.service.data.MetaService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å
æ°æ® |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "æ°æ®ç®¡ç\\å
æ°æ®ç®¡ç") |
| | | @RestController |
| | | @RequestMapping("/args") |
| | | public class MetaController extends BaseController { |
| | | @Autowired |
| | | MetaService metaService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "åç§°", dataType = "String", paramType = "query", required = false, example = "") |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(String name) { |
| | | try { |
| | | int count = metaService.selectCount(name); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @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 = "/selectByPage") |
| | | public ResponseMsg<List<MetaEntity>> selectByPage(String name, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | |
| | | List<MetaEntity> rs = metaService.selectByPage(name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @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<MetaEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | int count = metaService.selectCount(name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<MetaEntity> rs = metaService.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<MetaEntity>> selectAll() { |
| | | try { |
| | | List<MetaEntity> list = metaService.selectAll(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ ¹æ®IDæ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectById") |
| | | public ResponseMsg<MetaEntity> selectById(int id) { |
| | | try { |
| | | MetaEntity entity = metaService.selectById(id); |
| | | |
| | | return success(entity); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ·»å æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MetaEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody MetaEntity entity) { |
| | | try { |
| | | int count = metaService.insert(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éæ·»å ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MetaEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MetaEntity> list) { |
| | | try { |
| | | int count = metaService.inserts(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "åªé¤æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/delete") |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | int count = metaService.delete(id); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éå é¤") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "IDæ°ç»", dataType = "Integer", paramType = "query", example = "1,2") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { |
| | | try { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return fail("idæ°ç»ä¸è½ä¸ºç©º", -1); |
| | | } |
| | | |
| | | int count = metaService.deletes(ids); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¿®æ¹æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MetaEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody MetaEntity entity) { |
| | | try { |
| | | int count = metaService.update(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éä¿®æ¹") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MetaEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MetaEntity> list) { |
| | | try { |
| | | int count = metaService.updates(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.controller.data; |
| | | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.service.data.MetaFileService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å
æ°æ®æä»¶ |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "æ°æ®ç®¡ç\\å
æ°æ®æä»¶") |
| | | @RestController |
| | | @RequestMapping("/args") |
| | | public class MetaFileController extends BaseController { |
| | | @Autowired |
| | | MetaFileService metaFileService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "æä»¶å", dataType = "String", paramType = "query", required = false, example = "") |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(String name) { |
| | | try { |
| | | int count = metaFileService.selectCount(name); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @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 = "/selectByPage") |
| | | public ResponseMsg<List<MetaFileEntity>> selectByPage(String name, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | |
| | | List<MetaFileEntity> rs = metaFileService.selectByPage(name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @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<MetaFileEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | int count = metaFileService.selectCount(name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<MetaFileEntity> rs = metaFileService.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<MetaFileEntity>> selectAll() { |
| | | try { |
| | | List<MetaFileEntity> list = metaFileService.selectAll(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ ¹æ®IDæ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectById") |
| | | public ResponseMsg<MetaFileEntity> selectById(int id) { |
| | | try { |
| | | MetaFileEntity entity = metaFileService.selectById(id); |
| | | |
| | | return success(entity); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ·»å æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MetaFileEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody MetaFileEntity entity) { |
| | | try { |
| | | int count = metaFileService.insert(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éæ·»å ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MetaFileEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MetaFileEntity> list) { |
| | | try { |
| | | int count = metaFileService.inserts(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "åªé¤æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/delete") |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | int count = metaFileService.delete(id); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éå é¤") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "IDæ°ç»", dataType = "Integer", paramType = "query", example = "1,2") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { |
| | | try { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return fail("idæ°ç»ä¸è½ä¸ºç©º", -1); |
| | | } |
| | | |
| | | int count = metaFileService.deletes(ids); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¿®æ¹æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MetaFileEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody MetaFileEntity entity) { |
| | | try { |
| | | int count = metaFileService.update(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éä¿®æ¹") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MetaFileEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MetaFileEntity> list) { |
| | | try { |
| | | int count = metaFileService.updates(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.controller.sys; |
| | | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.AttachEntity; |
| | | import com.lf.server.service.sys.AttachService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * éä»¶ |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "è¿ç»´ç®¡ç\\éä»¶") |
| | | @RestController |
| | | @RequestMapping("/args") |
| | | public class AttachController extends BaseController { |
| | | @Autowired |
| | | AttachService attachService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "æä»¶å", dataType = "String", paramType = "query", required = false, example = "") |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(String name) { |
| | | try { |
| | | int count = attachService.selectCount(name); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @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 = "/selectByPage") |
| | | public ResponseMsg<List<AttachEntity>> selectByPage(String name, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | |
| | | List<AttachEntity> rs = attachService.selectByPage(name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @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<AttachEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | int count = attachService.selectCount(name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<AttachEntity> rs = attachService.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<AttachEntity>> selectAll() { |
| | | try { |
| | | List<AttachEntity> list = attachService.selectAll(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ ¹æ®IDæ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectById") |
| | | public ResponseMsg<AttachEntity> selectById(int id) { |
| | | try { |
| | | AttachEntity entity = attachService.selectById(id); |
| | | |
| | | return success(entity); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ·»å æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "AttachEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody AttachEntity entity) { |
| | | try { |
| | | int count = attachService.insert(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éæ·»å ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "AttachEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<AttachEntity> list) { |
| | | try { |
| | | int count = attachService.inserts(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "åªé¤æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/delete") |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | int count = attachService.delete(id); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éå é¤") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "IDæ°ç»", dataType = "Integer", paramType = "query", example = "1,2") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { |
| | | try { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return fail("idæ°ç»ä¸è½ä¸ºç©º", -1); |
| | | } |
| | | |
| | | int count = attachService.deletes(ids); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¿®æ¹æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "AttachEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody AttachEntity entity) { |
| | | try { |
| | | int count = attachService.update(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éä¿®æ¹") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "AttachEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<AttachEntity> list) { |
| | | try { |
| | | int count = attachService.updates(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.controller.sys; |
| | | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.MenuAuthEntity; |
| | | import com.lf.server.service.sys.MenuAuthService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * èå-æé |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "è¿ç»´ç®¡ç\\èåæé") |
| | | @RestController |
| | | @RequestMapping("/args") |
| | | public class MenuAuthController extends BaseController { |
| | | @Autowired |
| | | MenuAuthService menuAuthService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "menuid", value = "èåID", dataType = "Integer", paramType = "query", required = false, example = "") |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(Integer menuid) { |
| | | try { |
| | | int count = menuAuthService.selectCount(menuid); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "å页æ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "menuid", value = "èåID", dataType = "Integer", 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 = "/selectByPage") |
| | | public ResponseMsg<List<MenuAuthEntity>> selectByPage(Integer menuid, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | |
| | | List<MenuAuthEntity> rs = menuAuthService.selectByPage(menuid, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "å页æ¥è¯¢å¹¶è¿åè®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "menuid", value = "èåID", dataType = "Integer", 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<MenuAuthEntity>> selectByPageAndCount(Integer menuid, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | int count = menuAuthService.selectCount(menuid); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<MenuAuthEntity> rs = menuAuthService.selectByPage(menuid, 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<MenuAuthEntity>> selectAll() { |
| | | try { |
| | | List<MenuAuthEntity> list = menuAuthService.selectAll(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ ¹æ®IDæ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectById") |
| | | public ResponseMsg<MenuAuthEntity> selectById(int id) { |
| | | try { |
| | | MenuAuthEntity entity = menuAuthService.selectById(id); |
| | | |
| | | return success(entity); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ·»å æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MenuAuthEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody MenuAuthEntity entity) { |
| | | try { |
| | | int count = menuAuthService.insert(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éæ·»å ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MenuAuthEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MenuAuthEntity> list) { |
| | | try { |
| | | int count = menuAuthService.inserts(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "åªé¤æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/delete") |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | int count = menuAuthService.delete(id); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éå é¤") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "IDæ°ç»", dataType = "Integer", paramType = "query", example = "1,2") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { |
| | | try { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return fail("idæ°ç»ä¸è½ä¸ºç©º", -1); |
| | | } |
| | | |
| | | int count = menuAuthService.deletes(ids); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¿®æ¹æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MenuAuthEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody MenuAuthEntity entity) { |
| | | try { |
| | | int count = menuAuthService.update(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éä¿®æ¹") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MenuAuthEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MenuAuthEntity> list) { |
| | | try { |
| | | int count = menuAuthService.updates(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.controller.sys; |
| | | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.MsgEntity; |
| | | import com.lf.server.service.sys.MsgService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ¶æ¯éç¥ |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "è¿ç»´ç®¡ç\\æ¶æ¯éç¥") |
| | | @RestController |
| | | @RequestMapping("/args") |
| | | public class MsgController extends BaseController { |
| | | @Autowired |
| | | MsgService msgService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "title", value = "æ é¢", dataType = "String", paramType = "query", required = false, example = "") |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(String title) { |
| | | try { |
| | | int count = msgService.selectCount(title); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "å页æ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "title", 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 = "/selectByPage") |
| | | public ResponseMsg<List<MsgEntity>> selectByPage(String title, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | |
| | | List<MsgEntity> rs = msgService.selectByPage(title, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "å页æ¥è¯¢å¹¶è¿åè®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "title", 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<MsgEntity>> selectByPageAndCount(String title, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | int count = msgService.selectCount(title); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<MsgEntity> rs = msgService.selectByPage(title, 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<MsgEntity>> selectAll() { |
| | | try { |
| | | List<MsgEntity> list = msgService.selectAll(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ ¹æ®IDæ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectById") |
| | | public ResponseMsg<MsgEntity> selectById(int id) { |
| | | try { |
| | | MsgEntity entity = msgService.selectById(id); |
| | | |
| | | return success(entity); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ·»å æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MsgEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody MsgEntity entity) { |
| | | try { |
| | | int count = msgService.insert(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éæ·»å ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MsgEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<MsgEntity> list) { |
| | | try { |
| | | int count = msgService.inserts(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "åªé¤æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/delete") |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | int count = msgService.delete(id); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éå é¤") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "IDæ°ç»", dataType = "Integer", paramType = "query", example = "1,2") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { |
| | | try { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return fail("idæ°ç»ä¸è½ä¸ºç©º", -1); |
| | | } |
| | | |
| | | int count = msgService.deletes(ids); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¿®æ¹æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "MsgEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody MsgEntity entity) { |
| | | try { |
| | | int count = msgService.update(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éä¿®æ¹") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "MsgEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<MsgEntity> list) { |
| | | try { |
| | | int count = msgService.updates(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.controller.sys; |
| | | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.RoleMenuEntity; |
| | | import com.lf.server.service.sys.RoleMenuService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è§è²-èå |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "è¿ç»´ç®¡ç\\è§è²èå") |
| | | @RestController |
| | | @RequestMapping("/args") |
| | | public class RoleMenuController extends BaseController { |
| | | @Autowired |
| | | RoleMenuService roleMenuService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "roleid", value = "è§è²ID", dataType = "Integer", paramType = "query", required = false, example = "") |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(Integer roleid) { |
| | | try { |
| | | int count = roleMenuService.selectCount(roleid); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "å页æ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "roleid", value = "è§è²ID", dataType = "Integer", 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 = "/selectByPage") |
| | | public ResponseMsg<List<RoleMenuEntity>> selectByPage(Integer roleid, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | |
| | | List<RoleMenuEntity> rs = roleMenuService.selectByPage(roleid, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "å页æ¥è¯¢å¹¶è¿åè®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "roleid", value = "è§è²ID", dataType = "Integer", 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<RoleMenuEntity>> selectByPageAndCount(Integer roleid, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | int count = roleMenuService.selectCount(roleid); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<RoleMenuEntity> rs = roleMenuService.selectByPage(roleid, 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<RoleMenuEntity>> selectAll() { |
| | | try { |
| | | List<RoleMenuEntity> list = roleMenuService.selectAll(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ ¹æ®IDæ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectById") |
| | | public ResponseMsg<RoleMenuEntity> selectById(int id) { |
| | | try { |
| | | RoleMenuEntity entity = roleMenuService.selectById(id); |
| | | |
| | | return success(entity); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ·»å æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "RoleMenuEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody RoleMenuEntity entity) { |
| | | try { |
| | | int count = roleMenuService.insert(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éæ·»å ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "RoleMenuEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<RoleMenuEntity> list) { |
| | | try { |
| | | int count = roleMenuService.inserts(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "åªé¤æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/delete") |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | int count = roleMenuService.delete(id); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éå é¤") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "IDæ°ç»", dataType = "Integer", paramType = "query", example = "1,2") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { |
| | | try { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return fail("idæ°ç»ä¸è½ä¸ºç©º", -1); |
| | | } |
| | | |
| | | int count = roleMenuService.deletes(ids); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¿®æ¹æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "RoleMenuEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody RoleMenuEntity entity) { |
| | | try { |
| | | int count = roleMenuService.update(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éä¿®æ¹") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "RoleMenuEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<RoleMenuEntity> list) { |
| | | try { |
| | | int count = roleMenuService.updates(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.controller.sys; |
| | | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.sys.RoleResEntity; |
| | | import com.lf.server.service.sys.RoleResService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è§è²-èµæº |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "è¿ç»´ç®¡ç\\è§è²èµæº") |
| | | @RestController |
| | | @RequestMapping("/args") |
| | | public class RoleResController extends BaseController { |
| | | @Autowired |
| | | RoleResService roleResService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢è®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "roleid", value = "è§è²ID", dataType = "Integer", paramType = "query", required = false, example = "") |
| | | }) |
| | | @GetMapping({"/selectCount"}) |
| | | public ResponseMsg<Integer> selectCount(Integer roleid) { |
| | | try { |
| | | int count = roleResService.selectCount(roleid); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "å页æ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "roleid", value = "è§è²ID", dataType = "Integer", 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 = "/selectByPage") |
| | | public ResponseMsg<List<RoleResEntity>> selectByPage(Integer roleid, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | |
| | | List<RoleResEntity> rs = roleResService.selectByPage(roleid, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "å页æ¥è¯¢å¹¶è¿åè®°å½æ°") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "roleid", value = "è§è²ID", dataType = "Integer", 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<RoleResEntity>> selectByPageAndCount(Integer roleid, Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("æ¯é¡µé¡µæ°æå页æ°å°äº1", null); |
| | | } |
| | | int count = roleResService.selectCount(roleid); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | List<RoleResEntity> rs = roleResService.selectByPage(roleid, 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<RoleResEntity>> selectAll() { |
| | | try { |
| | | List<RoleResEntity> list = roleResService.selectAll(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ ¹æ®IDæ¥è¯¢") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectById") |
| | | public ResponseMsg<RoleResEntity> selectById(int id) { |
| | | try { |
| | | RoleResEntity entity = roleResService.selectById(id); |
| | | |
| | | return success(entity); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ·»å æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "RoleResEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insert(@RequestBody RoleResEntity entity) { |
| | | try { |
| | | int count = roleResService.insert(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éæ·»å ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "RoleResEntity", paramType = "body") |
| | | }) |
| | | @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> inserts(@RequestBody List<RoleResEntity> list) { |
| | | try { |
| | | int count = roleResService.inserts(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "åªé¤æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/delete") |
| | | public ResponseMsg<Integer> delete(int id) { |
| | | try { |
| | | int count = roleResService.delete(id); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éå é¤") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "IDæ°ç»", dataType = "Integer", paramType = "query", example = "1,2") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { |
| | | try { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return fail("idæ°ç»ä¸è½ä¸ºç©º", -1); |
| | | } |
| | | |
| | | int count = roleResService.deletes(ids); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¿®æ¹æ°æ®") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "å®ä½ç±»", dataType = "RoleResEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody RoleResEntity entity) { |
| | | try { |
| | | int count = roleResService.update(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¹éä¿®æ¹") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "å®ä½ç±»éå", dataType = "RoleResEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> updates(@RequestBody List<RoleResEntity> list) { |
| | | try { |
| | | int count = roleResService.updates(list); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.entity.data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * ä¸è½½è®°å½ |
| | | * @author WWW |
| | | */ |
| | | public class DownloadEntity implements Serializable { |
| | | private static final long serialVersionUID = -767416271272774912L; |
| | | |
| | | private int id; |
| | | |
| | | private String name; |
| | | |
| | | private int type; |
| | | |
| | | private int depid; |
| | | |
| | | private int dcount; |
| | | |
| | | private String pwd; |
| | | |
| | | private String url; |
| | | |
| | | private String descr; |
| | | |
| | | private String guid; |
| | | |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | | private int downloadUser; |
| | | |
| | | private Timestamp downloadTime; |
| | | |
| | | private String geo; |
| | | |
| | | private String bak; |
| | | |
| | | public DownloadEntity() { |
| | | } |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(int type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public int getDepid() { |
| | | return depid; |
| | | } |
| | | |
| | | public void setDepid(int depid) { |
| | | this.depid = depid; |
| | | } |
| | | |
| | | public int getDcount() { |
| | | return dcount; |
| | | } |
| | | |
| | | public void setDcount(int dcount) { |
| | | this.dcount = dcount; |
| | | } |
| | | |
| | | public String getPwd() { |
| | | return pwd; |
| | | } |
| | | |
| | | public void setPwd(String pwd) { |
| | | this.pwd = pwd; |
| | | } |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | |
| | | public String getDescr() { |
| | | return descr; |
| | | } |
| | | |
| | | public void setDescr(String descr) { |
| | | this.descr = descr; |
| | | } |
| | | |
| | | public String getGuid() { |
| | | return guid; |
| | | } |
| | | |
| | | public void setGuid(String guid) { |
| | | this.guid = guid; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
| | | |
| | | public void setCreateUser(int createUser) { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public Timestamp getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Timestamp createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public int getDownloadUser() { |
| | | return downloadUser; |
| | | } |
| | | |
| | | public void setDownloadUser(int downloadUser) { |
| | | this.downloadUser = downloadUser; |
| | | } |
| | | |
| | | public Timestamp getDownloadTime() { |
| | | return downloadTime; |
| | | } |
| | | |
| | | public void setDownloadTime(Timestamp downloadTime) { |
| | | this.downloadTime = downloadTime; |
| | | } |
| | | |
| | | public String getGeo() { |
| | | return geo; |
| | | } |
| | | |
| | | public void setGeo(String geo) { |
| | | this.geo = geo; |
| | | } |
| | | |
| | | public String getBak() { |
| | | return bak; |
| | | } |
| | | |
| | | public void setBak(String bak) { |
| | | this.bak = bak; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.entity.data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * å
æ°æ® |
| | | * @author WWW |
| | | */ |
| | | public class MetaEntity implements Serializable { |
| | | private static final long serialVersionUID = -525590434915195392L; |
| | | |
| | | private int id; |
| | | |
| | | private int dirid; |
| | | |
| | | private int depid; |
| | | |
| | | private String name; |
| | | |
| | | private String format; |
| | | |
| | | private long fsize; |
| | | |
| | | private String cs; |
| | | |
| | | private String fscale; |
| | | |
| | | private String resolution; |
| | | |
| | | private Timestamp gather; |
| | | |
| | | private String descr; |
| | | |
| | | private String guid; |
| | | |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | | private int updateUser; |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | private String geo; |
| | | |
| | | public MetaEntity() { |
| | | } |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public int getDirid() { |
| | | return dirid; |
| | | } |
| | | |
| | | public void setDirid(int dirid) { |
| | | this.dirid = dirid; |
| | | } |
| | | |
| | | public int getDepid() { |
| | | return depid; |
| | | } |
| | | |
| | | public void setDepid(int depid) { |
| | | this.depid = depid; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getFormat() { |
| | | return format; |
| | | } |
| | | |
| | | public void setFormat(String format) { |
| | | this.format = format; |
| | | } |
| | | |
| | | public long getFsize() { |
| | | return fsize; |
| | | } |
| | | |
| | | public void setFsize(long fsize) { |
| | | this.fsize = fsize; |
| | | } |
| | | |
| | | public String getCs() { |
| | | return cs; |
| | | } |
| | | |
| | | public void setCs(String cs) { |
| | | this.cs = cs; |
| | | } |
| | | |
| | | public String getFscale() { |
| | | return fscale; |
| | | } |
| | | |
| | | public void setFscale(String fscale) { |
| | | this.fscale = fscale; |
| | | } |
| | | |
| | | public String getResolution() { |
| | | return resolution; |
| | | } |
| | | |
| | | public void setResolution(String resolution) { |
| | | this.resolution = resolution; |
| | | } |
| | | |
| | | public Timestamp getGather() { |
| | | return gather; |
| | | } |
| | | |
| | | public void setGather(Timestamp gather) { |
| | | this.gather = gather; |
| | | } |
| | | |
| | | public String getDescr() { |
| | | return descr; |
| | | } |
| | | |
| | | public void setDescr(String descr) { |
| | | this.descr = descr; |
| | | } |
| | | |
| | | public String getGuid() { |
| | | return guid; |
| | | } |
| | | |
| | | public void setGuid(String guid) { |
| | | this.guid = guid; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
| | | |
| | | public void setCreateUser(int createUser) { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public Timestamp getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Timestamp createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public int getUpdateUser() { |
| | | return updateUser; |
| | | } |
| | | |
| | | public void setUpdateUser(int updateUser) { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public Timestamp getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getGeo() { |
| | | return geo; |
| | | } |
| | | |
| | | public void setGeo(String geo) { |
| | | this.geo = geo; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.entity.data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * å
æ°æ®æä»¶ |
| | | * @author WWW |
| | | */ |
| | | public class MetaFileEntity implements Serializable { |
| | | private static final long serialVersionUID = -859236217038350336L; |
| | | |
| | | private int id; |
| | | |
| | | private int metaid; |
| | | |
| | | private String name; |
| | | |
| | | private String guid; |
| | | |
| | | private String path; |
| | | |
| | | private int fileid; |
| | | |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | | private int updateUser; |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | public MetaFileEntity() { |
| | | } |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public int getMetaid() { |
| | | return metaid; |
| | | } |
| | | |
| | | public void setMetaid(int metaid) { |
| | | this.metaid = metaid; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getGuid() { |
| | | return guid; |
| | | } |
| | | |
| | | public void setGuid(String guid) { |
| | | this.guid = guid; |
| | | } |
| | | |
| | | public String getPath() { |
| | | return path; |
| | | } |
| | | |
| | | public void setPath(String path) { |
| | | this.path = path; |
| | | } |
| | | |
| | | public int getFileid() { |
| | | return fileid; |
| | | } |
| | | |
| | | public void setFileid(int fileid) { |
| | | this.fileid = fileid; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
| | | |
| | | public void setCreateUser(int createUser) { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public Timestamp getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Timestamp createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public int getUpdateUser() { |
| | | return updateUser; |
| | | } |
| | | |
| | | public void setUpdateUser(int updateUser) { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public Timestamp getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.entity.sys; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * éä»¶ |
| | | * @author WWW |
| | | */ |
| | | public class AttachEntity implements Serializable { |
| | | private static final long serialVersionUID = -106535972611296912L; |
| | | |
| | | private int id; |
| | | |
| | | private String name; |
| | | |
| | | private String tab; |
| | | |
| | | private String guid; |
| | | |
| | | private String path; |
| | | |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | | private int updateUser; |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | public AttachEntity() { |
| | | } |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getTab() { |
| | | return tab; |
| | | } |
| | | |
| | | public void setTab(String tab) { |
| | | this.tab = tab; |
| | | } |
| | | |
| | | public String getGuid() { |
| | | return guid; |
| | | } |
| | | |
| | | public void setGuid(String guid) { |
| | | this.guid = guid; |
| | | } |
| | | |
| | | public String getPath() { |
| | | return path; |
| | | } |
| | | |
| | | public void setPath(String path) { |
| | | this.path = path; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
| | | |
| | | public void setCreateUser(int createUser) { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public Timestamp getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Timestamp createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public int getUpdateUser() { |
| | | return updateUser; |
| | | } |
| | | |
| | | public void setUpdateUser(int updateUser) { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public Timestamp getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.entity.sys; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * èå-æé |
| | | * @author WWW |
| | | */ |
| | | public class MenuAuthEntity implements Serializable { |
| | | private static final long serialVersionUID = -298515079682001408L; |
| | | |
| | | private int id; |
| | | |
| | | private int menuid; |
| | | |
| | | private int authid; |
| | | |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | | private int updateUser; |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | public MenuAuthEntity() { |
| | | } |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public int getMenuid() { |
| | | return menuid; |
| | | } |
| | | |
| | | public void setMenuid(int menuid) { |
| | | this.menuid = menuid; |
| | | } |
| | | |
| | | public int getAuthid() { |
| | | return authid; |
| | | } |
| | | |
| | | public void setAuthid(int authid) { |
| | | this.authid = authid; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
| | | |
| | | public void setCreateUser(int createUser) { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public Timestamp getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Timestamp createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public int getUpdateUser() { |
| | | return updateUser; |
| | | } |
| | | |
| | | public void setUpdateUser(int updateUser) { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public Timestamp getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.entity.sys; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * æ¶æ¯éç¥ |
| | | * @author WWW |
| | | */ |
| | | public class MsgEntity implements Serializable { |
| | | private static final long serialVersionUID = -188183034857820256L; |
| | | |
| | | private int id; |
| | | |
| | | private String title; |
| | | |
| | | private String msg; |
| | | |
| | | private String guid; |
| | | |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | | private int updateUser; |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | public MsgEntity() { |
| | | } |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public String getGuid() { |
| | | return guid; |
| | | } |
| | | |
| | | public void setGuid(String guid) { |
| | | this.guid = guid; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
| | | |
| | | public void setCreateUser(int createUser) { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public Timestamp getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Timestamp createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public int getUpdateUser() { |
| | | return updateUser; |
| | | } |
| | | |
| | | public void setUpdateUser(int updateUser) { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public Timestamp getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.entity.sys; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * è§è²-èå |
| | | * @author WWW |
| | | */ |
| | | public class RoleMenuEntity implements Serializable { |
| | | private static final long serialVersionUID = -882394373827797504L; |
| | | |
| | | private int id; |
| | | |
| | | private int roleid; |
| | | |
| | | private int menuid; |
| | | |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | | private int updateUser; |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | public RoleMenuEntity() { |
| | | } |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public int getRoleid() { |
| | | return roleid; |
| | | } |
| | | |
| | | public void setRoleid(int roleid) { |
| | | this.roleid = roleid; |
| | | } |
| | | |
| | | public int getMenuid() { |
| | | return menuid; |
| | | } |
| | | |
| | | public void setMenuid(int menuid) { |
| | | this.menuid = menuid; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
| | | |
| | | public void setCreateUser(int createUser) { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public Timestamp getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Timestamp createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public int getUpdateUser() { |
| | | return updateUser; |
| | | } |
| | | |
| | | public void setUpdateUser(int updateUser) { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public Timestamp getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.entity.sys; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * è§è²-èµæº |
| | | * @author WWW |
| | | */ |
| | | public class RoleResEntity implements Serializable { |
| | | private static final long serialVersionUID = -634834740606525312L; |
| | | |
| | | private int id; |
| | | |
| | | private int roleid; |
| | | |
| | | private int resid; |
| | | |
| | | private int createUser; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | | private int updateUser; |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | public RoleResEntity() { |
| | | } |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public int getRoleid() { |
| | | return roleid; |
| | | } |
| | | |
| | | public void setRoleid(int roleid) { |
| | | this.roleid = roleid; |
| | | } |
| | | |
| | | public int getResid() { |
| | | return resid; |
| | | } |
| | | |
| | | public void setResid(int resid) { |
| | | this.resid = resid; |
| | | } |
| | | |
| | | public int getCreateUser() { |
| | | return createUser; |
| | | } |
| | | |
| | | public void setCreateUser(int createUser) { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public Timestamp getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Timestamp createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public int getUpdateUser() { |
| | | return updateUser; |
| | | } |
| | | |
| | | public void setUpdateUser(int updateUser) { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public Timestamp getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.mapper.data; |
| | | |
| | | import com.lf.server.entity.data.DownloadEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä¸è½½è®°å½ |
| | | * @author WWW |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface DownloadMapper { |
| | | /** |
| | | * æ¥è¯¢è®°å½æ° |
| | | * |
| | | * @param name åç§° |
| | | * @return è®°å½æ° |
| | | */ |
| | | public Integer selectCount(String name); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param name åç§° |
| | | * @param limit è®°å½è¡¨ |
| | | * @param offset åç§»é |
| | | * @return å表 |
| | | */ |
| | | public List<DownloadEntity> selectByPage(String name, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææ |
| | | * |
| | | * @return |
| | | */ |
| | | public List<DownloadEntity> selectAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public DownloadEntity selectById(int id); |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer insert(DownloadEntity entity); |
| | | |
| | | /** |
| | | * æ¹éæ·»å |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer inserts(List<DownloadEntity> list); |
| | | |
| | | /** |
| | | * åªé¤æ°æ® |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer delete(int id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deletes(List<Integer> ids); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer update(DownloadEntity entity); |
| | | |
| | | /** |
| | | * æ¹éä¿®æ¹ |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updates(List<DownloadEntity> list); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.mapper.data; |
| | | |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å
æ°æ®æä»¶ |
| | | * @author WWW |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface MetaFileMapper { |
| | | /** |
| | | * æ¥è¯¢è®°å½æ° |
| | | * |
| | | * @param name æä»¶å |
| | | * @return è®°å½æ° |
| | | */ |
| | | public Integer selectCount(String name); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param name æä»¶å |
| | | * @param limit è®°å½è¡¨ |
| | | * @param offset åç§»é |
| | | * @return å表 |
| | | */ |
| | | public List<MetaFileEntity> selectByPage(String name, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææ |
| | | * |
| | | * @return |
| | | */ |
| | | public List<MetaFileEntity> selectAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public MetaFileEntity selectById(int id); |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer insert(MetaFileEntity entity); |
| | | |
| | | /** |
| | | * æ¹éæ·»å |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer inserts(List<MetaFileEntity> list); |
| | | |
| | | /** |
| | | * åªé¤æ°æ® |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer delete(int id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deletes(List<Integer> ids); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer update(MetaFileEntity entity); |
| | | |
| | | /** |
| | | * æ¹éä¿®æ¹ |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updates(List<MetaFileEntity> list); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.mapper.data; |
| | | |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å
æ°æ® |
| | | * @author WWW |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface MetaMapper { |
| | | /** |
| | | * æ¥è¯¢è®°å½æ° |
| | | * |
| | | * @param name åç§° |
| | | * @return è®°å½æ° |
| | | */ |
| | | public Integer selectCount(String name); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param name åç§° |
| | | * @param limit è®°å½è¡¨ |
| | | * @param offset åç§»é |
| | | * @return å表 |
| | | */ |
| | | public List<MetaEntity> selectByPage(String name, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææ |
| | | * |
| | | * @return |
| | | */ |
| | | public List<MetaEntity> selectAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public MetaEntity selectById(int id); |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer insert(MetaEntity entity); |
| | | |
| | | /** |
| | | * æ¹éæ·»å |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer inserts(List<MetaEntity> list); |
| | | |
| | | /** |
| | | * åªé¤æ°æ® |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer delete(int id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deletes(List<Integer> ids); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer update(MetaEntity entity); |
| | | |
| | | /** |
| | | * æ¹éä¿®æ¹ |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updates(List<MetaEntity> list); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.mapper.sys; |
| | | |
| | | import com.lf.server.entity.sys.AttachEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * éä»¶ |
| | | * @author WWW |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface AttachMapper { |
| | | /** |
| | | * æ¥è¯¢è®°å½æ° |
| | | * |
| | | * @param name æä»¶å |
| | | * @return è®°å½æ° |
| | | */ |
| | | public Integer selectCount(String name); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param name æä»¶å |
| | | * @param limit è®°å½è¡¨ |
| | | * @param offset åç§»é |
| | | * @return å表 |
| | | */ |
| | | public List<AttachEntity> selectByPage(String name, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææ |
| | | * |
| | | * @return |
| | | */ |
| | | public List<AttachEntity> selectAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public AttachEntity selectById(int id); |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer insert(AttachEntity entity); |
| | | |
| | | /** |
| | | * æ¹éæ·»å |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer inserts(List<AttachEntity> list); |
| | | |
| | | /** |
| | | * åªé¤æ°æ® |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer delete(int id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deletes(List<Integer> ids); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer update(AttachEntity entity); |
| | | |
| | | /** |
| | | * æ¹éä¿®æ¹ |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updates(List<AttachEntity> list); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.mapper.sys; |
| | | |
| | | import com.lf.server.entity.sys.MenuAuthEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * èå-æé |
| | | * @author WWW |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface MenuAuthMapper { |
| | | /** |
| | | * æ¥è¯¢è®°å½æ° |
| | | * |
| | | * @param menuid èåID |
| | | * @return è®°å½æ° |
| | | */ |
| | | public Integer selectCount(Integer menuid); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param menuid èåID |
| | | * @param limit è®°å½è¡¨ |
| | | * @param offset åç§»é |
| | | * @return å表 |
| | | */ |
| | | public List<MenuAuthEntity> selectByPage(Integer menuid, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææ |
| | | * |
| | | * @return |
| | | */ |
| | | public List<MenuAuthEntity> selectAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public MenuAuthEntity selectById(int id); |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer insert(MenuAuthEntity entity); |
| | | |
| | | /** |
| | | * æ¹éæ·»å |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer inserts(List<MenuAuthEntity> list); |
| | | |
| | | /** |
| | | * åªé¤æ°æ® |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer delete(int id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deletes(List<Integer> ids); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer update(MenuAuthEntity entity); |
| | | |
| | | /** |
| | | * æ¹éä¿®æ¹ |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updates(List<MenuAuthEntity> list); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.mapper.sys; |
| | | |
| | | import com.lf.server.entity.sys.MsgEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ¶æ¯éç¥ |
| | | * @author WWW |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface MsgMapper { |
| | | /** |
| | | * æ¥è¯¢è®°å½æ° |
| | | * |
| | | * @param title æ é¢ |
| | | * @return è®°å½æ° |
| | | */ |
| | | public Integer selectCount(String title); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param title æ é¢ |
| | | * @param limit è®°å½è¡¨ |
| | | * @param offset åç§»é |
| | | * @return å表 |
| | | */ |
| | | public List<MsgEntity> selectByPage(String title, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææ |
| | | * |
| | | * @return |
| | | */ |
| | | public List<MsgEntity> selectAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public MsgEntity selectById(int id); |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer insert(MsgEntity entity); |
| | | |
| | | /** |
| | | * æ¹éæ·»å |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer inserts(List<MsgEntity> list); |
| | | |
| | | /** |
| | | * åªé¤æ°æ® |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer delete(int id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deletes(List<Integer> ids); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer update(MsgEntity entity); |
| | | |
| | | /** |
| | | * æ¹éä¿®æ¹ |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updates(List<MsgEntity> list); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.mapper.sys; |
| | | |
| | | import com.lf.server.entity.sys.RoleMenuEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è§è²-èå |
| | | * @author WWW |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface RoleMenuMapper { |
| | | /** |
| | | * æ¥è¯¢è®°å½æ° |
| | | * |
| | | * @param roleid è§è²ID |
| | | * @return è®°å½æ° |
| | | */ |
| | | public Integer selectCount(Integer roleid); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param roleid è§è²ID |
| | | * @param limit è®°å½è¡¨ |
| | | * @param offset åç§»é |
| | | * @return å表 |
| | | */ |
| | | public List<RoleMenuEntity> selectByPage(Integer roleid, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææ |
| | | * |
| | | * @return |
| | | */ |
| | | public List<RoleMenuEntity> selectAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public RoleMenuEntity selectById(int id); |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer insert(RoleMenuEntity entity); |
| | | |
| | | /** |
| | | * æ¹éæ·»å |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer inserts(List<RoleMenuEntity> list); |
| | | |
| | | /** |
| | | * åªé¤æ°æ® |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer delete(int id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deletes(List<Integer> ids); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer update(RoleMenuEntity entity); |
| | | |
| | | /** |
| | | * æ¹éä¿®æ¹ |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updates(List<RoleMenuEntity> list); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.mapper.sys; |
| | | |
| | | import com.lf.server.entity.sys.RoleResEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è§è²-èµæº |
| | | * @author WWW |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface RoleResMapper { |
| | | /** |
| | | * æ¥è¯¢è®°å½æ° |
| | | * |
| | | * @param roleid è§è²ID |
| | | * @return è®°å½æ° |
| | | */ |
| | | public Integer selectCount(Integer roleid); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param roleid è§è²ID |
| | | * @param limit è®°å½è¡¨ |
| | | * @param offset åç§»é |
| | | * @return å表 |
| | | */ |
| | | public List<RoleResEntity> selectByPage(Integer roleid, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææ |
| | | * |
| | | * @return |
| | | */ |
| | | public List<RoleResEntity> selectAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public RoleResEntity selectById(int id); |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer insert(RoleResEntity entity); |
| | | |
| | | /** |
| | | * æ¹éæ·»å |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer inserts(List<RoleResEntity> list); |
| | | |
| | | /** |
| | | * åªé¤æ°æ® |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer delete(int id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deletes(List<Integer> ids); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ® |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer update(RoleResEntity entity); |
| | | |
| | | /** |
| | | * æ¹éä¿®æ¹ |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updates(List<RoleResEntity> list); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.service.data; |
| | | |
| | | import com.lf.server.entity.data.DownloadEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.data.DownloadMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä¸è½½è®°å½ |
| | | * @author WWW |
| | | */ |
| | | @Service |
| | | public class DownloadService implements DownloadMapper { |
| | | @Autowired |
| | | DownloadMapper downloadMapper; |
| | | |
| | | @Override |
| | | public Integer selectCount(String name) { |
| | | name = "%" + (StringHelper.isNull(name) ? "" : name.trim()) + "%"; |
| | | |
| | | return downloadMapper.selectCount(name); |
| | | } |
| | | |
| | | @Override |
| | | public List<DownloadEntity> selectByPage(String name, Integer limit, Integer offset) { |
| | | name = "%" + (StringHelper.isNull(name) ? "" : name.trim()) + "%"; |
| | | |
| | | return downloadMapper.selectByPage(name, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | | public List<DownloadEntity> selectAll() { |
| | | return downloadMapper.selectAll(); |
| | | } |
| | | |
| | | @Override |
| | | public DownloadEntity selectById(int id) { |
| | | return downloadMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(DownloadEntity entity) { |
| | | return downloadMapper.insert(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer inserts(List<DownloadEntity> list) { |
| | | return downloadMapper.inserts(list); |
| | | } |
| | | |
| | | @Override |
| | | public Integer delete(int id) { |
| | | return downloadMapper.delete(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deletes(List<Integer> ids) { |
| | | return downloadMapper.deletes(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer update(DownloadEntity entity) { |
| | | return downloadMapper.update(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updates(List<DownloadEntity> list) { |
| | | return downloadMapper.updates(list); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.service.data; |
| | | |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.data.MetaFileMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å
æ°æ®æä»¶ |
| | | * @author WWW |
| | | */ |
| | | @Service |
| | | public class MetaFileService implements MetaFileMapper { |
| | | @Autowired |
| | | MetaFileMapper metaFileMapper; |
| | | |
| | | @Override |
| | | public Integer selectCount(String name) { |
| | | name = "%" + (StringHelper.isNull(name) ? "" : name.trim()) + "%"; |
| | | |
| | | return metaFileMapper.selectCount(name); |
| | | } |
| | | |
| | | @Override |
| | | public List<MetaFileEntity> selectByPage(String name, Integer limit, Integer offset) { |
| | | name = "%" + (StringHelper.isNull(name) ? "" : name.trim()) + "%"; |
| | | |
| | | return metaFileMapper.selectByPage(name, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | | public List<MetaFileEntity> selectAll() { |
| | | return metaFileMapper.selectAll(); |
| | | } |
| | | |
| | | @Override |
| | | public MetaFileEntity selectById(int id) { |
| | | return metaFileMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(MetaFileEntity entity) { |
| | | return metaFileMapper.insert(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer inserts(List<MetaFileEntity> list) { |
| | | return metaFileMapper.inserts(list); |
| | | } |
| | | |
| | | @Override |
| | | public Integer delete(int id) { |
| | | return metaFileMapper.delete(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deletes(List<Integer> ids) { |
| | | return metaFileMapper.deletes(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer update(MetaFileEntity entity) { |
| | | return metaFileMapper.update(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updates(List<MetaFileEntity> list) { |
| | | return metaFileMapper.updates(list); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.service.data; |
| | | |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.data.MetaMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å
æ°æ® |
| | | * @author WWW |
| | | */ |
| | | @Service |
| | | public class MetaService implements MetaMapper { |
| | | @Autowired |
| | | MetaMapper metaMapper; |
| | | |
| | | @Override |
| | | public Integer selectCount(String name) { |
| | | name = "%" + (StringHelper.isNull(name) ? "" : name.trim()) + "%"; |
| | | |
| | | return metaMapper.selectCount(name); |
| | | } |
| | | |
| | | @Override |
| | | public List<MetaEntity> selectByPage(String name, Integer limit, Integer offset) { |
| | | name = "%" + (StringHelper.isNull(name) ? "" : name.trim()) + "%"; |
| | | |
| | | return metaMapper.selectByPage(name, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | | public List<MetaEntity> selectAll() { |
| | | return metaMapper.selectAll(); |
| | | } |
| | | |
| | | @Override |
| | | public MetaEntity selectById(int id) { |
| | | return metaMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(MetaEntity entity) { |
| | | return metaMapper.insert(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer inserts(List<MetaEntity> list) { |
| | | return metaMapper.inserts(list); |
| | | } |
| | | |
| | | @Override |
| | | public Integer delete(int id) { |
| | | return metaMapper.delete(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deletes(List<Integer> ids) { |
| | | return metaMapper.deletes(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer update(MetaEntity entity) { |
| | | return metaMapper.update(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updates(List<MetaEntity> list) { |
| | | return metaMapper.updates(list); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.service.sys; |
| | | |
| | | import com.lf.server.entity.sys.AttachEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.sys.AttachMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * éä»¶ |
| | | * @author WWW |
| | | */ |
| | | @Service |
| | | public class AttachService implements AttachMapper { |
| | | @Autowired |
| | | AttachMapper attachMapper; |
| | | |
| | | @Override |
| | | public Integer selectCount(String name) { |
| | | name = "%" + (StringHelper.isNull(name) ? "" : name.trim()) + "%"; |
| | | |
| | | return attachMapper.selectCount(name); |
| | | } |
| | | |
| | | @Override |
| | | public List<AttachEntity> selectByPage(String name, Integer limit, Integer offset) { |
| | | name = "%" + (StringHelper.isNull(name) ? "" : name.trim()) + "%"; |
| | | |
| | | return attachMapper.selectByPage(name, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | | public List<AttachEntity> selectAll() { |
| | | return attachMapper.selectAll(); |
| | | } |
| | | |
| | | @Override |
| | | public AttachEntity selectById(int id) { |
| | | return attachMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(AttachEntity entity) { |
| | | return attachMapper.insert(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer inserts(List<AttachEntity> list) { |
| | | return attachMapper.inserts(list); |
| | | } |
| | | |
| | | @Override |
| | | public Integer delete(int id) { |
| | | return attachMapper.delete(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deletes(List<Integer> ids) { |
| | | return attachMapper.deletes(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer update(AttachEntity entity) { |
| | | return attachMapper.update(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updates(List<AttachEntity> list) { |
| | | return attachMapper.updates(list); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.service.sys; |
| | | |
| | | import com.lf.server.entity.sys.MenuAuthEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.sys.MenuAuthMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * èå-æé |
| | | * @author WWW |
| | | */ |
| | | @Service |
| | | public class MenuAuthService implements MenuAuthMapper { |
| | | @Autowired |
| | | MenuAuthMapper menuAuthMapper; |
| | | |
| | | @Override |
| | | public Integer selectCount(Integer menuid) { |
| | | return menuAuthMapper.selectCount(menuid); |
| | | } |
| | | |
| | | @Override |
| | | public List<MenuAuthEntity> selectByPage(Integer menuid, Integer limit, Integer offset) { |
| | | return menuAuthMapper.selectByPage(menuid, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | | public List<MenuAuthEntity> selectAll() { |
| | | return menuAuthMapper.selectAll(); |
| | | } |
| | | |
| | | @Override |
| | | public MenuAuthEntity selectById(int id) { |
| | | return menuAuthMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(MenuAuthEntity entity) { |
| | | return menuAuthMapper.insert(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer inserts(List<MenuAuthEntity> list) { |
| | | return menuAuthMapper.inserts(list); |
| | | } |
| | | |
| | | @Override |
| | | public Integer delete(int id) { |
| | | return menuAuthMapper.delete(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deletes(List<Integer> ids) { |
| | | return menuAuthMapper.deletes(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer update(MenuAuthEntity entity) { |
| | | return menuAuthMapper.update(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updates(List<MenuAuthEntity> list) { |
| | | return menuAuthMapper.updates(list); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.service.sys; |
| | | |
| | | import com.lf.server.entity.sys.MsgEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.sys.MsgMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ¶æ¯éç¥ |
| | | * @author WWW |
| | | */ |
| | | @Service |
| | | public class MsgService implements MsgMapper { |
| | | @Autowired |
| | | MsgMapper msgMapper; |
| | | |
| | | @Override |
| | | public Integer selectCount(String title) { |
| | | title = "%" + (StringHelper.isNull(title) ? "" : title.trim()) + "%"; |
| | | |
| | | return msgMapper.selectCount(title); |
| | | } |
| | | |
| | | @Override |
| | | public List<MsgEntity> selectByPage(String title, Integer limit, Integer offset) { |
| | | title = "%" + (StringHelper.isNull(title) ? "" : title.trim()) + "%"; |
| | | |
| | | return msgMapper.selectByPage(title, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | | public List<MsgEntity> selectAll() { |
| | | return msgMapper.selectAll(); |
| | | } |
| | | |
| | | @Override |
| | | public MsgEntity selectById(int id) { |
| | | return msgMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(MsgEntity entity) { |
| | | return msgMapper.insert(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer inserts(List<MsgEntity> list) { |
| | | return msgMapper.inserts(list); |
| | | } |
| | | |
| | | @Override |
| | | public Integer delete(int id) { |
| | | return msgMapper.delete(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deletes(List<Integer> ids) { |
| | | return msgMapper.deletes(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer update(MsgEntity entity) { |
| | | return msgMapper.update(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updates(List<MsgEntity> list) { |
| | | return msgMapper.updates(list); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.service.sys; |
| | | |
| | | import com.lf.server.entity.sys.RoleMenuEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.sys.RoleMenuMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è§è²-èå |
| | | * @author WWW |
| | | */ |
| | | @Service |
| | | public class RoleMenuService implements RoleMenuMapper { |
| | | @Autowired |
| | | RoleMenuMapper roleMenuMapper; |
| | | |
| | | @Override |
| | | public Integer selectCount(Integer roleid) { |
| | | return roleMenuMapper.selectCount(roleid); |
| | | } |
| | | |
| | | @Override |
| | | public List<RoleMenuEntity> selectByPage(Integer roleid, Integer limit, Integer offset) { |
| | | return roleMenuMapper.selectByPage(roleid, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | | public List<RoleMenuEntity> selectAll() { |
| | | return roleMenuMapper.selectAll(); |
| | | } |
| | | |
| | | @Override |
| | | public RoleMenuEntity selectById(int id) { |
| | | return roleMenuMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(RoleMenuEntity entity) { |
| | | return roleMenuMapper.insert(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer inserts(List<RoleMenuEntity> list) { |
| | | return roleMenuMapper.inserts(list); |
| | | } |
| | | |
| | | @Override |
| | | public Integer delete(int id) { |
| | | return roleMenuMapper.delete(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deletes(List<Integer> ids) { |
| | | return roleMenuMapper.deletes(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer update(RoleMenuEntity entity) { |
| | | return roleMenuMapper.update(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updates(List<RoleMenuEntity> list) { |
| | | return roleMenuMapper.updates(list); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.service.sys; |
| | | |
| | | import com.lf.server.entity.sys.RoleResEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.sys.RoleResMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è§è²-èµæº |
| | | * @author WWW |
| | | */ |
| | | @Service |
| | | public class RoleResService implements RoleResMapper { |
| | | @Autowired |
| | | RoleResMapper roleResMapper; |
| | | |
| | | @Override |
| | | public Integer selectCount(Integer roleid) { |
| | | return roleResMapper.selectCount(roleid); |
| | | } |
| | | |
| | | @Override |
| | | public List<RoleResEntity> selectByPage(Integer roleid, Integer limit, Integer offset) { |
| | | return roleResMapper.selectByPage(roleid, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | | public List<RoleResEntity> selectAll() { |
| | | return roleResMapper.selectAll(); |
| | | } |
| | | |
| | | @Override |
| | | public RoleResEntity selectById(int id) { |
| | | return roleResMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(RoleResEntity entity) { |
| | | return roleResMapper.insert(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer inserts(List<RoleResEntity> list) { |
| | | return roleResMapper.inserts(list); |
| | | } |
| | | |
| | | @Override |
| | | public Integer delete(int id) { |
| | | return roleResMapper.delete(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer deletes(List<Integer> ids) { |
| | | return roleResMapper.deletes(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer update(RoleResEntity entity) { |
| | | return roleResMapper.update(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updates(List<RoleResEntity> list) { |
| | | return roleResMapper.updates(list); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.data.DownloadMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | select count(*) from lf.sys_download |
| | | <where> |
| | | <if test="name != null"> |
| | | name like #{name} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download |
| | | <where> |
| | | <if test="name != null"> |
| | | name like #{name} |
| | | </if> |
| | | </where> |
| | | order by id |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.DownloadEntity"> |
| | | insert into lf.sys_download |
| | | (name,type,depid,dcount,pwd,url,descr,guid,create_user,create_time,download_user,download_time,geo,bak) |
| | | values |
| | | (#{name},#{type},#{depid},#{dcount},#{pwd},#{url},#{descr},#{guid},#{createUser},now(),#{downloadUser},now(),#{geo},#{bak}) |
| | | </insert> |
| | | |
| | | <insert id="inserts"> |
| | | insert into lf.sys_download |
| | | (name,type,depid,dcount,pwd,url,descr,guid,create_user,create_time,download_user,download_time,geo,bak) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.name},#{item.type},#{item.depid},#{item.dcount},#{item.pwd},#{item.url},#{item.descr},#{item.guid},#{item.createUser},now(),#{item.downloadUser},now(),#{item.geo},#{item.bak}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="delete"> |
| | | delete from lf.sys_download where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_download where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="update"> |
| | | update lf.sys_download |
| | | set name=#{name},type=#{type},depid=#{depid},dcount=#{dcount},pwd=#{pwd},url=#{url},descr=#{descr},guid=#{guid},download_user=#{downloadUser},download_time=now(),geo=#{geo},bak=#{bak} |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updates"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update lf.sys_download |
| | | <set> |
| | | name=#{item.name},type=#{item.type},depid=#{item.depid},dcount=#{item.dcount},pwd=#{item.pwd},url=#{item.url},descr=#{item.descr},guid=#{item.guid},download_user=#{item.downloadUser},download_time=now(),geo=#{item.geo},bak=#{item.bak} |
| | | </set> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.data.MetaFileMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | select count(*) from lf.sys_meta_file |
| | | <where> |
| | | <if test="name != null"> |
| | | name like #{name} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.MetaFileEntity"> |
| | | select * from lf.sys_meta_file |
| | | <where> |
| | | <if test="name != null"> |
| | | name like #{name} |
| | | </if> |
| | | </where> |
| | | order by id |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.data.MetaFileEntity"> |
| | | select * from lf.sys_meta_file order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.MetaFileEntity"> |
| | | select * from lf.sys_meta_file where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.MetaFileEntity"> |
| | | insert into lf.sys_meta_file |
| | | (metaid,name,guid,path,fileid,create_user,create_time) |
| | | values |
| | | (#{metaid},#{name},#{guid},#{path},#{fileid},#{createUser},now()) |
| | | </insert> |
| | | |
| | | <insert id="inserts"> |
| | | insert into lf.sys_meta_file |
| | | (metaid,name,guid,path,fileid,create_user,create_time) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.metaid},#{item.name},#{item.guid},#{item.path},#{item.fileid},#{item.createUser},now()) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="delete"> |
| | | delete from lf.sys_meta_file where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_meta_file where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="update"> |
| | | update lf.sys_meta_file |
| | | set metaid=#{metaid},name=#{name},guid=#{guid},path=#{path},fileid=#{fileid},update_user=#{updateUser},update_time=now() |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updates"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update lf.sys_meta_file |
| | | <set> |
| | | metaid=#{item.metaid},name=#{item.name},guid=#{item.guid},path=#{item.path},fileid=#{item.fileid},update_user=#{item.updateUser},update_time=now() |
| | | </set> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.data.MetaMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | select count(*) from lf.sys_meta |
| | | <where> |
| | | <if test="name != null"> |
| | | name like #{name} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | select * from lf.sys_meta |
| | | <where> |
| | | <if test="name != null"> |
| | | name like #{name} |
| | | </if> |
| | | </where> |
| | | order by id |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | select * from lf.sys_meta order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | select * from lf.sys_meta where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.MetaEntity"> |
| | | insert into lf.sys_meta |
| | | (dirid,depid,name,format,fsize,cs,fscale,resolution,gather,descr,guid,create_user,create_time,geo) |
| | | values |
| | | (#{dirid},#{depid},#{name},#{format},#{fsize},#{cs},#{fscale},#{resolution},now(),#{descr},#{guid},#{createUser},now(),#{geo}) |
| | | </insert> |
| | | |
| | | <insert id="inserts"> |
| | | insert into lf.sys_meta |
| | | (dirid,depid,name,format,fsize,cs,fscale,resolution,gather,descr,guid,create_user,create_time,geo) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.dirid},#{item.depid},#{item.name},#{item.format},#{item.fsize},#{item.cs},#{item.fscale},#{item.resolution},now(),#{item.descr},#{item.guid},#{item.createUser},now(),#{item.geo}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="delete"> |
| | | delete from lf.sys_meta where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_meta where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="update"> |
| | | update lf.sys_meta |
| | | set dirid=#{dirid},depid=#{depid},name=#{name},format=#{format},fsize=#{fsize},cs=#{cs},fscale=#{fscale},resolution=#{resolution},gather=now(),descr=#{descr},guid=#{guid},update_user=#{updateUser},update_time=now(),geo=#{geo} |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updates"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update lf.sys_meta |
| | | <set> |
| | | dirid=#{item.dirid},depid=#{item.depid},name=#{item.name},format=#{item.format},fsize=#{item.fsize},cs=#{item.cs},fscale=#{item.fscale},resolution=#{item.resolution},gather=now(),descr=#{item.descr},guid=#{item.guid},update_user=#{item.updateUser},update_time=now(),geo=#{item.geo} |
| | | </set> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.AttachMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | select count(*) from lf.sys_attach |
| | | <where> |
| | | <if test="name != null"> |
| | | name like #{name} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | select * from lf.sys_attach |
| | | <where> |
| | | <if test="name != null"> |
| | | name like #{name} |
| | | </if> |
| | | </where> |
| | | order by id |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | select * from lf.sys_attach order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | select * from lf.sys_attach where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.AttachEntity"> |
| | | insert into lf.sys_attach |
| | | (name,tab,guid,path,create_user,create_time) |
| | | values |
| | | (#{name},#{tab},#{guid},#{path},#{createUser},now()) |
| | | </insert> |
| | | |
| | | <insert id="inserts"> |
| | | insert into lf.sys_attach |
| | | (name,tab,guid,path,create_user,create_time) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.name},#{item.tab},#{item.guid},#{item.path},#{item.createUser},now()) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="delete"> |
| | | delete from lf.sys_attach where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_attach where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="update"> |
| | | update lf.sys_attach |
| | | set name=#{name},tab=#{tab},guid=#{guid},path=#{path},update_user=#{updateUser},update_time=now() |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updates"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update lf.sys_attach |
| | | <set> |
| | | name=#{item.name},tab=#{item.tab},guid=#{item.guid},path=#{item.path},update_user=#{item.updateUser},update_time=now() |
| | | </set> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.MenuAuthMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | select count(*) from lf.sys_menu_auth |
| | | <where> |
| | | <if test="menuid != 0"> |
| | | menuid = #{menuid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.MenuAuthEntity"> |
| | | select * from lf.sys_menu_auth |
| | | <where> |
| | | <if test="menuid != 0"> |
| | | menuid = #{menuid} |
| | | </if> |
| | | </where> |
| | | order by id |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.MenuAuthEntity"> |
| | | select * from lf.sys_menu_auth order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.MenuAuthEntity"> |
| | | select * from lf.sys_menu_auth where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.MenuAuthEntity"> |
| | | insert into lf.sys_menu_auth |
| | | (menuid,authid,create_user,create_time) |
| | | values |
| | | (#{menuid},#{authid},#{createUser},now()) |
| | | </insert> |
| | | |
| | | <insert id="inserts"> |
| | | insert into lf.sys_menu_auth |
| | | (menuid,authid,create_user,create_time) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.menuid},#{item.authid},#{item.createUser},now()) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="delete"> |
| | | delete from lf.sys_menu_auth where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_menu_auth where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="update"> |
| | | update lf.sys_menu_auth |
| | | set menuid=#{menuid},authid=#{authid},update_user=#{updateUser},update_time=now() |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updates"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update lf.sys_menu_auth |
| | | <set> |
| | | menuid=#{item.menuid},authid=#{item.authid},update_user=#{item.updateUser},update_time=now() |
| | | </set> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.MsgMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | select count(*) from lf.sys_msg |
| | | <where> |
| | | <if test="title != null"> |
| | | title like #{title} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.MsgEntity"> |
| | | select * from lf.sys_msg |
| | | <where> |
| | | <if test="title != null"> |
| | | title like #{title} |
| | | </if> |
| | | </where> |
| | | order by id |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.MsgEntity"> |
| | | select * from lf.sys_msg order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.MsgEntity"> |
| | | select * from lf.sys_msg where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.MsgEntity"> |
| | | insert into lf.sys_msg |
| | | (title,msg,guid,create_user,create_time) |
| | | values |
| | | (#{title},#{msg},#{guid},#{createUser},now()) |
| | | </insert> |
| | | |
| | | <insert id="inserts"> |
| | | insert into lf.sys_msg |
| | | (title,msg,guid,create_user,create_time) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.title},#{item.msg},#{item.guid},#{item.createUser},now()) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="delete"> |
| | | delete from lf.sys_msg where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_msg where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="update"> |
| | | update lf.sys_msg |
| | | set title=#{title},msg=#{msg},guid=#{guid},update_user=#{updateUser},update_time=now() |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updates"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update lf.sys_msg |
| | | <set> |
| | | title=#{item.title},msg=#{item.msg},guid=#{item.guid},update_user=#{item.updateUser},update_time=now() |
| | | </set> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.RoleMenuMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | select count(*) from lf.sys_role_menu |
| | | <where> |
| | | <if test="roleid != 0"> |
| | | roleid = #{roleid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.RoleMenuEntity"> |
| | | select * from lf.sys_role_menu |
| | | <where> |
| | | <if test="roleid != 0"> |
| | | roleid = #{roleid} |
| | | </if> |
| | | </where> |
| | | order by id |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.RoleMenuEntity"> |
| | | select * from lf.sys_role_menu order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.RoleMenuEntity"> |
| | | select * from lf.sys_role_menu where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.RoleMenuEntity"> |
| | | insert into lf.sys_role_menu |
| | | (roleid,menuid,create_user,create_time) |
| | | values |
| | | (#{roleid},#{menuid},#{createUser},now()) |
| | | </insert> |
| | | |
| | | <insert id="inserts"> |
| | | insert into lf.sys_role_menu |
| | | (roleid,menuid,create_user,create_time) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.roleid},#{item.menuid},#{item.createUser},now()) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="delete"> |
| | | delete from lf.sys_role_menu where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_role_menu where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="update"> |
| | | update lf.sys_role_menu |
| | | set roleid=#{roleid},menuid=#{menuid},update_user=#{updateUser},update_time=now() |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updates"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update lf.sys_role_menu |
| | | <set> |
| | | roleid=#{item.roleid},menuid=#{item.menuid},update_user=#{item.updateUser},update_time=now() |
| | | </set> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.RoleResMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | select count(*) from lf.sys_role_res |
| | | <where> |
| | | <if test="roleid != 0"> |
| | | roleid = #{roleid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.RoleResEntity"> |
| | | select * from lf.sys_role_res |
| | | <where> |
| | | <if test="roleid != 0"> |
| | | roleid = #{roleid} |
| | | </if> |
| | | </where> |
| | | order by id |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.RoleResEntity"> |
| | | select * from lf.sys_role_res order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.RoleResEntity"> |
| | | select * from lf.sys_role_res where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.RoleResEntity"> |
| | | insert into lf.sys_role_res |
| | | (roleid,resid,create_user,create_time) |
| | | values |
| | | (#{roleid},#{resid},#{createUser},now()) |
| | | </insert> |
| | | |
| | | <insert id="inserts"> |
| | | insert into lf.sys_role_res |
| | | (roleid,resid,create_user,create_time) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.roleid},#{item.resid},#{item.createUser},now()) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="delete"> |
| | | delete from lf.sys_role_res where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_role_res where id in |
| | | <foreach item="ids" collection="list" index="index" open="(" separator="," close=")"> |
| | | #{ids} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="update"> |
| | | update lf.sys_role_res |
| | | set roleid=#{roleid},resid=#{resid},update_user=#{updateUser},update_time=now() |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updates"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update lf.sys_role_res |
| | | <set> |
| | | roleid=#{item.roleid},resid=#{item.resid},update_user=#{item.updateUser},update_time=now() |
| | | </set> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |