Browse Source

lixin + zhao

XMTT 8 years ago
parent
commit
e0c000be6c
30 changed files with 1965 additions and 62 deletions
  1. 94 0
      src/main/java/com/ekexiu/console/system/dao/AuthApplyDao.java
  2. 22 0
      src/main/java/com/ekexiu/console/system/dao/AuthImageDao.java
  3. 30 0
      src/main/java/com/ekexiu/console/system/dao/CustPowerDao.java
  4. 39 0
      src/main/java/com/ekexiu/console/system/dao/CustomerRecordDao.java
  5. 25 0
      src/main/java/com/ekexiu/console/system/dao/MyCustomerDao.java
  6. 12 16
      src/main/java/com/ekexiu/console/system/dao/OrgDao.java
  7. 36 0
      src/main/java/com/ekexiu/console/system/dao/ProfessorDao.java
  8. 21 0
      src/main/java/com/ekexiu/console/system/dao/UserCountDao.java
  9. 15 20
      src/main/java/com/ekexiu/console/system/dao/UserDao.java
  10. 25 0
      src/main/java/com/ekexiu/console/system/dao/ViewCustomerDao.java
  11. 68 0
      src/main/java/com/ekexiu/console/system/po/AuthApply.java
  12. 42 0
      src/main/java/com/ekexiu/console/system/po/AuthImage.java
  13. 69 0
      src/main/java/com/ekexiu/console/system/po/CustPower.java
  14. 59 0
      src/main/java/com/ekexiu/console/system/po/CustomerRecord.java
  15. 200 0
      src/main/java/com/ekexiu/console/system/po/MyCustomer.java
  16. 18 8
      src/main/java/com/ekexiu/console/system/po/Organization.java
  17. 277 0
      src/main/java/com/ekexiu/console/system/po/Professor.java
  18. 2 2
      src/main/java/com/ekexiu/console/system/po/User.java
  19. 63 0
      src/main/java/com/ekexiu/console/system/po/UserCount.java
  20. 200 0
      src/main/java/com/ekexiu/console/system/po/ViewCustomer.java
  21. 107 0
      src/main/java/com/ekexiu/console/system/pojo/AuthApplyInfo.java
  22. 45 0
      src/main/java/com/ekexiu/console/system/pojo/OrgApplyInfo.java
  23. 130 0
      src/main/java/com/ekexiu/console/system/service/AuthApplyService.java
  24. 48 0
      src/main/java/com/ekexiu/console/system/service/AuthImageService.java
  25. 57 0
      src/main/java/com/ekexiu/console/system/service/CustPowerService.java
  26. 73 0
      src/main/java/com/ekexiu/console/system/service/CustomerRecordService.java
  27. 58 0
      src/main/java/com/ekexiu/console/system/service/MyCustomerService.java
  28. 51 0
      src/main/java/com/ekexiu/console/system/service/StatistService.java
  29. 23 16
      src/main/java/com/ekexiu/console/system/service/UserService.java
  30. 56 0
      src/main/java/com/ekexiu/console/system/service/ViewCustomerService.java

+ 94 - 0
src/main/java/com/ekexiu/console/system/dao/AuthApplyDao.java

@ -0,0 +1,94 @@
1
package com.ekexiu.console.system.dao;
2
3
import com.ekexiu.console.system.po.AuthApply;
4
import com.ekexiu.console.system.pojo.AuthApplyInfo;
5
import com.ekexiu.console.system.pojo.OrgApplyInfo;
6
import org.jfw.apt.annotation.Nullable;
7
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
10
import org.jfw.apt.orm.annotation.dao.method.operator.*;
11
import org.jfw.apt.orm.annotation.dao.param.*;
12
import org.jfw.util.PageQueryResult;
13
14
import java.sql.Connection;
15
import java.sql.PreparedStatement;
16
import java.sql.ResultSet;
17
import java.sql.SQLException;
18
import java.util.List;
19
20
/**
21
 * Created by TT on 2017/3/30.
22
 */
23
@DAO
24
public abstract class AuthApplyDao {
25
26
    @Insert
27
    public abstract int insert(Connection con, AuthApply authApply) throws SQLException;
28
29
    @Update
30
    public abstract int update(Connection con, AuthApply authApply) throws SQLException;
31
32
    @UpdateWith
33
    @From(AuthApply.class)
34
    public abstract int updateSolveStatus(Connection con, @Set Integer solveStatus, String authApplyId) throws SQLException;
35
36
    @Nullable
37
    @SelectOne
38
    public abstract AuthApply queryOne(Connection con, String authApplyId) throws SQLException;
39
40
    public AuthApply queryPro(Connection con, String professorId) throws SQLException {
41
        int _m_1 = 1;
42
        String sql = "SELECT AUTH_APPLY_ID,PROFESSOR_ID,APPLY_TYPE,SOLVE_STATUS FROM AUTH_APPLY "
43
                + " WHERE PROFESSOR_ID = ? ORDER BY CREATE_TIME DESC LIMIT 1";
44
        PreparedStatement ps = con.prepareStatement(sql);
45
        try {
46
            ps.setString(_m_1++, professorId);
47
            ResultSet rs = ps.executeQuery();
48
            try {
49
                if (rs.next()) {
50
                    AuthApply _result = new AuthApply();
51
                    _result.setAuthApplyId(rs.getString(1));
52
                    _result.setProfessorId(rs.getString(2));
53
                    _result.setApplyType(rs.getInt(3));
54
                    _result.setSolveStatus(rs.getInt(4));
55
                    return _result;
56
                } else {
57
                    return null;
58
                }
59
            } finally {
60
                try {
61
                    rs.close();
62
                } catch (Exception e1) {
63
                }
64
            }
65
        } finally {
66
            try {
67
                ps.close();
68
            } catch (Exception e2) {
69
            }
70
        }
71
    }
72
73
    @QueryList
74
    @OrderBy("ORDER BY CREATE_TIME")
75
    public abstract List<AuthApplyInfo> queryInfo(Connection con, Integer applyType) throws SQLException;
76
77
    @QueryOne
78
    @Nullable
79
    public abstract AuthApplyInfo queryInfo(Connection con, String authApplyId) throws SQLException;
80
81
    @QueryList
82
    @OrderBy("ORDER BY CREATE_TIME")
83
    public abstract List<OrgApplyInfo> queryOrgInfo(Connection con, Integer applyType)throws SQLException;
84
85
    @QueryOne
86
    @Nullable
87
    public abstract OrgApplyInfo queryOrgInfo(Connection con, String authApplyId) throws SQLException;
88
89
    @PageSelect
90
    @OrderBy("ORDER BY PROFESSOR_ID")
91
    public abstract PageQueryResult<AuthApply> query(Connection con, @Nullable @Like String professorId, @Nullable Integer solveStatus, @GtEq @Nullable @Alias("createTime") String bt,
92
                                                         @LtEq @Nullable @Alias("createTime") String et, int pageSize, int pageNo) throws SQLException;
93
94
}

+ 22 - 0
src/main/java/com/ekexiu/console/system/dao/AuthImageDao.java

@ -0,0 +1,22 @@
1
package com.ekexiu.console.system.dao;
2
3
import com.ekexiu.console.system.po.AuthImage;
4
import org.jfw.apt.orm.annotation.dao.DAO;
5
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
6
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
7
8
import java.sql.Connection;
9
import java.sql.SQLException;
10
import java.util.List;
11
12
/**
13
 * Created by TT on 2017/3/31.
14
 */
15
@DAO
16
public interface AuthImageDao {
17
    @Insert
18
    int insert(Connection con, AuthImage authImage) throws SQLException;
19
20
    @SelectList
21
    List<AuthImage> query(Connection con, String authApplyId) throws SQLException;
22
}

+ 30 - 0
src/main/java/com/ekexiu/console/system/dao/CustPowerDao.java

@ -0,0 +1,30 @@
1
package com.ekexiu.console.system.dao;
2
3
import com.ekexiu.console.system.po.CustPower;
4
import org.jfw.apt.orm.annotation.dao.Batch;
5
import org.jfw.apt.orm.annotation.dao.DAO;
6
import org.jfw.apt.orm.annotation.dao.method.From;
7
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
8
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
9
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
10
import org.jfw.apt.orm.annotation.dao.param.Set;
11
12
import java.sql.Connection;
13
import java.sql.SQLException;
14
15
@DAO
16
public interface CustPowerDao {
17
	@Insert
18
	int insert(Connection con, CustPower custPower) throws SQLException;
19
	@UpdateWith
20
	@From(CustPower.class)
21
    int update(Connection con, @Set String powType, String powerId) throws SQLException;
22
	@DeleteWith
23
	@From(CustPower.class)
24
	int delete(Connection con, String powerId) throws SQLException;
25
26
	@DeleteWith
27
	@Batch
28
	@From(CustPower.class)
29
	int[] delete(Connection con, @Batch String[] powerId) throws SQLException;
30
}

+ 39 - 0
src/main/java/com/ekexiu/console/system/dao/CustomerRecordDao.java

@ -0,0 +1,39 @@
1
package com.ekexiu.console.system.dao;
2
3
import com.ekexiu.console.system.po.CustomerRecord;
4
import org.jfw.apt.annotation.Nullable;
5
import org.jfw.apt.orm.annotation.dao.Batch;
6
import org.jfw.apt.orm.annotation.dao.DAO;
7
import org.jfw.apt.orm.annotation.dao.method.From;
8
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
9
import org.jfw.apt.orm.annotation.dao.method.operator.*;
10
11
import java.sql.Connection;
12
import java.sql.SQLException;
13
import java.util.List;
14
15
@DAO
16
public interface CustomerRecordDao {
17
	@Insert
18
	int insert(Connection con, CustomerRecord customerRecord) throws SQLException;
19
	@Update
20
	int update(Connection con, CustomerRecord customerRecord) throws SQLException;
21
22
	@DeleteWith
23
	@From(CustomerRecord.class)
24
	int delete(Connection con, String recordId) throws SQLException;
25
26
	@DeleteWith
27
	@Batch
28
	@From(CustomerRecord.class)
29
	int[] delete(Connection con, @Batch String[] recordId) throws SQLException;
30
	
31
	@Nullable
32
	@SelectOne
33
	CustomerRecord query(Connection con, String recordId) throws SQLException;
34
	
35
	@OrderBy("ORDER BY create_time ASC")
36
	@SelectList
37
	List<CustomerRecord> queryList(Connection con, String professorId)throws SQLException;	
38
39
}

