|
@@ -4,7 +4,6 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
@@ -31,10 +30,10 @@ public class EmployeeInfoController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private EmployeeInfoService employeeInfoService;
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private EmployeeVisitService employeeVisitService;
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
|
|
@@ -47,15 +46,11 @@ public class EmployeeInfoController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
return failed("用户信息获取失败");
|
|
|
}
|
|
|
- List<EmployeeInfo> infoList = employeeInfoService.findByPhone(employeeInfo.getMobileNo());
|
|
|
- if(infoList != null && infoList.size() > 2){
|
|
|
- return failed("该手机号已在系统中存在多条,请更新原有数据");
|
|
|
- }
|
|
|
- if(infoList != null && infoList.size() > 0){
|
|
|
+ EmployeeInfo info = employeeInfoService.findByPhone(employeeInfo.getMobileNo());
|
|
|
+ if(info != null){
|
|
|
if(employeeInfo.getCover()){
|
|
|
- EmployeeInfo info = infoList.get(0);
|
|
|
- employeeInfo.setId(info.getId());
|
|
|
employeeInfo.setOperatorId(sysUser.getId());
|
|
|
+ employeeInfo.setId(info.getId());
|
|
|
Date date = new Date();
|
|
|
employeeInfo.setUpdateTime(date);
|
|
|
employeeInfo.setCreateTime(date);
|