Selaa lähdekoodia

文章的相关产品

XMTT 6 vuotta sitten
vanhempi
commit
fd5c3209fc

+ 5 - 0
src/main/java/com/ekexiu/portal/dao/ArticleDao.java

798
			@SqlColumn(handlerClass = StringHandler.class, value = { "ARTICLE_ID IN (SELECT ID FROM ARTICLE_WARE WHERE WARE =?)" }) String ware, int rows)
798
			@SqlColumn(handlerClass = StringHandler.class, value = { "ARTICLE_ID IN (SELECT ID FROM ARTICLE_WARE WHERE WARE =?)" }) String ware, int rows)
799
			throws SQLException;
799
			throws SQLException;
800

800

801
	@LimitSelect
802
	@OrderBy(" ORDER BY PAGE_VIEWS DESC")
803
	@Where("STATUS = '1'")
804
	public abstract List<Article> queryByProductId(Connection con, @SqlColumn(handlerClass = StringHandler.class, value = {"ARTICLE_ID IN (SELECT ID FROM ARTICLE_PRODUCT WHERE PRODUCT =?)"}) String product, int rows) throws SQLException;
805

801
	@DefaultValue("0")
806
	@DefaultValue("0")
802
	@QueryVal
807
	@QueryVal
803
	@Where("STATUS = '1'")
808
	@Where("STATUS = '1'")

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

1257
		return articleDao.queryWares(con, id);
1257
		return articleDao.queryWares(con, id);
1258
	}
1258
	}
1259

1259

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

1260
	@Get
1266
	@Get
1261
	@Path("/product")
1267
	@Path("/product")
1262
	public List<ArticleProduct> queryProducts(@JdbcConn Connection con,String id)throws SQLException {
1268
	public List<ArticleProduct> queryProducts(@JdbcConn Connection con,String id)throws SQLException {