XMTT 6 years ago
parent
commit
898edf9e82

+ 5 - 5
src/main/java/com/ekexiu/project/bridge/collect/CollectDao.java

@ -1,9 +1,5 @@
1 1
package com.ekexiu.project.bridge.collect;
2 2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5
import java.util.List;
6

7 3
import org.jfw.apt.orm.annotation.dao.Batch;
8 4
import org.jfw.apt.orm.annotation.dao.DAO;
9 5
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
@ -14,6 +10,10 @@ import org.jfw.apt.orm.annotation.dao.param.GtEq;
14 10
import org.jfw.apt.orm.annotation.dao.param.In;
15 11
import org.jfw.apt.orm.annotation.dao.param.LtEq;
16 12

13
import java.sql.Connection;
14
import java.sql.SQLException;
15
import java.util.List;
16

17 17
@DAO
18 18
public interface CollectDao {
19 19

@ -25,7 +25,7 @@ public interface CollectDao {
25 25
	int[] insertWaveDataItems(Connection con,List<WaveDataItem> items)throws SQLException;
26 26
	
27 27
	@SelectList
28
	@OrderBy("ORDER BY SEQ,CTIME,DIC,CID")
28
	@OrderBy("ORDER BY SEQ,CTIME,DID,CID")
29 29
	List<WaveDataItem> query(Connection con,@In String[] seq,@Alias("ctime") @GtEq String btime,@Alias("ctime") @LtEq String etime)throws SQLException;
30 30
	
31 31
	@SelectList

+ 3 - 4
src/main/java/com/ekexiu/project/bridge/system/dao/UserDao.java

@ -11,7 +11,6 @@ import org.jfw.apt.orm.annotation.dao.method.Exclude;
11 11
import org.jfw.apt.orm.annotation.dao.method.From;
12 12
import org.jfw.apt.orm.annotation.dao.method.IncludeFixSet;
13 13
import org.jfw.apt.orm.annotation.dao.method.SetSentence;
14
import org.jfw.apt.orm.annotation.dao.method.Where;
15 14
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
16 15
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
17 16
import org.jfw.apt.orm.annotation.dao.method.operator.PageSelect;
@ -22,6 +21,7 @@ import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
22 21
import org.jfw.apt.orm.annotation.dao.param.Like;
23 22
import org.jfw.apt.orm.annotation.dao.param.Set;
24 23
import org.jfw.apt.orm.annotation.dao.param.SqlColumn;
24
import org.jfw.apt.orm.annotation.dao.param.UnEquals;
25 25
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
26 26
import org.jfw.util.PageQueryResult;
27 27
@ -61,8 +61,7 @@ public interface UserDao {
61 61
	int ban(Connection con, @Set String modifier, String id) throws SQLException;
62 62
63 63
	@PageSelect
64
	@Where("active = '1'")
65
	PageQueryResult<User> pageQuery(Connection con, @Nullable String account, @Nullable @Like String name, @Nullable @Like String comp, int pageSize,
64
	PageQueryResult<User> pageQuery(Connection con,@Nullable Boolean active, @Nullable String account, @Nullable @Like String name, @Nullable @Like String comp, int pageSize,
66 65
			int pageNo) throws SQLException;
67 66
68 67
	@UpdateWith
@ -76,7 +75,7 @@ public interface UserDao {
76 75
77 76
	@Nullable
78 77
	@SelectOne
79
	User queryByAccount(Connection con, String account) throws SQLException;
78
	User queryByAccount(Connection con, String account, @Nullable @UnEquals String id) throws SQLException;
80 79
81 80
	@Insert
82 81
	@Batch

+ 5 - 5
src/main/java/com/ekexiu/project/bridge/system/service/SysService.java

@ -128,8 +128,8 @@ public class SysService {
128 128
129 129
	@Get
130 130
	@Path("/check")
131
	public Boolean check(@JdbcConn Connection con,String account)throws SQLException {
132
		return this.userDao.queryByAccount(con, accountid) == null;
131
	public Boolean check(@JdbcConn Connection con,String account,@Nullable String id)throws SQLException {
132
		return this.userDao.queryByAccount(con, account,idid)==null;
133 133
	}
134 134
135 135
	@Get
@ -153,9 +153,9 @@ public class SysService {
153 153
154 154
	@Get
155 155
	@Path("/pq")
156
	public PageQueryResult<SessionUser> pageQuery(@JdbcConn Connection con, @Nullable String account, @Nullable String name, @Nullable String comp,
156
	public PageQueryResult<SessionUser> pageQuery(@JdbcConn Connection con,@Nullable Boolean active, @Nullable String account, @Nullable String name, @Nullable String comp,
157 157
			int pageSize, int pageNo) throws SQLException {
158
		PageQueryResult<User> pageQueryResult = this.userDao.pageQuery(con, account, name == null ? null : "%" + name + "%",
158
		PageQueryResult<User> pageQueryResult = this.userDao.pageQuery(con,active, account, name == null ? null : "%" + name + "%",
159 159
				comp == null ? null : "%" + comp + "%", pageSize, pageNo);
160 160
		List<User> users = pageQueryResult.getData();
161 161
		List<SessionUser> sessionUsers = new ArrayList<>();
@ -197,7 +197,7 @@ public class SysService {
197 197
    @Path("/resetPwMobile")
198 198
    public Object[] resetpwMobile(@JdbcConn(false) Connection con, String account, @DefaultValue("false") boolean checkExists) throws Exception {
199 199
		if (checkExists) {
200
			User user = this.userDao.queryByAccount(con, account);
200
			User user = this.userDao.queryByAccount(con, account,null);
201 201
			if (null == user) {
202 202
				throw new JfwBaseException(-60000, "not found account");
203 203
			}