+ 25 - 0
src/main/java/com/ekexiu/console/system/dao/MyCustomerDao.java

@ -0,0 +1,25 @@
1
package com.ekexiu.console.system.dao;
2
3
import com.ekexiu.console.system.po.MyCustomer;
4
import org.jfw.apt.annotation.Nullable;
5
import org.jfw.apt.orm.annotation.dao.DAO;
6
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
7
import org.jfw.apt.orm.annotation.dao.method.operator.PageSelect;
8
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
9
import org.jfw.apt.orm.annotation.dao.param.Like;
10
import org.jfw.util.PageQueryResult;
11
12
import java.sql.Connection;
13
import java.sql.SQLException;
14
15
@DAO
16
public interface MyCustomerDao {
17
	@Nullable
18
	@SelectOne
19
	MyCustomer query(Connection con, String powerId) throws SQLException;
20
	
21
	@PageSelect
22
	@OrderBy(" ORDER BY create_time desc")
23
	PageQueryResult<MyCustomer> query(Connection con, @Like String name, @Like String address, @Like String orgname, @Nullable String powType, @Nullable String cuserId, int pageSize, int pageNo) throws SQLException;
24
25
}

+ 12 - 16
src/main/java/com/ekexiu/console/system/dao/OrgDao.java

@ -1,25 +1,17 @@
1 1
package com.ekexiu.console.system.dao;
2 2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5

3
import com.ekexiu.console.system.po.Organization;
6 4
import org.jfw.apt.annotation.Nullable;
7 5
import org.jfw.apt.orm.annotation.dao.Batch;
8 6
import org.jfw.apt.orm.annotation.dao.DAO;
9 7
import org.jfw.apt.orm.annotation.dao.method.From;
10 8
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
11
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
12
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
13
import org.jfw.apt.orm.annotation.dao.method.operator.PageSelect;
14
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
15
import org.jfw.apt.orm.annotation.dao.method.operator.Update;
16
import org.jfw.apt.orm.annotation.dao.param.Alias;
17
import org.jfw.apt.orm.annotation.dao.param.GtEq;
18
import org.jfw.apt.orm.annotation.dao.param.Like;
19
import org.jfw.apt.orm.annotation.dao.param.LtEq;
9
import org.jfw.apt.orm.annotation.dao.method.operator.*;
10
import org.jfw.apt.orm.annotation.dao.param.*;
20 11
import org.jfw.util.PageQueryResult;
21 12

22
import com.ekexiu.console.system.po.Organization;
13
import java.sql.Connection;
14
import java.sql.SQLException;
23 15

