dingxin пре 6 година
родитељ
комит
d2df05ee84

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java Прегледај датотеку

@@ -63,5 +63,5 @@ public interface TaUserMapper {
63 63
      * @param phone
64 64
      * @return
65 65
      */
66
-    TaUser getByLoginName(@Param("communityId")Integer communityId, @Param("phone")String phone);
66
+    TaUser getByLoginName(@Param("id")Integer communityId, @Param("id")String phone);
67 67
 }

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java Прегледај датотеку

@@ -211,7 +211,7 @@ public class FaceServicelimpl implements FaceServiceI {
211 211
         }
212 212
         //身份为家属租客,状态为已停用
213 213
         if (null!=taUser && null!=sysRole){
214
-            if (Constant.INVALID.equals(taUser.getStatus()) && (Constant.RELATION.equals(sysRole.getRoleName())) || Constant.TENANT.equals(sysRole.getRoleName())){
214
+            if (Constant.INVALID.equals(taUser.getStatus()) && ((Constant.RELATION.equals(sysRole.getRoleName())) || Constant.TENANT.equals(sysRole.getRoleName()))){
215 215
                 response.addError("9996", "您的身份已停用,请联系物业");
216 216
                 return response;
217 217
             }
@@ -232,7 +232,7 @@ public class FaceServicelimpl implements FaceServiceI {
232 232
                 return resps;
233 233
             }
234 234
             //家属或者租客,已认证
235
-            if (Constant.RELATION.equals(sysRole.getRoleName()) || Constant.TENANT.equals(sysRole.getDescription()) && "1".equals(taUser.getVerifyStatus())) {
235
+            if (Constant.RELATION.equals(sysRole.getRoleName()) || Constant.TENANT.equals(sysRole.getRoleName()) && "1".equals(taUser.getVerifyStatus())) {
236 236
                 ResponseBean resps = checKout(faceImg, taFace, isA, uploadFile, userid);
237 237
                 if (resps.getCode().equals("0")) {
238 238
                     taUser.setFaceStatus("1");

+ 12
- 6
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Прегледај датотеку

@@ -311,21 +311,27 @@
311 311
 
312 312
   <select id="selectTaFaceParentId" parameterType="java.lang.Integer" resultMap="BaseResultMap" >
313 313
     select
314
-    <include refid="Base_Column_List" />
314
+      <include refid="Base_Column_List" />
315 315
     from ta_user
316
-    where id = #{id,jdbcType=INTEGER}
316
+    where 1=1
317 317
     <if test="otherUserID != null" >
318
-     and parent_id = #{otherUserID}
318
+     and id = #{otherUserID,jdbcType=INTEGER}
319 319
     </if>
320
-
320
+    <if test="id != null" >
321
+     and parent_id = #{id}
322
+    </if>
323
+    limit 1
321 324
   </select>
322 325
 
323
-  <select id="getByLoginName" parameterType="com.community.huiju.model.TaUser" resultMap="BaseResultMap" >
326
+  <select id="getByLoginName" parameterType="java.lang.Integer" resultMap="BaseResultMap" >
324 327
     select
325 328
     <include refid="Base_Column_List" />
326 329
     from ta_user
327 330
     where community_id = #{communityId,jdbcType=INTEGER}
328
-      and login_name = #{phone ,jdbcType=VARCHAR}
331
+    <if test="otherUserID != null" >
332
+      and login_name = #{phone}
333
+    </if>
334
+
329 335
   </select>
330 336
 
331 337
 </mapper>