Ver Código Fonte

关闭文章接口

XMTT 5 anos atrás
pai
commit
475f37aff4

+ 21 - 21
src/main/java/com/ekexiu/portal/service/ArticleService.java

376
	}
376
	}
377

377

378
	@Post
378
	@Post
379
	@Path("/save")
379
	@Path("/save1")
380
	public String saveArticle(@JdbcConn(false) Connection con, Article article,@Nullable String[] files,@Nullable String[] professors, @Nullable String[] resources,
380
	public String saveArticle(@JdbcConn(false) Connection con, Article article,@Nullable String[] files,@Nullable String[] professors, @Nullable String[] resources,
381
			@Nullable String[] orgs, @Nullable String[] wares,@Nullable String[] products) throws SQLException, IOException, JfwBaseException {
381
			@Nullable String[] orgs, @Nullable String[] wares,@Nullable String[] products) throws SQLException, IOException, JfwBaseException {
382
		String articleId = null;
382
		String articleId = null;
515
	}
515
	}
516

516

517
	@Post
517
	@Post
518
	@Path("/draft")
518
	@Path("/draft1")
519
	public String draft(@JdbcConn(false) Connection con, Article article,@Nullable String[] files, @Nullable String[] professors, @Nullable String[] resources, @Nullable String[] orgs,
519
	public String draft(@JdbcConn(false) Connection con, Article article,@Nullable String[] files, @Nullable String[] professors, @Nullable String[] resources, @Nullable String[] orgs,
520
			@Nullable String[] wares,@Nullable String[] products) throws SQLException, IOException, JfwBaseException {
520
			@Nullable String[] wares,@Nullable String[] products) throws SQLException, IOException, JfwBaseException {
521

521

653
	}
653
	}
654

654

655
	@Post
655
	@Post
656
	@Path("/timing")
656
	@Path("/timing1")
657
	public String timingPublish(@JdbcConn(false) Connection con, Article article,@Nullable String[] files, @Nullable String[] professors, @Nullable String[] resources,
657
	public String timingPublish(@JdbcConn(false) Connection con, Article article,@Nullable String[] files, @Nullable String[] professors, @Nullable String[] resources,
658
			@Nullable String[] orgs, @Nullable String[] wares,@Nullable String[] products) throws SQLException, IOException, JfwBaseException {
658
			@Nullable String[] orgs, @Nullable String[] wares,@Nullable String[] products) throws SQLException, IOException, JfwBaseException {
659
		String articleId = null;
659
		String articleId = null;
949
	}
949
	}
950

950

951
	@Get
951
	@Get
952
	@Path("/pqProPublish")
952
	@Path("/pqProPublish1")
953
	public PageQueryResult<Article> pageQueryProPublish(@JdbcConn Connection con, String ownerId, @DefaultValue("10") int pageSize,
953
	public PageQueryResult<Article> pageQueryProPublish(@JdbcConn Connection con, String ownerId, @DefaultValue("10") int pageSize,
954
			@DefaultValue("1") int pageNo) throws SQLException {
954
			@DefaultValue("1") int pageNo) throws SQLException {
955
		return this.articleDao.pageQueryProPublish(con, ownerId, pageSize, pageNo);
955
		return this.articleDao.pageQueryProPublish(con, ownerId, pageSize, pageNo);
979
	}
979
	}
980

980

981
	@Get
981
	@Get
982
	@Path("/pageQuery")
982
	@Path("/pageQuery1")
983
	public PageQueryResult<Article> pageQueryPublish(@JdbcConn Connection con, String ownerId,String articleType,@Nullable String[] status,@Nullable String key, @DefaultValue("10") int pageSize,
983
	public PageQueryResult<Article> pageQueryPublish(@JdbcConn Connection con, String ownerId,String articleType,@Nullable String[] status,@Nullable String key, @DefaultValue("10") int pageSize,
984
														@DefaultValue("1") int pageNo) throws SQLException {
984
														@DefaultValue("1") int pageNo) throws SQLException {
985
		return this.articleDao.pageQueryPublish(con, ownerId,articleType,status, key == null ? null : ("%" + key + "%"), pageSize, pageNo);
985
		return this.articleDao.pageQueryPublish(con, ownerId,articleType,status, key == null ? null : ("%" + key + "%"), pageSize, pageNo);
986
	}
986
	}
987

987

988
	@Get
988
	@Get
989
	@Path("/qa")
989
	@Path("/qa1")
990
	public List<Article> queryPublish(@JdbcConn Connection con, String ownerId, @DefaultValue("\"z\"")String publishTime, @DefaultValue("\"z\"") String articleId,String articleType,@Nullable String[] status,@Nullable String key, int rows) throws SQLException {
990
	public List<Article> queryPublish(@JdbcConn Connection con, String ownerId, @DefaultValue("\"z\"")String publishTime, @DefaultValue("\"z\"") String articleId,String articleType,@Nullable String[] status,@Nullable String key, int rows) throws SQLException {
991
		return this.articleDao.queryPublish(con, ownerId, publishTime, articleId, articleType,status, key == null ? null : ("%" + key + "%"), rows);
991
		return this.articleDao.queryPublish(con, ownerId, publishTime, articleId, articleType,status, key == null ? null : ("%" + key + "%"), rows);
992
	}
992
	}
