Browse Source

专家录入和专家录入审核功能

XMTT 7 years ago
parent
commit
26868f7229

+ 8 - 0
src/main/java/com/ekexiu/console/system/dao/OrgDao.java

@ -4,12 +4,14 @@ import com.ekexiu.console.system.po.Organization;
4 4
import com.ekexiu.console.system.pojo.OrganizationInfo;
5 5
import org.jfw.apt.annotation.Nullable;
6 6
import org.jfw.apt.orm.annotation.dao.Batch;
7
import org.jfw.apt.orm.annotation.dao.Column;
7 8
import org.jfw.apt.orm.annotation.dao.DAO;
8 9
import org.jfw.apt.orm.annotation.dao.method.From;
9 10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
10 11
import org.jfw.apt.orm.annotation.dao.method.operator.*;
11 12
import org.jfw.apt.orm.annotation.dao.param.Like;
12 13
import org.jfw.apt.orm.annotation.dao.param.Set;
14
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
13 15
import org.jfw.util.PageQueryResult;
14 16

15 17
import java.sql.Connection;
@ -44,4 +46,10 @@ public interface OrgDao {
44 46
	@OrderBy(" ORDER BY create_time DESC")
45 47
	PageQueryResult<OrganizationInfo> query(Connection con,@Nullable @Like String inviterId, @Nullable @Like String name, @Nullable @Like String industry, @Nullable @Like String subject, @Nullable @Like String city, int pageSize, int pageNo) throws SQLException;
46 48

49
	@Nullable
50
	@QueryVal
51
	@Column(handlerClass=StringHandler.class,value="id")
52
	@From(Organization.class)
53
	String queryByName(Connection con,String name)throws SQLException;
54

47 55
}

+ 30 - 7
src/main/java/com/ekexiu/console/system/dao/ProfessorDao.java

@ -1,12 +1,19 @@
1 1
package com.ekexiu.console.system.dao;
2 2
3 3
import com.ekexiu.console.system.po.Professor;
4
import com.ekexiu.console.system.pojo.ProfessorInfo;
5
import org.jfw.apt.annotation.Nullable;
6
import org.jfw.apt.orm.annotation.dao.Batch;
4 7
import org.jfw.apt.orm.annotation.dao.DAO;
5 8
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.IncludeFixSet;
10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
6 11
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.PageQuery;
7 13
import org.jfw.apt.orm.annotation.dao.method.operator.Update;
8 14
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
9
import org.jfw.apt.orm.annotation.dao.param.Set;
15
import org.jfw.apt.orm.annotation.dao.param.*;
16
import org.jfw.util.PageQueryResult;
10 17
11 18
import java.sql.Connection;
12 19
import java.sql.SQLException;
@ -15,22 +22,38 @@ import java.sql.SQLException;
15 22
 * Created by TT on 2017/4/6.
16 23
 */
