|
|
@@ -22,10 +22,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
22
|
22
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
23
|
23
|
import org.springframework.beans.factory.annotation.Value;
|
|
24
|
24
|
import org.springframework.http.MediaType;
|
|
25
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
26
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
27
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
28
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
25
|
+import org.springframework.web.bind.annotation.*;
|
|
29
|
26
|
|
|
30
|
27
|
import com.alibaba.fastjson.JSONArray;
|
|
31
|
28
|
import com.alibaba.fastjson.JSONObject;
|
|
|
@@ -249,10 +246,10 @@ public class UserInfoController {
|
|
249
|
246
|
@RequestMapping(value="/login", method = RequestMethod.POST)
|
|
250
|
247
|
@ApiOperation(value="用户登录", notes = "用户登录")
|
|
251
|
248
|
@ApiImplicitParams({
|
|
252
|
|
- @ApiImplicitParam(name = "username", value = "用户名", paramType = "form"),
|
|
253
|
|
- @ApiImplicitParam(name = "password", value = "密码", paramType = "form"),
|
|
254
|
|
- @ApiImplicitParam(name = "yzm", value = "验证码", paramType = "form"),
|
|
255
|
|
- @ApiImplicitParam(name = "from", value = "来源,app代表来自于移动端", paramType = "form")
|
|
|
249
|
+ @ApiImplicitParam(name = "username", value = "用户名", paramType = "query"),
|
|
|
250
|
+ @ApiImplicitParam(name = "password", value = "密码", paramType = "query"),
|
|
|
251
|
+ @ApiImplicitParam(name = "yzm", value = "验证码", paramType = "query"),
|
|
|
252
|
+ @ApiImplicitParam(name = "from", value = "来源,app代表来自于移动端", paramType = "query")
|
|
256
|
253
|
})
|
|
257
|
254
|
public Map<String, Object> Login(HttpServletRequest request, String username, String password, String yzm, String from) {
|
|
258
|
255
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
@@ -299,7 +296,15 @@ public class UserInfoController {
|
|
299
|
296
|
map.put("success", "手机验证码错误或者已过期!");
|
|
300
|
297
|
return map;
|
|
301
|
298
|
}*/
|
|
302
|
|
-
|
|
|
299
|
+
|
|
|
300
|
+ // 判断是否启用(离职状态)
|
|
|
301
|
+ String zgzt = userInfo.getZgzt();
|
|
|
302
|
+ if ("02".equals(zgzt)) {
|
|
|
303
|
+ map.put("status", false);
|
|
|
304
|
+ map.put("success", "该用户名为离职状态!");
|
|
|
305
|
+ return map;
|
|
|
306
|
+ }
|
|
|
307
|
+
|
|
303
|
308
|
int limitTime = Integer.parseInt(loginTime);
|
|
304
|
309
|
/**************************用户登录失败处理功能,限制用户非法登录次数************************/
|
|
305
|
310
|
if(userInfo == null) {//密码输入错误
|
|
|
@@ -1054,4 +1059,10 @@ public class UserInfoController {
|
|
1054
|
1059
|
}
|
|
1055
|
1060
|
return flag;
|
|
1056
|
1061
|
}
|
|
|
1062
|
+
|
|
|
1063
|
+ @GetMapping("/getBySfzhm/{sfzhm}/{orgId}")
|
|
|
1064
|
+ @ApiOperation(value="查询员工信息详情", notes = "身份证号和orgId")
|
|
|
1065
|
+ public UserInfo getBySfzhm(@PathVariable("sfzhm") String sfzhm,@PathVariable("orgId") Integer orgId) {
|
|
|
1066
|
+ return userInfoService.getBySfzhm(sfzhm, orgId);
|
|
|
1067
|
+ }
|
|
1057
|
1068
|
}
|