XMTT 7 gadi atpakaļ
vecāks
revīzija
01f5efebf5

+ 7 - 7
src/main/java/com/ekexiu/console/system/service/ResourceService.java

@ -34,27 +34,27 @@ public class ResourceService {
34 34
35 35
    @Path("/pq")
36 36
    @Get
37
    public PageQueryResult<ResourceInfo> pageQueryResult(@JdbcConn Connection con, @Nullable String title, @Nullable String name, int orderBy, @Nullable String bt, @Nullable String et, @DefaultValue("1") int pageNo, @DefaultValue("10") int pageSize)throws SQLException {
37
    public PageQueryResult<ResourceInfo> pageQueryResult(@JdbcConn Connection con, @Nullable String resourceName, @Nullable String name, int orderBy, @Nullable String bt, @Nullable String et, @DefaultValue("1") int pageNo, @DefaultValue("10") int pageSize)throws SQLException {
38 38
        if (orderBy == 1) {
39
            return this.resourceDao.queryByTime(con, title == null ? null : "%" + title + "%",  name == null ? "%" : "%" + name + "%", bt == null ? null : bt + "000000", et == null ? null : et + "235959", pageSize, pageNo);
39
            return this.resourceDao.queryByTime(con, resourceName == null ? null : "%" + resourceName + "%",  name == null ? "%" : "%" + name + "%", bt == null ? null : bt + "000000", et == null ? null : et + "235959", pageSize, pageNo);
40 40
        }
41 41
        if (orderBy == 2) {
42
            return this.resourceDao.queryByPV(con, title == null ? null : "%" + title + "%",  name == null ? "%" : "%" + name + "%", bt == null ? null : bt + "000000", et == null ? null : et + "235959", pageSize, pageNo);
42
            return this.resourceDao.queryByPV(con, resourceName == null ? null : "%" + resourceName + "%",  name == null ? "%" : "%" + name + "%", bt == null ? null : bt + "000000", et == null ? null : et + "235959", pageSize, pageNo);
43 43
        }
44 44
        return null;
45 45
    }
46 46
47 47
    @Post
48 48
    @Path("/deleteResource")
49
    public void deleteResource(@JdbcConn(true) Connection con, String[] articleIds) throws SQLException {
49
    public void deleteResource(@JdbcConn(true) Connection con, String resourceId) throws SQLException {
50 50
        //修改文章状态为删除
51
        this.resourceDao.updateStatus(con, articleIds, "3");
51
        this.resourceDao.updateStatus(con, resourceId, "3");
52 52
    }
53 53
54 54
    @Post
55 55
    @Path("/sortNum")
56
    public void updateSortNum(@JdbcConn(true) Connection con,String articleId,long sortNum) throws SQLException{
57
        this.resourceDao.updateSortNum(con, articleId, sortNum);
56
    public void updateSortNum(@JdbcConn(true) Connection con,String resourceId,long sortNum) throws SQLException{
57
        this.resourceDao.updateSortNum(con, resourceId, sortNum);
58 58
    }
59 59
60 60
    @Get