XMTT лет назад: 6
Родитель
Сommit
1e91c56099

+ 6 - 1
src/main/java/com/ekexiu/project/storage/system/dao/UserDao.java

@ -53,9 +53,14 @@ public interface UserDao {
53 53
    @SetSentence("active = '0'")
54 54
    int ban(Connection con, String id) throws SQLException;
55 55
56
    @UpdateWith
57
    @From(User.class)
58
    @SetSentence("active = '1'")
59
    int active(Connection con, String id) throws SQLException;
60
56 61
    @Nullable
57 62
    @SelectOne
58
    User queryByAccount(Connection con, String account, @Nullable @UnEquals String id) throws SQLException;
63
    User queryByAccount(Connection con,@Nullable Boolean active, String account, @Nullable @UnEquals String id) throws SQLException;
59 64
60 65
    @PageSelect
61 66
    @OrderBy("ORDER BY CREATE_TIME")

+ 0 - 3
src/main/java/com/ekexiu/project/storage/system/po/User.java

@ -4,8 +4,6 @@ import com.ekexiu.project.storage.base.po.CreateTimeSupported;
4 4
import org.jfw.apt.orm.annotation.entry.Column;
5 5
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
6 6
import org.jfw.apt.orm.annotation.entry.Table;
7
import org.jfw.apt.orm.annotation.entry.Unique;
8
import org.jfw.apt.orm.annotation.entry.Uniques;
9 7
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
10 8
import org.jfw.apt.orm.core.enums.DE;
11 9
@ -14,7 +12,6 @@ import org.jfw.apt.orm.core.enums.DE;
14 12
 */
15 13
@Table(descp = "用户表", value = "LUSER")
16 14
@PrimaryKey("id")
17
@Uniques({@Unique(clolumns = "account", name = "UC_LUSER_ACCOUNT")})
18 15
public class User implements CreateTimeSupported {
19 16
20 17
    private String id;

+ 9 - 2
src/main/java/com/ekexiu/project/storage/system/service/SysService.java

@ -115,8 +115,8 @@ public class SysService {
115 115
    @Get
116 116
    @Path("/check")
117 117
    @LoginUser
118
    public Boolean check(@JdbcConn Connection con,String account,@Nullable String id)throws SQLException {
119
        return this.userDao.queryByAccount(con, account,id)==null;
118
    public Boolean check(@JdbcConn Connection con,@Nullable Boolean active, String account,@Nullable String id)throws SQLException {
119
        return this.userDao.queryByAccount(con,active, account,id)==null;
120 120
    }
121 121
122 122
    @Get
@ -140,6 +140,13 @@ public class SysService {
140 140
        this.userDao.ban(con, id);
141 141
    }
142 142
143
    @Get
144
    @Path("/active")
145
    @LoginUser
146
    public void active(@JdbcConn(true) Connection con, String id) throws SQLException {
147
        this.userDao.active(con, id);
148
    }
149
143 150
    @Get
144 151
    @Path("/pq")
145 152
    @LoginUser