XMTT 7 jaren geleden
bovenliggende
commit
a87c08140c

+ 1 - 1
src/main/java/com/ekexiu/portal/platform/ButtedProfessorInfo.java

6

6

7
import com.ekexiu.portal.po.Professor;
7
import com.ekexiu.portal.po.Professor;
8

8

9
@ExtendView(fromSentence="PROFESSOR P INNER JOIN BUTTED_ORG B ON P.ID = B.OID" ,tableAlias="P")
9
@ExtendView(fromSentence="PROFESSOR P INNER JOIN BUTTED_PROFESSOR B ON P.ID = B.UID" ,tableAlias="P")
10
public class ButtedProfessorInfo extends Professor {
10
public class ButtedProfessorInfo extends Professor {
11
	private String buttedTime;
11
	private String buttedTime;
12
	private Integer hasHeadImage;
12
	private Integer hasHeadImage;

+ 11 - 0
src/main/java/com/ekexiu/portal/platform/Console.java

106
    public PageQueryResult<PlatformInfo> query(@JdbcConn Connection con, @Nullable String name, @Nullable String bt, @Nullable String et, @DefaultValue("1") int pageNo, @DefaultValue("10") int pageSize) throws SQLException {
106
    public PageQueryResult<PlatformInfo> query(@JdbcConn Connection con, @Nullable String name, @Nullable String bt, @Nullable String et, @DefaultValue("1") int pageNo, @DefaultValue("10") int pageSize) throws SQLException {
107
        return this.platformDao.query(con, name == null ? null : "%" + name + "%", bt == null ? null : bt + "000000", et == null ? null : et + "235959", pageSize, pageNo);
107
        return this.platformDao.query(con, name == null ? null : "%" + name + "%", bt == null ? null : bt + "000000", et == null ? null : et + "235959", pageSize, pageNo);
108
    }
108
    }
109
110
    @Get
111
    @Path("/pqButtedProfessors")
112
    public PageQueryResult<ButtedProfessorInfo> pageQueryButtedProfessorinfos(@JdbcConn Connection con,@Nullable String pid,@Nullable String name, int pageSize, int pageNo)
113
            throws SQLException {
114
        PageQueryResult<ButtedProfessorInfo> ret = new PageQueryResult<ButtedProfessorInfo>();
115
        if (pid != null) {
116
            ret = this.platformDao.queryButtedProfessorInfo(con, pid,name, pageSize, pageNo);
117
        }
118
        return ret;
119
    }
109
}
120
}

+ 6 - 0
src/main/java/com/ekexiu/portal/platform/PlatformDao.java

209
	@PageQuery
209
	@PageQuery
210
	@OrderBy(" ORDER BY create_time DESC NULLS LAST")
210
	@OrderBy(" ORDER BY create_time DESC NULLS LAST")
211
	PageQueryResult<PlatformInfo> query(Connection con, @Nullable @Like String name, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
211
	PageQueryResult<PlatformInfo> query(Connection con, @Nullable @Like String name, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
212

213
	@PageQuery
214
	@OrderBy(value = "ORDER BY BUTTE_TIME DESC,ID ASC")
215
	@Exclude({"descp"})
216
	PageQueryResult<ButtedProfessorInfo> queryButtedProfessorInfo(Connection con,
217
																  @SqlColumn(handlerClass = StringHandler.class, value = { "B.PID=?" }) String pid,@Nullable @SqlColumn(handlerClass = StringHandler.class, value = { "P.NAME LIKE ?" }) String name, int pageSize, int pageNo) throws SQLException;
212
}
218
}

+ 9 - 0
src/main/resources/database.sql

2362
ALTER TABLE DEMAND DROP COLUMN ORG_ID;
2362
ALTER TABLE DEMAND DROP COLUMN ORG_ID;
2363
ALTER TABLE DEMAND ALTER COLUMN ORG_NAME SET  NOT NULL;
2363
ALTER TABLE DEMAND ALTER COLUMN ORG_NAME SET  NOT NULL;
2364

2364

2365
ALTER TABLE public.article ADD owner_id CHAR(32) NULL;
2366

2367
UPDATE public.article set owner_id = professor_id WHERE article_type = '1'
2368

2369
UPDATE public.article SET owner_id = org_id WHERE article_type = '2'
2370

2371
ALTER TABLE public.article DROP professor_id;
2372

2373
ALTER TABLE public.article DROP org_id
2365

2374

2366

2375

2367

2376