Browse Source

修改企业账户时不允许修改企业名称。文章和资源显示为发布时间,创建企业时isjoin设置为1

XMTT 7 years ago
parent
commit
150c375a80

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

@ -30,12 +30,12 @@ public interface ArticleDao {
30 30
    String queryById(Connection con, String articleId) throws SQLException;
31 31
32 32
    @PageQuery
33
    @OrderBy(" ORDER BY create_time DESC NULLS LAST")
33
    @OrderBy(" ORDER BY publish_time DESC NULLS LAST")
34 34
    @Where("status='1'")
35
    PageQueryResult<ArticleInfo> queryByTime(Connection con, @Nullable @Like String articleTitle, @SqlColumn(value = {"(p.name is null or p.name like ?)", "(o.name is null or o.name like ?)"}, handlerClass = StringHandler.class) String name, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
35
    PageQueryResult<ArticleInfo> queryByTime(Connection con, @Nullable @Like String articleTitle, @SqlColumn(value = {"(p.name is null or p.name like ?)", "(o.name is null or o.name like ?)"}, handlerClass = StringHandler.class) String name, @Nullable @GtEq @Alias("publishTime") String bt, @Nullable @Alias("publishTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
36 36
37 37
    @PageQuery
38 38
    @OrderBy(" ORDER BY page_views DESC NULLS LAST")
39 39
    @Where("status='1'")
40
    PageQueryResult<ArticleInfo> queryByPV(Connection con, @Nullable @Like String articleTitle, @SqlColumn(value = {"(p.name is null or p.name like ?)", "(o.name is null or o.name like ?)"}, handlerClass = StringHandler.class) String name, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
40
    PageQueryResult<ArticleInfo> queryByPV(Connection con, @Nullable @Like String articleTitle, @SqlColumn(value = {"(p.name is null or p.name like ?)", "(o.name is null or o.name like ?)"}, handlerClass = StringHandler.class) String name, @Nullable @GtEq @Alias("publishTime") String bt, @Nullable @Alias("publishTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
41 41
}

+ 7 - 3
src/main/java/com/ekexiu/console/system/dao/OrgDao.java

@ -45,13 +45,17 @@ public interface OrgDao {
45 45
	@From(Organization.class)
46 46
	int updateAuthStatus(Connection con,String id,@Set String authStatus)throws SQLException;
47 47

48
	@UpdateWith
49
	@From(Organization.class)
50
	int updateIsJoin(Connection con,String id,@Set String isJoin)throws SQLException;
51

48 52
	@PageQuery
49
	@OrderBy(" ORDER BY create_time DESC NULLS LAST")
50
	PageQueryResult<OrganizationInfo> queryTime(Connection con, @Nullable @Like String name, @Nullable @Like String industry, @Nullable @Like String subject, @Nullable @Like String city, @Nullable String authStatus, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
53
	@OrderBy(" ORDER BY ou.create_time DESC NULLS LAST")
54
	PageQueryResult<OrganizationInfo> queryTime(Connection con, @Nullable @Like String name, @Nullable @Like String industry, @Nullable @Like String subject, @Nullable @Like String city, @Nullable String authStatus, @Nullable @GtEq @Alias("accountTime") String bt, @Nullable @Alias("accountTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
51 55

52 56
	@PageQuery
53 57
	@OrderBy(" ORDER BY page_views DESC NULLS LAST")
54
	PageQueryResult<OrganizationInfo> queryViews(Connection con, @Nullable @Like String name, @Nullable @Like String industry, @Nullable @Like String subject, @Nullable @Like String city, @Nullable String authStatus, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
58
	PageQueryResult<OrganizationInfo> queryViews(Connection con, @Nullable @Like String name, @Nullable @Like String industry, @Nullable @Like String subject, @Nullable @Like String city, @Nullable String authStatus, @Nullable @GtEq @Alias("accountTime") String bt, @Nullable @Alias("accountTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
55 59

56 60
	@Nullable
57 61
	@QueryVal

+ 3 - 3
src/main/java/com/ekexiu/console/system/dao/ResourceDao.java

@ -29,12 +29,12 @@ public interface ResourceDao {
29 29
    String queryById(Connection con, String resourceId) throws SQLException;
30 30
31 31
    @PageQuery
32
    @OrderBy(" ORDER BY create_time DESC NULLS LAST")
32
    @OrderBy(" ORDER BY publish_time DESC NULLS LAST")
33 33
    @Where("status='1'")
34
    PageQueryResult<ResourceInfo> queryByTime(Connection con, @Nullable @Like String resourceName, @SqlColumn(value = {"(p.name is null or p.name like ?)", "(o.name is null or o.name like ?)"}, handlerClass = StringHandler.class) String name, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
34
    PageQueryResult<ResourceInfo> queryByTime(Connection con, @Nullable @Like String resourceName, @SqlColumn(value = {"(p.name is null or p.name like ?)", "(o.name is null or o.name like ?)"}, handlerClass = StringHandler.class) String name, @Nullable @GtEq @Alias("publishTime") String bt, @Nullable @Alias("publishTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
35 35
36 36
    @PageQuery
37 37
    @OrderBy(" ORDER BY page_views DESC NULLS LAST")
38 38
    @Where("status='1'")
39
    PageQueryResult<ResourceInfo> queryByPV(Connection con, @Nullable @Like String resourceName,@SqlColumn(value = {"(p.name is null or p.name like ?)", "(o.name is null or o.name like ?)"}, handlerClass = StringHandler.class) String name, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
39
    PageQueryResult<ResourceInfo> queryByPV(Connection con, @Nullable @Like String resourceName,@SqlColumn(value = {"(p.name is null or p.name like ?)", "(o.name is null or o.name like ?)"}, handlerClass = StringHandler.class) String name, @Nullable @GtEq @Alias("publishTime") String bt, @Nullable @Alias("publishTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
40 40
}

+ 10 - 1
src/main/java/com/ekexiu/console/system/pojo/OrganizationInfo.java

@ -9,10 +9,11 @@ import org.jfw.apt.orm.core.defaultImpl.StringHandler;
9 9
/**
10 10
 * Created by TT on 2017/5/18.
11 11
 */
12
@ExtendView(fromSentence = "organization o RIGHT JOIN org_user ou on ou.id = o.id LEFT JOIN (select watch_object id,count(1) num from watch WHERE watch_type = 6 group by id)as fans  on fans.id = o.id", tableAlias = "o")
12
@ExtendView(fromSentence = "organization o RIGHT JOIN org_user ou on ou.id = o.id LEFT JOIN (   select watch_object id,count(1) num from watch WHERE watch_type = 6 group by id)as fans  on fans.id = o.id", tableAlias = "o")
13 13
public class OrganizationInfo extends Organization {
14 14
    private String inviterId;
15 15
    private String registerEmail;
16
    private String accountTime;
16 17
    private boolean hasOrgLogo;
17 18
    private int fans;
18 19
@ -51,4 +52,12 @@ public class OrganizationInfo extends Organization {
51 52
        this.inviterId = inviterId;
52 53
    }
53 54
55
    @CalcColumn(handlerClass = StringHandler.class, column = "ou.create_time")
56
    public String getAccountTime() {
57
        return accountTime;
58
    }
59
60
    public void setAccountTime(String accountTime) {
61
        this.accountTime = accountTime;
62
    }
54 63
}

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

@ -331,6 +331,7 @@ public class OrgService extends com.ekexiu.console.service.Upload {
331 331
            throw new JfwBaseException(3003, "该邮箱已被注册");
332 332
        }
333 333
        if ((orgId !=null)&&(this.orgUserDao.query(con,orgId)==null)){
334
            this.orgDao.updateIsJoin(con, orgId, "1");
334 335
            OrgUser orgUser = new OrgUser();
335 336
            orgUser.setId(orgId);
336 337
            orgUser.setEmail(email);
@ -347,6 +348,7 @@ public class OrgService extends com.ekexiu.console.service.Upload {
347 348
        }
348 349
        if ((orgId == null)&&(this.orgUserDao.queryByEmail(con,email)==null)) {
349 350
            String id = this.createOrganization(con, name);
351
            this.orgDao.updateIsJoin(con, orgId, "1");
350 352
            OrgUser orgUser = new OrgUser();
351 353
            orgUser.setId(id);
352 354
            orgUser.setEmail(email);