XMTT 8 years ago
parent
commit
581d5a5ea3

+ 11 - 1
src/main/java/com/ekexiu/console/system/dao/PictableDao.java

@ -1,11 +1,21 @@
1 1
package com.ekexiu.console.system.dao;
2 2
3
import com.ekexiu.console.system.po.Pictable;
3 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.QueryList;
7
8
import java.sql.Connection;
9
import java.sql.SQLException;
10
import java.util.List;
4 11
5 12
/**
6 13
 * Created by TT on 2017/4/19.
7 14
 */
8 15
@DAO
9
public class PictableDao {
16
public interface PictableDao {
10 17
18
    @QueryList
19
    @OrderBy("ORDER BY CREATE_TIME")
20
    List<Pictable> queryRec(Connection con, String cuserId)throws SQLException;
11 21
}

+ 5 - 5
src/main/java/com/ekexiu/console/system/po/Pictable.java

@ -12,7 +12,7 @@ import org.jfw.apt.orm.core.enums.DE;
12 12
public class Pictable {
13 13
14 14
    private String createTime;
15
    private String cuser_id;
15
    private String cuserId;
16 16
    private Integer znum;
17 17
    private Integer jnum;
18 18
    private Integer ljnum;
@ -28,12 +28,12 @@ public class Pictable {
28 28
    }
29 29
30 30
    @Column(DE.id_32)
31
    public String getCuser_id() {
32
        return cuser_id;
31
    public String getCuserId() {
32
        return cuserId;
33 33
    }
34 34
35
    public void setCuser_id(String cuser_id) {
36
        this.cuser_id = cuser_id;
35
    public void setCuserId(String cuserId) {
36
        this.cuserId = cuserId;
37 37
    }
38 38
39 39
    @Column(handlerClass = WIntHandler.class, dbType = "INT", insertable = true, nullable = false, renewable = false, queryable = true)

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

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

3 3
import com.ekexiu.console.service.Upload;
4
import com.ekexiu.console.system.dao.PictableDao;
4 5
import com.ekexiu.console.system.dao.RoleDao;
5 6
import com.ekexiu.console.system.dao.UserDao;
7
import com.ekexiu.console.system.po.Pictable;
6 8
import com.ekexiu.console.system.po.Role;
7 9
import com.ekexiu.console.system.po.User;
8 10
import com.ekexiu.console.system.vo.ConsoleAuthUser;
@ -27,6 +29,7 @@ import java.io.IOException;
27 29
import java.sql.Connection;
28 30
import java.sql.SQLException;
29 31
import java.util.ArrayList;
32
import java.util.List;
30 33

31 34
@Path("/sys/user")
32 35
public class UserService extends Upload {
@ -37,6 +40,16 @@ public class UserService extends Upload {
37 40
	private UserDao userDao;
38 41
	@Autowrie
39 42
	RoleDao roleDao;
43
	@Autowrie
44
	private PictableDao pictableDao;
45

46
	public PictableDao getPictableDao() {
47
		return pictableDao;
48
	}
49

50
	public void setPictableDao(PictableDao pictableDao) {
51
		this.pictableDao = pictableDao;
52
	}
40 53

41 54
	public RoleDao getRoleDao() {
42 55
		return roleDao;
@ -182,4 +195,10 @@ public class UserService extends Upload {
182 195
	public User query(@JdbcConn Connection con, @PathVar String id)throws SQLException {
183 196
		return this.userDao.queryById(con, id);
184 197
	}
198

199
	@Get
200
	@Path("/pictable/{id}")
201
	public List<Pictable> queryRec(@JdbcConn Connection con, @PathVar String id) throws SQLException {
202
		return this.pictableDao.queryRec(con, id);
203
	}
185 204
}