|
@@ -44,7 +44,7 @@ public class FaceServicelimpl implements FaceServiceI {
|
44
|
44
|
ResponseBean responseBean= new ResponseBean();
|
45
|
45
|
String faceImg =img(uploadFile);
|
46
|
46
|
/**当otherUserId不为空时判断它是否是业主下的租客或者家属*/
|
47
|
|
- if (null!= otherUserId && !userid.equals(otherUserId)) {
|
|
47
|
+ if (null!= otherUserId) {
|
48
|
48
|
responseBean = getTaFaceParentId(userid, otherUserId);
|
49
|
49
|
if ("1".equals(responseBean.getCode())){
|
50
|
50
|
responseBean.getMessage();
|
|
@@ -80,7 +80,7 @@ public class FaceServicelimpl implements FaceServiceI {
|
80
|
80
|
boolean isA = false;
|
81
|
81
|
ResponseBean responseBean= new ResponseBean();
|
82
|
82
|
String faceImg =img(uploadFile);
|
83
|
|
- if (null!= otherUserId && !userId.equals(otherUserId)) {
|
|
83
|
+ if (null!= otherUserId) {
|
84
|
84
|
responseBean = getTaFaceParentId(userId, otherUserId);
|
85
|
85
|
if ("1".equals(responseBean.getCode())) {
|
86
|
86
|
responseBean.getMessage();
|
|
@@ -160,7 +160,7 @@ public class FaceServicelimpl implements FaceServiceI {
|
160
|
160
|
public ResponseBean getTaFaceByUserId(Integer userId,Integer otherUserId) {
|
161
|
161
|
ResponseBean responseBean= new ResponseBean();
|
162
|
162
|
/**当otherUserId不为空时判断它是否是业主下的租客或者家属*/
|
163
|
|
- if (null!= otherUserId && !userId.equals(otherUserId)) {
|
|
163
|
+ if (null!= otherUserId) {
|
164
|
164
|
responseBean = getTaFaceParentId(userId, otherUserId);
|
165
|
165
|
if ("1".equals(responseBean.getCode())) {
|
166
|
166
|
responseBean.getMessage();
|
|
@@ -182,12 +182,13 @@ public class FaceServicelimpl implements FaceServiceI {
|
182
|
182
|
*判断当前用户下的人员关系(家属,租客)
|
183
|
183
|
*/
|
184
|
184
|
public ResponseBean getTaFaceParentId(Integer userId,Integer otherUserId){
|
185
|
|
- ResponseBean responseBean= new ResponseBean();
|
186
|
|
-/* TaUser user = taUserMapper.selectTaFaceParentId(userId,otherUserId);*/
|
|
185
|
+ ResponseBean responseBean= new ResponseBean();
|
187
|
186
|
TaUser users= taUserMapper.selectByPrimaryKey(otherUserId);
|
188
|
|
- if (null!= users && !users.getParentId().equals(userId)){
|
189
|
|
- responseBean.addError("您输入的家属或租户ID有误");
|
190
|
|
- return responseBean;
|
|
187
|
+ if (null == users || !userId.equals(users.getParentId())){
|
|
188
|
+ responseBean.addError("您输入的家属或租户ID有误");
|
|
189
|
+
|
|
190
|
+ }else if (userId.equals(otherUserId)){
|
|
191
|
+ responseBean.addError("您输入的家属或租户ID有误");
|
191
|
192
|
}
|
192
|
193
|
return responseBean;
|
193
|
194
|
}
|