| | |
| | | return fail(ex, -1); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "插入企业") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "token", value = "令牌", dataType = "String", paramType = "query", example = ""), |
| | | @ApiImplicitParam(name = "startDate", value = "开始日期", dataType = "String", paramType = "query", example = "2023-06-29"), |
| | | @ApiImplicitParam(name = "endDate", value = "结束日期", dataType = "String", paramType = "query", example = "2023-06-30"), |
| | | @ApiImplicitParam(name = "qylabel", value = "标签", dataType = "Integer", paramType = "query", example = "开业"), |
| | | @ApiImplicitParam(name = "showCount", value = "显示记录数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "currentPage", value = "当前分页数", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping({"/insertEnts"}) |
| | | public ResponseMsg<Object> insertEnts(String token, String startDate, String endDate, String qylabel, Integer showCount, Integer currentPage) { |
| | | try { |
| | | if (StringHelper.isEmpty(token)) { |
| | | token = entService.selectToken(); |
| | | } |
| | | if (StringHelper.isEmpty(token)) { |
| | | return fail("查询令牌失败"); |
| | | } |
| | | if (null == showCount || showCount < 1) { |
| | | showCount = 10; |
| | | } |
| | | if (null == currentPage || currentPage < 1) { |
| | | currentPage = 1; |
| | | } |
| | | |
| | | List<EntEntity> list = entService.selectEnts(token, startDate, endDate, qylabel, showCount, currentPage); |
| | | if (null == list || list.isEmpty()) { |
| | | return fail("查询企业为空"); |
| | | } |
| | | |
| | | Integer rows = entService.insertEnts(list); |
| | | |
| | | return success(rows); |
| | | } catch (Exception ex) { |
| | | return fail(ex, -1); |
| | | } |
| | | } |
| | | } |