17 24
@DAO
18
public abstract class ProfessorDao {
25
public interface ProfessorDao {
19 26
    @Insert
20
    public abstract int insert(Connection con, Professor professor) throws SQLException;
27
    int insert(Connection con, Professor professor) throws SQLException;
21 28
22 29
    @Update
23
    public abstract int update(Connection con, Professor professor) throws SQLException;
30
    int update(Connection con, Professor professor) throws SQLException;
24 31
25 32
    @UpdateWith
26 33
    @From(Professor.class)
27
    public abstract int updateAuthStatus(Connection con, String id, @Set Integer authStatus,@Set String idCard) throws SQLException;
34
    int updateAuthStatus(Connection con, String id, @Set Integer authStatus, @Set String idCard) throws SQLException;
28 35
29 36
    @UpdateWith
30 37
    @From(Professor.class)
31
    public abstract int updateAuthStatusExpert(Connection con,String id,@Set Integer authStatusExpert)throws SQLException;
38
    int updateAuthStatusExpert(Connection con, String id, @Set Integer authStatusExpert) throws SQLException;
32 39
33 40
    @UpdateWith
34 41
    @From(Professor.class)
35
    public abstract int updateAuthType(Connection con, String id, @Set Integer authType) throws SQLException;
42
    int updateAuthType(Connection con, String id, @Set Integer authType) throws SQLException;
43
44
    @PageQuery
45
    @OrderBy(" ORDER BY create_time DESC")
46
    PageQueryResult<ProfessorInfo> pageQuery(Connection con,@Nullable String enter,@Nullable @Like String orgName, @Nullable @Like String name, @Nullable Integer professorState,
47
                                             @Nullable @Alias("createTime") @GtEq String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
48
49
    @PageQuery
50
    @OrderBy(" ORDER BY professor_state desc,create_time desc")
51
    PageQueryResult<ProfessorInfo> pageQueryPerson(Connection con,String cuserId,@Nullable @Like String orgName, @Nullable @Like String name, @Nullable Integer professorState,
52
                                             @Nullable @Alias("createTime") @GtEq String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
53
54
    @Batch
55
    @IncludeFixSet("modifyTime")
56
    @UpdateWith
57
    @From(Professor.class)
58
    int[] updateProfessorState(Connection con, @Batch String[] id, @Set Integer professorState) throws SQLException;
36 59
}

+ 33 - 1
src/main/java/com/ekexiu/console/system/po/Professor.java

@ -1,5 +1,7 @@
1 1
package com.ekexiu.console.system.po;
2 2
3
import com.ekexiu.console.basepo.CreateTimeSupported;
4
import com.ekexiu.console.basepo.ModifyTimeSupported;
3 5
import org.jfw.apt.orm.annotation.entry.Column;
4 6
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
5 7
import org.jfw.apt.orm.annotation.entry.Table;
@ -16,7 +18,7 @@ import java.math.BigDecimal;
16 18
 */
17 19
@PrimaryKey("id")
18 20
@Table
19
public class Professor {
21
public class Professor implements CreateTimeSupported,ModifyTimeSupported {
20 22
    private String id;
21 23
    private String name;
22 24
    private String office;
@ -46,9 +48,39 @@ public class Professor {
46 48
    private Integer authType;
47 49
    private Integer authStatus;
48 50
    private Integer authStatusExpert;
51
    private String orgAuth;
49 52
    private String phone;
50 53
    private String email;
51 54
    private String idCard;
55
    private String cuserId;
56
    private Integer professorState;
57
58
    @Column(handlerClass=FixLenStringHandler.class,dbType="CHAR(1)",renewable=false)
59
    public String getOrgAuth() {
60
        return orgAuth;
61
    }
62
63
    public void setOrgAuth(String orgAuth) {
64
        this.orgAuth = orgAuth;
65
    }
66
67
    @Column(handlerClass=FixLenStringHandler.class,dbType="CHAR(32)",insertable=true,nullable=true,renewable=true,queryable=true)
68
    public String getCuserId() {
69
        return cuserId;
70
    }
71
72
    public void setCuserId(String cuserId) {
73
        this.cuserId = cuserId;
74
    }
75
76
    @Column(handlerClass=WIntHandler.class,dbType="INT",insertable=true,nullable=false,renewable=true,queryable=true)
77
    public Integer getProfessorState() {
78
        return professorState;
79
    }
80
81
    public void setProfessorState(Integer professorState) {
82
        this.professorState = professorState;
83
    }
52 84
53 85
    @Column(value= DE.String_de,dbType="VARCHAR(18)")
54 86
    public String getIdCard() {

+ 34 - 0
src/main/java/com/ekexiu/console/system/pojo/ProfessorInfo.java

@ -0,0 +1,34 @@
1
package com.ekexiu.console.system.pojo;
2
3
import com.ekexiu.console.system.po.Professor;
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/5/25.
10
 */
11
@ExtendView(fromSentence = "professor p LEFT JOIN cuser c on p.cuser_id = c.id LEFT JOIN organization o on p.org_id = o.id", tableAlias = "p")
12
public class ProfessorInfo extends Professor {
13
14
    private String enter;
15
    private String orgName;
16
17
    @CalcColumn(handlerClass = StringHandler.class, column = "o.name")
18
    public String getOrgName() {
19
        return orgName;
20
    }
21
22
    public void setOrgName(String orgName) {
23
        this.orgName = orgName;
24
    }
25
26
    @CalcColumn(handlerClass = StringHandler.class, column = "c.name")
27
    public String getEnter() {
28
        return enter;
29
    }
30
31
    public void setEnter(String enter) {
32
        this.enter = enter;
33
    }
34
}

+ 180 - 6
src/main/java/com/ekexiu/console/system/service/OrgService.java

@ -15,7 +15,11 @@ import org.jfw.apt.web.annotation.Path;
15 15
import org.jfw.apt.web.annotation.operate.Delete;
16 16
import org.jfw.apt.web.annotation.operate.Get;
17 17
import org.jfw.apt.web.annotation.operate.Post;
18
import org.jfw.apt.web.annotation.param.*;
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.RequestParam;
22
import org.jfw.util.JpgUtil;
19 23
import org.jfw.util.PageQueryResult;
20 24
import org.jfw.util.StringUtil;
21 25
import org.jfw.util.io.IoUtil;
@ -26,12 +30,79 @@ import java.sql.SQLException;
26 30

27 31
@Path("/sys/org")
28 32
public class OrgService extends com.ekexiu.console.service.Upload {
33
    private String defaultOrgType;
34

35
    /**
36
     * 默认企业认证状态为 0-未认证
37
     */
38
    private String defaultAuthStatus = "0";
29 39

30 40
    private File imagePath;
31 41
    private File tmpPath;
32 42
    private File orgPath;
43
    private int largeHeadPhotoWidth = 200;
44
    private int largeHeadPhotoHeight = 200;
45
    private int middleHeadPhotoWidth = 200;
46
    private int middleHeadPhotoHeight = 200;
47
    private int smallHeadPhotoWidth = 200;
48
    private int smallHeadPhotoHeight = 200;
49

50
    private File defaultHeadPhoto;
51
    private File defaultOrgLogo;
52
    private File defaultResourcePhoto;
53

54
    private byte[] dli;
55
    private byte[] dmi;
56
    private byte[] dsi;
57
    private byte[] dol;
58
    private byte[] dsl;
33 59
    public static final String DEFAULT_PW_STR = StringUtil.md5("12345678");
34 60

61
    @Autowrie
62
    private OrgDao orgDao;
63
    @Autowrie
64
    private OrgUserDao orgUserDao;
65

66
    public File getDefaultHeadPhoto() {
67
        return defaultHeadPhoto;
68
    }
69

70
    public void setDefaultHeadPhoto(File defaultHeadPhoto) {
71
        this.defaultHeadPhoto = defaultHeadPhoto;
72
    }
73

74
    public File getDefaultOrgLogo() {
75
        return defaultOrgLogo;
76
    }
77

78
    public void setDefaultOrgLogo(File defaultOrgLogo) {
79
        this.defaultOrgLogo = defaultOrgLogo;
80
    }
81

82
    public File getDefaultResourcePhoto() {
83
        return defaultResourcePhoto;
84
    }
85

86
    public void setDefaultResourcePhoto(File defaultResourcePhoto) {
87
        this.defaultResourcePhoto = defaultResourcePhoto;
88
    }
89

90
    public String getDefaultOrgType() {
91
        return defaultOrgType;
92
    }
93

94
    public void setDefaultOrgType(String defaultOrgType) {
95
        this.defaultOrgType = defaultOrgType;
96
    }
97

98
    public String getDefaultAuthStatus() {
99
        return defaultAuthStatus;
100
    }
101

102
    public void setDefaultAuthStatus(String defaultAuthStatus) {
103
        this.defaultAuthStatus = defaultAuthStatus;
104
    }
105

35 106
    public File getImagePath() {
36 107
        return imagePath;
37 108
    }
@ -57,11 +128,6 @@ public class OrgService extends com.ekexiu.console.service.Upload {
57 128
        this.orgPath = orgPath;
58 129
    }
59 130

60
    @Autowrie
61
    private OrgDao orgDao;
62
    @Autowrie
63
    private OrgUserDao orgUserDao;
64

65 131
    public OrgUserDao getOrgUserDao() {
66 132
        return orgUserDao;
67 133
    }
@ -78,6 +144,54 @@ public class OrgService extends com.ekexiu.console.service.Upload {
78 144
        this.orgDao = orgDao;
79 145
    }
80 146

147
    public int getLargeHeadPhotoWidth() {
148
        return largeHeadPhotoWidth;
149
    }
150

151
    public void setLargeHeadPhotoWidth(int largeHeadPhotoWidth) {
152
        this.largeHeadPhotoWidth = largeHeadPhotoWidth;
153
    }
154

155
    public int getLargeHeadPhotoHeight() {
156
        return largeHeadPhotoHeight;
157
    }
158

159
    public void setLargeHeadPhotoHeight(int largeHeadPhotoHeight) {
160
        this.largeHeadPhotoHeight = largeHeadPhotoHeight;
161
    }
162

163
    public int getMiddleHeadPhotoWidth() {
164
        return middleHeadPhotoWidth;
165
    }
166

167
    public void setMiddleHeadPhotoWidth(int middleHeadPhotoWidth) {
168
        this.middleHeadPhotoWidth = middleHeadPhotoWidth;
169
    }
170

171
    public int getMiddleHeadPhotoHeight() {
172
        return middleHeadPhotoHeight;
173
    }
174

175
    public void setMiddleHeadPhotoHeight(int middleHeadPhotoHeight) {
176
        this.middleHeadPhotoHeight = middleHeadPhotoHeight;
177
    }
178

179
    public int getSmallHeadPhotoWidth() {
180
        return smallHeadPhotoWidth;
181
    }
182

183
    public void setSmallHeadPhotoWidth(int smallHeadPhotoWidth) {
184
        this.smallHeadPhotoWidth = smallHeadPhotoWidth;
185
    }
186

187
    public int getSmallHeadPhotoHeight() {
188
        return smallHeadPhotoHeight;
189
    }
190

191
    public void setSmallHeadPhotoHeight(int smallHeadPhotoHeight) {
192
        this.smallHeadPhotoHeight = smallHeadPhotoHeight;
193
    }
194

81 195
    @Post
82 196
    @Path
83 197
    public String insert(@JdbcConn(true) Connection con, @RequestParam(excludeFields = {"createTime", "modifyTime", "id"}) Organization orgn)
@ -97,6 +211,43 @@ public class OrgService extends com.ekexiu.console.service.Upload {
97 211
        }
98 212
    }
99 213

214
    public void saveDefaultOrgLogo(String id) throws IOException {
215
        this.initDefaultImage();
216
        IoUtil.saveStream(new FileOutputStream(new File(this.orgPath, id + ".jpg")), this.dol, true);
217
    }
218

219
    private byte[] zoomImage(byte[] src, int w, int h) throws IOException {
220
        ByteArrayInputStream in = new ByteArrayInputStream(src);
221
        ByteArrayOutputStream out = new ByteArrayOutputStream();
222
        JpgUtil.zoom(in, out, w, h);
223
        out.flush();
224
        return out.toByteArray();
225
    }
226

227
    private void initDefaultImage() {
228
        if (this.dli != null)
229
            return;
230
        synchronized (this) {
231
            if (this.dli != null)
232
                return;
233
            try {
234
                byte[] dd = IoUtil.readStream(new FileInputStream(this.defaultHeadPhoto), true);
235
                this.dli = this.zoomImage(dd, this.largeHeadPhotoWidth, this.largeHeadPhotoHeight);
236
                this.dmi = this.zoomImage(dd, this.middleHeadPhotoWidth, this.middleHeadPhotoHeight);
237
                this.dsi = this.zoomImage(dd, this.smallHeadPhotoWidth, this.smallHeadPhotoHeight);
238
                this.dol = IoUtil.readStream(new FileInputStream(this.defaultOrgLogo), true);
239
                this.dsl = IoUtil.readStream(new FileInputStream(this.defaultResourcePhoto), true);
240
            } catch (IOException e) {
241
                this.dli = null;
242
                this.dmi = null;
243
                this.dsi = null;
244
                this.dol = null;
245
                this.dsl = null;
246
                throw new RuntimeException("init image error", e);
247
            }
248
        }
249
    }
250

100 251
    public boolean hasOrgLogo(String id) {
101 252
        String orgPath = this.orgPath+"/"+id+".jpg";
102 253
        File file = new File(orgPath);
@ -195,5 +346,28 @@ public class OrgService extends com.ekexiu.console.service.Upload {
195 346
        this.orgDao.delete(con, ids);
196 347
    }
197 348

349
    public String createOrganization(Connection con, String orgName) throws SQLException, IOException {
350
        String id = StringUtil.buildUUID();
351
        Organization org = new Organization();
352
        org.setId(id);
353
        org.setName(orgName);
354
        org.setOrgType(this.defaultOrgType);
355
        org.setAuthStatus(this.defaultAuthStatus);
356
        try {
357
            orgDao.insert(con, org);
358
            this.saveDefaultOrgLogo(id);
359
        } catch (SQLException e) {
360
            if ("23505".equals(e.getSQLState())) {
361
                con.rollback();
362
                id = orgDao.queryByName(con, orgName);
363
                if (id == null)
364
                    throw new RuntimeException("not fonud  with query organization by name");
365
                return id;
366
            }
367
            throw e;
368
        }
369
        return id;
370
    }
371

198 372

199 373
}

+ 122 - 0
src/main/java/com/ekexiu/console/system/service/ProfessorService.java

@ -0,0 +1,122 @@
1
package com.ekexiu.console.system.service;
2
3
import com.ekexiu.console.system.dao.OrgDao;
4
import com.ekexiu.console.system.dao.ProfessorDao;
5
import com.ekexiu.console.system.po.Professor;
6
import com.ekexiu.console.system.pojo.ProfessorInfo;
7
import com.ekexiu.console.system.vo.ConsoleAuthUser;
8
import org.jfw.apt.annotation.Autowrie;
9
import org.jfw.apt.annotation.DefaultValue;
10
import org.jfw.apt.annotation.Nullable;
11
import org.jfw.apt.web.annotation.LoginUser;
12
import org.jfw.apt.web.annotation.Path;
13
import org.jfw.apt.web.annotation.operate.Get;
14
import org.jfw.apt.web.annotation.operate.Post;
15
import org.jfw.apt.web.annotation.operate.Put;
16
import org.jfw.apt.web.annotation.param.JdbcConn;
17
import org.jfw.apt.web.annotation.param.RequestBody;
18
import org.jfw.util.PageQueryResult;
19
import org.jfw.util.StringUtil;
20
21
import java.io.IOException;
22
import java.sql.Connection;
23
import java.sql.SQLException;
24
25
/**
26
 * Created by TT on 2017/5/25.
27
 */
28
@Path("/sys/professor")
29
public class ProfessorService {
30
31
    @Autowrie
32
    private ProfessorDao professorDao;
33
    @Autowrie
34
    private OrgDao orgDao;
35
    @Autowrie
36
    private OrgService orgService;
37
38
    public OrgService getOrgService() {
39
        return orgService;
40
    }
41
42
    public void setOrgService(OrgService orgService) {
43
        this.orgService = orgService;
44
    }
45
46
    public OrgDao getOrgDao() {
47
        return orgDao;
48
    }
49
50
    public void setOrgDao(OrgDao orgDao) {
51
        this.orgDao = orgDao;
52
    }
53
54
    public ProfessorDao getProfessorDao() {
55
        return professorDao;
56
    }
57
58
    public void setProfessorDao(ProfessorDao professorDao) {
59
        this.professorDao = professorDao;
60
    }
61
62
    @Post
63
    @Path
64
    public String insert(@JdbcConn(true) Connection con, Professor professor, @Nullable String orgName)
65
            throws SQLException, IOException {
66
        if (professor.getId() == null) {
67
            professor.setId(StringUtil.buildUUID());
68
        }
69
        if (professor.getOrgId() == null && orgName != null) {
70
            if (null != this.orgDao.queryByName(con, orgName)) {
71
                professor.setOrgId(this.orgDao.queryByName(con, orgName));
72
            } else {
73
                professor.setOrgId(this.orgService.createOrganization(con, orgName));
74
            }
75
        }
76
        if (professor.getOrgAuth() == null) {
77
            professor.setOrgAuth("0");
78
        }
79
        this.professorDao.insert(con, professor);
80
        return professor.getId();
81
    }
82
83
    @Put
84
    @Path
85
    public void update(@JdbcConn(true) Connection con, @RequestBody Professor professor) throws SQLException, IOException {
86
        this.professorDao.update(con, professor);
87
    }
88
89
    @Get
90
    @Path("/pq")
91
    public PageQueryResult<ProfessorInfo> pageQuery(@JdbcConn Connection con, @Nullable String enter,@Nullable String orgName, @Nullable String name, @Nullable Integer professorState, @Nullable String bt, @Nullable String et, @DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
92
        String oName = null;
93
        if (orgName != null) {
94
            oName = "%" + orgName + "%";
95
        }
96
        String pname = null;
97
        if (name != null) {
98
            pname = "%" + name + "%";
99
        }
100
        return this.professorDao.pageQuery(con,enter, oName, pname, professorState, bt, et, pageSize, pageNo);
101
    }
102
103
    @Get
104
    @Path("/pqperson")
105
    public PageQueryResult<ProfessorInfo> pageQueryPerson(@JdbcConn Connection con, @LoginUser ConsoleAuthUser cau,@Nullable String orgName, @Nullable String name, @Nullable Integer professorState,@Nullable String bt, @Nullable String et, @DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
106
        String oName = null;
107
        if (orgName != null) {
108
            oName = "%" + orgName + "%";
109
        }
110
        String pname = null;
111
        if (name != null) {
112
            pname = "%" + name + "%";
113
        }
114
        return this.professorDao.pageQueryPerson(con,cau.getId(),oName, pname, professorState, bt, et, pageSize, pageNo);
115
    }
116
117
    @Post
118
    @Path("/check")
119
    public void check(@JdbcConn(true) Connection con, String[] ids,Integer professorState)throws SQLException {
120
        this.professorDao.updateProfessorState(con, ids, professorState);
121
    }
122
}

+ 29 - 0
src/main/java/com/ekexiu/console/system/service/UserService.java

@ -23,10 +23,13 @@ import org.jfw.util.PageQueryResult;
23 23
import org.jfw.util.StringUtil;
24 24
import org.jfw.util.auth.AuthUtil;
25 25
import org.jfw.util.exception.JfwBaseException;
26
import org.jfw.util.jdbc.JdbcUtil;
27
import org.jfw.util.jdbc.ResultSetExtractor;
26 28
import org.jfw.util.web.fileupload.UploadItemIterator;
27 29

28 30
import java.io.IOException;
29 31
import java.sql.Connection;
32
import java.sql.ResultSet;
30 33
import java.sql.SQLException;
31 34
import java.util.ArrayList;
32 35
import java.util.List;
@ -227,4 +230,30 @@ public class UserService extends Upload {
227 230
	public List<Pictable> queryRec(@JdbcConn Connection con, @PathVar String id) throws SQLException {
228 231
		return this.pictableDao.queryRec(con, id);
229 232
	}
233

234
	@Get
235
	@Path("/userName")
236
	public List<TestService.TypeaheadItem> get(@JdbcConn Connection con) throws SQLException{
237
		//String key = null;
238
		//if(q!=null)
239
		//{
240
		//	key= "%"+q+"%";
241
		//}
242
		List<TestService.TypeaheadItem> ret = new ArrayList<>();
243
		//final String finalKey = key;
244
		List<String> typeahead = JdbcUtil.queryList(con, "SELECT NAME FROM CUSER", new ResultSetExtractor<String>() {
245
			@Override
246
			public String extractData(ResultSet resultSet) throws SQLException {
247
				String s1 = resultSet.getString("NAME");
248
				return s1;
249
			}
250
		});
251
		for (String s1 : typeahead) {
252
			TestService.TypeaheadItem thi = new TestService.TypeaheadItem();
253
			thi.setCode(s1);
254
			thi.setCaption(s1);
255
			ret.add(thi);
256
		}
257
		return ret;
258
	}
230 259
}

+ 23 - 3
src/main/resources/project-dev.properties

@ -32,18 +32,35 @@ dataSource.maxPoolPreparedStatementPerConnectionSize::int=20
32 32
#默认的SQL语句自动提交状态(开启或关闭)设置由连接池本身设置(false由连接池定)
33 33
dataSource.defaultAutoCommit::boolean=false
34 34

35

36

35 37
#com_ekexiu_console_system_service_UserService.path::java.io.File=D:/tmp/data
36 38
#com_ekexiu_console_system_service_OrgService.tmpPath::java.io.File=D:/tmp/data/images/tmp
37 39
#com_ekexiu_console_system_service_OrgService.imagePath::java.io.File=D:/tmp/data/images
40
#cachedFileUploadServlet.cachePath::java.io.File=D:/tmp/data/images/tmp
41
#com_ekexiu_console_system_service_OrgService.defaultHeadPhoto::java.io.File=D:/tmp/data/images/default-icon.jpg
42
##机构默认图片保存路径
43
#com_ekexiu_console_system_service_OrgService.defaultOrgLogo::java.io.File=D:/tmp/data/images/default-icon.jpg
44
##资源默认图片保存路径
45
#com_ekexiu_console_system_service_OrgService.defaultResourcePhoto::java.io.File=D:/tmp/data/images/default-icon.jpg
46

47

38 48

39 49
com_ekexiu_console_system_service_OrgService.tmpPath::java.io.File=/kexiu/www/html/images/tmp
40 50
com_ekexiu_console_system_service_OrgService.imagePath::java.io.File=/kexiu/www/html/images
51
cachedFileUploadServlet.cachePath::java.io.File=/kexiu/www/html/images/tmp
52
用户默认头像保存路径
53
com_ekexiu_console_system_service_OrgService.defaultHeadPhoto::java.io.File=/kexiu/www/html/images/default-photo.jpg
54
#机构默认图片保存路径
55
com_ekexiu_console_system_service_OrgService.defaultOrgLogo::java.io.File=/kexiu/www/html/images/default-icon.jpg
56
#资源默认图片保存路径
57
com_ekexiu_console_system_service_OrgService.defaultResourcePhoto::java.io.File=/kexiu/www/html/images/default-icon.jpg
58

59

41 60

42 61
cachedFileUploadServlet=org.jfw.web.servlet.fileupload.cached.CachedUploadServletConfig
43 62
cachedFileUploadServlet.cacheByMemory::boolean=false
44 63
#文件上传默认路径
45
#cachedFileUploadServlet.cachePath::java.io.File=D:/tmp/data/images/tmp
46
cachedFileUploadServlet.cachePath::java.io.File=/kexiu/www/html/images/tmp
47 64
cachedFileUploadServlet.CachedItemValidator-ref=imageValidator
48 65
#文件默认尺寸限制,默认不超过5M
49 66
cachedFileUploadServlet.defaultSizeLimit::long=5242880
@ -74,4 +91,7 @@ mailService_Map.map-val-0::java.lang.String=smtp.mxhichina.com
74 91
mailService_Map.map-key-1::java.lang.String=mail.transport.protocol
75 92
mailService_Map.map-val-1::java.lang.String=smtp
76 93
mailService_Map.map-key-2::java.lang.String=mail.smtp.auth
77
mailService_Map.map-val-2::java.lang.String=true
94
mailService_Map.map-val-2::java.lang.String=true
95

96
com_ekexiu_console_system_service_OrgService.defaultOrgType=1
97


+ 8 - 0
src/main/resources/project-test-dev.properties

@ -32,6 +32,12 @@ dataSource.defaultAutoCommit::boolean=false
32 32
33 33
com_ekexiu_console_system_service_OrgService.tmpPath::java.io.File=/kexiu/www/html/images/tmp
34 34
com_ekexiu_console_system_service_OrgService.imagePath::java.io.File=/kexiu/www/html/images
35
#用户默认头像保存路径
36
com_ekexiu_console_system_service_OrgService.defaultHeadPhoto::java.io.File=/kexiu/www/html/images/default-photo.jpg
37
#机构默认图片保存路径
38
com_ekexiu_console_system_service_OrgService.defaultOrgLogo::java.io.File=/kexiu/www/html/images/default-icon.jpg
39
#资源默认图片保存路径
40
com_ekexiu_console_system_service_OrgService.defaultResourcePhoto::java.io.File=/kexiu/www/html/images/default-icon.jpg
35 41
36 42
cachedFileUploadServlet=org.jfw.web.servlet.fileupload.cached.CachedUploadServletConfig
37 43
cachedFileUploadServlet.cacheByMemory::boolean=false
@ -68,3 +74,5 @@ mailService_Map.map-key-1::java.lang.String=mail.transport.protocol
68 74
mailService_Map.map-val-1::java.lang.String=smtp
69 75
mailService_Map.map-key-2::java.lang.String=mail.smtp.auth
70 76
mailService_Map.map-val-2::java.lang.String=true
77
78
com_ekexiu_console_system_service_OrgService.defaultOrgType=1

+ 9 - 1
src/main/resources/project-test.properties

@ -32,6 +32,12 @@ dataSource.defaultAutoCommit::boolean=false
32 32
33 33
com_ekexiu_console_system_service_OrgService.tmpPath::java.io.File=/kexiu/www/html/images/tmp
34 34
com_ekexiu_console_system_service_OrgService.imagePath::java.io.File=/kexiu/www/html/images
35
#用户默认头像保存路径
36
com_ekexiu_console_system_service_OrgService.defaultHeadPhoto::java.io.File=/kexiu/www/html/images/default-photo.jpg
37
#机构默认图片保存路径
38
com_ekexiu_console_system_service_OrgService.defaultOrgLogo::java.io.File=/kexiu/www/html/images/default-icon.jpg
39
#资源默认图片保存路径
40
com_ekexiu_console_system_service_OrgService.defaultResourcePhoto::java.io.File=/kexiu/www/html/images/default-icon.jpg
35 41
36 42
cachedFileUploadServlet=org.jfw.web.servlet.fileupload.cached.CachedUploadServletConfig
37 43
cachedFileUploadServlet.cacheByMemory::boolean=false
@ -67,4 +73,6 @@ mailService_Map.map-val-0::java.lang.String=smtp.mxhichina.com
67 73
mailService_Map.map-key-1::java.lang.String=mail.transport.protocol
68 74
mailService_Map.map-val-1::java.lang.String=smtp
69 75
mailService_Map.map-key-2::java.lang.String=mail.smtp.auth
70
mailService_Map.map-val-2::java.lang.String=true
76
mailService_Map.map-val-2::java.lang.String=true
77
78
com_ekexiu_console_system_service_OrgService.defaultOrgType=1

+ 10 - 1
src/main/resources/project.properties

@ -33,6 +33,13 @@ dataSource.defaultAutoCommit::boolean=false
33 33
com_ekexiu_console_system_service_OrgService.tmpPath::java.io.File=/kexiu/www/html/images/tmp
34 34
com_ekexiu_console_system_service_OrgService.imagePath::java.io.File=/kexiu/www/html/images
35 35
36
#用户默认头像保存路径
37
com_ekexiu_console_system_service_OrgService.defaultHeadPhoto::java.io.File=/kexiu/www/html/images/default-photo.jpg
38
#机构默认图片保存路径
39
com_ekexiu_console_system_service_OrgService.defaultOrgLogo::java.io.File=/kexiu/www/html/images/default-icon.jpg
40
#资源默认图片保存路径
41
com_ekexiu_console_system_service_OrgService.defaultResourcePhoto::java.io.File=/kexiu/www/html/images/default-icon.jpg
42
36 43
cachedFileUploadServlet=org.jfw.web.servlet.fileupload.cached.CachedUploadServletConfig
37 44
cachedFileUploadServlet.cacheByMemory::boolean=false
38 45
#文件上传默认路径
@ -68,4 +75,6 @@ mailService_Map.map-val-0::java.lang.String=smtp.mxhichina.com
68 75
mailService_Map.map-key-1::java.lang.String=mail.transport.protocol
69 76
mailService_Map.map-val-1::java.lang.String=smtp
70 77
mailService_Map.map-key-2::java.lang.String=mail.smtp.auth
71
mailService_Map.map-val-2::java.lang.String=true
78
mailService_Map.map-val-2::java.lang.String=true
79
80
com_ekexiu_console_system_service_OrgService.defaultOrgType=1