XMTT vor 7 Jahren
Ursprung
Commit
f02aaa5a97

+ 9 - 0
src/main/java/com/ekexiu/console/system/po/Professor.java

@ -55,6 +55,7 @@ public class Professor implements CreateTimeSupported,ModifyTimeSupported {
55 55
    private String cuserId;
56 56
    private Integer professorState;
57 57
    private Integer sortFirst;
58
    private long pageViews;
58 59
    
59 60
    @Column(handlerClass=FixLenStringHandler.class,dbType="CHAR(1)",renewable=false)
60 61
@ -316,5 +317,13 @@ public class Professor implements CreateTimeSupported,ModifyTimeSupported {
316 317
        this.sortFirst = sortFirst;
317 318
    }
318 319
320
    @Column(DE.bigSerial)
321
    public long getPageViews() {
322
        return pageViews;
323
    }
324
325
    public void setPageViews(long pageViews) {
326
        this.pageViews = pageViews;
327
    }
319 328
}
320 329

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

@ -102,8 +102,13 @@ public class ProfessorService {
102 102
103 103
    @Put
104 104
    @Path
105
    public void update(@JdbcConn(true) Connection con, @RequestBody Professor professor) throws SQLException, IOException {
106
        this.professorDao.update(con, professor);
105
    public void update(@JdbcConn(true) Connection con, @RequestBody Professor professor) throws SQLException,JfwBaseException {
106
        UserDetail userDetail = this.professorDao.queryDetail(con, professor.getId());
107
        if (!Objects.equals(userDetail.getActiveStatus(), "1")) {
108
            this.professorDao.update(con, professor);
109
        }else {
110
            throw new JfwBaseException(50000, "只能修改未激活用户信息");
111
        }
107 112
    }
108 113
109 114
    @Get