1010
	}
1010
	}
1011

1011

1012
	@Get
1012
	@Get
1013
	@Path("/pqOrgPublish")
1013
	@Path("/pqOrgPublish1")
1014
	public PageQueryResult<Article> pageQueryOrgPublish(@JdbcConn Connection con, String ownerId, @DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo)
1014
	public PageQueryResult<Article> pageQueryOrgPublish(@JdbcConn Connection con, String ownerId, @DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo)
1015
			throws SQLException {
1015
			throws SQLException {
1016
		return this.articleDao.pageQueryOrgPublish(con, ownerId, pageSize, pageNo);
1016
		return this.articleDao.pageQueryOrgPublish(con, ownerId, pageSize, pageNo);
1024
	}
1024
	}
1025

1025

1026
	@Get
1026
	@Get
1027
	@Path("/query")
1027
	@Path("/query1")
1028
	public Article queryOne(@JdbcConn Connection con, String articleId) throws SQLException {
1028
	public Article queryOne(@JdbcConn Connection con, String articleId) throws SQLException {
1029
		return this.articleDao.queryOne(con, articleId);
1029
		return this.articleDao.queryOne(con, articleId);
1030
	}
1030
	}
1031

1031

1032
	@Get
1032
	@Get
1033
	@Path("/pqpublish")
1033
	@Path("/pqpublish1")
