Quellcode durchsuchen

文章批量设置栏目

XMTT vor 7 Jahren
Ursprung
Commit
1e871e180e

+ 2 - 1
src/main/java/com/ekexiu/console/system/dao/ArticleDao.java

@ -59,9 +59,10 @@ public interface ArticleDao {
59 59
    @From(Article.class)
60 60
    int updateSortNum(Connection con, String articleId, @Set long sortNum) throws SQLException;
61 61
62
    @Batch
62 63
    @UpdateWith
63 64
    @From(Article.class)
64
    int updateColNum(Connection con, String articleId, @Set int colNum) throws SQLException;
65
    int[] updateColNum(Connection con, @Batch String[] articleId, @Set int colNum) throws SQLException;
65 66
66 67
    @UpdateWith
67 68
    @From(Article.class)

+ 2 - 2
src/main/java/com/ekexiu/console/system/service/ArticleService.java

@ -75,8 +75,8 @@ public class ArticleService {
75 75
76 76
    @Post
77 77
    @Path("/colNum")
78
    public void updateColNum(@JdbcConn(true) Connection con,String articleId,int colNum)throws SQLException {
79
        this.articleDao.updateColNum(con, articleId, colNum);
78
    public void updateColNum(@JdbcConn(true) Connection con,String[] articleIds,int colNum)throws SQLException {
79
        this.articleDao.updateColNum(con, articleIds, colNum);
80 80
    }
81 81
82 82
    @Post