| | |
| | | */ |
| | | @EnableTransactionManagement |
| | | @Configuration |
| | | @MapperScan("com.lf.server.mapper") |
| | | @MapperScan("com.moon.server.mapper") |
| | | public class MybatisPlusConfig { |
| | | /** |
| | | * 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 |
| | |
| | | public Docket createRestApi() { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(apiInfo()).select() |
| | | .apis(RequestHandlerSelectors.basePackage("com.lf.server.controller")) |
| | | .apis(RequestHandlerSelectors.basePackage("com.moon.server.controller")) |
| | | //.securitySchemes(securitySchemes()) |
| | | //.securityContexts(securityContexts()) |
| | | .paths(PathSelectors.any()).build(); |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "DirEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDir", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDir(@RequestBody DirEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入多条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "DirEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDirs", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDirs(@RequestBody List<DirEntity> list, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "删除多条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "com.lf.server.entity.data.DirEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "DirEntity", paramType = "body", example = "") |
| | | }) |
| | | @GetMapping(value = "/deleteDirs") |
| | | public ResponseMsg<Integer> deleteDirs(@RequestParam List<Integer> ids) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.data.StyleEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "StyleEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertStyle", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertStyle(@RequestBody StyleEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入多条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "com.lf.server.entity.data.StyleEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "StyleEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertStyles", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertStyles(@RequestBody List<StyleEntity> list, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.data.VersionEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "VersionEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertVersion", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertVersion(@RequestBody VerEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.AuthEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "AuthEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertAuth", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertAuth(@RequestBody AuthEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.DepEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "DepEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDep", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDep(@RequestBody DepEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入多条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "com.lf.server.entity.sys.DepEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "DepEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertDes", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertDes(@RequestBody List<DepEntity> list, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.LoginEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "LoginEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertLogin", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertLogin(@RequestBody LoginEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.MenusEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "MenusEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertMenu", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertMenu(@RequestBody MenuEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入多条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "com.lf.server.entity.sys.MenusEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "MenusEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertMenus", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertMenus(@RequestBody List<MenuEntity> list, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.OperateEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "OperateEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertOperate", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertOperate(@RequestBody OperateEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.ResEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "ResEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertRes", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertRes(@RequestBody ResEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.ResOpEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "ResOpEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertResOp", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertResOp(@RequestBody ResOpEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.RoleEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "RoleEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertRole", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertRole(@RequestBody RoleEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.sys.TokenEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "TokenEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertToken", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertToken(@RequestBody TokenEntity entity, HttpServletRequest req) { |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "插入一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.data.UserEntity", paramType = "body", example = "") |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "UserEntity", paramType = "body", example = "") |
| | | }) |
| | | @PostMapping(value = "/insertUser", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> insertUser(@RequestBody UserEntity entity, HttpServletRequest req) { |
| | |
| | | String entityName = "Gxcg"; |
| | | String xls = "D:\\LF\\data\\xls\\测绘\\2-地下管线探测成果\\2-2 管线成果表.xlsx"; |
| | | |
| | | String className = "com.lf.server.entity.bs." + entityName; |
| | | String className = "com.moon.server.entity.bs." + entityName; |
| | | Object obj = ClassHelper.createInstance(className); |
| | | |
| | | List<?> list = ExcelHelper.readExcel(obj.getClass(), xls); |
| | |
| | | |
| | | # mybatis |
| | | #mybatis: |
| | | # type-aliases-package: com.lf.server.entity |
| | | # type-aliases-package: com.moon.server.entity |
| | | # config-location: classpath:mybatis.xml |
| | | # mapper-locations: classpath:mapper/**/*.xml |
| | | |
| | | mybatis-plus: |
| | | type-aliases-package: com.lf.server.entity |
| | | type-aliases-package: com.moon.server.entity |
| | | config-location: classpath:mybatis.xml |
| | | mapper-locations: classpath:mapper/**/*.xml |
| | | |
| | |
| | | <logger name="com.apache.ibatis" level="INFO"/> |
| | | |
| | | <!-- additivity:是否在父(这里为root节点)输出, 默认 true; --> |
| | | <logger name="com.lf.server" level="INFO" additivity="true"> |
| | | <logger name="com.moon.server" level="INFO" additivity="true"> |
| | | <appender-ref ref="INFO_FILE"/> |
| | | <appender-ref ref="ERROR_FILE"/> |
| | | </logger> |
| | |
| | | <setting name="logImpl" value="NO_LOGGING" /> |
| | | </settings> |
| | | <typeAliases> |
| | | <package name="com.lf.server.entity"/> |
| | | <package name="com.moon.server.entity"/> |
| | | </typeAliases> |
| | | </configuration> |