1034
	public PageQueryResult<Article> queryPagePublish(@JdbcConn Connection con, @Nullable String articleTitle, @DefaultValue("10") int pageSize,
1034
	public PageQueryResult<Article> queryPagePublish(@JdbcConn Connection con, @Nullable String articleTitle, @DefaultValue("10") int pageSize,
1035
			@DefaultValue("1") int pageNo) throws SQLException {
1035
			@DefaultValue("1") int pageNo) throws SQLException {
1036
		if (articleTitle != null) {
1036
		if (articleTitle != null) {
1069
	}
1069
	}
1070

1070

1071
	@Get
1071
	@Get
1072
	@Path("/index/search")
1072
	@Path("/index/search1")
1073
	public List<Article> indexSearch(@JdbcConn Connection con, @Nullable String key, @DefaultValue("Long.MAX_VALUE") long sortNum, @DefaultValue("\"9\"") String publishTime, @DefaultValue("\"G\"") String id, @DefaultValue("10000000") int rows) throws SQLException {
1073
	public List<Article> indexSearch(@JdbcConn Connection con, @Nullable String key, @DefaultValue("Long.MAX_VALUE") long sortNum, @DefaultValue("\"9\"") String publishTime, @DefaultValue("\"G\"") String id, @DefaultValue("10000000") int rows) throws SQLException {
1074
		if (key != null) {
1074
		if (key != null) {
1075
			key = "%" + key + "%";
1075
			key = "%" + key + "%";
1096
	}
1096
	}
1097

1097

1098
	@Get
1098
	@Get
1099
	@Path("/pqself")
1099
	@Path("/pqself1")
1100
	public PageQueryResult<SelfArticle> queryPageSelf(@JdbcConn Connection con, String articleType, String ownerId,
1100
	public PageQueryResult<SelfArticle> queryPageSelf(@JdbcConn Connection con, String articleType, String ownerId,
1101
			@Nullable String key, @DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
1101
			@Nullable String key, @DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
1102
		if (key != null) {
1102
		if (key != null) {
1161
	}
1161
	}
1162

1162

1163
	@Get
1163
	@Get
1164
	@Path("/ralateArticles")
1164
	@Path("/ralateArticles1")
1165
	public List<Article> ralateArticles(@JdbcConn Connection con, @Nullable String[] keys, @Nullable String professorId, @Nullable String orgId,
1165
	public List<Article> ralateArticles(@JdbcConn Connection con, @Nullable String[] keys, @Nullable String professorId, @Nullable String orgId,
1166
			String articleId, @DefaultValue("5") int rows) throws SQLException {
1166
			String articleId, @DefaultValue("5") int rows) throws SQLException {
1167
		String[] ids = this.articleDao.queryArticleIdWithSameKeyWord(con, articleId, rows);
1167
		String[] ids = this.articleDao.queryArticleIdWithSameKeyWord(con, articleId, rows);
1172
	}
1172
	}
1173

1173

1174
	@Get
1174
	@Get
1175
	@Path("/byAssProfessor")
1175
	@Path("/byAssProfessor1")
1176
	public List<Article> byAssProfessor(@JdbcConn Connection con, String id, @DefaultValue("5") int rows) throws SQLException {
1176
	public List<Article> byAssProfessor(@JdbcConn Connection con, String id, @DefaultValue("5") int rows) throws SQLException {
1177

1177

1178
		List<ArticlePro> pros = this.articleProDao.queryByProfessorId(con, id);
1178
		List<ArticlePro> pros = this.articleProDao.queryByProfessorId(con, id);
1190
	}
1190
	}
1191

1191

1192
	@Get
1192
	@Get
1193
	@Path("/byAssOrg")
1193
	@Path("/byAssOrg1")
1194
	public List<Article> byAssOrg(@JdbcConn Connection con, String id, @DefaultValue("5") int rows) throws SQLException {
1194
	public List<Article> byAssOrg(@JdbcConn Connection con, String id, @DefaultValue("5") int rows) throws SQLException {
1195

1195

1196
		List<ArticleOrg> pros = this.articleOrgDao.queryByOrgId(con, id);
1196
		List<ArticleOrg> pros = this.articleOrgDao.queryByOrgId(con, id);
1208
	}
1208
	}
1209

1209

1210
	@Get
1210
	@Get
1211
	@Path("/byAssResource")
1211
	@Path("/byAssResource1")
1212
	public List<Article> byAssResource(@JdbcConn Connection con, String id, @DefaultValue("5") int rows) throws SQLException {
1212
	public List<Article> byAssResource(@JdbcConn Connection con, String id, @DefaultValue("5") int rows) throws SQLException {
1213

1213

1214
		List<ArticleRes> pros = this.articleResDao.queryByResourceId(con, id);
1214
		List<ArticleRes> pros = this.articleResDao.queryByResourceId(con, id);
1225
		return this.articleDao.limitQueryPublish(con, ids, rows);
1225
		return this.articleDao.limitQueryPublish(con, ids, rows);
1226
	}
1226
	}
1227

1227

1228
	@Path("/byShareId")
1228
	@Path("/byShareId1")
1229
	@Get
1229
	@Get
1230
	public Article query(@JdbcConn Connection con, long id) throws SQLException {
1230
	public Article query(@JdbcConn Connection con, long id) throws SQLException {
1231
		return this.articleDao.query(con, id);
1231
		return this.articleDao.query(con, id);
1246
		}
1246
		}
1247
		return this.articleDao.lasterByPublishTime(con, time, rows);
1247
		return this.articleDao.lasterByPublishTime(con, time, rows);
1248
	}
1248
	}
1249
	@Path("/lq/byWare")
1249
	@Path("/lq/byWare1")
1250
	@Get
1250
	@Get
1251
	public List<Article> byWare(@JdbcConn Connection con,String ware,int rows) throws SQLException{
1251
	public List<Article> byWare(@JdbcConn Connection con,String ware,int rows) throws SQLException{
1252
		return articleDao.queryByWareId(con, ware, rows);
1252
		return articleDao.queryByWareId(con, ware, rows);
1258
	}
1258
	}
1259

1259

1260
	@Get
1260
	@Get
1261
	@Path("/lq/byProduct")
1261
	@Path("/lq/byProduct1")
1262
	public List<Article> byProduct(@JdbcConn Connection con, String product,int rows)throws SQLException {
1262
	public List<Article> byProduct(@JdbcConn Connection con, String product,int rows)throws SQLException {
1263
		return articleDao.queryByProductId(con, product, rows);
1263
		return articleDao.queryByProductId(con, product, rows);
1264
	}
1264
	}
1265

1265

1266
	@Get
1266
	@Get
1267
	@Path("/product")
1267
	@Path("/product1")
1268
	public List<ArticleProduct> queryProducts(@JdbcConn Connection con,String id)throws SQLException {
1268
	public List<ArticleProduct> queryProducts(@JdbcConn Connection con,String id)throws SQLException {
1269
		return articleDao.queryProduct(con, id);
1269
		return articleDao.queryProduct(con, id);
1270
	}
1270
	}
1271

1271

1272
	@Get
1272
	@Get
1273
	@Path("/count/publish")
1273
	@Path("/count/publish1")
1274
	public long countPublish(@JdbcConn Connection con,String category,String owner)throws SQLException {
1274
	public long countPublish(@JdbcConn Connection con,String category,String owner)throws SQLException {
1275
		return articleDao.countPublish(con, category, owner);
1275
		return articleDao.countPublish(con, category, owner);
1276
	}
1276
	}
1277

1277

1278
	@Get
1278
	@Get
1279
	@Path("/qm")
1279
	@Path("/qm1")
1280
	public List<Article> query(@JdbcConn Connection con,String[] id)throws SQLException {
1280
	public List<Article> query(@JdbcConn Connection con,String[] id)throws SQLException {
1281
		return this.articleDao.query(con, id,null);
1281
		return this.articleDao.query(con, id,null);
1282
	}
1282
	}