政务云服务资源 本地数据接口
This commit is contained in:
parent
5e403b6ae6
commit
89de07eac0
|
@ -912,4 +912,21 @@ public class ResourceController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getPolicyCloudService")
|
||||||
|
@ApiOperation("/获取政务云服务资源")
|
||||||
|
@LogOperation("/获取政务云服务资源")
|
||||||
|
public Result<PageData<Map<String, Object>>> getPolicyCloudService(@RequestParam Map<String, Object> params) {
|
||||||
|
int page = 1;
|
||||||
|
int pageSize = 10;
|
||||||
|
if (params.containsKey("limit") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("limit").toString())) {
|
||||||
|
pageSize = Integer.parseInt(params.get("limit").toString());
|
||||||
|
}
|
||||||
|
if (params.containsKey("page") && org.apache.commons.lang3.StringUtils.isNotBlank(params.get("page").toString())) {
|
||||||
|
page = Integer.parseInt(params.get("page").toString());
|
||||||
|
}
|
||||||
|
String sql = String.format("SELECT * FROM policy_cloud_service LIMIT %d,%d", page * pageSize, pageSize);
|
||||||
|
List<Map<String, Object>> result = jdbcTemplate.queryForList(sql);
|
||||||
|
return new Result<PageData<Map<String, Object>>>().ok(new PageData<>(result, jdbcTemplate.queryForObject("SELECT COUNT(*) FROM policy_cloud_service", Long.class)));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
DROP TABLE IF EXISTS `policy_cloud_service`;
|
||||||
|
CREATE TABLE `policy_cloud_service` (
|
||||||
|
`service_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
|
`service_item_tier1` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||||
|
`service_item_tier2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||||
|
`service_description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||||
|
`specification` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||||
|
`remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||||
|
`year` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL
|
||||||
|
PRIMARY KEY (`service_type`) USING BTREE
|
||||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
Loading…
Reference in New Issue