|
@@ -40,18 +40,18 @@ public class FaceServicelimpl implements FaceServiceI {
|
40
|
40
|
|
41
|
41
|
@Override
|
42
|
42
|
@Transactional(rollbackFor = Exception.class)
|
43
|
|
- public ResponseBean addFace(Integer userid, MultipartFile uploadFile,Integer otherUserID) {
|
|
43
|
+ public ResponseBean addFace(Integer userid, MultipartFile uploadFile,Integer otherUserId) {
|
44
|
44
|
ResponseBean responseBean= new ResponseBean();
|
45
|
45
|
String faceImg =img(uploadFile);
|
46
|
|
- /**当otherUserID不为空时判断它是否是业主下的租客或者家属*/
|
47
|
|
- if (null!= otherUserID && !userid.equals(otherUserID)) {
|
48
|
|
- responseBean = getTaFaceParentId(userid, otherUserID);
|
|
46
|
+ /**当otherUserId不为空时判断它是否是业主下的租客或者家属*/
|
|
47
|
+ if (null!= otherUserId && !userid.equals(otherUserId)) {
|
|
48
|
+ responseBean = getTaFaceParentId(userid, otherUserId);
|
49
|
49
|
if ("1".equals(responseBean.getCode())){
|
50
|
50
|
responseBean.getMessage();
|
51
|
51
|
return responseBean;
|
52
|
52
|
}
|
53
|
53
|
}
|
54
|
|
- Integer activeUser = otherUserID == null?userid:otherUserID;
|
|
54
|
+ Integer activeUser = otherUserId == null?userid:otherUserId;
|
55
|
55
|
TaUser user = taUserMapper.selectByPrimaryKey(activeUser);
|
56
|
56
|
TaFace taFace = new TaFace();
|
57
|
57
|
taFace.setFaceImg(faceImg);
|
|
@@ -63,7 +63,7 @@ public class FaceServicelimpl implements FaceServiceI {
|
63
|
63
|
taFace.setUpdateDate(new Date());
|
64
|
64
|
|
65
|
65
|
/*验证身份*/
|
66
|
|
- responseBean=addVerify( activeUser, uploadFile, otherUserID, faceImg, taFace) ;
|
|
66
|
+ responseBean=addVerify( activeUser, uploadFile, otherUserId, faceImg, taFace) ;
|
67
|
67
|
return responseBean;
|
68
|
68
|
}
|
69
|
69
|
|
|
@@ -71,22 +71,22 @@ public class FaceServicelimpl implements FaceServiceI {
|
71
|
71
|
* 修改人脸信息
|
72
|
72
|
* @param userId 登入人ID
|
73
|
73
|
* @param uploadFile
|
74
|
|
- * @param otherUserID 关联家属或者租客ID
|
|
74
|
+ * @param otherUserId 关联家属或者租客ID
|
75
|
75
|
* @return
|
76
|
76
|
*/
|
77
|
77
|
@Override
|
78
|
78
|
@Transactional(rollbackFor = Exception.class)
|
79
|
|
- public ResponseBean upDateFace(Integer userId, MultipartFile uploadFile,Integer otherUserID) {
|
|
79
|
+ public ResponseBean upDateFace(Integer userId, MultipartFile uploadFile,Integer otherUserId) {
|
80
|
80
|
boolean isA = false;
|
81
|
81
|
ResponseBean responseBean= new ResponseBean();
|
82
|
82
|
String faceImg =img(uploadFile);
|
83
|
|
- if (null!= otherUserID && !userId.equals(otherUserID)) {
|
84
|
|
- responseBean = getTaFaceParentId(userId, otherUserID);
|
|
83
|
+ if (null!= otherUserId && !userId.equals(otherUserId)) {
|
|
84
|
+ responseBean = getTaFaceParentId(userId, otherUserId);
|
85
|
85
|
if ("1".equals(responseBean.getCode())) {
|
86
|
86
|
responseBean.getMessage();
|
87
|
87
|
return responseBean;
|
88
|
88
|
}}
|
89
|
|
- Integer activeUser = otherUserID == null?userId:otherUserID;
|
|
89
|
+ Integer activeUser = otherUserId == null?userId:otherUserId;
|
90
|
90
|
//当前修改的id否存在
|
91
|
91
|
TaFace face = taFaceMapper.getByUserId(activeUser);
|
92
|
92
|
if (null == face){
|
|
@@ -157,17 +157,17 @@ public class FaceServicelimpl implements FaceServiceI {
|
157
|
157
|
*获得用户,租客,家属,其中一种身份的信息
|
158
|
158
|
*/
|
159
|
159
|
@Override
|
160
|
|
- public ResponseBean getTaFaceByUserId(Integer userId,Integer otherUserID) {
|
|
160
|
+ public ResponseBean getTaFaceByUserId(Integer userId,Integer otherUserId) {
|
161
|
161
|
ResponseBean responseBean= new ResponseBean();
|
162
|
|
- /**当otherUserID不为空时判断它是否是业主下的租客或者家属*/
|
163
|
|
- if (null!= otherUserID && !userId.equals(otherUserID)) {
|
164
|
|
- responseBean = getTaFaceParentId(userId, otherUserID);
|
|
162
|
+ /**当otherUserId不为空时判断它是否是业主下的租客或者家属*/
|
|
163
|
+ if (null!= otherUserId && !userId.equals(otherUserId)) {
|
|
164
|
+ responseBean = getTaFaceParentId(userId, otherUserId);
|
165
|
165
|
if ("1".equals(responseBean.getCode())) {
|
166
|
166
|
responseBean.getMessage();
|
167
|
167
|
return responseBean;
|
168
|
168
|
}
|
169
|
169
|
}
|
170
|
|
- Integer id = otherUserID == null?userId:otherUserID;
|
|
170
|
+ Integer id = otherUserId == null?userId:otherUserId;
|
171
|
171
|
TaFace face = taFaceMapper.getByUserId(id);
|
172
|
172
|
if (null!= face){
|
173
|
173
|
responseBean.addSuccess(face);
|
|
@@ -181,10 +181,10 @@ public class FaceServicelimpl implements FaceServiceI {
|
181
|
181
|
/**
|
182
|
182
|
*判断当前用户下的人员关系(家属,租客)
|
183
|
183
|
*/
|
184
|
|
- public ResponseBean getTaFaceParentId(Integer userId,Integer otherUserID){
|
|
184
|
+ public ResponseBean getTaFaceParentId(Integer userId,Integer otherUserId){
|
185
|
185
|
ResponseBean responseBean= new ResponseBean();
|
186
|
|
-/* TaUser user = taUserMapper.selectTaFaceParentId(userId,otherUserID);*/
|
187
|
|
- TaUser users= taUserMapper.selectByPrimaryKey(otherUserID);
|
|
186
|
+/* TaUser user = taUserMapper.selectTaFaceParentId(userId,otherUserId);*/
|
|
187
|
+ TaUser users= taUserMapper.selectByPrimaryKey(otherUserId);
|
188
|
188
|
if (null!= users && !users.getParentId().equals(userId)){
|
189
|
189
|
responseBean.addError("您输入的家属或租户ID有误");
|
190
|
190
|
return responseBean;
|
|
@@ -208,7 +208,7 @@ public class FaceServicelimpl implements FaceServiceI {
|
208
|
208
|
/**
|
209
|
209
|
*各种身份校验
|
210
|
210
|
*/
|
211
|
|
- public ResponseBean addVerify(Integer userid, MultipartFile uploadFile,Integer otherUserID,String faceImg,TaFace taFace) {
|
|
211
|
+ public ResponseBean addVerify(Integer userid, MultipartFile uploadFile,Integer otherUserId,String faceImg,TaFace taFace) {
|
212
|
212
|
ResponseBean response = new ResponseBean();
|
213
|
213
|
TaSysRole sysRole = taSysRoleMapper.findRoleByUserId(userid);
|
214
|
214
|
TaUser taUser = taUserMapper.selectByPrimaryKey(userid);
|