24 16
@DAO
25 17
public interface OrgDao {
@ -32,7 +24,7 @@ public interface OrgDao {
32 24
	@DeleteWith
33 25
	@From(Organization.class)
34 26
	int delete(Connection con, String id) throws SQLException;
35
	
27

36 28
	@DeleteWith
37 29
	@Batch
38 30
	@From(Organization.class)
@ -42,9 +34,13 @@ public interface OrgDao {
42 34
	@SelectOne
43 35
	Organization query(Connection con, String id) throws SQLException;
44 36

37
	@UpdateWith
38
	@From(Organization.class)
39
	int updateAuthStatus(Connection con,String id,@Set String authStatus)throws SQLException;
40

45 41
	@PageSelect
46 42
	@OrderBy(" ORDER BY NAME")
47
	PageQueryResult<Organization> query(Connection con, @Nullable @Like String name, @Nullable String type, @GtEq @Nullable @Alias("createTime") String bt,
48
			@LtEq @Nullable @Alias("createTime") String et, int pageSize, int pageNo) throws SQLException;
43
	PageQueryResult<Organization> query(Connection con, @Nullable @Like String name, @Nullable String orgType, @GtEq @Nullable @Alias("createTime") String bt,
44
										@LtEq @Nullable @Alias("createTime") String et, int pageSize, int pageNo) throws SQLException;
49 45

50 46
}

+ 36 - 0
src/main/java/com/ekexiu/console/system/dao/ProfessorDao.java

@ -0,0 +1,36 @@
1
package com.ekexiu.console.system.dao;
2
3
import com.ekexiu.console.system.po.Professor;
4
import org.jfw.apt.orm.annotation.dao.DAO;
5
import org.jfw.apt.orm.annotation.dao.method.From;
6
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
7
import org.jfw.apt.orm.annotation.dao.method.operator.Update;
8
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
9
import org.jfw.apt.orm.annotation.dao.param.Set;
10
11
import java.sql.Connection;
12
import java.sql.SQLException;
13
14
/**
15
 * Created by TT on 2017/4/6.
16
 */
17
@DAO
18
public abstract class ProfessorDao {
19
    @Insert
20
    public abstract int insert(Connection con, Professor professor) throws SQLException;
21
22
    @Update
23
    public abstract int update(Connection con, Professor professor) throws SQLException;
24
25
    @UpdateWith
26
    @From(Professor.class)
27
    public abstract int updateAuthStatus(Connection con, String id, @Set Integer authStatus) throws SQLException;
28
29
    @UpdateWith
30
    @From(Professor.class)
31
    public abstract int updateAuthStatusExpert(Connection con,String id,@Set Integer authStatusExpert)throws SQLException;
32
33
    @UpdateWith
34
    @From(Professor.class)
35
    public abstract int updateAuthType(Connection con, String id, @Set Integer authType) throws SQLException;
36
}

+ 21 - 0
src/main/java/com/ekexiu/console/system/dao/UserCountDao.java

@ -0,0 +1,21 @@
1
package com.ekexiu.console.system.dao;
2
3
import com.ekexiu.console.system.po.UserCount;
4
import org.jfw.apt.orm.annotation.dao.DAO;
5
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
6
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
7
8
import java.sql.Connection;
9
import java.sql.SQLException;
10
import java.util.List;
11
12
/**
13
 * Created by TT on 2017/4/17.
14
 */
15
@DAO
16
public interface UserCountDao {
17
18
    @SelectList
19
    @OrderBy("ORDER BY CREATE_TIME")
20
    List<UserCount> query(Connection con)throws SQLException;
21
}

+ 15 - 20
src/main/java/com/ekexiu/console/system/dao/UserDao.java

@ -1,30 +1,17 @@
1 1
package com.ekexiu.console.system.dao;
2 2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5

3
import com.ekexiu.console.system.po.User;
6 4
import org.jfw.apt.annotation.Nullable;
7 5
import org.jfw.apt.orm.annotation.dao.Batch;
8 6
import org.jfw.apt.orm.annotation.dao.DAO;
9 7
import org.jfw.apt.orm.annotation.dao.Dynamic;
10
import org.jfw.apt.orm.annotation.dao.method.From;
11
import org.jfw.apt.orm.annotation.dao.method.IncludeFixSet;
12
import org.jfw.apt.orm.annotation.dao.method.Or;
13
import org.jfw.apt.orm.annotation.dao.method.SetSentence;
14
import org.jfw.apt.orm.annotation.dao.method.Where;
15
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
16
import org.jfw.apt.orm.annotation.dao.method.operator.PageSelect;
17
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
18
import org.jfw.apt.orm.annotation.dao.method.operator.Update;
19
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
20
import org.jfw.apt.orm.annotation.dao.param.Alias;
21
import org.jfw.apt.orm.annotation.dao.param.GtEq;
22
import org.jfw.apt.orm.annotation.dao.param.Like;
23
import org.jfw.apt.orm.annotation.dao.param.LtEq;
24
import org.jfw.apt.orm.annotation.dao.param.Set;
8
import org.jfw.apt.orm.annotation.dao.method.*;
9
import org.jfw.apt.orm.annotation.dao.method.operator.*;
10
import org.jfw.apt.orm.annotation.dao.param.*;
25 11
import org.jfw.util.PageQueryResult;
26 12

27
import com.ekexiu.console.system.po.User;
13
import java.sql.Connection;
14
import java.sql.SQLException;
28 15

29 16
@DAO
30 17
public interface UserDao {
@ -71,8 +58,16 @@ public interface UserDao {
71 58
	int dsiable(Connection con, String id) throws SQLException;
72 59

73 60
	@PageSelect
74
	public PageQueryResult<User> pageQuery(Connection con, @Nullable @Like String name, @Nullable Boolean actived, @Nullable String mobile,
61
	PageQueryResult<User> pageQuery(Connection con, @Nullable @Like String name, @Nullable Boolean actived, @Nullable String mobile,
75 62
			@Nullable String email, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageNo, int pageSize)
76 63
			throws SQLException;
77 64

65
	@DeleteWith
66
	@From(User.class)
67
	int delete(Connection con, String id) throws SQLException;
68

69
	@DeleteWith
70
	@Batch
71
	@From(User.class)
72
	int[] delete(Connection con, @Batch String[] id) throws SQLException;
78 73
}

+ 25 - 0
src/main/java/com/ekexiu/console/system/dao/ViewCustomerDao.java

@ -0,0 +1,25 @@
1
package com.ekexiu.console.system.dao;
2
3
import com.ekexiu.console.system.po.ViewCustomer;
4
import org.jfw.apt.annotation.Nullable;
5
import org.jfw.apt.orm.annotation.dao.DAO;
6
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
7
import org.jfw.apt.orm.annotation.dao.method.operator.PageSelect;
8
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
9
import org.jfw.apt.orm.annotation.dao.param.Like;
10
import org.jfw.util.PageQueryResult;
11
12
import java.sql.Connection;
13
import java.sql.SQLException;
14
15
@DAO
16
public interface ViewCustomerDao {
17
	@Nullable
18
	@SelectOne
19
	ViewCustomer query(Connection con, String id) throws SQLException;
20
	
21
	@PageSelect
22
	@OrderBy(" ORDER BY create_time")
23
	PageQueryResult<ViewCustomer> query(Connection con, @Like String name, @Like String address, @Like String orgname, @Nullable Integer sendMailStatus, int pageSize, int pageNo) throws SQLException;
24
25
}

+ 68 - 0
src/main/java/com/ekexiu/console/system/po/AuthApply.java

@ -0,0 +1,68 @@
1
package com.ekexiu.console.system.po;
2
3
import com.ekexiu.console.basepo.CreateTimeSupported;
4
import org.jfw.apt.orm.annotation.entry.Column;
5
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
6
import org.jfw.apt.orm.annotation.entry.Table;
7
import org.jfw.apt.orm.core.defaultImpl.WIntHandler;
8
import org.jfw.apt.orm.core.enums.DE;
9
10
/**
11
 * Created by TT on 2017/3/30.
12
 */
13
@PrimaryKey("authApplyId")
14
@Table
15
public class AuthApply implements CreateTimeSupported {
16
17
    private String authApplyId;
18
    private String professorId;
19
    private Integer applyType;
20
    private Integer solveStatus;
21
    private String createTime;
22
23
    @Column(DE.id_32)
24
    public String getAuthApplyId() {
25
        return authApplyId;
26
    }
27
28
    public void setAuthApplyId(String authApplyId) {
29
        this.authApplyId = authApplyId;
30
    }
31
32
    @Column(DE.id_32)
33
    public String getProfessorId() {
34
        return professorId;
35
    }
36
37
    public void setProfessorId(String professorId) {
38
        this.professorId = professorId;
39
    }
40
41
    @Column(handlerClass = WIntHandler.class, dbType = "INT", insertable = true, nullable = false, renewable = false, queryable = true)
42
    public Integer getApplyType() {
43
        return applyType;
44
    }
45
46
    public void setApplyType(Integer applyType) {
47
        this.applyType = applyType;
48
    }
49
50
    @Column(handlerClass = WIntHandler.class, dbType = "INT", insertable = true, nullable = false, renewable = true, queryable = true)
51
    public Integer getSolveStatus() {
52
        return solveStatus;
53
    }
54
55
    public void setSolveStatus(Integer solveStatus) {
56
        this.solveStatus = solveStatus;
57
    }
58
59
    @Override
60
    public String getCreateTime() {
61
        return createTime;
62
    }
63
64
    @Override
65
    public void setCreateTime(String createTime) {
66
        this.createTime = createTime;
67
    }
68
}

+ 42 - 0
src/main/java/com/ekexiu/console/system/po/AuthImage.java

@ -0,0 +1,42 @@
1
package com.ekexiu.console.system.po;
2
3
import org.jfw.apt.orm.annotation.entry.Column;
4
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
5
import org.jfw.apt.orm.annotation.entry.Table;
6
import org.jfw.apt.orm.core.enums.DE;
7
8
/**
9
 * Created by TT on 2017/3/31.
10
 */
11
@Table
12
@PrimaryKey("authImageId")
13
public class AuthImage {
14
    private String authImageId;
15
    private String authApplyId;
16
    private String authSrc;
17
18
    @Column(DE.id_32)
19
    public String getAuthImageId() {
20
        return authImageId;
21
    }
22
    public void setAuthImageId(String authImageId) {
23
        this.authImageId = authImageId;
24
    }
25
26
    @Column(DE.id_32)
27
    public String getAuthApplyId() {
28
        return authApplyId;
29
    }
30
    public void setAuthApplyId(String authApplyId) {
31
        this.authApplyId = authApplyId;
32
    }
33
34
    @Column(DE.string_de)
35
    public String getAuthSrc() {
36
        return authSrc;
37
    }
38
    public void setAuthSrc(String authSrc) {
39
        this.authSrc = authSrc;
40
    }
41
42
}

+ 69 - 0
src/main/java/com/ekexiu/console/system/po/CustPower.java

@ -0,0 +1,69 @@
1
package com.ekexiu.console.system.po;
2
3
import com.ekexiu.console.basepo.CreateTimeSupported;
4
import com.ekexiu.console.basepo.DescpSupported;
5
import com.ekexiu.console.basepo.ModifyTimeSupported;
6
import org.jfw.apt.orm.annotation.entry.Column;
7
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
8
import org.jfw.apt.orm.annotation.entry.Table;
9
import org.jfw.apt.orm.core.enums.DE;
10
11
@PrimaryKey("powerId")
12
@Table("customer_power")
13
public class CustPower implements CreateTimeSupported,ModifyTimeSupported,DescpSupported {
14
	private String powerId;
15
	private String cuserId;
16
	private String professorId;
17
	private String createTime;
18
	private String powType;
19
	private String modifyTime;
20
	private String descp;
21
	
22
	@Column(DE.id_32)
23
	public String getPowerId() {
24
		return powerId;
25
	}
26
	public void setPowerId(String powerId) {
27
		this.powerId = powerId;
28
	}
29
	@Column(DE.String_de)
30
	public String getCuserId() {
31
		return cuserId;
32
	}
33
	public void setCuserId(String cuserId) {
34
		this.cuserId = cuserId;
35
	}
36
	@Column(DE.String_de)
37
	public String getProfessorId() {
38
		return professorId;
39
	}
40
	public void setProfessorId(String professorId) {
41
		this.professorId = professorId;
42
	}
43
	public String getCreateTime() {
44
		return createTime;
45
	}
46
	public void setCreateTime(String createTime) {
47
		this.createTime = createTime;
48
	}
49
	@Column(DE.String_de)
50
	public String getPowType() {
51
		return powType;
52
	}
53
	public void setPowType(String powType) {
54
		this.powType = powType;
55
	}
56
	public String getModifyTime() {
57
		return modifyTime;
58
	}
59
	public void setModifyTime(String modifyTime) {
60
		this.modifyTime = modifyTime;
61
	}
62
	public String getDescp() {
63
		return descp;
64
	}
65
	public void setDescp(String descp) {
66
		this.descp = descp;
67
	}
68
69
}

+ 59 - 0
src/main/java/com/ekexiu/console/system/po/CustomerRecord.java

@ -0,0 +1,59 @@
1
package com.ekexiu.console.system.po;
2
3
import com.ekexiu.console.basepo.CreateTimeSupported;
4
import com.ekexiu.console.basepo.DescpSupported;
5
import org.jfw.apt.orm.annotation.entry.Column;
6
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
7
import org.jfw.apt.orm.annotation.entry.Table;
8
import org.jfw.apt.orm.core.enums.DE;
9
10
@PrimaryKey("recordId")
11
@Table("customer_record")
12
public class CustomerRecord implements CreateTimeSupported,DescpSupported {
13
	private String recordId;
14
	private String professorId;
15
	private String cuserId;
16
	private String descp;
17
	private String createTime;
18
	private String cuserName;
19
	@Column(DE.id_32)
20
	public String getRecordId() {
21
		return recordId;
22
	}
23
	public void setRecordId(String recordId) {
24
		this.recordId = recordId;
25
	}	
26
	@Column(DE.String_de)
27
	public String getProfessorId() {
28
		return professorId;
29
	}
30
	public void setProfessorId(String professorId) {
31
		this.professorId = professorId;
32
	}
33
	@Column(DE.String_de)
34
	public String getCuserId() {
35
		return cuserId;
36
	}
37
	public void setCuserId(String cuserId) {
38
		this.cuserId = cuserId;
39
	}
40
	public String getDescp() {
41
		return descp;
42
	}
43
	public void setDescp(String descp) {
44
		this.descp = descp;
45
	}
46
	public String getCreateTime() {
47
		return createTime;
48
	}
49
	public void setCreateTime(String createTime) {
50
		this.createTime = createTime;
51
	}
52
	@Column(DE.String_de)
53
	public String getCuserName() {
54
		return cuserName;
55
	}
56
	public void setCuserName(String cuserName) {
57
		this.cuserName = cuserName;
58
	}
59
}

+ 200 - 0
src/main/java/com/ekexiu/console/system/po/MyCustomer.java

@ -0,0 +1,200 @@
1
package com.ekexiu.console.system.po;
2
3
import com.ekexiu.console.basepo.CreateTimeSupported;
4
import com.ekexiu.console.basepo.DescpSupported;
5
import com.ekexiu.console.basepo.ModifyTimeSupported;
6
import org.jfw.apt.orm.annotation.entry.Column;
7
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
8
import org.jfw.apt.orm.annotation.entry.Table;
9
import org.jfw.apt.orm.core.enums.DE;
10
11
@PrimaryKey("powerId")
12
@Table("view_my_customer")
13
public class MyCustomer  implements CreateTimeSupported,ModifyTimeSupported,DescpSupported {
14
	private String powerId;
15
	private String id;
16
	private String email;
17
	private String phone;
18
	private String subject;	
19
	private String industry;
20
	private String department;
21
	private String office;
22
	private String orgId;
23
	private String title;
24
	private String name;
25
	private String address;
26
	private Integer authentication;
27
	private String authType;
28
	private Integer authStatus;
29
	private Integer sortFirst;
30
	private Integer authStatusExpert;
31
	private String orgname;
32
	private String descp;
33
	private String createTime;
34
	private String powType;
35
	private String modifyTime;
36
	private String cuserId;
37
//String_de大写的是允许为空,小写的是不允许为空
38
	@Column(DE.string_de)
39
	public String getPowerId() {
40
		return powerId;
41
	}
42
	public void setPowerId(String powerId) {
43
		this.powerId = powerId;
44
	}
45
	@Column(DE.String_de)
46
	public String getId() {
47
		return id;
48
	}
49
	public void setId(String id) {
50
		this.id = id;
51
	}
52
	@Column(DE.String_de)
53
	public String getEmail() {
54
		return email;
55
	}
56
57
	public void setEmail(String email) {
58
		this.email = email;
59
	}
60
	@Column(DE.String_de)
61
	public String getSubject() {
62
		return subject;
63
	}
64
65
	public void setSubject(String subject) {
66
		this.subject = subject;
67
	}
68
	@Column(DE.String_de)
69
	public String getPhone() {
70
		return phone;
71
	}
72
73
	public void setPhone(String phone) {
74
		this.phone = phone;
75
	}
76
	@Column(DE.String_de)
77
	public String getIndustry() {
78
		return industry;
79
	}
80
	public void setIndustry(String industry) {
81
		this.industry = industry;
82
	}
83
	@Column(DE.String_de)
84
	public String getDepartment() {
85
		return department;
86
	}
87
	public void setDepartment(String department) {
88
		this.department = department;
89
	}
90
	@Column(DE.String_de)
91
	public String getOffice() {
92
		return office;
93
	}
94
	public void setOffice(String office) {
95
		this.office = office;
96
	}
97
	@Column(DE.String_de)
98
	public String getOrgId() {
99
		return orgId;
100
	}
101
	public void setOrgId(String orgId) {
102
		this.orgId = orgId;
103
	}
104
	@Column(DE.String_de)
105
	public String getTitle() {
106
		return title;
107
	}
108
	public void setTitle(String title) {
109
		this.title = title;
110
	}
111
	@Column(DE.String_de)
112
	public String getName() {
113
		return name;
114
	}
115
	public void setName(String name) {
116
		this.name = name;
117
	}
118
	@Column(DE.String_de)
119
	public String getAddress() {
120
		return address;
121
	}
122
	public void setAddress(String address) {
123
		this.address = address;
124
	}
125
	@Column(DE.Int_de)
126
	public Integer getAuthentication() {
127
		return authentication;
128
	}
129
	public void setAuthentication(Integer authentication) {
130
		this.authentication = authentication;
131
	}
132
	@Column(DE.String_de)
133
	public String getAuthType() {
134
		return authType;
135
	}
136
	public void setAuthType(String authType) {
137
		this.authType = authType;
138
	}
139
	@Column(DE.Int_de)
140
	public Integer getAuthStatus() {
141
		return authStatus;
142
	}
143
	public void setAuthStatus(Integer authStatus) {
144
		this.authStatus = authStatus;
145
	}
146
	@Column(DE.Int_de)
147
	public Integer getSortFirst() {
148
		return sortFirst;
149
	}
150
	public void setSortFirst(Integer sortFirst) {
151
		this.sortFirst = sortFirst;
152
	}
153
	@Column(DE.Int_de)
154
	public Integer getAuthStatusExpert() {
155
		return authStatusExpert;
156
	}
157
	public void setAuthStatusExpert(Integer authStatusExpert) {
158
		this.authStatusExpert = authStatusExpert;
159
	}
160
161
	@Column(DE.String_de)
162
	public String getOrgname() {
163
		return orgname;
164
	}
165
	public void setOrgname(String orgname) {
166
		this.orgname = orgname;
167
	}
168
	public String getDescp() {
169
		return descp;
170
	}
171
	public void setDescp(String descp) {
172
		this.descp = descp;
173
	}
174
	public String getCreateTime() {
175
		return createTime;
176
	}
177
	public void setCreateTime(String createTime) {
178
		this.createTime = createTime;
179
	}
180
	public String getModifyTime() {
181
		return modifyTime;
182
	}
183
	public void setModifyTime(String modifyTime) {
184
		this.modifyTime = modifyTime;
185
	}
186
	@Column(DE.String_de)
187
	public String getPowType() {
188
		return powType;
189
	}
190
	public void setPowType(String powType) {
191
		this.powType = powType;
192
	}
193
	@Column(DE.String_de)
194
	public String getCuserId() {
195
		return cuserId;
196
	}
197
	public void setCuserId(String cuserId) {
198
		this.cuserId = cuserId;
199
	}
200
}

+ 18 - 8
src/main/java/com/ekexiu/console/system/po/Organization.java

@ -11,14 +11,24 @@ import com.ekexiu.console.basepo.ModifyTimeSupported;
11 11
@PrimaryKey("id")
12 12
@Table
13 13
public class Organization implements CreateTimeSupported,ModifyTimeSupported,DescpSupported{
14
	
14

15 15
	private String id;
16 16
	private String name;
17
	private String type;
17
	private String orgType;
18 18
	private String createTime;
19 19
	private String modifyTime;
20 20
	private String descp;
21
	
21
	private String authStatus;
22

23
	@Column(DE.string_de)
24
	public String getAuthStatus() {
25
		return authStatus;
26
	}
27

28
	public void setAuthStatus(String authStatus) {
29
		this.authStatus = authStatus;
30
	}
31

22 32
	@Column(DE.id_32)
23 33
	public String getId() {
24 34
		return id;
@ -34,11 +44,11 @@ public class Organization implements CreateTimeSupported,ModifyTimeSupported,Des
34 44
		this.name = name;
35 45
	}
36 46
	@Column(DE.singleChar)
37
	public String getType() {
38
		return type;
47
	public String getOrgType() {
48
		return orgType;
39 49
	}
40
	public void setType(String type) {
41
		this.type = type;
50
	public void setOrgType(String orgType) {
51
		this.orgType = orgType;
42 52
	}
43 53
	public String getCreateTime() {
44 54
		return createTime;
@ -58,5 +68,5 @@ public class Organization implements CreateTimeSupported,ModifyTimeSupported,Des
58 68
	public void setDescp(String descp) {
59 69
		this.descp = descp;
60 70
	}
61
	
71

62 72
}

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

@ -0,0 +1,277 @@
1
package com.ekexiu.console.system.po;
2
3
import org.jfw.apt.orm.annotation.entry.Column;
4
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
5
import org.jfw.apt.orm.annotation.entry.Table;
6
import org.jfw.apt.orm.core.defaultImpl.BigDecimalHandler;
7
import org.jfw.apt.orm.core.defaultImpl.FixLenStringHandler;
8
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
9
import org.jfw.apt.orm.core.defaultImpl.WIntHandler;
10
import org.jfw.apt.orm.core.enums.DE;
11
12
import java.math.BigDecimal;
13
14
/**
15
 * Created by TT on 2017/4/6.
16
 */
17
@PrimaryKey("id")
18
@Table
19
public class Professor {
20
    private String id;
21
    private String name;
22
    private String office;
23
    /**
24
     *职称
25
     */
26
    private String title;
27
    private String orgId;
28
    private String department;
29
    /**
30
     * 学科
31
     */
32
    private String subject;
33
    /**
34
     * 应用行业
35
     */
36
    private String industry;
37
    private String province;
38
    private String address;
39
    private String descp;
40
    private String createTime;
41
    private String modifyTime;
42
    private BigDecimal starLevel;
43
    private Integer consultCount;
44
    private BigDecimal starAvg;
45
    private Integer authentication;
46
    private Integer authType;
47
    private Integer authStatus;
48
    private Integer authStatusExpert;
49
    private String phone;
50
    private String email;
51
    private Integer sortFirst;
52
53
    @Column(value=DE.String_de,dbType="TEXT")
54
    public String getOffice() {
55
        return office;
56
    }
57
58
    public void setOffice(String office) {
59
        this.office = office;
60
    }
61
62
    @Column(handlerClass=StringHandler.class,dbType="TEXT",insertable=false,nullable=true,renewable=false,queryable=true)
63
    public String getSubject() {
64
        return subject;
65
    }
66
67
    public void setSubject(String subject) {
68
        this.subject = subject;
69
    }
70
    @Column(handlerClass=StringHandler.class,dbType="TEXT",insertable=false,nullable=true,renewable=false,queryable=true)
71
    public String getIndustry() {
72
        return industry;
73
    }
74
75
    public void setIndustry(String industry) {
76
        this.industry = industry;
77
    }
78
79
    /**
80
     * 所在省份
81
     * @return
82
     */
83
    @Column(DE.String_de)
84
    public String getProvince() {
85
        return province;
86
    }
87
88
    public void setProvince(String province) {
89
        this.province = province;
90
    }
91
92
    /**
93
     * 所在城市
94
     * @return
95
     */
96
    @Column(DE.String_de)
97
    public String getAddress() {
98
        return address;
99
    }
100
101
    public void setAddress(String address) {
102
        this.address = address;
103
    }
104
105
    /**
106
     * 机构部门
107
     * @return
108
     */
109
    @Column(DE.String_de)
110
    public String getDepartment() {
111
        return department;
112
    }
113
114
    public void setDepartment(String department) {
115
        this.department = department;
116
    }
117
118
    /**
119
     * 任职机构ID
120
     * @return
121
     */
122
    @Column(handlerClass=FixLenStringHandler.class,dbType="CHAR(32)",insertable=true,nullable=true,renewable=true,queryable=true)
123
    public String getOrgId() {
124
        return orgId;
125
    }
126
127
    public void setOrgId(String orgId) {
128
        this.orgId = orgId;
129
    }
130
131
    /**
132
     * 职称
133
     * @return
134
     */
135
    @Column(DE.String_de)
136
    public String getTitle() {
137
        return title;
138
    }
139
140
    public void setTitle(String title) {
141
        this.title = title;
142
    }
143
144
    @Column(DE.id_32)
145
    public String getId() {
146
        return id;
147
    }
148
149
    public void setId(String id) {
150
        this.id = id;
151
    }
152
153
    @Column(DE.dictCaption)
154
    public String getName() {
155
        return name;
156
    }
157
158
    public void setName(String name) {
159
        this.name = name;
160
    }
161
    @Column(handlerClass=StringHandler.class,dbType="TEXT",insertable=false,nullable=true,renewable=false,queryable=true)
162
    public String getDescp() {
163
        return descp;
164
    }
165
166
    public void setDescp(String descp) {
167
        this.descp = descp;
168
    }
169
170
    public String getCreateTime() {
171
        return createTime;
172
    }
173
174
    public void setCreateTime(String createTime) {
175
        this.createTime = createTime;
176
    }
177
178
    public String getModifyTime() {
179
        return modifyTime;
180
    }
181
182
    public void setModifyTime(String modifyTime) {
183
        this.modifyTime = modifyTime;
184
    }
185
186
    @Column(handlerClass=BigDecimalHandler.class,dbType="DECIMAL",insertable=false,nullable=false,renewable=false,queryable=true)
187
    public BigDecimal getStarLevel() {
188
        return starLevel;
189
    }
190
191
    public void setStarLevel(BigDecimal starLevel) {
192
        this.starLevel = starLevel;
193
    }
194
195
    @Column(handlerClass=WIntHandler.class,dbType="INT",insertable=false,nullable=false,renewable=false,queryable=true)
196
    public Integer getConsultCount() {
197
        return consultCount;
198
    }
199
200
    public void setConsultCount(Integer consultCount) {
201
        this.consultCount = consultCount;
202
    }
203
204
    @Column(handlerClass=BigDecimalHandler.class,dbType="DECIMAL",insertable=false,nullable=false,renewable=false,queryable=true)
205
    public BigDecimal getStarAvg() {
206
        return starAvg;
207
    }
208
209
    public void setStarAvg(BigDecimal starAvg) {
210
        this.starAvg = starAvg;
211
    }
212
213
    @Column(handlerClass=WIntHandler.class,dbType="INT",insertable=true,nullable=true,renewable=false,queryable=true)
214
    public Integer getAuthentication() {
215
        return authentication;
216
    }
217
218
    public void setAuthentication(Integer authentication) {
219
        this.authentication = authentication;
220
    }
221
222
    @Column(handlerClass=WIntHandler.class,dbType="INT",insertable=false,nullable=false,renewable=false,queryable=true)
223
    public Integer getAuthType() {
224
        return authType;
225
    }
226
227
    public void setAuthType(Integer authType) {
228
        this.authType = authType;
229
    }
230
231
    @Column(handlerClass=WIntHandler.class,dbType="INT",insertable=false,nullable=false,renewable=false,queryable=true)
232
    public Integer getAuthStatus() {
233
        return authStatus;
234
    }
235
236
    public void setAuthStatus(Integer authStatus) {
237
        this.authStatus = authStatus;
238
    }
239
240
    @Column(handlerClass=WIntHandler.class,dbType="INT",insertable=false,nullable=true,renewable=false,queryable=true)
241
    public Integer getAuthStatusExpert() {
242
        return authStatusExpert;
243
    }
244
245
    public void setAuthStatusExpert(Integer authStatusExpert) {
246
        this.authStatusExpert = authStatusExpert;
247
    }
248
249
    @Column(value= DE.String_de,dbType="VARCHAR(20)")
250
    public String getPhone() {
251
        return phone;
252
    }
253
254
    public void setPhone(String phone) {
255
        this.phone = phone;
256
    }
257
258
    @Column(DE.Email_de)
259
    public String getEmail() {
260
        return email;
261
    }
262
263
    public void setEmail(String email) {
264
        this.email = email;
265
    }
266
267
    @Column(handlerClass=WIntHandler.class,dbType="INT",insertable=false,nullable=false,renewable=false,queryable=true)
268
    public Integer getSortFirst() {
269
        return sortFirst;
270
    }
271
272
    public void setSortFirst(Integer sortFirst) {
273
        this.sortFirst = sortFirst;
274
    }
275
276
}
277

+ 2 - 2
src/main/java/com/ekexiu/console/system/po/User.java

@ -14,8 +14,8 @@ import com.ekexiu.console.basepo.DescpSupported;
14 14
import com.ekexiu.console.basepo.ModifyTimeSupported;
15 15

16 16
@PrimaryKey("id")
17
@Uniques({ @Unique(name = "UN_LUSER_MOBILE", clolumns = "mobile"), @Unique(name = "UN_LUSER_EMAIL", clolumns = "email") })
18
@Table("LUSER")
17
@Uniques({ @Unique(name = "UN_CUSER_MOBILE", clolumns = "mobile"), @Unique(name = "UN_CUSER_EMAIL", clolumns = "email") })
18
@Table("CUSER")
19 19
public class User implements CreateTimeSupported, ModifyTimeSupported, DescpSupported {
20 20

21 21
	private String id;

+ 63 - 0
src/main/java/com/ekexiu/console/system/po/UserCount.java

@ -0,0 +1,63 @@
1
package com.ekexiu.console.system.po;
2
3
import org.jfw.apt.orm.annotation.entry.Column;
4
import org.jfw.apt.orm.annotation.entry.Table;
5
import org.jfw.apt.orm.core.defaultImpl.WIntHandler;
6
import org.jfw.apt.orm.core.enums.DE;
7
8
/**
9
 * Created by TT on 2017/4/17.
10
 */
11
@Table("view_user_count")
12
public class UserCount {
13
    private String createTime;
14
    private Integer znum;
15
    private Integer jnum;
16
    private Integer ljnum;
17
    private Integer lznum;
18
19
    @Column(DE.string_de)
20
    public String getCreateTime() {
21
        return createTime;
22
    }
23
24
    public void setCreateTime(String createTime) {
25
        this.createTime = createTime;
26
    }
27
28
    @Column(handlerClass = WIntHandler.class, dbType = "INT", insertable = true, nullable = false, renewable = false, queryable = true)
29
    public Integer getZnum() {
30
        return znum;
31
    }
32
33
    public void setZnum(Integer znum) {
34
        this.znum = znum;
35
    }
36
37
    @Column(handlerClass = WIntHandler.class, dbType = "INT", insertable = true, nullable = false, renewable = false, queryable = true)
38
    public Integer getJnum() {
39
        return jnum;
40
    }
41
42
    public void setJnum(Integer jnum) {
43
        this.jnum = jnum;
44
    }
45
46
    @Column(handlerClass = WIntHandler.class, dbType = "INT", insertable = true, nullable = false, renewable = false, queryable = true)
47
    public Integer getLjnum() {
48
        return ljnum;
49
    }
50
51
    public void setLjnum(Integer ljnum) {
52
        this.ljnum = ljnum;
53
    }
54
55
    @Column(handlerClass = WIntHandler.class, dbType = "INT", insertable = true, nullable = false, renewable = false, queryable = true)
56
    public Integer getLznum() {
57
        return lznum;
58
    }
59
60
    public void setLznum(Integer lznum) {
61
        this.lznum = lznum;
62
    }
63
}

+ 200 - 0
src/main/java/com/ekexiu/console/system/po/ViewCustomer.java

@ -0,0 +1,200 @@
1
package com.ekexiu.console.system.po;
2
3
import com.ekexiu.console.basepo.CreateTimeSupported;
4
import org.jfw.apt.orm.annotation.entry.Column;
5
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
6
import org.jfw.apt.orm.annotation.entry.Table;
7
import org.jfw.apt.orm.core.enums.DE;
8
9
@PrimaryKey("id")
10
@Table("view_customer")
11
public class ViewCustomer implements CreateTimeSupported {
12
	private String id;
13
	private String email;
14
	private String phone;
15
	private String mobilePhone;
16
	private String createTime;
17
	private String activeTime;
18
	private Integer sendMailStatus;//send_mail_status;数据库带下横线的要去掉然后用横线后的单词第一个字母大写,int类型代表不能为空,Integer类型是可以为空,下面都要设定这个类型,在查询条件那个地方还要设定可以为空
19
	private String inviteCode;
20
	private String inviterId;
21
	private String userType;
22
	private String industry;
23
	private String department;
24
	private String office;
25
	private String orgId;
26
	private String title;
27
	private String name;
28
	private String address;
29
	private Integer authentication;
30
	private String authType;
31
	private Integer authStatus;
32
	private Integer sortFirst;
33
	private Integer authStatusExpert;
34
	private String orgname;
35
//String_de大写的是允许为空,小写的是不允许为空
36
	@Column(DE.String_de)
37
	public String getId() {
38
		return id;
39
	}
40
	public void setId(String id) {
41
		this.id = id;
42
	}
43
	@Column(DE.String_de)
44
	public String getEmail() {
45
		return email;
46
	}
47
48
	public void setEmail(String email) {
49
		this.email = email;
50
	}
51
	@Column(DE.String_de)
52
	public String getPhone() {
53
		return phone;
54
	}
55
56
	public void setPhone(String phone) {
57
		this.phone = phone;
58
	}
59
	@Column(DE.String_de)
60
	public String getMobilePhone() {
61
		return mobilePhone;
62
	}
63
64
	public void setMobilePhone(String mobilePhone) {
65
		this.mobilePhone = mobilePhone;
66
	}
67
	@Column(DE.String_de)
68
	public String getCreateTime() {
69
		return createTime;
70
	}
71
	public void setCreateTime(String createTime) {
72
		this.createTime = createTime;
73
	}
74
	@Column(DE.String_de)
75
	public String getActiveTime() {
76
		return activeTime;
77
	}
78
	public void setActiveTime(String activeTime) {
79
		this.activeTime = activeTime;
80
	}
81
	@Column(DE.Int_de)
82
	public Integer getSendMailStatus() {
83
		return sendMailStatus;
84
	}
85
	public void setSendMailStatus(Integer sendMailStatus) {
86
		this.sendMailStatus = sendMailStatus;
87
	}
88
	@Column(DE.String_de)
89
	public String getInviteCode() {
90
		return inviteCode;
91
	}
92
	public void setInviteCode(String inviteCode) {
93
		this.inviteCode = inviteCode;
94
	}
95
	@Column(DE.String_de)
96
	public String getInviterId() {
97
		return inviterId;
98
	}
99
	public void setInviterId(String inviterId) {
100
		this.inviterId = inviterId;
101
	}
102
	@Column(DE.String_de)
103
	public String getUserType() {
104
		return userType;
105
	}
106
	public void setUserType(String userType) {
107
		this.userType = userType;
108
	}
109
	@Column(DE.String_de)
110
	public String getIndustry() {
111
		return industry;
112
	}
113
	public void setIndustry(String industry) {
114
		this.industry = industry;
115
	}
116
	@Column(DE.String_de)
117
	public String getDepartment() {
118
		return department;
119
	}
120
	public void setDepartment(String department) {
121
		this.department = department;
122
	}
123
	@Column(DE.String_de)
124
	public String getOffice() {
125
		return office;
126
	}
127
	public void setOffice(String office) {
128
		this.office = office;
129
	}
130
	@Column(DE.String_de)
131
	public String getOrgId() {
132
		return orgId;
133
	}
134
	public void setOrgId(String orgId) {
135
		this.orgId = orgId;
136
	}
137
	@Column(DE.String_de)
138
	public String getTitle() {
139
		return title;
140
	}
141
	public void setTitle(String title) {
142
		this.title = title;
143
	}
144
	@Column(DE.String_de)
145
	public String getName() {
146
		return name;
147
	}
148
	public void setName(String name) {
149
		this.name = name;
150
	}
151
	@Column(DE.String_de)
152
	public String getAddress() {
153
		return address;
154
	}
155
	public void setAddress(String address) {
156
		this.address = address;
157
	}
158
	@Column(DE.Int_de)
159
	public Integer getAuthentication() {
160
		return authentication;
161
	}
162
	public void setAuthentication(Integer authentication) {
163
		this.authentication = authentication;
164
	}
165
	@Column(DE.String_de)
166
	public String getAuthType() {
167
		return authType;
168
	}
169
	public void setAuthType(String authType) {
170
		this.authType = authType;
171
	}
172
	@Column(DE.Int_de)
173
	public Integer getAuthStatus() {
174
		return authStatus;
175
	}
176
	public void setAuthStatus(Integer authStatus) {
177
		this.authStatus = authStatus;
178
	}
179
	@Column(DE.Int_de)
180
	public Integer getSortFirst() {
181
		return sortFirst;
182
	}
183
	public void setSortFirst(Integer sortFirst) {
184
		this.sortFirst = sortFirst;
185
	}
186
	@Column(DE.Int_de)
187
	public Integer getAuthStatusExpert() {
188
		return authStatusExpert;
189
	}
190
	public void setAuthStatusExpert(Integer authStatusExpert) {
191
		this.authStatusExpert = authStatusExpert;
192
	}
193
	@Column(DE.String_de)
194
	public String getOrgname() {
195
		return orgname;
196
	}
197
	public void setOrgname(String orgname) {
198
		this.orgname = orgname;
199
	}
200
}

+ 107 - 0
src/main/java/com/ekexiu/console/system/pojo/AuthApplyInfo.java

@ -0,0 +1,107 @@
1
package com.ekexiu.console.system.pojo;
2
3
import com.ekexiu.console.system.po.AuthApply;
4
import org.jfw.apt.orm.annotation.entry.CalcColumn;
5
import org.jfw.apt.orm.annotation.entry.ExtendView;
6
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
7
import org.jfw.apt.orm.core.defaultImpl.WIntHandler;
8
9
/**
10
 * Created by TT on 2017/3/31.
11
 */
12
@ExtendView(fromSentence = "auth_apply a INNER JOIN professor p on a.professor_id = p.id  LEFT JOIN organization o on p.org_id = o.id",tableAlias = "a")
13
public class AuthApplyInfo extends AuthApply {
14
15
    //private String authSrc;
16
    private String name;
17
    private String orgName;
18
    private String office;
19
    private String title;
20
    private String department;
21
    private Integer authStatusExpert;
22
    private Integer authStatus;
23
    private String idCard;
24
25
    @CalcColumn(handlerClass = StringHandler.class,column = "p.id_card")
26
    public String getIdCard() {
27
        return idCard;
28
    }
29
30
    public void setIdCard(String idCard) {
31
        this.idCard = idCard;
32
    }
33
34
    @CalcColumn(handlerClass = StringHandler.class,column = "p.phone")
35
    public String getPhone() {
36
        return phone;
37
    }
38
39
    public void setPhone(String phone) {
40
        this.phone = phone;
41
    }
42
43
    private String phone;
44
45
    @CalcColumn(handlerClass=StringHandler.class,column="p.name")
46
    public String getName() {
47
        return name;
48
    }
49
50
    public void setName(String name) {
51
        this.name = name;
52
    }
53
54
    @CalcColumn(handlerClass=StringHandler.class,column="o.name")
55
    public String getOrgName() {
56
        return orgName;
57
    }
58
59
    public void setOrgName(String orgName) {
60
        this.orgName = orgName;
61
    }
62
63
    @CalcColumn(handlerClass=StringHandler.class,column="p.office")
64
    public String getOffice() {
65
        return office;
66
    }
67
68
    public void setOffice(String office) {
69
        this.office = office;
70
    }
71
72
    @CalcColumn(handlerClass=StringHandler.class,column="p.title")
73
    public String getTitle() {
74
        return title;
75
    }
76
77
    public void setTitle(String title) {
78
        this.title = title;
79
    }
80
81
    @CalcColumn(handlerClass=StringHandler.class,column="p.department")
82
    public String getDepartment() {
83
        return department;
84
    }
85
86
    public void setDepartment(String department) {
87
        this.department = department;
88
    }
89
90
    @CalcColumn(handlerClass=WIntHandler.class,column="p.auth_status_expert")
91
    public Integer getAuthStatusExpert() {
92
        return authStatusExpert;
93
    }
94
95
    public void setAuthStatusExpert(Integer authStatusExpert) {
96
        this.authStatusExpert = authStatusExpert;
97
    }
98
99
    @CalcColumn(handlerClass=WIntHandler.class,column="p.auth_status")
100
    public Integer getAuthStatus() {
101
        return authStatus;
102
    }
103
104
    public void setAuthStatus(Integer authStatus) {
105
        this.authStatus = authStatus;
106
    }
107
}

+ 45 - 0
src/main/java/com/ekexiu/console/system/pojo/OrgApplyInfo.java

@ -0,0 +1,45 @@
1
package com.ekexiu.console.system.pojo;
2
3
import com.ekexiu.console.system.po.AuthApply;
4
import org.jfw.apt.orm.annotation.entry.CalcColumn;
5
import org.jfw.apt.orm.annotation.entry.ExtendView;
6
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
7
8
/**
9
 * Created by TT on 2017/4/13.
10
 */
11
@ExtendView(fromSentence = "auth_apply a INNER JOIN organization o on a.professor_id = o.id LEFT JOIN org_user ou on ou.id = o.id", tableAlias = "a")
12
public class OrgApplyInfo extends AuthApply {
13
14
    private String name;
15
    private String email;
16
    private String authStatus;
17
18
    @CalcColumn(handlerClass = StringHandler.class, column = "o.name")
19
    public String getName() {
20
21
        return name;
22
    }
23
24
    public void setName(String name) {
25
        this.name = name;
26
    }
27
28
    @CalcColumn(handlerClass = StringHandler.class,column = "ou.email")
29
    public String getEmail() {
30
        return email;
31
    }
32
33
    public void setEmail(String email) {
34
        this.email = email;
35
    }
36
37
    @CalcColumn(handlerClass = StringHandler.class,column = "o.auth_status")
38
    public String getAuthStatus() {
39
        return authStatus;
40
    }
41
42
    public void setAuthStatus(String authStatus) {
43
        this.authStatus = authStatus;
44
    }
45
}

+ 130 - 0
src/main/java/com/ekexiu/console/system/service/AuthApplyService.java

@ -0,0 +1,130 @@
1
package com.ekexiu.console.system.service;
2
3
import com.ekexiu.console.system.dao.AuthApplyDao;
4
import com.ekexiu.console.system.dao.OrgDao;
5
import com.ekexiu.console.system.dao.ProfessorDao;
6
import com.ekexiu.console.system.po.AuthApply;
7
import com.ekexiu.console.system.pojo.AuthApplyInfo;
8
import com.ekexiu.console.system.pojo.OrgApplyInfo;
9
import org.jfw.apt.annotation.Autowrie;
10
import org.jfw.apt.annotation.DefaultValue;
11
import org.jfw.apt.annotation.Nullable;
12
import org.jfw.apt.orm.annotation.dao.param.Set;
13
import org.jfw.apt.web.annotation.Path;
14
import org.jfw.apt.web.annotation.operate.Get;
15
import org.jfw.apt.web.annotation.operate.Post;
16
import org.jfw.apt.web.annotation.operate.Put;
17
import org.jfw.apt.web.annotation.param.JdbcConn;
18
import org.jfw.apt.web.annotation.param.PathVar;
19
import org.jfw.apt.web.annotation.param.RequestBody;
20
import org.jfw.util.PageQueryResult;
21
22
import java.sql.Connection;
23
import java.sql.SQLException;
24
import java.util.List;
25
26
/**
27
 * Created by TT on 2017/3/30.
28
 */
29
30
@Path("/authApply")
31
public class AuthApplyService {
32
33
    @Autowrie
34
    private AuthApplyDao authApplyDao;
35
    @Autowrie
36
    private ProfessorDao professorDao;
37
    @Autowrie
38
    private OrgDao orgDao;
39
40
    public OrgDao getOrgDao() {
41
        return orgDao;
42
    }
43
44
    public void setOrgDao(OrgDao orgDao) {
45
        this.orgDao = orgDao;
46
    }
47
48
    public ProfessorDao getProfessorDao() {
49
        return professorDao;
50
    }
51
52
    public void setProfessorDao(ProfessorDao professorDao) {
53
        this.professorDao = professorDao;
54
    }
55
56
    public AuthApplyDao getAuthApplyDao() {
57
        return authApplyDao;
58
    }
59
60
    public void setAuthApplyDao(AuthApplyDao authApplyDao) {
61
        this.authApplyDao = authApplyDao;
62
    }
63
64
    @Put
65
    @Path
66
    public void update(@JdbcConn(true) Connection con, @RequestBody AuthApply authApply) throws SQLException {
67
        this.authApplyDao.update(con, authApply);
68
    }
69
70
    @Post
71
    @Path("/solveStatus")
72
    public void updateSolveStatus(@JdbcConn(true) Connection con, @Set Integer solveStatus, String authApplyId) throws SQLException {
73
        this.authApplyDao.updateSolveStatus(con, solveStatus, authApplyId);
74
    }
75
76
    @Post
77
    @Path("/state")
78
    public void updateState(@JdbcConn(true) Connection con, String authApplyId, Integer solveStatus, Integer applyType, String professorId) throws SQLException {
79
        this.authApplyDao.updateSolveStatus(con, solveStatus, authApplyId);
80
        if (applyType == 1) {
81
            this.professorDao.updateAuthStatus(con, professorId, solveStatus);
82
        } else if (applyType == 2) {
83
            this.professorDao.updateAuthStatusExpert(con, professorId, solveStatus);
84
            if (solveStatus == 3) {
85
                this.professorDao.updateAuthType(con, professorId, 1);
86
            }
87
        } else if (applyType == 3) {
88
            this.orgDao.updateAuthStatus(con, professorId, String.valueOf(solveStatus));
89
        }
90
    }
91
92
    @Get
93
    @Path("/qaRealName")
94
    public List<AuthApplyInfo> queryRealName(@JdbcConn Connection con) throws SQLException {
95
        return this.authApplyDao.queryInfo(con, 1);
96
    }
97
98
    @Get
99
    @Path("/qaExpert")
100
    public List<AuthApplyInfo> queryExpert(@JdbcConn Connection con) throws SQLException {
101
        return this.authApplyDao.queryInfo(con, 2);
102
    }
103
104
    @Get
105
    @Path("/qaOrg")
106
    public List<OrgApplyInfo> queryOrg(@JdbcConn Connection con) throws SQLException {
107
        return this.authApplyDao.queryOrgInfo(con,3);
108
    }
109
110
    @Get
111
    @Path("/info/{authApplyId}")
112
    public AuthApplyInfo query(@JdbcConn Connection con, @PathVar String authApplyId) throws SQLException {
113
        return this.authApplyDao.queryInfo(con, authApplyId);
114
    }
115
116
    @Get
117
    @Path("/orgInfo/{authApplyId}")
118
    public OrgApplyInfo queryOrgInfo(@JdbcConn Connection con,@PathVar String authApplyId)throws SQLException {
119
        return this.authApplyDao.queryOrgInfo(con,authApplyId);
120
    }
121
122
123
    @Get
124
    @Path("/pq")
125
    public PageQueryResult<AuthApply> pageQuery(@JdbcConn Connection con, @Nullable String professorId, @Nullable Integer solveStatus, @Nullable String bt, @Nullable String et, @DefaultValue("1") int pageNo, @DefaultValue("10") int pageSize) throws SQLException {
126
        return this.authApplyDao.query(con, professorId, solveStatus, bt, et, pageSize, pageNo);
127
    }
128
129
130
}

+ 48 - 0
src/main/java/com/ekexiu/console/system/service/AuthImageService.java

@ -0,0 +1,48 @@
1
package com.ekexiu.console.system.service;
2
3
import com.ekexiu.console.system.dao.AuthApplyDao;
4
import com.ekexiu.console.system.dao.AuthImageDao;
5
import com.ekexiu.console.system.po.AuthImage;
6
import org.jfw.apt.annotation.Autowrie;
7
import org.jfw.apt.web.annotation.Path;
8
import org.jfw.apt.web.annotation.operate.Get;
9
import org.jfw.apt.web.annotation.param.JdbcConn;
10
import org.jfw.apt.web.annotation.param.PathVar;
11
12
import java.sql.Connection;
13
import java.sql.SQLException;
14
import java.util.List;
15
16
/**
17
 * Created by TT on 2017/4/12.
18
 */
19
@Path("/authImage")
20
public class AuthImageService {
21
    @Autowrie
22
    private AuthImageDao authImageDao;
23
24
    @Autowrie
25
    private AuthApplyDao authApplyDao;
26
27
    public AuthImageDao getAuthImageDao() {
28
        return authImageDao;
29
    }
30
31
    public void setAuthImageDao(AuthImageDao authImageDao) {
32
        this.authImageDao = authImageDao;
33
    }
34
35
    public AuthApplyDao getAuthApplyDao() {
36
        return authApplyDao;
37
    }
38
39
    public void setAuthApplyDao(AuthApplyDao authApplyDao) {
40
        this.authApplyDao = authApplyDao;
41
    }
42
43
    @Get
44
    @Path("/byApply/{authApplyId}")
45
    public List<AuthImage> query(@JdbcConn Connection con, @PathVar String authApplyId) throws SQLException {
46
        return this.authImageDao.query(con, authApplyId);
47
    }
48
}

+ 57 - 0
src/main/java/com/ekexiu/console/system/service/CustPowerService.java

@ -0,0 +1,57 @@
1
package com.ekexiu.console.system.service;
2
3
import com.ekexiu.console.system.dao.CustPowerDao;
4
import com.ekexiu.console.system.po.CustPower;
5
import org.jfw.apt.annotation.Autowrie;
6
import org.jfw.apt.orm.annotation.dao.param.Set;
7
import org.jfw.apt.web.annotation.Path;
8
import org.jfw.apt.web.annotation.operate.Delete;
9
import org.jfw.apt.web.annotation.operate.Post;
10
import org.jfw.apt.web.annotation.param.JdbcConn;
11
import org.jfw.apt.web.annotation.param.PathVar;
12
import org.jfw.apt.web.annotation.param.RequestParam;
13
import org.jfw.util.StringUtil;
14
15
import java.sql.Connection;
16
import java.sql.SQLException;
17
18
@Path("/sys/cpow")
19
public class CustPowerService {
20
	@Autowrie
21
	private CustPowerDao custPowerDao;
22
23
	public CustPowerDao getCustPowerDao() {
24
		return custPowerDao;
25
	}
26
27
	public void setCustPowerDao(CustPowerDao custPowerDao) {
28
		this.custPowerDao = custPowerDao;
29
	}
30
	@Post
31
	@Path
32
	public String insert(@JdbcConn(true) Connection con, @RequestParam(excludeFields = { "createTime", "modifyTime", "powerId" }) CustPower cpower)
33
			throws SQLException {
34
		String powerId = StringUtil.buildUUID();
35
		cpower.setPowerId(powerId);
36
		this.custPowerDao.insert(con, cpower);
37
		return powerId;
38
	}
39
40
	@Post
41
	@Path("/updatacpow")
42
	public void update(@JdbcConn(true) Connection con, @Set String powType, String powerId) throws SQLException {
43
	    this.custPowerDao.update(con, powType, powerId);
44
	}
45
	@Delete
46
	@Path("/id/{powerId}")
47
	public void deleteOne(@JdbcConn(true) Connection con,@PathVar String powerId)throws SQLException{
48
		this.custPowerDao.delete(con, powerId);
49
	}
50
	
51
	
52
	@Post
53
	@Path("/del")
54
	public void delete(@JdbcConn(true) Connection con,String[] ids)throws SQLException{
55
		this.custPowerDao.delete(con, ids);
56
	}	
57
}

+ 73 - 0
src/main/java/com/ekexiu/console/system/service/CustomerRecordService.java

@ -0,0 +1,73 @@
1
package com.ekexiu.console.system.service;
2
3
import com.ekexiu.console.system.dao.CustomerRecordDao;
4
import com.ekexiu.console.system.po.CustomerRecord;
5
import org.jfw.apt.annotation.Autowrie;
6
import org.jfw.apt.annotation.Nullable;
7
import org.jfw.apt.web.annotation.Path;
8
import org.jfw.apt.web.annotation.operate.Delete;
9
import org.jfw.apt.web.annotation.operate.Get;
10
import org.jfw.apt.web.annotation.operate.Post;
11
import org.jfw.apt.web.annotation.operate.Put;
12
import org.jfw.apt.web.annotation.param.JdbcConn;
13
import org.jfw.apt.web.annotation.param.PathVar;
14
import org.jfw.apt.web.annotation.param.RequestBody;
15
import org.jfw.apt.web.annotation.param.RequestParam;
16
import org.jfw.util.StringUtil;
17
18
import java.sql.Connection;
19
import java.sql.SQLException;
20
import java.util.List;
21
22
@Path("/sys/crecord")
23
public class CustomerRecordService {
24
	@Autowrie
25
	private CustomerRecordDao customerRecordDao;
26
27
	public CustomerRecordDao getCustomerRecordDao() {
28
		return customerRecordDao;
29
	}
30
31
	public void setCustomerRecordDao(CustomerRecordDao customerRecordDao) {
32
		this.customerRecordDao = customerRecordDao;
33
	}
34
	@Post
35
	@Path
36
	public String insert(@JdbcConn(true) Connection con, @RequestParam(excludeFields = { "createTime", "recordId" }) CustomerRecord customerRecord)
37
			throws SQLException {
38
		String recordId = StringUtil.buildUUID();
39
		customerRecord.setRecordId(recordId);
40
		this.customerRecordDao.insert(con, customerRecord);
41
		return recordId;
42
	}
43
44
	@Put
45
	@Path
46
	public void update(@JdbcConn(true) Connection con,@RequestBody CustomerRecord customerRecord)throws SQLException{
47
		this.customerRecordDao.update(con, customerRecord);
48
	}
49
	@Delete
50
	@Path("/id/{recordId}")
51
	public void deleteOne(@JdbcConn(true) Connection con,@PathVar String recordId)throws SQLException{
52
		this.customerRecordDao.delete(con, recordId);
53
	}
54
	
55
	@Post
56
	@Path("/del")
57
	public void delete(@JdbcConn(true) Connection con,String[] ids)throws SQLException{
58
		this.customerRecordDao.delete(con, ids);
59
	}
60
	@Get
61
	@Path("/id/{id}")
62
	public CustomerRecord query(@JdbcConn Connection con, @PathVar String id)throws SQLException{
63
		return this.customerRecordDao.query(con, id);
64
	}
65
	@Get
66
	@Path("/qrecord")
67
//	public List<CustomerRecord> queryList(@JdbcConn Connection con, @Nullable String professorId,@LoginUser ConsoleAuthUser user) throws SQLException {
68
//		return this.customerRecordDao.queryList(con, professorId,user.getId());
69
	public List<CustomerRecord> queryList(@JdbcConn Connection con, @Nullable String professorId) throws SQLException {
70
		return this.customerRecordDao.queryList(con, professorId);
71
	}
72
73
}

+ 58 - 0
src/main/java/com/ekexiu/console/system/service/MyCustomerService.java

@ -0,0 +1,58 @@
1
package com.ekexiu.console.system.service;
2
3
import com.ekexiu.console.system.dao.MyCustomerDao;
4
import com.ekexiu.console.system.po.MyCustomer;
5
import com.ekexiu.console.system.vo.ConsoleAuthUser;
6
import org.jfw.apt.annotation.Autowrie;
7
import org.jfw.apt.annotation.DefaultValue;
8
import org.jfw.apt.annotation.Nullable;
9
import org.jfw.apt.orm.annotation.dao.param.Like;
10
import org.jfw.apt.web.annotation.LoginUser;
11
import org.jfw.apt.web.annotation.Path;
12
import org.jfw.apt.web.annotation.operate.Get;
13
import org.jfw.apt.web.annotation.param.JdbcConn;
14
import org.jfw.apt.web.annotation.param.PathVar;
15
import org.jfw.util.PageQueryResult;
16
17
import java.sql.Connection;
18
import java.sql.SQLException;
19
20
21
@Path("/sys/mycustomer")
22
public class MyCustomerService {
23
	@Autowrie
24
	private MyCustomerDao myCustomerDao;
25
26
	public MyCustomerDao getMyCustomerDao() {
27
		return myCustomerDao;
28
	}
29
30
	public void setMyCustomerDao(MyCustomerDao myCustomerDao) {
31
		this.myCustomerDao = myCustomerDao;
32
	}
33
	@Get
34
	@Path("/pq")
35
	public PageQueryResult<MyCustomer> pageQuery(@JdbcConn Connection con, @Nullable @Like String name, @Nullable @Like String address, @Nullable @Like String orgname, @Nullable String powType, @LoginUser ConsoleAuthUser user, @DefaultValue("1") int pageNo, @DefaultValue("10") int pageSize)throws SQLException{
36
		String Cname ="%";
37
		if(name!=null)
38
		{
39
			Cname="%"+name+"%";
40
		}
41
		String Caddress ="%";
42
		if(address!=null)
43
		{
44
			Caddress="%"+address+"%";
45
		}
46
		String Corgname ="%";
47
		if(orgname!=null)
48
		{
49
			Corgname="%"+orgname+"%";
50
		}
51
		return this.myCustomerDao.query(con, Cname, Caddress, Corgname, powType,user.getId(), pageSize, pageNo);
52
	}	
53
	@Get
54
	@Path("/id/{id}")
55
	public MyCustomer query(@JdbcConn Connection con, @PathVar String id)throws SQLException{
56
		return this.myCustomerDao.query(con, id);
57
	}	
58
}

+ 51 - 0
src/main/java/com/ekexiu/console/system/service/StatistService.java

@ -0,0 +1,51 @@
1
package com.ekexiu.console.system.service;
2
3
import com.ekexiu.console.system.dao.UserCountDao;
4
import com.ekexiu.console.system.po.UserCount;
5
import org.jfw.apt.annotation.Autowrie;
6
import org.jfw.apt.web.annotation.Path;
7
import org.jfw.apt.web.annotation.operate.Get;
8
import org.jfw.apt.web.annotation.param.JdbcConn;
9
import org.jfw.util.jdbc.JdbcUtil;
10
11
import java.sql.Connection;
12
import java.sql.SQLException;
13
import java.util.HashMap;
14
import java.util.List;
15
import java.util.Map;
16
17
/**
18
 * Created by TT on 2017/4/10.
19
 */
20
@Path("/operation/statist")
21
public class StatistService {
22
23
    @Autowrie
24
    private UserCountDao userCountDao;
25
26
    public UserCountDao getUserCountDao() {
27
        return userCountDao;
28
    }
29
30
    public void setUserCountDao(UserCountDao userCountDao) {
31
        this.userCountDao = userCountDao;
32
    }
33
34
    @Get
35
    @Path("/user")
36
    public Map<String, Object> user(@JdbcConn Connection con) throws SQLException {
37
        Map<String, Object> map = new HashMap<String, Object>();
38
        map.put("all",JdbcUtil.queryInt(con,"SELECT COUNT(1) FROM LUSER",0));
39
        map.put("actived",JdbcUtil.queryInt(con,"SELECT COUNT(1) FROM LUSER WHERE PASSWD<>'11111111111111111111111111111111'",0));
40
        map.put("byRole", JdbcUtil.queryMaps(con, "select authentication code,count(1) num from professor group by code"));
41
        map.put("byType", JdbcUtil.queryMaps(con, "select auth_type code,count(1) num from professor group by code"));
42
        return map;
43
    }
44
45
    @Get
46
    @Path("/userCount")
47
    public List<UserCount> query(@JdbcConn Connection con) throws SQLException {
48
        return this.userCountDao.query(con);
49
    }
50
51
}

+ 23 - 16
src/main/java/com/ekexiu/console/system/service/UserService.java

@ -1,10 +1,11 @@
1 1
package com.ekexiu.console.system.service;
2 2

3
import java.io.IOException;
4
import java.sql.Connection;
5
import java.sql.SQLException;
6
import java.util.ArrayList;
7

3
import com.ekexiu.console.service.Upload;
4
import com.ekexiu.console.system.dao.RoleDao;
5
import com.ekexiu.console.system.dao.UserDao;
6
import com.ekexiu.console.system.po.Role;
7
import com.ekexiu.console.system.po.User;
8
import com.ekexiu.console.system.vo.ConsoleAuthUser;
8 9
import org.jfw.apt.annotation.Autowrie;
9 10
import org.jfw.apt.annotation.DefaultValue;
10 11
import org.jfw.apt.annotation.Nullable;
@ -15,23 +16,17 @@ import org.jfw.apt.web.annotation.method.SetSession;
15 16
import org.jfw.apt.web.annotation.operate.Get;
16 17
import org.jfw.apt.web.annotation.operate.Post;
17 18
import org.jfw.apt.web.annotation.operate.Put;
18
import org.jfw.apt.web.annotation.param.FieldParam;
19
import org.jfw.apt.web.annotation.param.JdbcConn;
20
import org.jfw.apt.web.annotation.param.PathVar;
21
import org.jfw.apt.web.annotation.param.RequestBody;
22
import org.jfw.apt.web.annotation.param.RequestParam;
19
import org.jfw.apt.web.annotation.param.*;
23 20
import org.jfw.util.PageQueryResult;
24 21
import org.jfw.util.StringUtil;
25 22
import org.jfw.util.auth.AuthUtil;
26 23
import org.jfw.util.exception.JfwBaseException;
27 24
import org.jfw.util.web.fileupload.UploadItemIterator;
28 25

29
import com.ekexiu.console.service.Upload;
30
import com.ekexiu.console.system.dao.RoleDao;
31
import com.ekexiu.console.system.dao.UserDao;
32
import com.ekexiu.console.system.po.Role;
33
import com.ekexiu.console.system.po.User;
34
import com.ekexiu.console.system.vo.ConsoleAuthUser;
26
import java.io.IOException;
27
import java.sql.Connection;
28
import java.sql.SQLException;
29
import java.util.ArrayList;
35 30

36 31
@Path("/sys/user")
37 32
public class UserService extends Upload {
@ -175,4 +170,16 @@ public class UserService extends Upload {
175 170
	public Upload.UploadItem head(@org.jfw.apt.web.annotation.param.Upload UploadItemIterator it) throws JfwBaseException, IOException {
176 171
		return this.upload(it);
177 172
	}
173

174
	@Post
175
	@Path("/del")
176
	public void delete(@JdbcConn(true)Connection con,String[] ids)throws SQLException {
177
		this.userDao.delete(con, ids);
178
	}
179

180
	@Get
181
	@Path("/id/{id}")
182
	public User query(@JdbcConn Connection con, @PathVar String id)throws SQLException {
183
		return this.userDao.queryById(con, id);
184
	}
178 185
}

+ 56 - 0
src/main/java/com/ekexiu/console/system/service/ViewCustomerService.java

@ -0,0 +1,56 @@
1
package com.ekexiu.console.system.service;
2
3
import com.ekexiu.console.system.dao.ViewCustomerDao;
4
import com.ekexiu.console.system.po.ViewCustomer;
5
import org.jfw.apt.annotation.Autowrie;
6
import org.jfw.apt.annotation.DefaultValue;
7
import org.jfw.apt.annotation.Nullable;
8
import org.jfw.apt.orm.annotation.dao.param.Like;
9
import org.jfw.apt.web.annotation.Path;
10
import org.jfw.apt.web.annotation.operate.Get;
11
import org.jfw.apt.web.annotation.param.JdbcConn;
12
import org.jfw.apt.web.annotation.param.PathVar;
13
import org.jfw.util.PageQueryResult;
14
15
import java.sql.Connection;
16
import java.sql.SQLException;
17
18
@Path("/sys/viewcustomer")
19
public class ViewCustomerService {
20
	@Autowrie
21
	private ViewCustomerDao viewCustomerDao;
22
23
	public ViewCustomerDao getViewCustomerDao() {
24
		return viewCustomerDao;
25
	}
26
27
	public void setViewCustomerDao(ViewCustomerDao viewCustomerDao) {
28
		this.viewCustomerDao = viewCustomerDao;
29
	}
30
	@Get
31
	@Path("/pq")
32
	public PageQueryResult<ViewCustomer> pageQuery(@JdbcConn Connection con, @Nullable @Like String name, @Nullable @Like String address, @Nullable @Like String orgname, @Nullable Integer sendMailStatus, @DefaultValue("1") int pageNo, @DefaultValue("10") int pageSize)throws SQLException{
33
		String Cname ="%";
34
		if(name!=null)
35
		{
36
			Cname="%"+name+"%";
37
		}
38
		String Caddress ="%";
39
		if(address!=null)
40
		{
41
			Caddress="%"+address+"%";
42
		}
43
		String Corgname ="%";
44
		if(orgname!=null)
45
		{
46
			Corgname="%"+orgname+"%";
47
		}
48
		return this.viewCustomerDao.query(con, Cname, Caddress, Corgname, sendMailStatus, pageSize, pageNo);
49
	}
50
51
	@Get
52
	@Path("/id/{id}")
53
	public ViewCustomer query(@JdbcConn Connection con, @PathVar String id)throws SQLException{
54
		return this.viewCustomerDao.query(con, id);
55
	}	
56
}