XMTT 5 years ago
parent
commit
e2bea75a72

+ 11 - 0
src/main/java/com/ekexiu/portal/resResult/ResearchResult.java

@ -37,6 +37,8 @@ public class ResearchResult implements CreateTimeSupported, ModifyTimeSupported
37 37
    private boolean console;
38 38
    private boolean professor;
39 39
40
    private long pageViews;
41
40 42
    @Column(DE.id_32)
41 43
    public String getId() {
42 44
        return id;
@ -236,4 +238,13 @@ public class ResearchResult implements CreateTimeSupported, ModifyTimeSupported
236 238
    public void setProfessor(boolean professor) {
237 239
        this.professor = professor;
238 240
    }
241
242
    @Column(descp="浏览量",value = DE.long_de)
243
    public long getPageViews() {
244
        return pageViews;
245
    }
246
247
    public void setPageViews(long pageViews) {
248
        this.pageViews = pageViews;
249
    }
239 250
}

+ 5 - 0
src/main/java/com/ekexiu/portal/resResult/ResearchResultDao.java

@ -65,4 +65,9 @@ public interface ResearchResultDao {
65 65
    @From(ResearchResult.class)
66 66
    @Where("status='1'")
67 67
    long countPublish(Connection con, @SqlColumn(handlerClass = StringHandler.class,value = "ID IN (SELECT ID FROM RESEARCHER WHERE PROFESSOR_ID = ?)") String professor) throws SQLException;
68
69
    @From(ResearchResult.class)
70
    @UpdateWith
71
    @SetSentence("PAGE_VIEWS = PAGE_VIEWS + 1")
72
    int incPageViews(Connection con, String id) throws SQLException;
68 73
}

+ 6 - 0
src/main/java/com/ekexiu/portal/resResult/ResearchResultService.java

@ -230,6 +230,12 @@ public class ResearchResultService {
230 230
        return researchResultDao.countPublish(con, id);
231 231
    }
232 232
233
    @Post
234
    @Path("/incPageViews")
235
    public void incPageViews(@JdbcConn(true) Connection con,String id)throws SQLException{
236
        this.researchResultDao.incPageViews(con, id);
237
    }
238
233 239
234 240
235 241
    /**

+ 58 - 1
src/main/resources/database.sql

@ -2628,4 +2628,61 @@ COMMENT ON COLUMN TEAM.SUBJECT IS '学术领域';
2628 2628
COMMENT ON COLUMN TEAM.INDUSTRY IS '行业领域';
2629 2629
COMMENT ON COLUMN TEAM.DESCP IS '团队简介';
2630 2630
COMMENT ON COLUMN TEAM.STATUS IS '团队状态  0:已删除 1待审核 2审核失败 3审核通过';
2631
COMMENT ON COLUMN TEAM.CERTIFY IS '团队材料';
2631
COMMENT ON COLUMN TEAM.CERTIFY IS '团队材料';
2632

2633
CREATE TABLE RESEARCH_RESULT (
2634
	ID CHAR(32) NOT NULL,
2635
	NAME TEXT NOT NULL,
2636
	LEVEL TEXT,
2637
	ORG_ID CHAR(32),
2638
	DEPARTMENT TEXT,
2639
	SUBJECT TEXT,
2640
	INDUSTRY TEXT,
2641
	DESCP TEXT,
2642
	APPLY_DESCP TEXT,
2643
	PROSPECT TEXT,
2644
	INDICATOR TEXT,
2645
	ADVANTAGE TEXT,
2646
	BENEFIT TEXT,
2647
	COOPERATION TEXT,
2648
	PIC TEXT,
2649
	CREATOR CHAR(32) NOT NULL,
2650
	STATUS CHAR(1) NOT NULL,
2651
	PLATFORM CHAR(1) NOT NULL,
2652
	CONSOLE CHAR(1) NOT NULL,
2653
	PROFESSOR CHAR(1) NOT NULL,
2654
  PAGE_VIEWS BIGINT NOT NULL,
2655
	CREATE_TIME CHAR(14) NOT NULL,
2656
	MODIFY_TIME CHAR(14) NOT NULL);
2657
ALTER TABLE RESEARCH_RESULT ADD PRIMARY KEY (ID);
2658
COMMENT ON TABLE RESEARCH_RESULT IS '成果';
2659
COMMENT ON COLUMN RESEARCH_RESULT.NAME IS '成果名称';
2660
COMMENT ON COLUMN RESEARCH_RESULT.LEVEL IS '技术水平';
2661
COMMENT ON COLUMN RESEARCH_RESULT.ORG_ID IS '所属机构';
2662
COMMENT ON COLUMN RESEARCH_RESULT.DEPARTMENT IS '所属部门';
2663
COMMENT ON COLUMN RESEARCH_RESULT.SUBJECT IS '学术领域';
2664
COMMENT ON COLUMN RESEARCH_RESULT.INDUSTRY IS '应用领域';
2665
COMMENT ON COLUMN RESEARCH_RESULT.DESCP IS '成果简介';
2666
COMMENT ON COLUMN RESEARCH_RESULT.APPLY_DESCP IS '应用介绍';
2667
COMMENT ON COLUMN RESEARCH_RESULT.PROSPECT IS '产业化前景';
2668
COMMENT ON COLUMN RESEARCH_RESULT.INDICATOR IS '技术指标';
2669
COMMENT ON COLUMN RESEARCH_RESULT.ADVANTAGE IS '技术优势';
2670
COMMENT ON COLUMN RESEARCH_RESULT.BENEFIT IS '经济和社会化效益';
2671
COMMENT ON COLUMN RESEARCH_RESULT.COOPERATION IS '合作备注';
2672
COMMENT ON COLUMN RESEARCH_RESULT.PIC IS '图片';
2673
COMMENT ON COLUMN RESEARCH_RESULT.CREATOR IS '创建人ID';
2674
COMMENT ON COLUMN RESEARCH_RESULT.STATUS IS '状态 0:删除,1:发布的 ,2:草稿';
2675
COMMENT ON COLUMN RESEARCH_RESULT.PLATFORM IS '是否是平台用户';
2676
COMMENT ON COLUMN RESEARCH_RESULT.CONSOLE IS '是否是后台用户';
2677
COMMENT ON COLUMN RESEARCH_RESULT.PROFESSOR IS '是否是专家用户';
2678
COMMENT ON COLUMN RESEARCH_RESULT.PAGE_VIEWS IS '浏览量';
2679

2680
CREATE TABLE RESEARCHER (
2681
	ID CHAR(32) NOT NULL,
2682
	PROFESSOR_ID CHAR(32) NOT NULL,
2683
	NAME TEXT NOT NULL);
2684
ALTER TABLE RESEARCHER ADD PRIMARY KEY (ID,NAME);
2685

2686
CREATE TABLE RES_RESULT_KEY_WORD (
2687
	ID CHAR(32) NOT NULL,
2688
	KW TEXT NOT NULL);