|
@@ -28,6 +28,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
28
|
28
|
import org.springframework.web.bind.annotation.*;
|
29
|
29
|
|
30
|
30
|
import javax.servlet.http.HttpServletRequest;
|
|
31
|
+
|
|
32
|
+import java.time.LocalDateTime;
|
31
|
33
|
import java.util.ArrayList;
|
32
|
34
|
import java.util.HashMap;
|
33
|
35
|
import java.util.List;
|
|
@@ -336,10 +338,15 @@ public class TaUserController extends BaseController {
|
336
|
338
|
return ResponseBean.error("用户名或密码错误", ResponseBean.ERROR_ILLEGAL_PARAMS);
|
337
|
339
|
}
|
338
|
340
|
|
|
341
|
+ if (taUser.getExpDate().isBefore(LocalDateTime.now())){
|
|
342
|
+ return ResponseBean.error("该账号已经过期,请联系管理员", ResponseBean.ERROR_UNAVAILABLE);
|
|
343
|
+ }
|
|
344
|
+
|
339
|
345
|
if (!taUser.getStatus().equals(CommConstant.STATUS_NORMAL) ) {
|
340
|
346
|
return ResponseBean.error("该账号已经停用,请联系管理员", ResponseBean.ERROR_UNAVAILABLE);
|
341
|
347
|
}
|
342
|
348
|
|
|
349
|
+
|
343
|
350
|
List<TaRole> roles = iTaRoleService.getRolesByUser(taUser.getUserId());
|
344
|
351
|
taUser.setRoles(roles);
|
345
|
352
|
taUser.setLoginPassword("");
|