gongdecai пре 3 година
родитељ
комит
6b924586ff

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CommonUser.java

@@ -92,7 +92,7 @@ public class CommonUser extends BaseModel<CommonUser> {
      * 身份信息
      */
     @TableField(exist = false)
-    private List<IdentityAuthenticationInfo> identityAuthenticationInfoList ;
+    private String  identityFlag ;
 
 
     @Override

+ 25 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java

@@ -5,11 +5,13 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.yh.saas.plugin.yiliangyiyun.entity.CacheComponent;
 import com.yh.saas.plugin.yiliangyiyun.entity.CommonUser;
+import com.yh.saas.plugin.yiliangyiyun.entity.DriverViewInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.IdentityAuthenticationInfo;
 import com.yh.saas.plugin.yiliangyiyun.exception.AppServiceException;
 import com.yh.saas.plugin.yiliangyiyun.exception.ExceptionDefinition;
 import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
 import com.yh.saas.plugin.yiliangyiyun.mapper.CommonUserMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.IDriverViewInfoService;
 import com.yh.saas.plugin.yiliangyiyun.service.IIdentityAuthenticationInfoService;
 import com.yh.saas.plugin.yiliangyiyun.util.*;
 import com.yh.saas.plugin.yiliangyiyun.service.ICommonUserService;
@@ -54,6 +56,9 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     @Autowired
     private IIdentityAuthenticationInfoService iIdentityAuthenticationInfoService;
 
+    @Autowired
+    private IDriverViewInfoService iDriverViewInfoService;
+
     Connection  coon=null;
     Connection  coon1=null;
     @Value("com.mysql.jdbc.Driver")
@@ -239,7 +244,16 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         this.updateById(userDO);
         List<IdentityAuthenticationInfo> identityAuthenticationInfos = iIdentityAuthenticationInfoService.selectList(new EntityWrapper<IdentityAuthenticationInfo>().eq("customer_phone",userDTO.getPhone())
                 .eq("delete_flag","0").eq("authentication_status","7"));
-        userDTO.setIdentityAuthenticationInfoList(identityAuthenticationInfos);
+        List<DriverViewInfo> driverViewInfos = iDriverViewInfoService.selectList(new EntityWrapper<DriverViewInfo>()
+                .eq("driver_phone",userDTO.getPhone()));
+        String flag = null;
+        if(!CollectionUtils.isEmpty(identityAuthenticationInfos)){
+            flag = "1";
+        }
+        if(!CollectionUtils.isEmpty(driverViewInfos)){
+            flag = flag+ "2";
+        }
+        userDTO.setIdentityFlag(flag);
         return userDTO;
     }
 
@@ -308,7 +322,16 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         this.updateById(userDO);
         List<IdentityAuthenticationInfo> identityAuthenticationInfos = iIdentityAuthenticationInfoService.selectList(new EntityWrapper<IdentityAuthenticationInfo>().eq("customer_phone",user.getPhone())
                 .eq("delete_flag","0").eq("authentication_status","7"));
-        user.setIdentityAuthenticationInfoList(identityAuthenticationInfos);
+        List<DriverViewInfo> driverViewInfos = iDriverViewInfoService.selectList(new EntityWrapper<DriverViewInfo>()
+        .eq("driver_phone",user.getPhone()));
+        String flag = null;
+        if(!CollectionUtils.isEmpty(identityAuthenticationInfos)){
+            flag = "1";
+        }
+        if(!CollectionUtils.isEmpty(driverViewInfos)){
+            flag = flag+ "2";
+        }
+        user.setIdentityFlag(flag);
         return user;
     }