Showing
2 changed files
with
4 additions
and
4 deletions
@@ -3807,14 +3807,13 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport | @@ -3807,14 +3807,13 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport | ||
3807 | identityCard.setStatus((byte)1); | 3807 | identityCard.setStatus((byte)1); |
3808 | identityCard.setCreateTime(DateUtil.getCurrentTimeSecond()); | 3808 | identityCard.setCreateTime(DateUtil.getCurrentTimeSecond()); |
3809 | identityCard.setUpdateTime(identityCard.getCreateTime()); | 3809 | identityCard.setUpdateTime(identityCard.getCreateTime()); |
3810 | - // 查询是否存在 | ||
3811 | - UnionShareUserIdentityCard identityCardDb = unionShareUserIdentityCardMapper.selectByUid(bo.getUid()); | 3810 | + // 查询是否有正常状态的身份证照片 |
3811 | + UnionShareUserIdentityCard identityCardDb = unionShareUserIdentityCardMapper.selectActiveByUid(bo.getUid()); | ||
3812 | int result = 0; | 3812 | int result = 0; |
3813 | if(identityCardDb==null){ | 3813 | if(identityCardDb==null){ |
3814 | result = unionShareUserIdentityCardMapper.insert(identityCard); | 3814 | result = unionShareUserIdentityCardMapper.insert(identityCard); |
3815 | }else{ | 3815 | }else{ |
3816 | - identityCard.setId(identityCardDb.getId()); | ||
3817 | - result = unionShareUserIdentityCardMapper.updateByPrimaryKey(identityCard); | 3816 | + throw new ServiceException(ServiceError.UNION_IDENTITYCARD_EXIST_ERROR); |
3818 | } | 3817 | } |
3819 | redisHashCache.delete(ShareOrdersKeyEnum.USER_SETTLEMENT.getPreKey(), bo.getUid()); | 3818 | redisHashCache.delete(ShareOrdersKeyEnum.USER_SETTLEMENT.getPreKey(), bo.getUid()); |
3820 | return result; | 3819 | return result; |
-
Please register or login to post a comment